OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
int18_law151_nsv_shift.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!|| int18_law151_nsv_shift_mod ../common_source/interf/int18_law151_nsv_shift.F
25!||--- called by ------------------------------------------------------
26!|| inintr ../starter/source/interfaces/interf1/inintr.F
27!|| intfop2 ../engine/source/interfaces/interf/intfop2.F
28!|| inttri ../engine/source/interfaces/intsort/inttri.F
29!||====================================================================
31 contains
32! ======================================================================================================================
33! procedures
34! ======================================================================================================================
35!! \brief index shifting for law151
36!! \details law151 has collocated numerical scheme node identifier is 1:NUMELS starting from NUMNOD+1 to NUMNOD+NUMELS
37!||====================================================================
38!|| int18_law151_nsv_shift ../common_source/interf/int18_law151_nsv_shift.F
39!||--- called by ------------------------------------------------------
40!|| inintr ../starter/source/interfaces/interf1/inintr.F
41!|| intfop2 ../engine/source/interfaces/interf/intfop2.F
42!|| inttri ../engine/source/interfaces/intsort/inttri.F
43!||--- uses -----------------------------------------------------
44!|| groupdef_mod ../common_source/modules/groupdef_mod.F
45!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
46!|| multi_fvm_mod ../common_source/modules/ale/multi_fvm_mod.F90
47!||====================================================================
48 subroutine int18_law151_nsv_shift(mode,itask,nthread,multi_fvm,ipari,intbuf_tab,npari,ninter,numnod,opt_int_id)
49!$COMMENT
50! INT18_LAW151_NSV_SHIFT description
51! shift the secondary node ID
52! for /INT18 + LAW151
53!
54! INT18_LAW151_NSV_SHIFT organization :
55! - at the beginning of inttri/intfop2, shift with +numnod
56! - at the end of inttri/intfop2, shift with -numnod
57!$ENDCOMMENT
58! ----------------------------------------------------------------------------------------------------------------------
59! Modules
60! ----------------------------------------------------------------------------------------------------------------------
61 use intbufdef_mod
62 use multi_fvm_mod
63 use groupdef_mod
64! ----------------------------------------------------------------------------------------------------------------------
65! Implicit None
66! ----------------------------------------------------------------------------------------------------------------------
67 implicit none
68! ----------------------------------------------------------------------------------------------------------------------
69! Arguments
70! ----------------------------------------------------------------------------------------------------------------------
71 integer,intent(in) :: npari,ninter,numnod,nthread
72 character(len=*), intent(in) :: mode
73 integer, intent(in) :: itask
74 type(intbuf_struct_),dimension(ninter), intent(inout) :: intbuf_tab
75 integer, dimension(npari,*), intent(in) :: ipari
76 type(multi_fvm_struct) :: multi_fvm
77 integer,intent(in),optional :: opt_int_id
78! ----------------------------------------------------------------------------------------------------------------------
79! Arguments
80! ----------------------------------------------------------------------------------------------------------------------
81 INTEGER :: II,N,NN
82 INTEGER :: NSN
83 INTEGER :: NSNF,NSNL
84 INTEGER :: INTER_ID
85C-----------------------------------------------
86 inter_id = 0
87 IF(PRESENT(opt_int_id))THEN
88 inter_id = max(0,opt_int_id)
89 ENDIF
90 DO nn=1,multi_fvm%NUMBER_INT18
91 n = multi_fvm%INT18_LIST(nn)
92 IF(inter_id > 0)THEN
93 IF(inter_id /= n) cycle
94 ENDIF
95 nsn = ipari(5,n) ! number of secondary nodes
96 nsnf = 1 + itask * nsn / nthread
97 nsnl = (1 + itask) * nsn / nthread
98 ! add/substract NUMNOD to NSV for phantom nodes
99 ! if NSV > 0 --> local phantom node
100 ! else if NSV < 0 --> reote node
101 IF(mode=='+') THEN
102 DO ii = nsnf,nsnl
103 IF(intbuf_tab(n)%NSV(ii)>0) intbuf_tab(n)%NSV(ii) = intbuf_tab(n)%NSV(ii) + numnod
104 ENDDO
105 ELSE
106 DO ii = nsnf,nsnl
107 IF(intbuf_tab(n)%NSV(ii)>0) intbuf_tab(n)%NSV(ii) = intbuf_tab(n)%NSV(ii) - numnod
108 ENDDO
109 ENDIF
110 ENDDO
111
112 RETURN
113 end subroutine int18_law151_nsv_shift
114
115!===============================================================================
#define max(a, b)
Definition macros.h:21
subroutine int18_law151_nsv_shift(mode, itask, nthread, multi_fvm, ipari, intbuf_tab, npari, ninter, numnod, opt_int_id)