53 SUBROUTINE volratio(n1, n2, n3, n4, AlphaR,coor,numnp,NdMassLump)
79 CHARACTER*4 :: myid_chr
81 INTEGER :: j1l, j2l, j3l, j4l
83 INTEGER,
DIMENSION(1:4,1) :: vx
84 REAL*8 :: xcn,ycn,zcn,xpt,ypt,zpt
86 REAL*8,
DIMENSION(1:3) :: circenttet,
x,
y,
z,xmd,ymd,zmd
87 REAL*8,
DIMENSION(1:4,1:3) :: circenttri
89 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
91 INTEGER :: n1, n2, n3, n4
93 REAL*8,
DIMENSION(1:4) :: alphar
95 REAL*8 :: x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
97 REAL*8 :: x12mp,x13mp,x14mp,x23mp,x24mp,x34mp
98 REAL*8 :: y12mp,y13mp,y14mp,y23mp,y24mp,y34mp
99 REAL*8 :: z12mp,z13mp,z14mp,z23mp,z24mp,z34mp
102 REAL*8 :: x14v,x24v, x34v, y14v, y24v, y34v, z14v, z24v, z34v
103 REAL*8 :: v11,v21,v31
106 REAL*8,
DIMENSION(1:3) :: norm1, norm2, norm3, norm4, normc1, normc2, normc3,centroidtet
107 REAL*8,
DIMENSION(1:3) :: vnorm12, vnorm13, vnorm14, vnorm23, vnorm24, vnorm34
108 REAL*8 :: offset12, offset13, offset14, offset23, offset24, offset34
110 INTEGER :: same1,same2,same3
111 REAL*8 :: offset1, offset2, offset3,offset4, offsetc1, offsetc2, offsetc3,
calcoffset,
offset
112 CHARACTER*61 :: qhullstat
114 REAL*8 :: aj1, aj2, aj3, aj4
115 real*8 feasiblept(0:2)
116 REAL*8,
DIMENSION(0:3,0:6) :: planes
117 integer :: ndmasslump
124 IF(ndmasslump.EQ.1)
THEN
150 v11 = y24v*z34v - z24v*y34v
151 v21 = -( x24v*z34v - z24v*x34v )
152 v31 = x24v*y34v - y24v*x34v
154 volel = -( x14v*v11 + y14v*v21 + z14v*v31 )/6.d0
158 x12mp = 0.5d0*(x1 + x2)
159 x13mp = 0.5d0*(x1 + x3)
160 x14mp = 0.5d0*(x1 + x4)
161 x23mp = 0.5d0*(x2 + x3)
162 x24mp = 0.5d0*(x2 + x4)
163 x34mp = 0.5d0*(x3 + x4)
164 y12mp = 0.5d0*(y1 + y2)
165 y13mp = 0.5d0*(y1 + y3)
166 y14mp = 0.5d0*(y1 + y4)
167 y23mp = 0.5d0*(y2 + y3)
168 y24mp = 0.5d0*(y2 + y4)
169 y34mp = 0.5d0*(y3 + y4)
170 z12mp = 0.5d0*(z1 + z2)
171 z13mp = 0.5d0*(z1 + z3)
172 z14mp = 0.5d0*(z1 + z4)
173 z23mp = 0.5d0*(z2 + z3)
174 z24mp = 0.5d0*(z2 + z4)
175 z34mp = 0.5d0*(z3 + z4)
179 CALL
planenorm(x3,y3,z3,x2,y2,z2,x1,y1,z1,norm1(1),norm1(2),norm1(3),same1)
180 offset1 =
calcoffset(norm1(1),norm1(2),norm1(3),x1,y1,z1)
181 CALL
planenorm(x1,y1,z1,x2,y2,z2,x4,y4,z4,norm2(1),norm2(2),norm2(3),same1)
182 offset2 =
calcoffset(norm2(1),norm2(2),norm2(3),x1,y1,z1)
183 CALL
planenorm(x2,y2,z2,x3,y3,z3,x4,y4,z4,norm3(1),norm3(2),norm3(3),same1)
184 offset3 =
calcoffset(norm3(1),norm3(2),norm3(3),x2,y2,z2)
185 CALL
planenorm(x1,y1,z1,x4,y4,z4,x3,y3,z3,norm4(1),norm4(2),norm4(3),same1)
186 offset4 =
calcoffset(norm4(1),norm4(2),norm4(3),x1,y1,z1)
188 CALL
planenorm3d( x1, y1, z1, x2, y2 , z2, vnorm12 )
189 offset12 =
offset(vnorm12,x12mp,y12mp,z12mp)
191 CALL
planenorm3d( x1, y1, z1, x3, y3 , z3, vnorm13 )
192 offset13 =
offset(vnorm13,x13mp,y13mp,z13mp)
194 CALL
planenorm3d( x1, y1, z1, x4, y4 , z4, vnorm14 )
195 offset14 =
offset(vnorm14,x14mp,y14mp,z14mp)
197 CALL
planenorm3d( x2, y2, z2, x3, y3 , z3, vnorm23 )
198 offset23 =
offset(vnorm23,x23mp,y23mp,z23mp)
200 CALL
planenorm3d( x2, y2, z2, x4, y4 , z4, vnorm24 )
201 offset24 =
offset(vnorm24,x24mp,y24mp,z24mp)
203 CALL
planenorm3d( x3, y3, z3, x4, y4 , z4, vnorm34 )
204 offset34 =
offset(vnorm34,x34mp,y34mp,z34mp)
206 planes(0:2,0) = -norm1(1:3)
207 planes( 3,0) = offset1
208 planes(0:2,1) = -norm2(1:3)
209 planes( 3,1) = offset2
210 planes(0:2,2) = -norm3(1:3)
211 planes( 3,2) = offset3
212 planes(0:2,3) = -norm4(1:3)
213 planes( 3,3) = offset4
217 planes(0:2,4) = -vnorm12(1:3)
218 planes(3,4) = offset12
219 planes(0:2,5) = -vnorm13(1:3)
220 planes(3,5) = offset13
221 planes(0:2,6) = -vnorm14(1:3)
222 planes(3,6) = offset14
228 planes(0:2,4) = vnorm12(1:3)
229 planes(3,4) = -offset12
230 planes(0:2,5) = -vnorm23(1:3)
231 planes(3,5) = offset23
232 planes(0:2,6) = -vnorm24(1:3)
233 planes(3,6) = offset24
239 planes(0:2,4) = -vnorm34(1:3)
240 planes(3,4) = offset34
241 planes(0:2,5) = vnorm13(1:3)
242 planes(3,5) = -offset13
243 planes(0:2,6) = vnorm23(1:3)
244 planes(3,6) = -offset23
250 planes(0:2,4) = vnorm14(1:3)
251 planes(3,4) = -offset14
252 planes(0:2,5) = vnorm24(1:3)
253 planes(3,5) = -offset24
254 planes(0:2,6) = vnorm34(1:3)
255 planes(3,6) = -offset34
259 IF((aj1+aj2+aj3+aj4)/volel.GT.1.0005.OR.&
260 (aj1+aj2+aj3+aj4)/volel.LT.0.995)
THEN
261 print*,
'ERROR: Node Volume Calculation Incorrect'
262 print*,(aj1+aj2+aj3+aj4)/volel
266 alphar(1) = aj1/volel
267 alphar(2) = aj2/volel
268 alphar(3) = aj3/volel
269 alphar(4) = aj4/volel
272 ELSE IF(ndmasslump.EQ.0)
THEN
real *8 function calcoffset(x1, y1, z1, x2, y2, z2)
void int int REAL REAL * y
real *8 function offset(vNorm, x2, y2, z2)
subroutine planenorm(x1, y1, z1, x2, y2, z2, x3, y3, z3, xn, yn, zn, same)
void int int int REAL REAL REAL * z
subroutine volratio(n1, n2, n3, n4, AlphaR, coor, numnp, NdMassLump)
subroutine planenorm3d(ax, ay, az, bx, by, bz, vNorm)
void volume_lasserre_file(double planes2[7][4], rational *volume)