31 SUBROUTINE volum0(IVOLU ,RVOLU ,VOL ,X ,SURF_NODES,
32 2 N ,NN ,SURF_ELTYP,SURF_ELEM,
33 3 ICONTACT,PORO ,FR_MV, T_MONVOLN)
41#include "implicit_f.inc"
51 INTEGER IVOLU(*), ICONTACT(*), NN, FR_MV(*),
52 . SURF_NODES(,4),SURF_ELTYP(NN),SURF_ELEM(NN)
55 . x(3,*), n(3,*),rvolu(*),
poro(*),vol
60 INTEGER I,II,K,NOD1,NOD2,NOD3,NOD4
61 my_real AREA,XX,YY,ZZ,X13,Y13,Z13,X24,Y24,Z24,NX, NY, NZ
62 my_real,
DIMENSION(:),
ALLOCATABLE :: f1, f2
63 DOUBLE PRECISION FRMV6(2,6)
71 ALLOCATE(f1(nn + t_monvoln%NB_FILL_TRI), f2(nn + t_monvoln%NB_FILL_TRI))
75 IF(surf_eltyp(i)==7)
THEN
77 ELSEIF(surf_eltyp(i)/=3)
THEN
80 nod1 = surf_nodes(i,1)
81 nod2 = surf_nodes(i,2)
82 nod3 = surf_nodes(i,3)
83 nod4 = surf_nodes(i,4)
84 xx=half*(x(1,nod1)+x(1,nod2))
85 yy=half*(x(2,nod1)+x(2,nod2))
86 zz=half*(x(3,nod1)+x(3,nod2))
87 x13=x(1,nod3)-x(1,nod1)
88 y13=x(2,nod3)-x(2,nod1)
89 z13=x(3,nod3)-x(3,nod1)
90 x24=x(1,nod4)-x(1,nod2)
91 y24=x(2,nod4)-x(2,nod2)
92 z24=x(3,nod4)-x(3,nod2)
93 n(1,ii)=half*(y13*z24-y24*z13)
94 n(2,ii)=half*(z13*x24-z24*x13)
95 n(3,ii)=half*(x13*y24-x24*y13)
96 f1(i) = sqrt( n(1,ii)**2+n(2,ii)**2+n(3,ii)**2 )
97 f2(i) = third*( n(1,ii)*xx+n(2,ii)*yy+n(3,ii)*zz )
102 nod1 = surf_nodes(i,1)
103 nod2 = surf_nodes(i,2)
104 nod3 = surf_nodes(i,3)
105 nod4 = surf_nodes(i,4)
106 IF(surf_eltyp(i)==3)
THEN
108 IF(icontact(nod1)/=0)
poro(ii)=
poro(ii)+fourth
109 IF(icontact(nod2)/=0)
poro(ii)=
poro(ii)+fourth
110 IF(icontact(nod3)/=0)
poro(ii)=
poro(ii)+fourth
111 IF(icontact(nod4)/=0)
poro(ii)=
poro(ii)+fourth
112 ELSEIF(surf_eltyp(i)==7)
THEN
115 IF(icontact(nod1)/=0)
poro(ii)=
poro(ii)+third
116 IF(icontact(nod2)/=0)
poro(ii)=
poro(ii)+third
117 IF(icontact(nod3)/=0)
poro(ii)=
poro(ii)+third
121 IF(icontact(nod1)/=0)
poro(ii)=
poro(ii)+fourth
122 IF(icontact(nod2)/=0)
poro(ii)=
poro(ii)+fourth
123 IF(icontact(nod3)/=0)
poro(ii)=
poro(ii)+fourth
124 IF(icontact(nod4)/=0)
poro(ii)=
poro(ii)+fourth
126 xx=half*(x(1,nod1)+x(1,nod2))
127 yy=half*(x(2,nod1)+x(2,nod2))
128 zz=half*(x(3,nod1)+x(3,nod2))
129 x13=x(1,nod3)-x(1,nod1
130 y13=x(2,nod3)-x(2,nod1)
131 z13=x(3,nod3)-x(3,nod1)
132 x24=x(1,nod4)-x(1,nod2)
133 y24=x(2,nod4)-x(2,nod2)
134 z24=x(3,nod4)-x(3,nod2)
135 n(1,ii)=half*(y13*z24-y24*z13)
136 n(2,ii)=half*(z13*x24-z24*x13)
137 n(3,ii)=half*(x13*y24-x24*y13)
138 f1(i) = sqrt( n(1,ii)**2+n(2,ii)**2+n(3,ii)**2 )
139 f2(i) = third*( n(1,ii)*xx+n(2,ii)*yy+n(3,ii)*zz )
142 IF (ispmd + 1 == fr_mv(nspmd + 2))
THEN
143 DO ii = 1, t_monvoln%NB_FILL_TRI
144 nod1 = t_monvoln%FILL_TRI(3 * (ii - 1) + 1)
145 nod2 = t_monvoln%FILL_TRI(3 * (ii - 1) + 2)
146 nod3 = t_monvoln%FILL_TRI(3 * (ii - 1) + 3)
148 xx=half*(x(1,nod1)+x(1,nod2))
149 yy=half*(x(2,nod1)+x(2,nod2))
150 zz=half*(x(3,nod1)+x(3,nod2))
151 x13=x(1,nod3)-x(1,nod1)
152 y13=x(2,nod3)-x(2,nod1)
153 z13=x(3,nod3)-x(3,nod1)
154 x24=x(1,nod4)-x(1,nod2)
155 y24=x(2,nod4)-x(2,nod2)
156 z24=x(3,nod4)-x(3,nod2)
157 nx=half*(y13*z24-y24*z13)
158 ny=half*(z13*x24-z24*x13)
159 nz=half*(x13*y24-x24*y13)
160 f1(nn + ii) = sqrt( nx**2+ny**2+nz**2 )
161 f2(nn + ii) = third*( nx*xx+ny*yy+nz*zz )
164 DO ii = 1, t_monvoln%NB_FILL_TRI
173 CALL sum_6_float(1, nn + t_monvoln%NB_FILL_TRI, f1, frmv6(1,1), 2)
174 CALL sum_6_float(1, nn + t_monvoln%NB_FILL_TRI, f2, frmv6(2,1), 2)
180 area = frmv6(1,1)+frmv6(1,2)+frmv6(1,3)+
181 . frmv6(1,4)+frmv6(1,5)+frmv6(1,6)
182 vol = frmv6(2,1)+frmv6(2,2)+frmv6(2,3)+
183 . frmv6(2,4)+frmv6(2,5)+frmv6(2,6)