OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
int18_law151_init.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "com01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine int18_law151_init (multi_fvm, igrbric, ipari, ixs, igroups, iparg, elbuf_tab, force_int, x, v, ms, kinet, x_append, v_append, mass_append, kinet_append, force_int_pon)

Function/Subroutine Documentation

◆ int18_law151_init()

subroutine int18_law151_init ( type(multi_fvm_struct) multi_fvm,
type (group_), dimension(ngrbric), intent(in) igrbric,
integer, dimension(npari,*), intent(in) ipari,
integer, dimension(nixs, *), intent(in) ixs,
integer, dimension(numels), intent(in) igroups,
integer, dimension(nparg,*), intent(in) iparg,
type (elbuf_struct_), dimension(ngroup), intent(in) elbuf_tab,
intent(inout) force_int,
intent(in) x,
intent(in) v,
intent(in) ms,
integer, dimension(*), intent(in) kinet,
intent(inout) x_append,
intent(inout) v_append,
intent(inout) mass_append,
integer, dimension(*), intent(inout) kinet_append,
real(kind=8), dimension(3,6,*), intent(inout) force_int_pon )

Definition at line 34 of file int18_law151_init.F.

39
40!$COMMENT
41! INT18_LAW151_INIT description
42! initialization of array for /INT18 + LAW 151
43!
44! INT18_LAW151_INIT organization :
45! - X/V/Mass_Append:
46! * (1:NUMNOD) : classical x/v/mass
47! * (NUMNOD+1:NUMNOD+NUMELS) : phantom node x/v/mass
48! - kinet_append :
49! * (1:numnod) : classical kinet
50! * (NUMNOD+1:NUMNOD+NUMELS) : =0 (no kinet for phantom node)
51! - force_int array :
52! * for parith/off :
53! dimension = 3,NUMELS*NTHREADS
54! each itask thread works in (1+itask*numels:(1+itask)*numels)
55!$endcomment
56C-----------------------------------------------
57C M o d u l e s
58C-----------------------------------------------
59 USE multi_fvm_mod
60 USE groupdef_mod
61 USE elbufdef_mod
62 USE message_mod
63 use element_mod , only : nixs
64C-----------------------------------------------
65C I m p l i c i t T y p e s
66C-----------------------------------------------
67#include "implicit_f.inc"
68#include "comlock.inc"
69#include "com04_c.inc"
70#include "param_c.inc"
71#include "com01_c.inc"
72C-----------------------------------------------
73C D u m m y A r g u m e n t s
74C-----------------------------------------------
75 INTEGER, DIMENSION(NPARI,*), INTENT(in) :: IPARI
76 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), INTENT(in) :: ELBUF_TAB
77 INTEGER, DIMENSION(NUMELS), INTENT(in) ::IGROUPS
78 INTEGER, DIMENSION(NPARG,*), INTENT(in) ::IPARG
79 my_real, DIMENSION(3,*), INTENT(in) :: x,v
80 my_real, DIMENSION(3,*), INTENT(inout) :: x_append,v_append
81 my_real, DIMENSION(*), INTENT(in) :: ms
82 INTEGER, DIMENSION(*), INTENT(in) :: KINET
83 my_real, DIMENSION(*), INTENT(inout) :: mass_append
84 INTEGER, DIMENSION(*), INTENT(inout) :: KINET_APPEND
85 my_real, DIMENSION(3,*), INTENT(inout) :: force_int
86 REAL(kind=8), dimension(3,6,*), INTENT(inout) :: force_int_pon
87 INTEGER, DIMENSION(NIXS, *), INTENT(in) :: IXS
88 TYPE(MULTI_FVM_STRUCT) :: MULTI_FVM
89 TYPE (GROUP_) , DIMENSION(NGRBRIC), INTENT(in) :: IGRBRIC
90C-----------------------------------------------
91C L o c a l V a r i a b l e s
92C-----------------------------------------------
93 INTEGER :: N,NN,II,JJ,MY_SIZE
94 INTEGER :: NFT,GROUP_ID,ILOC
95 INTEGER :: ISU1,NSN,NODE_ID,IBRIC
96 LOGICAL, DIMENSION(:), ALLOCATABLE :: TAG
97C-----------------------------------------------
98 ! X/V/MASS extended
99 ! 1:NUMNOD --> classical x/v/mass
100 ! NUMNOD+1:NUMNOD+NUMELS --> x/v/mass of phantom nodes (located to the center of
101 ! the ALE elements)
102 ! INT18_GLOBAL_LIST --> true if /INT18 + LAW151 for the NIN interface
103 multi_fvm%INT18_GLOBAL_LIST(1:ninter) = .false.
104 ALLOCATE(tag(numels))
105 tag(1:numels)=.false.
106 IF( multi_fvm%IS_INT18_LAW151 ) THEN
107 DO n=1,multi_fvm%NUMBER_INT18
108 nn = multi_fvm%INT18_LIST(n)
109 multi_fvm%INT18_GLOBAL_LIST(nn) = .true.
110 ENDDO
111! ! 1:NUMNOD --> classical x/v/mass
112 x_append(1:3,1:numnod) = x(1:3,1:numnod)
113 v_append(1:3,1:numnod) = v(1:3,1:numnod)
114 mass_append(1:numnod) = ms(1:numnod)
115 kinet_append(1:numnod) = kinet(1:numnod)
116! ! initialization of phantom nodes
117 x_append( 1:3,numnod+1:numnod+numels ) = zero
118 v_append( 1:3,numnod+1:numnod+numels ) = zero
119 ! KINET : not used for phantom nodes, always equal to 0
120 mass_append(numnod+1:numnod+numels) = zero
121 kinet_append(numnod+1:numnod+numels) = 0
122 force_int(1:multi_fvm%SIZE_FORCE_INT_1,1:multi_fvm%SIZE_FORCE_INT_2) = zero
123
124 my_size = multi_fvm%SIZE_FORCE_INT_PON
125 force_int_pon(1:3,1:6,1:my_size) = zero
126
127 DO nn=1,multi_fvm%NUMBER_INT18
128 n = multi_fvm%INT18_LIST(nn)
129 isu1 = ipari(45,n)
130 nsn = ipari(5,n) ! number of secondary nodes
131 DO ii = 1,nsn
132 ibric = igrbric(isu1)%ENTITY(ii) ! id of the phantom element
133 IF(.NOT. tag(ibric)) THEN ! otherwise already done with a previous interface
134 group_id = igroups(ibric) ! id of the element group
135 nft = iparg(3,group_id)
136 iloc = ibric - nft
137 ! mass
138 mass_append(numnod + ibric) = elbuf_tab(group_id)%GBUF%RHO(iloc) * elbuf_tab(group_id)%GBUF%VOL(iloc)
139 ! position
140 DO jj = 2, 9
141 node_id = ixs(jj, ibric) ! id of node of the phantom element
142 x_append(1, numnod + ibric) = x_append(1, numnod + ibric) + one_over_8 * x(1, node_id)
143 x_append(2, numnod + ibric) = x_append(2, numnod + ibric) + one_over_8 * x(2, node_id)
144 x_append(3, numnod + ibric) = x_append(3, numnod + ibric) + one_over_8 * x(3, node_id)
145 ENDDO
146 ! velocity
147 v_append(1, numnod + ibric) = multi_fvm%VEL(1, ibric)
148 v_append(2, numnod + ibric) = multi_fvm%VEL(2, ibric)
149 v_append(3, numnod + ibric) = multi_fvm%VEL(3, ibric)
150 tag(ibric)=.true.
151 ENDIF
152 ENDDO
153 ENDDO
154 ENDIF
155 IF(ALLOCATED(tag))DEALLOCATE(tag)
156
157 RETURN
#define my_real
Definition cppsort.cpp:32