FE-Project
Loading...
Searching...
No Matches
scale_meshutil_1d Module Reference

module FElib / Mesh / utility for 1D mesh More...

Functions/Subroutines

subroutine, public meshutil1d_genlinedomain (pos_v, etov, ke_x, xmin, xmax, fx)
subroutine, public meshutil1d_genconnectivity (etoe, etof, etov, ne, nfaces)
subroutine, public meshutil1d_buildinteriormap (vmapm, vmapp, mapm, mapp, pos_en, pos_ev, etoe, etof, etov, fmask, ne, np, nfp, nfaces, nv)
subroutine, public meshutil1d_genpatchboundarymap (vmapb, mapb, vmapp, pos_en, xmin, xmax, fmask, ne, np, nfp, nfaces, nv)
subroutine, public meshutil1d_genpatchboundarymap_wide (vmapb2, vmapb, halosize, nex, np)
subroutine, public meshutil1d_genperiodicboundarymap (etoe, etof, vmapp, xperiod, x, fx, fmask, ne, np, nfp, nfaces, nv)
subroutine, public meshutil1d_buildglobalmap (panelid_table, pi_table, tileid_map, tilefaceid_map, tilepanelid_map, ntile)

Detailed Description

module FElib / Mesh / utility for 1D mesh

Description
A module useful for generating 1D mesh
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ meshutil1d_genlinedomain()

subroutine, public scale_meshutil_1d::meshutil1d_genlinedomain ( real(rp), dimension(ke_x+1,1), intent(out) pos_v,
integer, dimension(ke_x,2), intent(out) etov,
integer, intent(in) ke_x,
real(rp), intent(in) xmin,
real(rp), intent(in) xmax,
real(rp), dimension(ke_x+1), intent(in), optional fx )

Definition at line 37 of file scale_meshutil_1d.F90.

40
41 implicit none
42
43 integer, intent(in) :: Ke_x
44 real(RP), intent(in) :: xmin, xmax
45 real(RP), intent(in), optional :: Fx(Ke_x+1)
46
47 real(RP), intent(out) :: pos_v(Ke_x+1,1)
48 integer, intent(out) :: EToV(Ke_x,2)
49
50 integer :: i
51 integer :: n
52 integer :: NvX
53
54 !-----------------------------------------------------------------------------
55
56 nvx = ke_x + 1
57
58 do i=1, nvx
59 if (present(fx) ) then
60 pos_v(i,1) = fx(i)
61 else
62 pos_v(i,1) = (xmax - xmin)*dble(i - 1)/dble(nvx - 1) + xmin
63 end if
64 end do
65
66 do i=1, ke_x
67 etov(i,1:2) = (/ i, i+1 /)
68 end do
69
70 !---
71 !!$
72 !!$ write(*,*) "-- vx, vy --"
73 !!$ do j=1, NvY
74 !!$ do i=1, NvX
75 !!$ n = i + (j-1)*NvY
76 !!$ write(*,*) i, j, " :", mesh%vx(n), mesh%vy(n)
77 !!$ end do
78 !!$ end do
79 !!$
80 !!$ write(*,*) "-- EToV --"
81 !!$ do j=1, Ke_y
82 !!$ do i=1, Ke_x
83 !!$ n = i + (j-1)*Ke_y
84 !!$ write(*,*) i, j, " :", mesh%EToV(n,:)
85 !!$ end do
86 !!$ end do
87
88 return

Referenced by scale_mesh_base1d::meshbase1d_setuplocaldom().

◆ meshutil1d_genconnectivity()

subroutine, public scale_meshutil_1d::meshutil1d_genconnectivity ( integer, dimension(ne, nfaces), intent(out) etoe,
integer, dimension(ne, nfaces), intent(out) etof,
integer, dimension(ne,2), intent(in) etov,
integer, intent(in) ne,
integer, intent(in) nfaces )

Definition at line 92 of file scale_meshutil_1d.F90.

