78 REAL*8 :: xx,yy,zz,size1,size2,size3,size4,size5,size6,size7,size8,size9,size10,size11,size12
81 CHARACTER*4 :: ichr1, ichr2
85 LOGICAL :: pointonproc
89 IF(glb%iElType.EQ.8)
THEN
90 DO i = 1, glb%NumElVol
91 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(1,
i), glb%ElConnVol(4,
i), size1)
92 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(5,
i), glb%ElConnVol(8,
i), size2)
93 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(6,
i), glb%ElConnVol(7,
i), size3)
94 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(2,
i), glb%ElConnVol(3,
i), size4)
96 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(4,
i), glb%ElConnVol(8,
i), size5)
97 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(8,
i), glb%ElConnVol(7,
i), size6)
98 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(7,
i), glb%ElConnVol(3,
i), size7)
99 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(3,
i), glb%ElConnVol(4,
i), size8)
101 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(1,
i), glb%ElConnVol(5,
i), size9)
102 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(5,
i), glb%ElConnVol(6,
i), size10)
103 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(6,
i), glb%ElConnVol(2,
i), size11)
104 CALL
smallestelement(glb%NumNP, glb%MeshCoor, glb%ElConnVol(2,
i), glb%ElConnVol(1,
i), size12)
106 longestedge =
max(size1, size2, size3, size4, size5, size6, size7, size8, size9, size10, size11, size12, longestedge)
111 DO i = 1, glb%NumElVol
115 xx = glb%MeshCoor(1,glb%ElConnVol(1,
i)) - glb%MeshCoor(1,glb%ElConnVol(2,
i))
116 yy = glb%MeshCoor(2,glb%ElConnVol(1,
i)) - glb%MeshCoor(2,glb%ElConnVol(2,
i))
117 zz = glb%MeshCoor(3,glb%ElConnVol(1,
i)) - glb%MeshCoor(3,glb%ElConnVol(2,
i))
118 size1 =
sqrt(xx*xx+yy*yy+zz*zz)
119 xx = glb%MeshCoor(1,glb%ElConnVol(2,
i)) - glb%MeshCoor(1,glb%ElConnVol(3,
i))
120 yy = glb%MeshCoor(2,glb%ElConnVol(2,
i)) - glb%MeshCoor(2,glb%ElConnVol(3,
i))
121 zz = glb%MeshCoor(3,glb%ElConnVol(2,
i)) - glb%MeshCoor(3,glb%ElConnVol(3,
i))
122 size2 =
sqrt(xx*xx+yy*yy+zz*zz)
123 xx = glb%MeshCoor(1,glb%ElConnVol(3,
i)) - glb%MeshCoor(1,glb%ElConnVol(1,
i))
124 yy = glb%MeshCoor(2,glb%ElConnVol(3,
i)) - glb%MeshCoor(2,glb%ElConnVol(1,
i))
125 zz = glb%MeshCoor(3,glb%ElConnVol(3,
i)) - glb%MeshCoor(3,glb%ElConnVol(1,
i))
126 size3 =
sqrt(xx*xx+yy*yy+zz*zz)
127 xx = glb%MeshCoor(1,glb%ElConnVol(4,
i)) - glb%MeshCoor(1,glb%ElConnVol(1,
i))
128 yy = glb%MeshCoor(2,glb%ElConnVol(4,
i)) - glb%MeshCoor(2,glb%ElConnVol(1,
i))
129 zz = glb%MeshCoor(3,glb%ElConnVol(4,
i)) - glb%MeshCoor(3,glb%ElConnVol(1,
i))
130 size4 =
sqrt(xx*xx+yy*yy+zz*zz)
131 xx = glb%MeshCoor(1,glb%ElConnVol(4,
i)) - glb%MeshCoor(1,glb%ElConnVol(2,
i))
132 yy = glb%MeshCoor(2,glb%ElConnVol(4,
i)) - glb%MeshCoor(2,glb%ElConnVol(2,
i))
133 zz = glb%MeshCoor(3,glb%ElConnVol(4,
i)) - glb%MeshCoor(3,glb%ElConnVol(2,
i))
134 size5 =
sqrt(xx*xx+yy*yy+zz*zz)
135 xx = glb%MeshCoor(1,glb%ElConnVol(4,
i)) - glb%MeshCoor(1,glb%ElConnVol(3,
i))
136 yy = glb%MeshCoor(2,glb%ElConnVol(4,
i)) - glb%MeshCoor(2,glb%ElConnVol(3,
i))
137 zz = glb%MeshCoor(3,glb%ElConnVol(4,
i)) - glb%MeshCoor(3,glb%ElConnVol(3,
i))
138 size6 =
sqrt(xx*xx+yy*yy+zz*zz)
139 longestedge =
max(size1,size2,size3,size4,size5,size6,longestedge)
144 ALLOCATE(glb%PointOnProc(1:glb%NumProbesNd))
146 DO i = 1, glb%NumProbesNd
148 glb%PointOnProc(
i) = .false.
156 glb%PointOnProc(
i) = .true.
158 longestedge =
sqrt(
sum( ( glb%ProbeCoorNd(1:3,
i) - glb%MeshCoor(1:3,
j) )**2 ) )
163 IF(glb%PointOnProc(
i))
THEN
164 WRITE(ichr1,
'(i4.4)')
i
165 WRITE(ichr2,
'(I4.4)') myid
167 OPEN(440+
i,file=
'Rocfrac/Rocout/Probe.'//ichr1//
'.'//ichr2,position=
'REWIND')
168 WRITE(440+
i,*)
'# Probe Data Coordinate', glb%MeshCoor(1:3,glb%ProbeNd(
i))
209 INTEGER,
PARAMETER :: ndim = 3
211 REAL ( kind = 8 ) center(ndim)
213 REAL ( kind = 8 ) p(ndim)
216 IF (
sum( ( p(1:ndim) - center(1:ndim) )**2 ) <=
r *
r )
THEN
Tfloat sum() const
Return the sum of all the pixel values in an image.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine sphere_imp_contains_point_3d(r, center, p, inside)
subroutine smallestelement(NumNP, coor, Node1, Node2, lngth)
subroutine findprobe(glb, myid)