FE-Project
Loading...
Searching...
No Matches
scale_mesh_cubedom3d.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module FElib / Mesh / Cubic 3D domain
3!!
4!! @par Description
5!! Manage mesh data of cubic 3D domain for element-based methods
6!!
7!! @author Yuta Kawai, Team SCALE
8!<
9#include "scaleFElib.h"
11 !-----------------------------------------------------------------------------
12 !
13 !++ used modules
14 !
15 use scale_io
16 use scale_precision
17 use scale_prc
18
19 use scale_mesh_base3d, only: &
22
23 use scale_mesh_base2d, only: &
26
27 use scale_localmesh_3d, only: &
31
32 use scale_mesh_rectdom2d, only: &
34
36
37 !-----------------------------------------------------------------------------
38 implicit none
39 private
40
41 !-----------------------------------------------------------------------------
42 !
43 !++ Public type & procedure
44 !
45 type, extends(meshbase3d), public :: meshcubedom3d
46 integer :: negx
47 integer :: negy
48 integer :: negz
49
50 integer :: nprcx
51 integer :: nprcy
52 integer :: nprcz
53
54 real(rp), public :: xmin_gl, xmax_gl
55 real(rp), public :: ymin_gl, ymax_gl
56 real(rp), public :: zmin_gl, zmax_gl
57
58 real(rp), allocatable :: fz(:)
59
60 integer, allocatable :: rcdomijk2lcmeshid(:,:,:)
61
62 logical :: isperiodicx
63 logical :: isperiodicy
64 logical :: isperiodicz
65
66 type(meshrectdom2d) :: mesh2d
67 type(quadrilateralelement) :: refelem2d
68 contains
69 procedure :: init => meshcubedom3d_init
70 procedure :: final => meshcubedom3d_final
71 procedure :: generate => meshcubedom3d_generate
72 procedure :: getmesh2d => meshcubedom3d_getmesh2d
73 procedure :: set_geometric_with_vcoord => meshcubedom3d_set_geometric_with_vcoord
74 end type meshcubedom3d
75
77
78 !-----------------------------------------------------------------------------
79 !
80 !++ Public parameters & variables
81 !
82
83 !-----------------------------------------------------------------------------
84 !
85 !++ Private procedure
86 !
87
88 !-----------------------------------------------------------------------------
89 !
90 !++ Private parameters & variables
91 !
92
93contains
94!> Initialize an object to manage a cubic 3D domain
95!OCL SERIAL
96 subroutine meshcubedom3d_init( this, &
97 NeGX, NeGY, NeGZ, &
98 dom_xmin, dom_xmax, dom_ymin, dom_ymax, dom_zmin, dom_zmax, &
99 isPeriodicX, isPeriodicY, isPeriodicZ, &
100 refElem, NLocalMeshPerPrc, NprcX, NprcY, &
101 nproc, myrank, &
102 FZ )
103
104 implicit none
105
106 class(meshcubedom3d), intent(inout) :: this
107 integer, intent(in) :: NeGX
108 integer, intent(in) :: NeGY
109 integer, intent(in) :: NeGZ
110 real(RP), intent(in) :: dom_xmin
111 real(RP), intent(in) :: dom_xmax
112 real(RP), intent(in) :: dom_ymin
113 real(RP), intent(in) :: dom_ymax
114 real(RP), intent(in) :: dom_Zmin
115 real(RP), intent(in) :: dom_zmax
116 logical, intent(in) :: isPeriodicX
117 logical, intent(in) :: isPeriodicY
118 logical, intent(in) :: isPeriodicZ
119 type(hexahedralelement), intent(in), target :: refElem
120 integer, intent(in) :: NLocalMeshPerPrc
121 integer, intent(in) :: NprcX
122 integer, intent(in) :: NprcY
123 integer, intent(in), optional :: nproc
124 integer, intent(in), optional :: myrank
125 real(RP), intent(in), optional :: FZ(NeGZ+1)
126
127 integer :: k
128 real(RP) :: dz
129 !-----------------------------------------------------------------------------
130
131 this%NeGX = negx
132 this%NeGY = negy
133 this%NeGZ = negz
134
135 this%xmin_gl = dom_xmin
136 this%xmax_gl = dom_xmax
137 this%ymin_gl = dom_ymin
138 this%ymax_gl = dom_ymax
139 this%zmin_gl = dom_zmin
140 this%zmax_gl = dom_zmax
141 this%dom_vol = (this%xmax_gl - this%xmin_gl) * (this%ymax_gl - this%ymin_gl) * (this%zmax_gl - this%zmin_gl)
142
143 this%isPeriodicX = isperiodicx
144 this%isPeriodicY = isperiodicy
145 this%isPeriodicZ = isperiodicz
146
147 this%NprcX = nprcx
148 this%NprcY = nprcy
149 this%NprcZ = 1
150
151 !- Fz
152 allocate( this%FZ(this%NeGZ+1) )
153 if ( present(fz) ) then
154 this%FZ(:) = fz(:)
155 else
156 this%FZ(1 ) = dom_zmin
157 this%FZ(this%NeGZ+1) = dom_zmax
158 dz = (dom_zmax - dom_zmin) / dble(this%NeGZ)
159 do k=2, this%NeGZ
160 this%FZ(k) = this%FZ(k-1) + dz
161 end do
162 end if
163
164 !--
165 call meshbase3d_init( this, refelem, nlocalmeshperprc, 6, &
166 nproc, myrank )
167
168 !--- 2D mesh
169
170 call this%refElem2D%Init( this%refElem3D%PolyOrder_h, refelem%IsLumpedMatrix() )
171
172 call this%mesh2D%Init( this%NeGX, this%NeGY, dom_xmin, dom_xmax, dom_ymin, dom_ymax, &
173 isperiodicx, isperiodicy, this%refElem2D, nlocalmeshperprc, &
174 nprcx, nprcy, nproc, myrank )
175
176 return
177 end subroutine meshcubedom3d_init
178
179!> Finalize an object to manage a cubic 3D domain
180!OCL SERIAL
181 subroutine meshcubedom3d_final( this )
182 use scale_prc
183 implicit none
184
185 class(meshcubedom3d), intent(inout) :: this
186 !-----------------------------------------------------------------------------
187
188 if (this%isGenerated) then
189 if ( allocated(this%rcdomIJK2LCMeshID) ) then
190 deallocate( this%rcdomIJK2LCMeshID )
191 end if
192 else
193 if ( allocated( this%FZ ) ) deallocate( this%FZ )
194 end if
195
196 call this%mesh2D%Final()
197 call this%refElem2D%Final()
198
199 call meshbase3d_final(this)
200
201 return
202 end subroutine meshcubedom3d_final
203
204!OCL SERIAL
205 subroutine meshcubedom3d_getmesh2d( this, ptr_mesh2D )
206 implicit none
207 class(meshcubedom3d), intent(in), target :: this
208 class(meshbase2d), pointer, intent(out) :: ptr_mesh2D
209 !-------------------------------------------------------
210
211 ptr_mesh2d => this%mesh2D
212 return
213 end subroutine meshcubedom3d_getmesh2d
214
215!> Generate a cubic 3D computational domain based on the parameters set in the initialization
216!OCL SERIAL
217 subroutine meshcubedom3d_generate( this )
218 implicit none
219
220 class(meshcubedom3d), intent(inout), target :: this
221
222 integer :: n
223 type(localmesh3d), pointer :: mesh
224
225 integer :: tileID_table(this%LOCAL_MESH_NUM, this%PRC_NUM)
226 integer :: panelID_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
227 integer :: pi_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
228 integer :: pj_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
229 integer :: pk_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
230
231 integer :: TILE_NUM_PER_PANEL
232 integer :: tileID
233 !-----------------------------------------------------------------------------
234
235 tile_num_per_panel = this%LOCAL_MESH_NUM_global / 1
236
237
238 !--- Construct the connectivity of patches (only master node)
239
240 call messhcubedom3d_assigndomid( this, & ! (in)
241 tileid_table, panelid_table, & ! (out)
242 pi_table, pj_table, pk_table ) ! (out)
243
244 !--- Setup local meshes managed by my process
245
246 do n=1, this%LOCAL_MESH_NUM
247 mesh => this%lcmesh_list(n)
248 tileid = tileid_table(n, mesh%PRC_myrank+1)
249
250 call meshcubedom3d_setuplocaldom( mesh, &
251 tileid, panelid_table(tileid), &
252 pi_table(tileid), pj_table(tileid), pk_table(tileid), this%NprcX, this%NprcY, this%NprcZ, &
253 this%xmin_gl, this%xmax_gl, this%ymin_gl, this%ymax_gl, this%zmin_gl, this%zmax_gl, &
254 this%NeGX/this%NprcX, this%NeGY/this%NprcY, this%NeGZ/this%NprcZ, this%FZ(:) )
255
256 call meshrectdom2d_setuplocaldom( this%mesh2D%lcmesh_list(n), &
257 tileid, panelid_table(tileid), &
258 pi_table(tileid), pj_table(tileid), this%NprcX, this%NprcY, &
259 this%xmin_gl, this%xmax_gl, this%ymin_gl, this%ymax_gl, &
260 this%NeGX/this%NprcX, this%NeGY/this%NprcY )
261
262 call mesh%SetLocalMesh2D( this%mesh2D%lcmesh_list(n) )
263 !---
264 ! write(*,*) "** my_rank=", mesh%PRC_myrank
265 ! write(*,*) " tileID:", mesh%tileID
266 ! write(*,*) " pnlID:", mesh%panelID, "-- i,j (within a panel)=", pi_table(tileID), pj_table(tileID)
267 ! write(*,*) " local mesh:", n, "( total", this%LOCAL_MESH_NUM, ")"
268 ! write(*,*) " panel_connect:", this%tilePanelID_globalMap(:,mesh%tileID)
269 ! write(*,*) " tile_connect:", this%tileID_globalMap(:,mesh%tileID)
270 ! write(*,*) " face_connect:", this%tileFaceID_globalMap(:,mesh%tileID)
271 ! write(*,*) " domain size"
272 ! write(*,*) " NeX, NeY:", mesh%NeX, mesh%NeY
273 ! write(*,*) " [X], [Y]:", mesh%xmin, mesh%xmax, ":", mesh%ymin, mesh%ymax
274 end do
275
276 ! To set rcdomIJP2LCMeshID, call AssignDomID for 2D mesh
277 call this%mesh2D%AssignDomID( &
278 tileid_table, panelid_table, & ! (out)
279 pi_table, pj_table ) ! (out)
280
281 this%isGenerated = .true.
282 this%mesh2D%isGenerated = .true.
283
284 deallocate( this%FZ )
285
286 return
287 end subroutine meshcubedom3d_generate
288
289!OCL SERIAL
290 subroutine meshcubedom3d_set_geometric_with_vcoord(this, lcdomID, GsqrtV_lc, zlev_lc, G13_lc, G23_lc)
291 implicit none
292 class(meshcubedom3d), intent(inout), target :: this
293 integer, intent(in) :: lcdomID
294 real(RP), intent(in) :: GsqrtV_lc(this%refElem3D%Np,this%lcmesh_list(lcdomID)%NeA)
295 real(RP), intent(in) :: zlev_lc(this%refElem3D%Np,this%lcmesh_list(lcdomID)%NeA)
296 real(RP), intent(in) :: G13_lc(this%refElem3D%Np,this%lcmesh_list(lcdomID)%NeA)
297 real(RP), intent(in) :: G23_lc(this%refElem3D%Np,this%lcmesh_list(lcdomID)%NeA)
298
299 integer :: ke
300 class(localmesh3d), pointer :: lcmesh
301 !-------------------------------------------------------
302
303 lcmesh => this%lcmesh_list(lcdomid)
304
305 !$omp parallel private(ke)
306 !$omp do
307 do ke=lcmesh%NeS, lcmesh%NeE
308 lcmesh%zlev(:,ke) = zlev_lc(:,ke)
309 end do
310 !$omp do
311 do ke=lcmesh%NeS, lcmesh%NeA
312 lcmesh%Gsqrt(:,ke) = gsqrtv_lc(:,ke)
313 lcmesh%GI3(:,ke,1) = g13_lc(:,ke)
314 lcmesh%GI3(:,ke,2) = g23_lc(:,ke)
315 end do
316 !$omp end parallel
317
318 return
319 end subroutine meshcubedom3d_set_geometric_with_vcoord
320
321 !- private ------------------------------------------------------
322
323!OCL SERIAL
324 subroutine meshcubedom3d_setuplocaldom( lcmesh, &
325 tileID, panelID, &
326 i, j, k, NprcX, NprcY, NprcZ, &
327 dom_xmin, dom_xmax, dom_ymin, dom_ymax, dom_zmin, dom_zmax, &
328 NeX, NeY, NeZ, &
329 FZ )
330
331 use scale_prof
332 use scale_meshutil_3d, only: &
337
339 implicit none
340
341 type(localmesh3d), intent(inout) :: lcmesh
342 integer, intent(in) :: tileID
343 integer, intent(in) :: panelID
344 integer, intent(in) :: i, j, k
345 integer, intent(in) :: NprcX, NprcY, NprcZ
346 real(RP), intent(in) :: dom_xmin, dom_xmax
347 real(RP), intent(in) :: dom_ymin, dom_ymax
348 real(RP), intent(in) :: dom_Zmin, dom_zmax
349 integer, intent(in) :: NeX, NeY, NeZ
350 real(RP), intent(in) :: FZ(NeZ*NprcZ+1)
351
352 class(elementbase3d), pointer :: elem
353 real(RP) :: delx, dely
354 real(RP) :: FZ_lc(NeZ+1)
355
356 integer :: ii, jj, kk
357 integer :: ke
358 !-----------------------------------------------------------------------------
359
360 elem => lcmesh%refElem3D
361 lcmesh%tileID = tileid
362 lcmesh%panelID = panelid
363
364 !--
365 lcmesh%Ne = nex * ney * nez
366 lcmesh%Nv = (nex + 1)*(ney + 1)*(nez + 1)
367 lcmesh%NeS = 1
368 lcmesh%NeE = lcmesh%Ne
369 lcmesh%NeA = lcmesh%Ne + 2*(nex + ney)*nez + 2*nex*ney
370
371 lcmesh%NeX = nex
372 lcmesh%NeY = ney
373 lcmesh%NeZ = nez
374
375 lcmesh%Ne2D = nex * ney
376 lcmesh%Ne2DA = nex * ney + 2*(nex + ney)
377
378 !--
379 delx = (dom_xmax - dom_xmin)/dble(nprcx)
380 dely = (dom_ymax - dom_ymin)/dble(nprcy)
381 fz_lc(:) = fz((k-1)*nez+1:k*nez+1)
382 lcmesh%xmin = dom_xmin + (i-1)*delx
383 lcmesh%xmax = dom_xmin + i *delx
384 lcmesh%ymin = dom_ymin + (j-1)*dely
385 lcmesh%ymax = dom_ymin + j *dely
386 lcmesh%zmin = fz_lc(1)
387 lcmesh%zmax = fz_lc(nez+1)
388
389 !-
390 allocate( lcmesh%pos_ev(lcmesh%Nv,3) )
391 allocate( lcmesh%EToV(lcmesh%Ne,elem%Nv) )
392 allocate( lcmesh%EToE(lcmesh%Ne,elem%Nfaces) )
393 allocate( lcmesh%EToF(lcmesh%Ne,elem%Nfaces) )
394 allocate( lcmesh%BCType(lcmesh%refElem%Nfaces,lcmesh%Ne) )
395 allocate( lcmesh%VMapM(elem%NfpTot, lcmesh%Ne) )
396 allocate( lcmesh%VMapP(elem%NfpTot, lcmesh%Ne) )
397 allocate( lcmesh%MapM(elem%NfpTot, lcmesh%Ne) )
398 allocate( lcmesh%MapP(elem%NfpTot, lcmesh%Ne) )
399
400 allocate( lcmesh%EMap3Dto2D(lcmesh%Ne) )
401
402 lcmesh%BCType(:,:) = bctype_interior
403
404 !----
405
406 call meshutil3d_gencubedomain( lcmesh%pos_ev, lcmesh%EToV, & ! (out)
407 lcmesh%NeX, lcmesh%xmin, lcmesh%xmax, & ! (in)
408 lcmesh%NeY, lcmesh%ymin, lcmesh%ymax, & ! (in)
409 lcmesh%NeZ, lcmesh%zmin, lcmesh%zmax, fz=fz_lc ) ! (in)
410
411 !---
412 call meshbase3d_setgeometricinfo( lcmesh, meshcubedom3d_coord_conv, meshcubedom3d_calc_normal )
413
414 !---
415 call meshutil3d_genconnectivity( lcmesh%EToE, lcmesh%EToF, & ! (out)
416 lcmesh%EToV, lcmesh%Ne, elem%Nfaces ) ! (in)
417
418 !---
419 call meshutil3d_buildinteriormap( lcmesh%VmapM, lcmesh%VMapP, lcmesh%MapM, lcmesh%MapP, & ! (out)
420 lcmesh%pos_en, lcmesh%pos_ev, lcmesh%EToE, lcmesh%EtoF, lcmesh%EtoV, & ! (in)
421 elem%Fmask_h, elem%Fmask_v, lcmesh%Ne, lcmesh%Nv, elem%Np, elem%Nfp_h, elem%Nfp_v, elem%NfpTot, & ! (in)
422 elem%Nfaces_h, elem%Nfaces_v, elem%Nfaces ) ! (in)
423
424 call meshutil3d_genpatchboundarymap( lcmesh%VMapB, lcmesh%MapB, lcmesh%VMapP, & !(out)
425 lcmesh%pos_en, lcmesh%xmin, lcmesh%xmax, lcmesh%ymin, lcmesh%ymax, lcmesh%zmin, lcmesh%zmax, & ! (in)
426 elem%Fmask_h, elem%Fmask_v, lcmesh%Ne, lcmesh%Nv, elem%Np, elem%Nfp_h, elem%Nfp_v, elem%NfpTot, & ! (in)
427 elem%Nfaces_h, elem%Nfaces_v, elem%Nfaces ) ! (in)
428
429 !---
430 !$omp parallel do collapse(2) private(ii,ke)
431 do kk=1, lcmesh%NeZ
432 do jj=1, lcmesh%NeY
433 do ii=1, lcmesh%NeX
434 ke = ii + (jj-1) * lcmesh%NeX + (kk-1) * lcmesh%NeX * lcmesh%NeY
435 lcmesh%EMap3Dto2D(ke) = ii + (jj-1) * lcmesh%NeX
436 end do
437 end do
438 end do
439
440 return
441 end subroutine meshcubedom3d_setuplocaldom
442
443!OCL SERIAL
444 subroutine messhcubedom3d_assigndomid( this, &
445 tileID_table, panelID_table, &
446 pi_table, pj_table, pk_table )
447
448 use scale_meshutil_3d, only: &
450 implicit none
451
452 type(meshcubedom3d), target, intent(inout) :: this
453 integer, intent(out) :: tileID_table(this%LOCAL_MESH_NUM, this%PRC_NUM)
454 integer, intent(out) :: panelID_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
455 integer, intent(out) :: pi_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
456 integer, intent(out) :: pj_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
457 integer, intent(out) :: pk_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
458
459 integer :: n
460 integer :: p
461 integer :: tileID
462 integer :: is_lc, js_lc, ks_lc
463 integer :: ilc_count, jlc_count, klc_count
464 integer :: ilc, jlc, klc
465
466 type(localmesh3d), pointer :: lcmesh
467 !-----------------------------------------------------------------------------
468
470 panelid_table, pi_table, pj_table, pk_table, & ! (out)
471 this%tileID_globalMap, this%tileFaceID_globalMap, this%tilePanelID_globalMap, & ! (out)
472 this%LOCAL_MESH_NUM_global, 6, 8, & ! (in)
473 this%isPeriodicX, this%isPeriodicY, this%isPeriodicZ, & ! (in)
474 this%NprcX, this%NprcY, this%NprcZ ) ! (in)
475
476 !----
477
478 do p=1, this%PRC_NUM
479 do n=1, this%LOCAL_MESH_NUM
480 tileid = n + (p-1)*this%LOCAL_MESH_NUM
481 lcmesh => this%lcmesh_list(n)
482 !-
483 tileid_table(n,p) = tileid
484 this%tileID_global2localMap(tileid) = n
485 this%PRCRank_globalMap(tileid) = p - 1
486
487 !-
488 if ( this%PRCRank_globalMap(tileid) == lcmesh%PRC_myrank ) then
489 if (n==1) then
490 is_lc = pi_table(tileid); ilc_count = 1
491 js_lc = pj_table(tileid); jlc_count = 1
492 ks_lc = pk_table(tileid); klc_count = 1
493 end if
494 if(is_lc < pi_table(tileid)) ilc_count = ilc_count + 1
495 if(js_lc < pj_table(tileid)) jlc_count = jlc_count + 1
496 if(ks_lc < pk_table(tileid)) klc_count = klc_count + 1
497 end if
498 end do
499 end do
500
501 allocate( this%rcdomIJK2LCMeshID(ilc_count,jlc_count,klc_count) )
502 do klc=1, klc_count
503 do jlc=1, jlc_count
504 do ilc=1, ilc_count
505 this%rcdomIJK2LCMeshID(ilc,jlc,klc) = ilc + (jlc - 1)*ilc_count + (klc - 1)*ilc_count*jlc_count
506 end do
507 end do
508 end do
509
510 return
511 end subroutine messhcubedom3d_assigndomid
512
513!OCL SERIAL
514 subroutine meshcubedom3d_coord_conv( x, y, z, xX, xY, xZ, yX, yY, yZ, zX, zY, zZ, &
515 vx, vy, vz, elem )
516
517 implicit none
518
519 type(elementbase3d), intent(in) :: elem
520 real(rp), intent(out) :: x(elem%np), y(elem%np), z(elem%np)
521 real(rp), intent(out) :: xx(elem%np), xy(elem%np), xz(elem%np)
522 real(rp), intent(out) :: yx(elem%np), yy(elem%np), yz(elem%np)
523 real(rp), intent(out) :: zx(elem%np), zy(elem%np), zz(elem%np)
524 real(rp), intent(in) :: vx(elem%nv), vy(elem%nv), vz(elem%nv)
525
526 !-------------------------------------------------
527
528 x(:) = vx(1) + 0.5_rp*(elem%x1(:) + 1.0_rp)*(vx(2) - vx(1))
529 y(:) = vy(1) + 0.5_rp*(elem%x2(:) + 1.0_rp)*(vy(3) - vy(1))
530 z(:) = vz(1) + 0.5_rp*(elem%x3(:) + 1.0_rp)*(vz(5) - vz(1))
531
532 xx(:) = 0.5_rp*(vx(2) - vx(1)) !matmul(refElem%Dx1,mesh%x1(:,n))
533 xy(:) = 0.0_rp !matmul(refElem%Dx2,mesh%x1(:,n))
534 xz(:) = 0.0_rp !matmul(refElem%Dx3,mesh%x1(:,n))
535 yx(:) = 0.0_rp !matmul(refElem%Dx1,mesh%x2(:,n))
536 yy(:) = 0.5_rp*(vy(3) - vy(1)) !matmul(refElem%Dx2,mesh%x2(:,n))
537 yz(:) = 0.0_rp !matmul(refElem%Dx3,mesh%x2(:,n))
538 zx(:) = 0.0_rp !matmul(refElem%Dx1,mesh%x3(:,n))
539 zy(:) = 0.0_rp !matmul(refElem%Dx2,mesh%x3(:,n))
540 zz(:) = 0.5_rp*(vz(5) - vz(1)) !matmul(refElem%Dx3,mesh%x3(:,n))
541
542 return
543 end subroutine meshcubedom3d_coord_conv
544
545!OCL SERIAL
546 subroutine meshcubedom3d_calc_normal( normal_fn, &
547 Escale_f, fid_h, fid_v, elem )
548
549 implicit none
550
551 type(elementbase3d), intent(in) :: elem
552 real(rp), intent(out) :: normal_fn(elem%nfptot,3)
553 integer, intent(in) :: fid_h(elem%nfp_h,elem%nfaces_h)
554 integer, intent(in) :: fid_v(elem%nfp_v,elem%nfaces_v)
555 real(rp), intent(in) :: escale_f(elem%nfptot,3,3)
556
557 integer :: d
558 !-------------------------------------------------
559
560 do d=1, 3
561 normal_fn(fid_h(:,1),d) = - escale_f(fid_h(:,1),2,d)
562 normal_fn(fid_h(:,2),d) = + escale_f(fid_h(:,2),1,d)
563 normal_fn(fid_h(:,3),d) = + escale_f(fid_h(:,3),2,d)
564 normal_fn(fid_h(:,4),d) = - escale_f(fid_h(:,4),1,d)
565
566 normal_fn(fid_v(:,1),d) = - escale_f(fid_v(:,1),3,d)
567 normal_fn(fid_v(:,2),d) = + escale_f(fid_v(:,2),3,d)
568 end do
569
570 return
571 end subroutine meshcubedom3d_calc_normal
572
573end module scale_mesh_cubedom3d
module FElib / Element / Base
module FElib / Element / hexahedron
module FElib / Element / Quadrilateral
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
integer, parameter, public bctype_interior
module FElib / Mesh / Base 2D
subroutine, public meshbase2d_final(this)
subroutine, public meshbase2d_init(this, refelem, nlocalmeshperprc, nprocs, myrank)
subroutine, public meshbase2d_setgeometricinfo(lcmesh, coord_conv, calc_normal)
module FElib / Mesh / Base 3D
subroutine, public meshbase3d_init(this, refelem, nlocalmeshperprc, nsidetile, nproc, myrank)
subroutine, public meshbase3d_final(this)
subroutine, public meshbase3d_setgeometricinfo(lcmesh, coord_conv, calc_normal)
module FElib / Mesh / Cubic 3D domain
subroutine meshcubedom3d_init(this, negx, negy, negz, dom_xmin, dom_xmax, dom_ymin, dom_ymax, dom_zmin, dom_zmax, isperiodicx, isperiodicy, isperiodicz, refelem, nlocalmeshperprc, nprcx, nprcy, nproc, myrank, fz)
Initialize an object to manage a cubic 3D domain.
subroutine, public meshcubedom3d_coord_conv(x, y, z, xx, xy, xz, yx, yy, yz, zx, zy, zz, vx, vy, vz, elem)
module FElib / Mesh / Rectangle 2D domain
subroutine, public meshrectdom2d_setuplocaldom(lcmesh, tileid, panelid, i, j, nprcx, nprcy, dom_xmin, dom_xmax, dom_ymin, dom_ymax, nex, ney)
module FElib / Mesh / utility for 3D mesh
subroutine, public meshutil3d_buildglobalmap(panelid_table, pi_table, pj_table, pk_table, tileid_map, tilefaceid_map, tilepanelid_map, ntile, ntileface, ntilevertex, isperiodicx, isperiodicy, isperiodicz, ne_x, ne_y, ne_z)
subroutine, public meshutil3d_buildinteriormap(vmapm, vmapp, mapm, mapp, pos_en, pos_ev, etoe, etof, etov, fmask_h, fmask_v, ne, nv, np, nfp_h, nfp_v, nfptot, nfaces_h, nfaces_v, nfaces)
subroutine, public meshutil3d_genconnectivity(etoe, etof, etov, ne, nfaces)
subroutine, public meshutil3d_gencubedomain(pos_v, etov, ke_x, xmin, xmax, ke_y, ymin, ymax, ke_z, zmin, zmax, fz)
subroutine, public meshutil3d_genpatchboundarymap(vmapb, mapb, vmapp, pos_en, xmin, xmax, ymin, ymax, zmin, zmax, fmask_h, fmask_v, ne, nv, np, nfp_h, nfp_v, nfptot, nfaces_h, nfaces_v, nfaces)
Derived type representing a 3D reference element.
Derived type representing a hexahedral element.
Derived type representing a quadrilateral element.
Derived type to manage a local 3D computational domain.