94
95 implicit none
96
97 integer, intent(in) :: Ne
98 integer, intent(in) :: Nfaces
99 integer, intent(out) :: EToE(Ne, Nfaces)
100 integer, intent(out) :: EToF(Ne, Nfaces)
101 integer, intent(in) :: EToV(Ne,2)
102
103 integer :: nodes(Ne*Nfaces,1)
104 integer :: face_ids(Ne*Nfaces)
105 integer :: spNodeToNode(Ne*Nfaces,4)
106 integer :: k
107 integer :: f
108 integer :: n
109 integer :: n1, n2
110 integer :: Nnodes
111 integer :: tmp
112 integer :: spNodeToNodeRowTmp(4)
113 integer :: Nnodes_row
114 integer :: matchL(2,4), matchR(2,4)
115
116 real(RP) :: EToE_1d(Ne*Nfaces)
117 real(RP) :: EToF_1d(Ne*Nfaces)
118 !-----------------------------------------------------------------------------
119
120 nnodes = maxval( etov )
121 nnodes_row = size(nodes,1)
122
123 !---------
124 do n=1, ne
125 nodes(n ,:) = etov(n,(/ 1 /))
126 nodes(n+ne ,:) = etov(n,(/ 2 /))
127 end do
128 nodes = nodes - 1
129
130 !---------
131
132 do n=1, ne
133 etoe(n,:) = n
134 etof(n,:) = (/ 1, 2 /)
135 end do
136
137 face_ids(:) = nodes(:,1) + 1
138
139 do f=1, nfaces
140 do k=1, ne
141 n = k + (f-1)*ne
142 spnodetonode(n,:) = (/ face_ids(n), n, etoe(k,f), etof(k,f) /)
143 ! write(*,*) "face_id, n, EToE, EToF:", spNodeToNode(n,:)
144 end do
145 end do
146
147 ! Sort row
148 do n1=1, nnodes_row-1
149 do n2=n1+1, nnodes_row
150 if (spnodetonode(n1,1) > spnodetonode(n2,1)) then
151 spnodetonoderowtmp(:) = spnodetonode(n1,:)
152 spnodetonode(n1,:) = spnodetonode(n2,:)
153 spnodetonode(n2,:) = spnodetonoderowtmp
154 end if
155 end do
156 end do
157
158 ! do n=1, Nnodes_row
159 ! write(*,*) "(sorted) face_id, n, EToE, EToF:", spNodeToNode(n,:)
160 ! end do
161
162 !
163 etoe_1d(:) = -1
164 etof_1d(:) = -1
165 do n=1, nnodes_row-1
166 if ( spnodetonode(n,1) - spnodetonode(n+1,1) == 0 ) then
167 matchl(:,:) = spnodetonode((/ n, n+1 /), :)
168 matchr(:,:) = spnodetonode((/ n+1, n /), :)
169
170 etoe_1d(matchl(:,2)) = matchr(:,3)
171 etof_1d(matchl(:,2)) = matchr(:,4)
172 end if
173 end do
174
175 do f=1, nfaces
176 do k=1, ne
177 n = k + (f-1)*ne
178 if ( etoe_1d(n) /= -1 ) then
179 etoe(k,f) = etoe_1d(n)
180 etof(k,f) = etof_1d(n)
181 end if
182 end do
183 end do
184
185 !-------------------
186
187! write(*,*) "EToE------"
188! do k=1, mesh%Ne
189! write(*,*) "k=", k, ":", mesh%EToE(k,:)
190! end do
191! write(*,*) "EToF------"
192! do k=1, mesh%Ne
193! write(*,*) "k=", k, ":", mesh%EToF(k,:)
194! end do
195
196 return

Referenced by scale_mesh_base1d::meshbase1d_setuplocaldom(), and meshutil1d_buildglobalmap().

◆ meshutil1d_buildinteriormap()

