47 type(
tet_t),
allocatable :: el(:)
60 type(
mesh_t),
intent(in),
target :: msh
61 integer,
intent(in),
optional :: mthd
68 if (
present(mthd))
then
75 this%nelv = msh%nelv * 8
76 allocate(this%el(this%nelv))
79 this%nelv = msh%nelv * 5
80 allocate(this%el(this%nelv))
83 this%nelv = msh%nelv * 6
84 allocate(this%el(this%nelv))
96 if (
allocated(this%el))
then
111 type(
point_t),
pointer :: p1, p2, p3, p4
114 do i = 1, tet_msh%msh%nelv
117 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
118 p2 => tet_msh%msh%elements(i)%e%pts(2)%p
119 p3 => tet_msh%msh%elements(i)%e%pts(5)%p
120 p4 => tet_msh%msh%elements(i)%e%pts(4)%p
121 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
124 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
125 p2 => tet_msh%msh%elements(i)%e%pts(2)%p
126 p3 => tet_msh%msh%elements(i)%e%pts(3)%p
127 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
128 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
131 p1 => tet_msh%msh%elements(i)%e%pts(4)%p
132 p2 => tet_msh%msh%elements(i)%e%pts(3)%p
133 p3 => tet_msh%msh%elements(i)%e%pts(2)%p
134 p4 => tet_msh%msh%elements(i)%e%pts(7)%p
135 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
138 p1 => tet_msh%msh%elements(i)%e%pts(4)%p
139 p2 => tet_msh%msh%elements(i)%e%pts(3)%p
140 p3 => tet_msh%msh%elements(i)%e%pts(8)%p
141 p4 => tet_msh%msh%elements(i)%e%pts(1)%p
142 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
145 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
146 p2 => tet_msh%msh%elements(i)%e%pts(5)%p
147 p3 => tet_msh%msh%elements(i)%e%pts(6)%p
148 p4 => tet_msh%msh%elements(i)%e%pts(8)%p
149 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
152 p1 => tet_msh%msh%elements(i)%e%pts(2)%p
153 p2 => tet_msh%msh%elements(i)%e%pts(5)%p
154 p3 => tet_msh%msh%elements(i)%e%pts(6)%p
155 p4 => tet_msh%msh%elements(i)%e%pts(7)%p
156 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
159 p1 => tet_msh%msh%elements(i)%e%pts(3)%p
160 p2 => tet_msh%msh%elements(i)%e%pts(8)%p
161 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
162 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
163 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
166 p1 => tet_msh%msh%elements(i)%e%pts(4)%p
167 p2 => tet_msh%msh%elements(i)%e%pts(8)%p
168 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
169 p4 => tet_msh%msh%elements(i)%e%pts(5)%p
170 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
180 type(
point_t),
pointer :: p1, p2, p3, p4
183 do i = 1, tet_msh%msh%nelv
186 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
187 p2 => tet_msh%msh%elements(i)%e%pts(2)%p
188 p3 => tet_msh%msh%elements(i)%e%pts(3)%p
189 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
190 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
193 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
194 p2 => tet_msh%msh%elements(i)%e%pts(4)%p
195 p3 => tet_msh%msh%elements(i)%e%pts(3)%p
196 p4 => tet_msh%msh%elements(i)%e%pts(8)%p
197 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
200 p1 => tet_msh%msh%elements(i)%e%pts(3)%p
201 p2 => tet_msh%msh%elements(i)%e%pts(8)%p
202 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
203 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
204 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
207 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
208 p2 => tet_msh%msh%elements(i)%e%pts(5)%p
209 p3 => tet_msh%msh%elements(i)%e%pts(8)%p
210 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
211 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
214 p1 => tet_msh%msh%elements(i)%e%pts(8)%p
215 p2 => tet_msh%msh%elements(i)%e%pts(3)%p
216 p3 => tet_msh%msh%elements(i)%e%pts(1)%p
217 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
218 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
226 type(
point_t),
pointer :: p1, p2, p3, p4
229 do i = 1, tet_msh%msh%nelv
232 p1 => tet_msh%msh%elements(i)%e%pts(5)%p
233 p2 => tet_msh%msh%elements(i)%e%pts(8)%p
234 p3 => tet_msh%msh%elements(i)%e%pts(1)%p
235 p4 => tet_msh%msh%elements(i)%e%pts(7)%p
236 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
239 p1 => tet_msh%msh%elements(i)%e%pts(5)%p
240 p2 => tet_msh%msh%elements(i)%e%pts(1)%p
241 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
242 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
243 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
246 p1 => tet_msh%msh%elements(i)%e%pts(8)%p
247 p2 => tet_msh%msh%elements(i)%e%pts(4)%p
248 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
249 p4 => tet_msh%msh%elements(i)%e%pts(1)%p
250 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
253 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
254 p2 => tet_msh%msh%elements(i)%e%pts(7)%p
255 p3 => tet_msh%msh%elements(i)%e%pts(2)%p
256 p4 => tet_msh%msh%elements(i)%e%pts(6)%p
257 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
260 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
261 p2 => tet_msh%msh%elements(i)%e%pts(2)%p
262 p3 => tet_msh%msh%elements(i)%e%pts(7)%p
263 p4 => tet_msh%msh%elements(i)%e%pts(3)%p
264 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
267 p1 => tet_msh%msh%elements(i)%e%pts(1)%p
268 p2 => tet_msh%msh%elements(i)%e%pts(7)%p
269 p3 => tet_msh%msh%elements(i)%e%pts(3)%p
270 p4 => tet_msh%msh%elements(i)%e%pts(4)%p
271 call tet_msh%el(j)%init(j, p1, p2, p3, p4)
Defines a tetrahedral mesh.
subroutine tet_mesh_bisect_svtc(tet_msh)
Bisect each hexahedron into six tetrahedrons.
subroutine tet_mesh_bisect_otpv(tet_msh)
subroutine tet_mesh_bisect_fvtc(tet_msh)
Bisect each hexahedron into five tetrahedrons.
integer, parameter, public tet_msh_otpv
subroutine tet_mesh_init(this, msh, mthd)
Initialise a tetrahedral mesh based on a hexahedral mesh msh.
subroutine tet_mesh_free(this)
Deallocate a tetrahedral mesh.
integer, parameter, public tet_msh_fvtc
integer, parameter, public tet_msh_svtc
Defines a tetrahedral element.
A point in with coordinates .