OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
iniphase.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine iniphase (n2d, numels, numeltg, numelq, numnod, ngroup, ixs, ipart_, iphase, idp, kvol, nuparam, uparam, ntrace, itagnsol, isolnod, part_fill, nbip, nbsubmat, mlw, elbuf_tab, ng, multi_fvm, ixq, ixtg, ityp, nel)

Function/Subroutine Documentation

◆ iniphase()

subroutine iniphase ( integer, intent(in) n2d,
integer, intent(in) numels,
integer, intent(in) numeltg,
integer, intent(in) numelq,
integer, intent(in) numnod,
integer, intent(in) ngroup,
integer, dimension(nixs,numels) ixs,
integer, dimension(*) ipart_,
integer, dimension(nbsubmat+1,*) iphase,
integer idp,
kvol,
integer nuparam,
uparam,
integer ntrace,
integer, dimension(numnod) itagnsol,
integer isolnod,
integer, dimension(*) part_fill,
integer, dimension(nbsubmat,nel) nbip,
integer, intent(in) nbsubmat,
integer, intent(in) mlw,
type(elbuf_struct_), dimension(ngroup), intent(in), target elbuf_tab,
integer, intent(in) ng,
type (multi_fvm_struct), intent(in) multi_fvm,
integer, dimension(nixq,numelq), intent(in) ixq,
integer, dimension(nixtg,numeltg), intent(in) ixtg,
integer, intent(in) ityp,
integer, intent(in) nel )
Parameters
[in]n2d2d/3d flag
nbipnumber of internal points
ntracemaximum number of internal points (NBIP <= NTRACE, default 7*7*7)
[in]ixqquad connectivity buffer
[in]ixtgtriangles connectivity buffer
[in]itypelem types of the current group (quad, triangles, hexa,)
[in]itypvolume fractions
[in]mlwmaterial law (type)
[in]ngcurrent elem group
[in]nelnumber of elements in the group

Definition at line 29 of file iniphase.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE elbufdef_mod
40 USE multi_fvm_mod
41 USE constant_mod , ONLY : nine_over_10
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER,INTENT(IN) :: N2D !< 2d/3d flag
50 INTEGER,INTENT(IN) :: NUMELS, NUMELTG, NUMELQ, NUMNOD, NGROUP !array sizes
51 INTEGER,INTENT(IN) :: NBSUBMAT
52 INTEGER IXS(NIXS,NUMELS),IPART_(*),IPHASE(NBSUBMAT+1,*),IDP,NUPARAM
53 INTEGER ITAGNSOL(NUMNOD)
54 INTEGER :: NBIP(NBSUBMAT,NEL) !< number of internal points
55 INTEGER :: NTRACE !< maximum number of internal points (NBIP <= NTRACE, default 7*7*7)
56 INTEGER ISOLNOD,PART_FILL(*)
57 INTEGER,INTENT(IN) :: IXQ(NIXQ,NUMELQ) !< quad connectivity buffer
58 INTEGER,INTENT(IN) :: IXTG(NIXTG,NUMELTG) !< triangles connectivity buffer
59 INTEGER, INTENT(IN) :: ITYP !< elem types of the current group (quad, triangles, hexa,)
60 my_real kvol(nbsubmat,nel) !< volume fractions
61 my_real uparam(nuparam)
62 INTEGER,INTENT(IN) :: MLW !< material law (type)
63 INTEGER,INTENT(IN) :: NG !< current elem group
64 TYPE(ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP), INTENT(IN) :: ELBUF_TAB
65 TYPE (MULTI_FVM_STRUCT), INTENT(IN) :: MULTI_FVM
66 INTEGER, INTENT(IN) :: NEL !< number of elements in the group
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER :: I,K,J !< loop and temporary integers
71 INTEGER :: IMAT !< submat identifier (in 1:NBSUBMAT)
72 INTEGER :: IX(4) !< working array for shell nodes
73 my_real :: av(nbsubmat) !< working array for volume fractions
74 TYPE(G_BUFEL_) ,POINTER :: GBUF !< global elem buffer
75 TYPE(L_BUFEL_) ,POINTER :: LBUF !< local elem buffer (submaterials)
76C-----------------------------------------------
77C---
78C FILL ELEMENTS INPUT PHASES
79C---
80 av(1:nbsubmat) = zero
81
82 IF(mlw==51)THEN
83 !when using LAW51 nbsubmat=4
84 av(1) = uparam(4)
85 av(2) = uparam(5)
86 av(3) = uparam(6)
87 av(4) = uparam(46)
88 ELSE
89 gbuf => elbuf_tab(ng)%GBUF
90 DO i=1,multi_fvm%NBMAT
91 lbuf => elbuf_tab(ng)%BUFLY(i)%LBUF(1,1,1)
92 av(i) = lbuf%VOL(1) / gbuf%VOL(1) !same value for idx=1,NEL then idx=1 here.
93 ENDDO
94 ENDIF
95C
96 DO i=1,nel
97 IF(ipart_(i) /= 0) THEN
98 IF (ipart_(i) /= idp .AND. part_fill(ipart_(i)) == 0) THEN
99 kvol(1:nbsubmat,i) = av(1:nbsubmat)
100 part_fill(ipart_(i)) = 1
101 ELSEIF (ipart_(i) == idp) THEN
102 imat=maxloc(av(1:nbsubmat),1) ! The default phase is the one that is most prevalent.
103 iphase(1,i) = imat
104 iphase(nbsubmat+1,i) = 1 !number of present submaterials
105 kvol(imat,i) = zero
106 IF (nbip(imat,i) == 0) THEN
107 nbip(imat,i) = ntrace
108 ENDIF
109 IF (isolnod == 8) THEN
110 DO k=2,9
111 j = ixs(k,i)
112 IF(itagnsol(j) == 0)itagnsol(j) = 1
113 END DO
114 ELSEIF (isolnod == 4) THEN
115 ix(1) =ixs(2,i)
116 ix(2) =ixs(4,i)
117 ix(3) =ixs(7,i)
118 ix(4) =ixs(6,i)
119 DO k=1,4
120 j = ix(k)
121 IF(itagnsol(j) == 0)itagnsol(j) = 1
122 END do!next K
123 ELSEIF(ityp == 7 .AND. n2d > 0)THEN
124 IF(itagnsol(ixtg(2,i)) == 0)itagnsol(ixtg(2,i)) = 1
125 IF(itagnsol(ixtg(3,i)) == 0)itagnsol(ixtg(3,i)) = 1
126 IF(itagnsol(ixtg(4,i)) == 0)itagnsol(ixtg(4,i)) = 1
127 ELSEIF(ityp == 2)THEN
128 IF(itagnsol(ixq(2,i)) == 0)itagnsol(ixq(2,i)) = 1
129 IF(itagnsol(ixq(3,i)) == 0)itagnsol(ixq(3,i)) = 1
130 IF(itagnsol(ixq(4,i)) == 0)itagnsol(ixq(4,i)) = 1
131 IF(itagnsol(ixq(5,i)) == 0)itagnsol(ixq(5,i)) = 1
132 endif!ISOLNOD
133 part_fill(idp) = 1
134 END if!(IPART_(I) /= IDP )
135 ENDIF !IF(IPART(I) /= 0)
136 END do!next I
137C-----
138 RETURN
#define my_real
Definition cppsort.cpp:32
if(complex_arithmetic) id