subroutine, public scale_meshutil_1d::meshutil1d_buildinteriormap ( integer, dimension(nfp,nfaces,ne), intent(out) vmapm,
integer, dimension(nfp,nfaces,ne), intent(out) vmapp,
integer, dimension(nfp,nfaces,ne), intent(out) mapm,
integer, dimension(nfp,nfaces,ne), intent(out) mapp,
real(rp), dimension(np,ne,1), intent(in) pos_en,
real(rp), dimension(nv,1), intent(in) pos_ev,
integer, dimension(ne, nfaces), intent(in) etoe,
integer, dimension(ne, nfaces), intent(in) etof,
integer, dimension(ne,2), intent(in) etov,
integer, dimension(nfp,2), intent(in) fmask,
integer, intent(in) ne,
integer, intent(in) np,
integer, intent(in) nfp,
integer, intent(in) nfaces,
integer, intent(in) nv )

Definition at line 200 of file scale_meshutil_1d.F90.

202
203
204 implicit none
205
206 integer, intent(in) :: Ne
207 integer, intent(in) :: Np
208 integer, intent(in) :: Nfp
209 integer, intent(in) :: Nfaces
210 integer, intent(in) :: Nv
211
212 integer, intent(out) :: VMapM(Nfp,Nfaces,Ne)
213 integer, intent(out) :: VMapP(Nfp,Nfaces,Ne)
214 integer, intent(out) :: MapM(Nfp,Nfaces,Ne)
215 integer, intent(out) :: MapP(Nfp,Nfaces,Ne)
216
217 real(RP), intent(in) :: pos_en(Np,Ne,1)
218 real(RP), intent(in) :: pos_ev(Nv,1)
219 integer, intent(in) :: EToE(Ne, Nfaces)
220 integer, intent(in) :: EToF(Ne, Nfaces)
221 integer, intent(in) :: EToV(Ne,2)
222 integer, intent(in) :: Fmask(Nfp,2)
223
224
225 integer :: k, k1, k2
226 integer :: f, f1, f2
227 integer :: p
228 integer :: n
229 integer :: idP, idM
230 integer :: v1, v2
231 integer :: nodeids(Np,Ne)
232 real(RP) :: refd2
233 real(RP) :: x1(Nfp,Nfp), x2(Nfp,Nfp)
234 real(RP) :: dist(Nfp,Nfp)
235 real(RP) :: x(Np*Ne)
236 !-----------------------------------------------------------------------------
237
238 do k=1, ne
239 do p=1, np
240 n = p + (k-1)*np
241 nodeids(p,k) = n
242 x(n) = pos_en(p,k,1)
243 end do
244 end do
245
246 do k=1, ne
247 do f=1, nfaces
248 do p=1, nfp
249 n = p + (f-1)*nfp + (k-1)*nfp*nfaces
250 mapm(p,f,k) = n
251 mapp(p,f,k) = n
252 vmapm(p,f,k) = nodeids(fmask(p,f),k)
253 end do
254 end do
255 end do
256
257 vmapp(:,:,:) = -1
258 do k1=1, ne
259 do f1=1, nfaces
260 k2 = etoe(k1,f1); f2 = etof(k1,f1)
261
262 v1 = etov(k1,f1); v2 = etov(k1,1+mod(f1,nfaces))
263 refd2 = (pos_ev(v1,1) - pos_ev(v2,1))**2
264
265 x1(:,:) = spread( x(vmapm(:,f1,k1)), 2, nfp )
266 x2(:,:) = spread( x(vmapm(:,f2,k2)), 1, nfp )
267
268 dist(:,:) = (x1 - x2)**2
269 do idp=1, nfp
270 do idm=1, nfp
271 if (dist(idm,idp)/refd2 < 1.0e-14_rp) then
272 vmapp(idm,f1,k1) = vmapm(idp,f2,k2)
273 mapp(idm,f1,k1) = idp + (f2-1)*nfp + (k2-1)*nfp*nfaces
274 end if
275 end do
276 end do
277 end do
278 end do
279
280 !-----
281! mapB_counter = 0
282! do k=1,mesh%Ne
283! do f=1,elem%Nfaces
284! do p=1,elem%Nfp
285! n = p + (f-1)*elem%Nfp + (k-1)*elem%Nfp*elem%Nfaces
286! if (mesh%VMapM(p,f,k) == mesh%VMapP(p,f,k)) then
287! mapB_counter = mapB_counter + 1
288! mapB_tmp(mapB_counter) = n
289!
290! vmapB_tmp(mapB_counter) = mesh%VMapM(p,f,k)
291! mesh%VMapP(p,f,k) = elem%Np*mesh%NeE + mapB_counter
292! end if
293! end do
294! end do
295! end do
296!
297! allocate( mesh%mapB(mapB_counter) )
298! allocate( mesh%vmapB(mapB_counter) )
299! mesh%mapB(:) = mapB_tmp(1:mapB_counter)
300! mesh%vmapB(:) = vmapB_tmp(1:mapB_counter)
301
302 !-------
303 ! write(*,*) "Build MapInfo: "
304 ! do k=1,Ne
305 ! write(*,*) "k=", k, "---"
306 ! write(*,*) " VMapM:", VMapM(:,:,k)
307 ! write(*,*) " VMapP:", VMapP(:,:,k)
308 ! end do
309
310! write(*,*) "mapB:", mesh%mapB(:)
311! write(*,*) "vmapB:", mesh%vmapB(:)
312
313 return

