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