OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_nodal_state.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!|| check_nodal_state ../engine/source/interfaces/interf/check_nodal_state.f
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- uses -----------------------------------------------------
28!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
29!||====================================================================
30 SUBROUTINE check_nodal_state( ITASK,ITAG,NEWFRONT,INTBUF_TAB,SIZE_SEC_NODE,
31 . SHIFT_S_NODE,INTER_SEC_NODE,SEC_NODE_ID)
32!$COMMENT
33! CHECK_NODAL_STATE description
34! deactivation of node from an interface
35! CHECK_NODAL_STATE organization
36!$ENDCOMMENT
37 USE intbufdef_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "task_c.inc"
46#include "com04_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(in) :: ITASK ! omp thread ID
51 INTEGER, INTENT(in) :: SIZE_SEC_NODE ! size of INTER_SEC_NODE & SEC_NODE_ID
52 INTEGER, DIMENSION(2*NUMNOD), INTENT(in) :: ITAG ! tag of node : 0 if secondary node is deactivated, 1 if secondary node is activated
53 INTEGER, DIMENSION(NINTER), INTENT(inout) :: NEWFRONT !< flag to force some exchanges related to S nodes between processor (if a S node becomes a shooting node - all interface) / force the collision detection algo if a new segment is activated for the (interface 25 + solid erosion)
54 TYPE(intbuf_struct_), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB ! interface data
55! shift to point to INTER_SEC_NODE/SEC_NODE_ID arrays & number of interface per node:
56! SHIFT_S_NODE(i) = index to NTER_SEC_NODE/SEC_NODE_ID for node_id = i
57! shift_s_node(i+1) - shift_s_node(i) = number of interface per node
58 INTEGER, DIMENSION(NUMNOD+1), INTENT(in) :: SHIFT_S_NODE
59
60 INTEGER, DIMENSION(SIZE_SEC_NODE), INTENT(in) :: INTER_SEC_NODE,SEC_NODE_ID ! list of interface of the nodes & ID of secondary nodes in each interface
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: I,J,K
65 INTEGER :: FIRST,LAST
66 INTEGER :: LOCAL_COUNTER,SHIFT
67 INTEGER :: NB_INTERFACE,NIN,NODE_ID
68 INTEGER, DIMENSION(:), ALLOCATABLE :: LOCAL_INDEX_SECONDARY_NODE
69C-----------------------------------------------
70 local_counter = 0
71 first = 1 + itask * (numnod / nthread)
72 last = (itask + 1) * (numnod / nthread)
73 IF(itask+1==nthread) last = numnod
74 ALLOCATE( local_index_secondary_node( last-first+1 ) )
75 ! --------------------------
76 ! find the deactivated nodes
77 DO i=first,last
78 IF(itag(i)==0) THEN
79 local_counter = local_counter + 1
80 local_index_secondary_node(local_counter) = i ! save the node ID
81 ENDIF
82 ENDDO
83 ! --------------------------
84 ! loop over the interface of deactivated nodes to deactivate the secondary nodes
85 DO i=1,local_counter
86 k = local_index_secondary_node(i) ! get the node ID
87 nb_interface = shift_s_node(k+1) - shift_s_node(k) ! get the number of interface where the node is defined
88 shift = shift_s_node(k) ! shift for the array "INTER_SEC_NODE"
89 DO j=1,nb_interface
90 nin = inter_sec_node(shift+j) ! interface ID
91 node_id = sec_node_id(shift+j) ! secondary node ID of the interface NIN
92
93 IF(intbuf_tab(nin)%STFNS(node_id)>zero) THEN ! check the current state of the node
94 intbuf_tab(nin)%STFNS(node_id) = -intbuf_tab(nin)%STFNS(node_id) ! nodal state change
95 newfront(nin) = -1 ! force some exchanges for S node of the interface NIN for the next cycle
96 ENDIF
97 ENDDO
98 ENDDO
99 ! --------------------------
100 DEALLOCATE( local_index_secondary_node )
101
102 RETURN
103 END SUBROUTINE check_nodal_state
subroutine check_nodal_state(itask, itag, newfront, intbuf_tab, size_sec_node, shift_s_node, inter_sec_node, sec_node_id)
end diagonal values have been computed in the(sparse) matrix id.SOL