Referenced by scale_mesh_base1d::meshbase1d_setuplocaldom().

◆ meshutil1d_genpatchboundarymap()

subroutine, public scale_meshutil_1d::meshutil1d_genpatchboundarymap ( integer, dimension(:), intent(inout), allocatable vmapb,
integer, dimension(:), intent(inout), allocatable mapb,
integer, dimension(nfp,nfaces,ne), intent(inout) vmapp,
real(rp), dimension(np,ne,1), intent(in) pos_en,
real(rp), intent(in) xmin,
real(rp), intent(in) xmax,
integer, dimension(nfp,2), intent(in) fmask,
integer, intent(in) ne,
integer, intent(in) np,
integer, intent(in) nfp,
integer, intent(in) nfaces,
integer, intent(in) nv )

Definition at line 317 of file scale_meshutil_1d.F90.

319
320 implicit none
321
322 integer, intent(in) :: Ne
323 integer, intent(in) :: Np
324 integer, intent(in) :: Nfp
325 integer, intent(in) :: Nfaces
326 integer, intent(in) :: Nv
327
328 integer, intent(inout), allocatable :: VMapB(:)
329 integer, intent(inout), allocatable :: MapB(:)
330 integer, intent(inout) :: VMapP(Nfp,Nfaces,Ne)
331
332 real(RP), intent(in) :: pos_en(Np,Ne,1)
333 real(RP), intent(in) :: xmin, xmax
334 integer, intent(in) :: Fmask(Nfp,2)
335
336 integer :: k
337 integer :: b
338 integer :: f
339 integer :: i, j
340 real(RP) :: x
341
342 real(RP), parameter :: NODE_TOL = 1.0e-12_rp
343
344 integer :: elemIDs(Nfp*Ne,2)
345 integer :: faceIDs(Nfp*Ne,2)
346 integer :: counterB(2)
347 integer :: mapB_counter
348 real(RP) :: rdomx
349 !-----------------------------------------------------------------------------
350
351 counterb(:) = 0d0
352 rdomx = 1.0_rp/(xmax - xmin)
353
354 do k=1, ne
355 do f=1, nfaces
356 x = sum(pos_en(fmask(:,f),k,1)/dble(nfp))
357
358 call eval_domain_boundary(1, x, xmin, k, f, rdomx)
359 call eval_domain_boundary(2, x, xmax, k, f, rdomx)
360 end do
361 end do
362
363
364 allocate( mapb(sum(counterb*nfp)) )
365 allocate( vmapb(size(mapb)) )
366
367 mapb_counter = 1
368 do b = 1, 2
369 ! write(*,*) "LocalMesh boundary ID:", b
370 ! write(*,*) counterB(b)
371 ! write(*,*) ordInfo(1:counterB(1),b)
372 ! write(*,*) elemIds(1:counterB(1),b)
373 ! write(*,*) faceIds(1:counterB(1),b)
374
375 do i=1, counterb(b)
376 k = elemids(i,b); f = faceids(i,b)
377 do j=1, nfp
378 vmapp(j,f,k) = np*ne + mapb_counter
379 vmapb(mapb_counter) = fmask(j,f) + (k-1)*np
380 mapb_counter = mapb_counter + 1
381 end do
382 end do
383 end do
384
385 ! write(*,*) "VMapP:-----"
386 ! do b=1, 4
387 ! do i=1, counterB(b)
388 ! k = elemIds(i,b); f = faceIDs(i,b)
389 ! write(*,*) "bid=", b, ":", mesh%VmapP(:,f,k)
390 ! end do
391 ! end do
392 ! write(*,*) "-----"
393 ! write(*,*) "VMapB:", mesh%VmapB(:)
394 ! write(*,*) "NeA=", mesh%NeA
395
396 return
397 contains
398 subroutine eval_domain_boundary(domb_id, r, rbc, k_, f_, normalized_fac)
399 implicit none
400 integer, intent(in) :: domb_id
401 real(RP), intent(in) :: r
402 real(RP), intent(in) :: rbc
403 integer, intent(in) :: k_, f_
404 real(RP), intent(in) :: normalized_fac
405 !-------------------------------------------------------------
406
407 if ( abs(r - rbc)*normalized_fac < node_tol ) then
408 counterb(domb_id) = counterb(domb_id) + 1
409 elemids(counterb(domb_id),domb_id) = k_
410 faceids(counterb(domb_id),domb_id) = f_
411 end if
412
413 return
414 end subroutine eval_domain_boundary

