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 : save in a Radioss buffer
32! a list of node
33!
34! SET_U_SENS_SPMD_NODE_LIST organization :
35! - check if the size of %NODE_LIST is sufficient
36! and reallocate the array if the size is not sufficient
37! - save the node in %NODE_LIST
38!$ENDCOMMENT
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE user_interface_mod
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C A n a l y s e M o d u l e
49C-----------------------------------------------
50#include "com04_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER, INTENT(in) :: size_array
55 INTEGER, DIMENSION(SIZE_ARRAY), INTENT(in) :: array
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER :: i,j
60 INTEGER, DIMENSION(:), ALLOCATABLE :: local_array
61! -------------------------------
62 j = sensor_user_struct%POINTER_NODE
63 DO i=1,size_array
64 j = j + 1
65 IF(j>sensor_user_struct%NUMBER_NODE) THEN
66 sensor_user_struct%NUMBER_NODE = sensor_user_struct%NUMBER_NODE + numnod
67 ALLOCATE( local_array(sensor_user_struct%NUMBER_NODE) )
68
69 local_array(1:j-1) = sensor_user_struct%NODE_LIST(j-1)
70
71 DEALLOCATE( sensor_user_struct%NODE_LIST )
72 ALLOCATE( sensor_user_struct%NODE_LIST( sensor_user_struct%NUMBER_NODE ) )
73
74 sensor_user_struct%NODE_LIST(1:j-1) = local_array(1:j-1)
75 sensor_user_struct%NODE_LIST(j:sensor_user_struct%NUMBER_NODE) = 0
76
77 DEALLOCATE( local_array )
78 ENDIF
79 sensor_user_struct%NODE_LIST(j) = array(i)
80 ENDDO
81
82 sensor_user_struct%POINTER_NODE = j
83
85 RETURN
86 END FUNCTION set_u_sens_spmd_node_list
integer function set_u_sens_spmd_node_list(array, size_array)