OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
set_u_sens_spmd_node_list.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| set_u_sens_spmd_node_list ../starter/source/tools/sensor/set_u_sens_spmd_node_list.F
25!||--- uses -----------------------------------------------------
26!|| user_interface_mod ../starter/source/modules/user_interface_mod.F90
27!||====================================================================
28 INTEGER FUNCTION set_u_sens_spmd_node_list(ARRAY,SIZE_ARRAY)
29!$COMMENT
30! SET_U_SENS_SPMD_NODE_LIST description
31! User function to save a list of nodes in a Radioss buffer
32!
33! SET_U_SENS_SPMD_NODE_LIST organization :
34! - check if the size of %NODE_LIST is sufficient
35! and reallocate the array if the size is not sufficient
36! - save the nodes in %NODE_LIST
37!$ENDCOMMENT
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE user_interface_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C A n a l y s e M o d u l e
48C-----------------------------------------------
49#include "com04_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER, INTENT(in) :: size_array
54 INTEGER, DIMENSION(SIZE_ARRAY), INTENT(in) :: array
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER :: i,j
59 INTEGER, DIMENSION(:), ALLOCATABLE :: local_array
60! -------------------------------
61 j = sensor_user_struct%POINTER_NODE
62 DO i=1,size_array
63 j = j + 1
64 IF(j>sensor_user_struct%NUMBER_NODE) THEN
65 sensor_user_struct%NUMBER_NODE = sensor_user_struct%NUMBER_NODE + numnod
66 ALLOCATE( local_array(sensor_user_struct%NUMBER_NODE) )
67
68 local_array(1:j-1) = sensor_user_struct%NODE_LIST(j-1)
69
70 DEALLOCATE( sensor_user_struct%NODE_LIST )
71 ALLOCATE( sensor_user_struct%NODE_LIST( sensor_user_struct%NUMBER_NODE ) )
72
73 sensor_user_struct%NODE_LIST(1:j-1) = local_array(1:j-1)
74 sensor_user_struct%NODE_LIST(j:sensor_user_struct%NUMBER_NODE) = 0
75
76 DEALLOCATE( local_array )
77 ENDIF
78 sensor_user_struct%NODE_LIST(j) = array(i)
79 ENDDO
80
81 sensor_user_struct%POINTER_NODE = j
82
84 RETURN
85 END FUNCTION set_u_sens_spmd_node_list
integer function set_u_sens_spmd_node_list(array, size_array)