Referenced by scale_mesh_base1d::meshbase1d_setuplocaldom().

◆ meshutil1d_genpatchboundarymap_wide()

subroutine, public scale_meshutil_1d::meshutil1d_genpatchboundarymap_wide ( integer, dimension(2*halosize), intent(inout) vmapb2,
integer, dimension(2), intent(in) vmapb,
integer, intent(in) halosize,
integer, intent(in) nex,
integer, intent(in) np )

Definition at line 418 of file scale_meshutil_1d.F90.

421 use scale_prc, only: prc_abort
422 implicit none
423 integer, intent(in) :: HaloSize
424 integer, intent(in) :: NeX
425 integer, intent(in) :: Np
426 integer, intent(inout) :: VMapB2(2*HaloSize)
427 integer, intent(in) :: VMapB(2)
428
429 integer :: f
430 integer :: iso, isso, i, ii
431 integer :: ke, p, ph, pv
432 !------------------------------------------------------------
433
434 if ( halosize > np ) then
435 log_info("MeshUtil1D_genPatchBoundaryMap_wide",*) "HaloSize should be <= Np. Check!"
436 call prc_abort
437 end if
438
439 !--
440 f = 1
441 iso = 0; isso = 0
442 do ph=1, halosize
443 i = iso + 1
444 ii = isso + ph
445 vmapb2(ii) = vmapb(i) + (ph-1)
446 end do
447
448 !--
449 f = 2
450 iso = iso + 1
451 isso = isso + halosize
452 do ph=1, halosize
453 i = iso + 1
454 ii = isso + ph
455 vmapb2(ii) = vmapb(i) - (ph-1)
456 end do
457 return

◆ meshutil1d_genperiodicboundarymap()

subroutine, public scale_meshutil_1d::meshutil1d_genperiodicboundarymap ( integer, dimension(ne, nfaces), intent(inout) etoe,
integer, dimension(ne, nfaces), intent(inout) etof,
integer, dimension(nfp,nfaces,ne), intent(inout) vmapp,
real(rp), intent(in) xperiod,
real(rp), dimension(np,ne), intent(in) x,
real(rp), dimension(nfp*ne), intent(in) fx,
integer, dimension(nfp,4), intent(in) fmask,
integer, intent(in) ne,
integer, intent(in) np,
integer, intent(in) nfp,
integer, intent(in) nfaces,
integer, intent(in) nv )

Definition at line 461 of file scale_meshutil_1d.F90.

463
464 implicit none
465
466 integer, intent(in) :: Ne
467 integer, intent(in) :: Np
468 integer, intent(in) :: Nfp
469 integer, intent(in) :: Nfaces
470 integer, intent(in) :: Nv
471 integer, intent(inout) :: EToE(Ne, Nfaces)
472 integer, intent(inout) :: EToF(Ne, Nfaces)
473 integer, intent(inout) :: VMapP(Nfp,Nfaces,Ne)
474 real(RP), intent(in) :: xperiod
475 real(RP), intent(in) :: x(Np,Ne)
476 real(RP), intent(in) :: fx(Nfp*Ne)
477 integer, intent(in) :: Fmask(Nfp,4)
478
479 integer :: k, k1, k2
480 integer :: f, f1, f2
481 integer :: p
482 integer :: n
483
484 real(RP) :: cx1, cx2
485 real(RP) :: dx_pbc
486 integer :: idP, idM
487 integer :: vidL(Nfp), vidR(Nfp)
488 integer :: fidL(Nfp), fidR(Nfp)
489
490 real(RP) :: refd2
491 real(RP) :: x1(Nfp,Nfp), x2(Nfp,Nfp)
492 real(RP) :: dist(Nfp,Nfp)
493
494 real(RP), parameter :: NODE_TOL = 1.0e-12_rp
495 !-----------------------------------------------------------------------------
496
497
498 do k1=1, ne
499 do f1=1, nfaces
500 cx1 = sum(x(fmask(:,f1),k1)/dble(nfp))
501
502 k2 = etoe(k1,f1); f2 = etof(k1,f1)
503 if (k2==k1) then
504 do k2=1, ne
505 if (k1 /= k2) then
506 do f2=1, nfaces
507 if (etoe(k2,f2) == k2) then
508 cx2 = sum(x(fmask(:,f2),k2)/dble(nfp))
509
510 dx_pbc = sqrt( (abs(cx1-cx2)-xperiod)**2 )
511
512 if (dx_pbc < node_tol) then
513
514 etoe(k1,f1) = k2; etoe(k2,f2) = k1
515 etof(k1,f1) = f2; etof(k2,f2) = f1
516
517 !mesh%BCType(f1,k1) = BCTYPE_PERIODIC
518 !mesh%BCType(f2,k2) = BCTYPE_PERIODIC
519
520 do p=1, nfp
521 vidl(p) = fmask(p,f1) + (k1-1)*np
522 vidr(p) = fmask(p,f2) + (k2-1)*np
523 fidl(p) = p + (f1-1)*nfp + (k1-1)*nfp*nfaces
524 fidr(p) = p + (f2-1)*nfp + (k2-1)*nfp*nfaces
525 end do
526
527 x1(:,:) = spread( fx(fidl(:)), 2, nfp )
528 x2(:,:) = spread( fx(fidr(:)), 1, nfp )
529
530 dist(:,:) = (abs(x1-x2) -xperiod)**2
531
532 do idp=1,nfp
533 do idm=1,nfp
534 if (dist(idm,idp) < node_tol) then
535 vmapp(idm,f1,k1) = vidr(idp)
536 vmapp(idp,f2,k2) = vidl(idm)
537 end if
538 end do
539 end do
540
541 end if
542 end if
543 end do
544 end if
545 end do
546 end if
547
548 end do
549 end do
550
551 !-------
552
553! write(*,*) "Build MapInfo (Periodic BC): "
554! do k=1,mesh%Ne
555! write(*,*) "k=", k, "---"
556! write(*,*) " VMapM:", mesh%VMapM(:,:,k)
557! write(*,*) " VMapP:", mesh%VMapP(:,:,k)
558! write(*,*) "BCType:", mesh%BCType(:,k)
559! end do
560
561 return

◆ meshutil1d_buildglobalmap()

subroutine, public scale_meshutil_1d::meshutil1d_buildglobalmap ( integer, dimension(ntile), intent(out) panelid_table,
integer, dimension(ntile), intent(out) pi_table,
integer, dimension(2,ntile), intent(out) tileid_map,
integer, dimension(2,ntile), intent(out) tilefaceid_map,
integer, dimension(2,ntile), intent(out) tilepanelid_map,
integer, intent(in) ntile )

Definition at line 565 of file scale_meshutil_1d.F90.

569
570 use scale_prc, only: prc_ismaster
571 implicit none
572
573 integer, intent(in) :: Ntile
574 integer, intent(out) :: panelID_table(Ntile)
575 integer, intent(out) :: pi_table(Ntile)
576 integer, intent(out) :: tileID_map(2,Ntile)
577 integer, intent(out) :: tileFaceID_map(2,Ntile)
578 integer, intent(out) :: tilePanelID_map(2,Ntile)
579
580 integer :: NtilePerPanel
581 integer :: Ne, Nv
582 integer, allocatable :: nodesID_1d(:)
583 integer, allocatable :: EToV(:,:)
584 integer, allocatable :: EToE(:,:)
585 integer, allocatable :: EToF(:,:)
586 integer :: i, f
587 integer :: panelID
588 integer :: tileID, tileID_R
589 integer :: counter
590 real(DP) :: del
591
592 !-----------------------------------------------------------------------------
593
594 ntileperpanel = ntile
595 ne = ntileperpanel
596 nv = ne + 1
597 allocate( nodesid_1d(nv) )
598 allocate( etov(ntile,2), etoe(ntile,2), etof(ntile,2) )
599
600 nodesid_1d(:) = -1
601 counter = 0
602 do i = 2, nv-1
603 counter = counter + 1
604 nodesid_1d(i) = counter
605 end do
606
607 !----
608
609 tileid = 0
610
611 do i = 1, ne
612 tileid = tileid + 1
613 panelid_table(tileid) = 1
614 pi_table(tileid) = i
615 etov(tileid,:) = (/ nodesid_1d(i), nodesid_1d(i+1) /)
616 end do
617
618 call meshutil1d_genconnectivity( etoe, etof, &
619 & etov, ntile, 2 )
620 tileid_map(:,:) = transpose(etoe)
621 tilefaceid_map(:,:) = transpose(etof)
622
623 do tileid=1, ntile
624 do f=1, 2
625 tileid_r = tileid_map(f,tileid)
626 tilepanelid_map(f,tileid) = panelid_table(tileid_r)
627 end do
628 end do
629
630 !--
631
632 ! if (PRC_isMaster) then
633 !
634 ! write(*,*) "TotTile", tileID, Ntile
635 ! do tileID = 1, Ntile
636 ! write(*,*) "tileID:", tileID, ", EtoV:", EtoV(tileID,:)
637 ! end do
638 ! write(*,*) "-----------"
639 ! do tileID = 1, Ntile
640 ! write(*,*) "tileID:", tileID, ", EtoE:", EtoE(tileID,:)
641 ! end do
642 ! write(*,*) "-----------"
643 ! do tileID = 1, Ntile
644 ! write(*,*) "tileID:", tileID, ", EtoF:", EtoF(tileID,:)
645 ! end do
646 !
647 ! end if
648
649 return

References meshutil1d_genconnectivity().

Referenced by scale_mesh_base1d::meshbase1d_assigndomid().