21 #include "sll_assert.h"
22 #include "sll_errors.h"
23 #include "sll_memory.h"
24 #include "sll_working_precision.h"
60 sll_int32 :: num_nodes
61 sll_int32 :: num_triangles
62 sll_int32 :: num_edges
63 sll_int32 :: num_bound
65 sll_real64,
pointer :: coord(:, :)
66 sll_int32,
pointer :: nodes(:, :)
68 sll_real64 :: eta1_min
69 sll_real64 :: eta1_max
70 sll_real64 :: eta2_min
71 sll_real64 :: eta2_max
82 sll_real64,
dimension(:),
pointer :: area
83 sll_int32,
dimension(:),
pointer :: refs
84 sll_int32,
dimension(:),
pointer :: reft
85 sll_int32,
dimension(:, :),
pointer :: nvois
86 sll_int32,
dimension(:),
pointer :: nusd
87 sll_int32,
dimension(:),
pointer :: npoel1
88 sll_int32,
dimension(:),
pointer :: npoel2
89 sll_int32,
dimension(:),
pointer :: krefro
90 sll_int32,
dimension(:),
pointer :: kctfro
91 sll_int32,
dimension(:),
pointer :: kelfro
92 sll_int32,
dimension(:, :),
pointer :: ksofro
93 sll_real64,
dimension(:, :),
pointer :: vnofro
94 sll_real64,
dimension(:),
pointer :: xmal1
95 sll_real64,
dimension(:),
pointer :: xmal2
96 sll_real64,
dimension(:),
pointer :: xmal3
97 sll_int32,
dimension(:, :),
pointer :: nuvac
98 sll_int32,
dimension(:),
pointer :: nugcv
99 sll_int32,
dimension(:),
pointer :: nbcov
100 sll_real64,
dimension(:),
pointer :: xlcod
102 sll_real64,
dimension(:),
pointer :: vtaux
103 sll_real64,
dimension(:),
pointer :: vtauy
104 sll_int32,
dimension(:),
pointer :: nctfro
105 sll_int32,
dimension(:),
pointer :: nctfrp
107 logical :: analyzed = .false.
169 character(len=*),
intent(in) :: maafil
172 sll_allocate(m, ierr)
185 character(len=*),
intent(in) :: maafil
203 sll_int32 :: is1, iv1
204 sll_int32 :: is2, iv2
205 sll_int32 :: is3, iv3
210 sll_real64 :: xa, xb, xc
211 sll_real64 :: ya, yb, yc
214 sll_allocate(tri_mesh, ierr)
216 tri_mesh%num_nodes = hex_mesh%num_pts_tot
217 tri_mesh%num_triangles = hex_mesh%num_triangles
220 sll_allocate(tri_mesh%coord(1:2, tri_mesh%num_nodes), ierr)
221 sll_allocate(tri_mesh%nodes(1:3, 1:tri_mesh%num_triangles), ierr)
222 sll_allocate(tri_mesh%refs(tri_mesh%num_nodes), ierr)
223 sll_allocate(tri_mesh%nvois(1:3, 1:tri_mesh%num_triangles), ierr)
227 do i = 1, hex_mesh%num_pts_tot
228 tri_mesh%coord(1, i) = hex_mesh%global_to_x1(i)
229 tri_mesh%coord(2, i) = hex_mesh%global_to_x2(i)
233 do i = 1, hex_mesh%num_triangles
235 x1 = hex_mesh%center_cartesian_coord(1, i)
236 y1 = hex_mesh%center_cartesian_coord(2, i)
239 call hex_mesh%get_neighbours(i, iv1, iv2, iv3)
241 xa = tri_mesh%coord(1, is1)
242 ya = tri_mesh%coord(2, is1)
243 xb = tri_mesh%coord(1, is2)
244 yb = tri_mesh%coord(2, is2)
245 xc = tri_mesh%coord(1, is3)
246 yc = tri_mesh%coord(2, is3)
248 det = 2.0_f64*((xb - xa)*(yc - ya) - (xc - xa)*(yb - ya))
251 tri_mesh%nodes(:, i) = [is1, is2, is3]
252 tri_mesh%nvois(:, i) = [iv1, iv2, iv3]
254 tri_mesh%nodes(:, i) = [is1, is3, is2]
255 tri_mesh%nvois(:, i) = [iv3, iv2, iv1]
258 if (tri_mesh%nvois(1, i) < 0)
then
259 tri_mesh%refs(tri_mesh%nodes(1, i)) = 1
260 tri_mesh%refs(tri_mesh%nodes(2, i)) = 1
263 if (tri_mesh%nvois(2, i) < 0)
then
264 tri_mesh%refs(tri_mesh%nodes(2, i)) = 1
265 tri_mesh%refs(tri_mesh%nodes(3, i)) = 1
268 if (tri_mesh%nvois(3, i) < 0)
then
269 tri_mesh%refs(tri_mesh%nodes(3, i)) = 1
270 tri_mesh%refs(tri_mesh%nodes(1, i)) = 1
301 sll_int32,
intent(in) :: nc_eta1
302 sll_real64,
intent(in) :: eta1_min
303 sll_real64,
intent(in) :: eta1_max
304 sll_int32,
intent(in) :: nc_eta2
305 sll_real64,
intent(in) :: eta2_min
306 sll_real64,
intent(in) :: eta2_max
307 sll_int32,
optional :: bc
310 sll_allocate(m, ierr)
312 if (
present(bc))
then
313 sll_assert(bc == sll_p_periodic)
338 nc_eta1, eta1_min, eta1_max, nc_eta2, &
339 eta2_min, eta2_max, bc)
342 sll_int32,
intent(in) :: nc_eta1
343 sll_real64,
intent(in) :: eta1_min
344 sll_real64,
intent(in) :: eta1_max
345 sll_int32,
intent(in) :: nc_eta2
346 sll_real64,
intent(in) :: eta2_min
347 sll_real64,
intent(in) :: eta2_max
348 sll_int32,
optional :: bc
350 if (
present(bc))
then
351 sll_assert(bc == sll_p_periodic)
376 sll_int32,
intent(in) :: nc_eta1
377 sll_real64,
intent(in) :: eta1_min
378 sll_real64,
intent(in) :: eta1_max
379 sll_int32,
intent(in) :: nc_eta2
380 sll_real64,
intent(in) :: eta2_min
381 sll_real64,
intent(in) :: eta2_max
382 sll_int32,
optional :: bc
390 sll_int32 :: nd1, nd2, nd3
392 sll_int32 :: l, l1, ll1, ll2
393 sll_int32 :: in, iin, n, noeud, nsom, nxm, nym, neltot, ndd
394 sll_int32 :: nbox, nboy
395 sll_int32 :: iel, iev
396 sll_int32 :: nelin, nefro, nelfr, nhp, nlp
399 sll_real64 :: xx1, xx2, pasx0, pasx1, pasy0, pasy1
400 sll_real64 :: alx, aly
401 sll_int32,
allocatable :: nar(:)
403 mesh%eta1_min = eta1_min
404 mesh%eta1_max = eta1_max
405 mesh%eta2_min = eta2_min
406 mesh%eta2_max = eta2_max
410 ndd = max(nbox, nboy)
411 alx = eta1_max - eta1_min
412 aly = eta2_max - eta2_min
420 mesh%num_triangles = neltot
421 mesh%num_nodes = noeud
422 sll_clear_allocate(mesh%coord(1:2, 1:noeud), ierr)
423 sll_allocate(mesh%nodes(1:3, 1:neltot), ierr); mesh%nodes = 0
424 sll_allocate(mesh%nvois(3, 1:neltot), ierr); mesh%nvois = 0
425 sll_allocate(mesh%refs(1:noeud), ierr); mesh%refs = 0
427 pasx0 = alx/real(nxm, f64)
428 pasx1 = pasx0*0.5_f64
429 pasy0 = aly/real(nym, f64)
430 pasy1 = pasy0*0.5_f64
436 xx1 = eta1_min + alx - real(i - 1, f64)*pasx0
437 xx2 = eta2_min + real(n, f64)*pasy0
438 mesh%coord(1, iin) = xx1
439 mesh%coord(2, iin) = xx2
458 mesh%nodes(1, nelt) = nd1
459 mesh%nodes(2, nelt) = nd2
460 mesh%nodes(3, nelt) = nd1 + 1
464 mesh%nodes(1, nelt) = nd1 + 1
465 mesh%nodes(2, nelt) = nd2
466 mesh%nodes(3, nelt) = nd3
472 nefro = 4*(nbox - 2) + 4*(nboy - 2)
473 nelfr = 2*(nbox - 1) + 2*(nboy - 1) - 2
474 nelin = neltot - nelfr
476 allocate (nar(2*(nbox + nboy)))
481 mesh%refs(nar(i)) = 1
487 mesh%refs(nar(i)) = 3
492 nar(i) = nbox*(nlp - i)
493 mesh%refs(nar(i)) = 4
497 nar(i) = i*nbox - nxm
498 mesh%refs(nar(i)) = 2
503 if (
present(bc))
then
506 iel = (i - 1)*2*nym + 1
507 iev = iel + 2*nym - 1
508 mesh%nvois(1, iel) = iev
509 mesh%nvois(3, iev) = iel
514 iev = iel + 2*nxm*(nym - 1) + 1
515 mesh%nvois(3, iel) = iev
516 mesh%nvois(2, iev) = iel
524 do i = 1, 2*(nbox - 1), 2
525 mesh%nvois(3, i) = -1
526 mesh%nvois(2, neltot - i + 1) = -3
529 mesh%nvois(1, 1) = -2
533 mesh%nvois(3, j) = -4
534 mesh%nvois(1, j + 1) = -2
536 mesh%nvois(3, neltot) = -4
539 if (mesh%refs(i) > mesh%nmxfr) mesh%nmxfr = mesh%nmxfr + 1
552 sll_real64 :: eta1_min, eta1_max, eta2_min, eta2_max
553 sll_int32 :: i, nctfrt, nbtcot
555 eta1_min = minval(mesh%coord(1, :))
556 eta1_max = maxval(mesh%coord(1, :))
557 eta2_min = minval(mesh%coord(2, :))
558 eta2_max = maxval(mesh%coord(2, :))
561 do i = 1, mesh%num_triangles
562 if (mesh%nvois(1, i) < 0) nctfrt = nctfrt + 1
563 if (mesh%nvois(2, i) < 0) nctfrt = nctfrt + 1
564 if (mesh%nvois(3, i) < 0) nctfrt = nctfrt + 1
567 nbtcot = (3*mesh%num_triangles + nctfrt)/2
569 write (*,
"(/,(a))")
'2D mesh : num_triangles num_nodes num_edges '
570 write (*,
"(10x,3(i6,9x),/,'Frame',/,4(g13.3,1x))") &
571 mesh%num_triangles, &
588 x1 = mesh%coord(1, i)
599 x2 = mesh%coord(2, i)
606 character(len=*),
intent(in) :: mtv_file
610 sll_int32 :: out_unit
611 sll_int32 :: i, j, k, l
613 open (file=mtv_file, status=
'replace', form=
'formatted', newunit=out_unit)
617 write (out_unit,
"(a)")
"$DATA=CURVE3D"
618 write (out_unit,
"(a)")
"%equalscale=T"
619 write (out_unit,
"(a)")
"%toplabel='Maillage' "
621 do i = 1, mesh%num_triangles
623 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
624 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(2, i)), 0.
625 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(3, i)), 0.
626 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
633 write (out_unit,
"(a)")
"$DATA=CURVE3D"
634 write (out_unit,
"(a)")
"%equalscale=T"
635 write (out_unit,
"(a)")
"%toplabel='Numeros des noeuds et des triangles' "
637 do i = 1, mesh%num_triangles
638 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
639 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(2, i)), 0.
640 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(3, i)), 0.
641 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
645 do i = 1, mesh%num_triangles
646 x1 = (mesh%coord(1, mesh%nodes(1, i)) &
647 + mesh%coord(1, mesh%nodes(2, i)) &
648 + mesh%coord(1, mesh%nodes(3, i)))/3.0_f64
649 y1 = (mesh%coord(2, mesh%nodes(1, i)) &
650 + mesh%coord(2, mesh%nodes(2, i)) &
651 + mesh%coord(2, mesh%nodes(3, i)))/3.0_f64
652 write (out_unit,
"(a)", advance=
"no")
"@text x1="
653 write (out_unit,
"(f8.5)", advance=
"no") x1
654 write (out_unit,
"(a)", advance=
"no")
" y1="
655 write (out_unit,
"(f8.5)", advance=
"no") y1
656 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=4 ll='"
657 write (out_unit,
"(i4)", advance=
"no") i
658 write (out_unit,
"(a)")
"'"
661 do i = 1, mesh%num_nodes
662 x1 = mesh%coord(1, i)
663 y1 = mesh%coord(2, i)
664 write (out_unit,
"(a)", advance=
"no")
"@text x1="
665 write (out_unit,
"(g15.3)", advance=
"no") x1
666 write (out_unit,
"(a)", advance=
"no")
" y1="
667 write (out_unit,
"(g15.3)", advance=
"no") y1
668 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
669 write (out_unit,
"(i4)", advance=
"no") i
670 write (out_unit,
"(a)")
"'"
675 write (out_unit, *)
"$DATA=CURVE3D"
676 write (out_unit, *)
"%equalscale=T"
677 write (out_unit, *)
"%toplabel='Numeros des noeuds' "
679 do i = 1, mesh%num_triangles
680 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
681 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(2, i)), 0.
682 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(3, i)), 0.
683 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
687 do i = 1, mesh%num_nodes
688 x1 = mesh%coord(1, i)
689 y1 = mesh%coord(2, i)
690 write (out_unit,
"(a)", advance=
"no")
"@text x1="
691 write (out_unit,
"(g15.3)", advance=
"no") x1
692 write (out_unit,
"(a)", advance=
"no")
" y1="
693 write (out_unit,
"(g15.3)", advance=
"no") y1
694 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
695 write (out_unit,
"(i4)", advance=
"no") i
696 write (out_unit,
"(a)")
"'"
701 write (out_unit, *)
"$DATA=CURVE3D"
702 write (out_unit, *)
"%equalscale=T"
703 write (out_unit, *)
"%toplabel='Numeros des triangles' "
705 do i = 1, mesh%num_triangles
706 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
707 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(2, i)), 0.
708 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(3, i)), 0.
709 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nodes(1, i)), 0.
713 do i = 1, mesh%num_triangles
714 x1 = (mesh%coord(1, mesh%nodes(1, i)) &
715 + mesh%coord(1, mesh%nodes(2, i)) &
716 + mesh%coord(1, mesh%nodes(3, i)))/3.0_f64
717 y1 = (mesh%coord(2, mesh%nodes(1, i)) &
718 + mesh%coord(2, mesh%nodes(2, i)) &
719 + mesh%coord(2, mesh%nodes(3, i)))/3.0_f64
720 write (out_unit,
"(a)", advance=
"no")
"@text x1="
721 write (out_unit,
"(g15.3)", advance=
"no") x1
722 write (out_unit,
"(a)", advance=
"no")
" y1="
723 write (out_unit,
"(g15.3)", advance=
"no") y1
724 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=4 ll='"
725 write (out_unit,
"(i4)", advance=
"no") i
726 write (out_unit,
"(a)")
"'"
731 write (out_unit, *)
"$DATA=CURVE3D"
732 write (out_unit, *)
"%equalscale=T"
733 write (out_unit, *)
"%toplabel='References des frontieres' "
735 do i = 1, mesh%num_triangles
736 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.0
737 write (out_unit, *) mesh%coord(1:2, mesh%nodes(2, i)), 0.0
738 write (out_unit, *) mesh%coord(1:2, mesh%nodes(3, i)), 0.0
739 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.0
743 do i = 1, mesh%num_triangles
745 if (mesh%nvois(j, i) < 0)
then
746 k = mod(j - 1, 3) + 1
748 x1 = mesh%coord(1, mesh%nodes(k, i))
749 y1 = mesh%coord(2, mesh%nodes(k, i))
750 x2 = mesh%coord(1, mesh%nodes(l, i))
751 y2 = mesh%coord(2, mesh%nodes(l, i))
752 write (out_unit,
"(a)", advance=
"no")
"@text x1="
753 write (out_unit,
"(g15.3)", advance=
"no") 0.5_f64*(x1 + x2)
754 write (out_unit,
"(a)", advance=
"no")
" y1="
755 write (out_unit,
"(g15.3)", advance=
"no") 0.5_f64*(y1 + y2)
756 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
757 write (out_unit,
"(i1)", advance=
"no") - mesh%nvois(j, i)
758 write (out_unit,
"(a)")
"'"
765 write (out_unit, *)
"$DATA=CURVE3D"
766 write (out_unit, *)
"%equalscale=T"
767 write (out_unit, *)
"%toplabel='References des noeuds' "
769 do i = 1, mesh%num_triangles
770 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.0
771 write (out_unit, *) mesh%coord(1:2, mesh%nodes(2, i)), 0.0
772 write (out_unit, *) mesh%coord(1:2, mesh%nodes(3, i)), 0.0
773 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.0
777 do i = 1, mesh%num_nodes
778 x1 = mesh%coord(1, i)
779 y1 = mesh%coord(2, i)
780 write (out_unit,
"(a)", advance=
"no")
"@text x1="
781 write (out_unit,
"(g15.3)", advance=
"no") x1
782 write (out_unit,
"(a)", advance=
"no")
" y1="
783 write (out_unit,
"(g15.3)", advance=
"no") y1
784 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
785 write (out_unit,
"(i1)", advance=
"no") mesh%refs(i)
786 write (out_unit,
"(a)")
"'"
789 if (mesh%analyzed)
then
793 write (out_unit, *)
"$DATA=CURVE3D"
794 write (out_unit, *)
"%equalscale=T"
795 write (out_unit, *)
"%toplabel='Polygones de Voronoi'"
797 do i = 1, mesh%num_triangles
798 write (out_unit, *)
"%linetype = 1 # Solid Linetype (default=1)"
799 write (out_unit, *)
"%linewidth = 1 # Linewidth (default=1)"
800 write (out_unit, *)
"%linecolor = 1 # Line Color (default=1)"
802 if (mesh%nvois(j, i) > 0)
then
804 write (out_unit, *) x1, y1, 0.
806 write (out_unit, *) x1, y1, 0.
812 do i = 1, mesh%num_triangles
814 write (out_unit, *)
"%linetype = 1 # Solid Linetype (default=1)"
815 write (out_unit, *)
"%linewidth = 1 # Linewidth (default=1)"
816 write (out_unit, *)
"%linecolor = 2 # Line Color (default=1)"
817 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.
818 write (out_unit, *) mesh%coord(1:2, mesh%nodes(2, i)), 0.
819 write (out_unit, *) mesh%coord(1:2, mesh%nodes(3, i)), 0.
820 write (out_unit, *) mesh%coord(1:2, mesh%nodes(1, i)), 0.
826 write (out_unit, *)
"$DATA=CURVE3D"
827 write (out_unit, *)
"%equalscale=T"
828 write (out_unit, *)
"%toplabel='Numeros des noeuds et des cotes' "
830 do i = 1, mesh%nbtcot
831 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nuvac(1, i)), 0.
832 write (out_unit,
"(3f10.5)") mesh%coord(:, mesh%nuvac(2, i)), 0.
834 x1 = 0.5_f64*(mesh%coord(1, mesh%nuvac(1, i)) + mesh%coord(1, mesh%nuvac(2, i)))
835 y1 = 0.5_f64*(mesh%coord(2, mesh%nuvac(1, i)) + mesh%coord(2, mesh%nuvac(2, i)))
836 write (out_unit,
"(a)", advance=
"no")
"@text x1="
837 write (out_unit,
"(g15.3)", advance=
"no") x1
838 write (out_unit,
"(a)", advance=
"no")
" y1="
839 write (out_unit,
"(g15.3)", advance=
"no") y1
840 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
841 write (out_unit,
"(i4)", advance=
"no") i
842 write (out_unit,
"(a)")
"'"
845 do i = 1, mesh%num_nodes
846 x1 = mesh%coord(1, i)
847 y1 = mesh%coord(2, i)
848 write (out_unit,
"(a)", advance=
"no")
"@text x1="
849 write (out_unit,
"(g15.3)", advance=
"no") x1
850 write (out_unit,
"(a)", advance=
"no")
" y1="
851 write (out_unit,
"(g15.3)", advance=
"no") y1
852 write (out_unit,
"(a)", advance=
"no")
" z1=0. lc=5 ll='"
853 write (out_unit,
"(i4)", advance=
"no") i
854 write (out_unit,
"(a)")
"'"
859 write (out_unit, *)
"$END"
868 sll_assert(mesh%num_nodes > 0)
875 character(len=*),
intent(in) :: maafil
877 sll_int32 :: nfmaa = 12
887 write (iout,
"(/////10x,'>>> Read mesh from file <<<'/)")
888 print *,
" will open : ", maafil
889 open (nfmaa, file=maafil, status=
'OLD', err=80)
890 print *,
" opened : ", maafil
891 write (*, 1050, advance=
'no') trim(maafil)
893 write (iout,
"(10x,'Open the file' &
894 & /10x,'Unit number',i3,' fichier ',a14)") &
898 read (nfmaa, *) nmaill, imxref
899 read (nfmaa, *) mesh%num_nodes, &
900 mesh%num_triangles, &
907 sll_allocate(mesh%coord(1:2, mesh%num_nodes), sll_err)
908 sll_allocate(mesh%nodes(1:3, 1:mesh%num_triangles), sll_err)
909 sll_allocate(mesh%refs(mesh%num_nodes), sll_err)
910 sll_allocate(mesh%reft(mesh%num_triangles), sll_err)
911 sll_allocate(mesh%nusd(mesh%num_triangles), sll_err)
912 sll_allocate(mesh%nvois(3, mesh%num_triangles), sll_err)
914 read (nfmaa, *) ((mesh%coord(i, j), i=1, 2), j=1, mesh%num_nodes)
915 read (nfmaa, *) (mesh%refs(i), i=1, mesh%num_nodes)
916 read (nfmaa, *) ((mesh%nodes(i, j), i=1, 3), j=1, mesh%num_triangles)
917 read (nfmaa, *) ((mesh%nvois(i, j), i=1, 3), j=1, mesh%num_triangles)
918 read (nfmaa, *) (mesh%nusd(i), i=1, mesh%num_triangles)
922 write (iout,
"(//,10x,'Nb of nodes : ',i10/ &
923 & ,10x,'Nb of triangles : ',i10/ &
924 & ,10x,'Nb max of BC : ',i10/ &
925 & ,10x,'Nb max of subdomain : ',i10/ &
926 & ,10x,/'Nb triangles with 1 node' &
927 & ,' on boundary : ',i10/)") mesh%num_nodes, &
928 mesh%num_triangles, mesh%nmxfr, mesh%nmxsd, nefro
930 write (iout,
"(//10x,'Nb elements inside : ',i10/ &
931 & ,10x,'Nb elements boundary : ',i10/)") nelin, mesh%nelfr
933 1050
format(/
' Read mesh from file ', a,
' ? Y')
937 sll_error(
'Read from file',
'Input file '//maafil//
' not found.')
944 sll_int32,
intent(in) :: iel
945 sll_real64,
intent(out) :: x1
946 sll_real64,
intent(out) :: x2
948 sll_real64 :: xa, ya, xb, yb, xc, yc
949 sll_real64 :: det, syca, syba
951 xa = mesh%coord(1, mesh%nodes(1, iel))
952 ya = mesh%coord(2, mesh%nodes(1, iel))
953 xb = mesh%coord(1, mesh%nodes(2, iel))
954 yb = mesh%coord(2, mesh%nodes(2, iel))
955 xc = mesh%coord(1, mesh%nodes(3, iel))
956 yc = mesh%coord(2, mesh%nodes(3, iel))
958 det = 2.0_f64*((xb - xa)*(yc - ya) - (xc - xa)*(yb - ya))
959 syca = (yc - ya)*(xb*xb - xa*xa + yb*yb - ya*ya)
960 syba = (xb - xa)*(xc*xc - xa*xa + yc*yc - ya*ya)
962 x1 = (syca - (yb - ya)*(xc*xc - xa*xa + yc*yc - ya*ya))/det
963 x2 = (syba - (xc - xa)*(xb*xb - xa*xa + yb*yb - ya*ya))/det
975 sll_int32,
intent(in) :: num_cells
976 sll_int32,
optional :: order
978 sll_int32 :: i, j, cell, layer
979 sll_real64 :: r, alpha
981 if (
present(order))
then
988 do cell = 1, num_cells
989 if (cell > num_cells - layer)
then
990 r = real(cell, f64)*1.0_f64/real(num_cells, f64)
993 mesh%coord(1, i + j - 1) = r*cos(alpha)
994 mesh%coord(2, i + j - 1) = r*sin(alpha)
995 alpha = alpha +
sll_p_pi/real(3*cell, f64)
1009 integer,
dimension(:),
allocatable :: indc
1011 sll_int32 :: i, j, k
1012 sll_int32 :: it, is, is1, is2, is3
1013 sll_int32 :: ntmp, id1, nct, iel, ind, iel1, nel
1014 sll_int32 :: i1, i2, i3
1015 sll_int32 :: jel1, jel2, jel3, nel1, nel2, nel3
1018 real(8) :: xlml, xlmu, ylml, ylmu
1019 real(8) :: lx1, lx2, ly1, ly2
1021 xlml = minval(mesh%coord(1, :))
1022 xlmu = maxval(mesh%coord(1, :))
1023 ylml = minval(mesh%coord(2, :))
1024 ylmu = maxval(mesh%coord(2, :))
1026 mesh%petitl = 1.d-04*min(xlmu - xlml, ylmu - ylml)/sqrt(real(mesh%num_nodes, 8))
1027 mesh%grandl = 1.d+04*max(xlmu - xlml, ylmu - ylmu)
1029 allocate (mesh%area(mesh%num_triangles)); mesh%area = 0.0_f64
1033 do it = 1, mesh%num_triangles
1035 lx1 = mesh%coord(1, mesh%nodes(2, it)) - mesh%coord(1, mesh%nodes(1, it))
1036 ly1 = mesh%coord(2, mesh%nodes(3, it)) - mesh%coord(2, mesh%nodes(1, it))
1037 lx2 = mesh%coord(1, mesh%nodes(3, it)) - mesh%coord(1, mesh%nodes(1, it))
1038 ly2 = mesh%coord(2, mesh%nodes(2, it)) - mesh%coord(2, mesh%nodes(1, it))
1040 mesh%area(it) = 0.5_f64*abs(lx1*ly1 - lx2*ly2)
1042 if (mesh%area(it) <= 0._f64)
then
1043 write (6, *)
" Triangle : ", it
1044 write (6, *) mesh%nodes(1, it),
":", mesh%coord(1:2, mesh%nodes(1, it))
1045 write (6, *) mesh%nodes(2, it),
":", mesh%coord(1:2, mesh%nodes(2, it))
1046 write (6, *) mesh%nodes(3, it),
":", mesh%coord(1:2, mesh%nodes(3, it))
1047 stop
"triangle negative area"
1050 airtot = airtot + mesh%area(it)
1060 allocate (mesh%npoel1(mesh%num_nodes + 1))
1063 do i = 1, mesh%num_triangles
1064 is1 = mesh%nodes(1, i)
1065 is2 = mesh%nodes(2, i)
1066 is3 = mesh%nodes(3, i)
1067 mesh%npoel1(is1 + 1) = mesh%npoel1(is1 + 1) + 1
1068 mesh%npoel1(is2 + 1) = mesh%npoel1(is2 + 1) + 1
1069 mesh%npoel1(is3 + 1) = mesh%npoel1(is3 + 1) + 1
1077 do i = 3, mesh%num_nodes + 1
1078 mesh%npoel1(i) = mesh%npoel1(i - 1) + mesh%npoel1(i)
1088 allocate (mesh%npoel2(mesh%npoel1(mesh%num_nodes + 1)))
1089 allocate (indc(mesh%num_nodes))
1093 do it = 1, mesh%num_triangles
1095 is = mesh%nodes(k, it)
1096 mesh%npoel2(mesh%npoel1(is) + indc(is)) = it
1097 indc(is) = indc(is) + 1
1105 do iel = 1, mesh%num_triangles
1107 is1 = mesh%nodes(1, iel)
1108 is2 = mesh%nodes(2, iel)
1109 is3 = mesh%nodes(3, iel)
1116 nel1 = mesh%npoel1(is1 + 1) - mesh%npoel1(is1)
1117 nel2 = mesh%npoel1(is2 + 1) - mesh%npoel1(is2)
1119 loop1:
do i1 = 1, nel1
1120 jel1 = mesh%npoel2(mesh%npoel1(is1) + i1)
1121 if (jel1 .ne. iel)
then
1123 jel2 = mesh%npoel2(mesh%npoel1(is2) + i2)
1124 if (jel2 == jel1)
then
1125 mesh%nvois(1, iel) = jel1
1134 nel2 = mesh%npoel1(is2 + 1) - mesh%npoel1(is2)
1135 nel3 = mesh%npoel1(is3 + 1) - mesh%npoel1(is3)
1137 loop2:
do i2 = 1, nel2
1138 jel2 = mesh%npoel2(mesh%npoel1(is2) + i2)
1139 if (jel2 /= iel)
then
1141 jel3 = mesh%npoel2(mesh%npoel1(is3) + i3)
1142 if (jel3 == jel2)
then
1143 mesh%nvois(2, iel) = jel2
1152 nel3 = mesh%npoel1(is3 + 1) - mesh%npoel1(is3)
1153 nel1 = mesh%npoel1(is1 + 1) - mesh%npoel1(is1)
1155 loop3:
do i3 = 1, nel3
1156 jel3 = mesh%npoel2(mesh%npoel1(is3) + i3)
1157 if (jel3 /= iel)
then
1159 jel1 = mesh%npoel2(mesh%npoel1(is1) + i1)
1160 if (jel1 == jel3)
then
1161 mesh%nvois(3, iel) = jel3
1172 do is = 1, mesh%num_nodes
1174 nel = mesh%npoel1(is + 1) - mesh%npoel1(is)
1180 if (mesh%refs(is) == 0)
then
1183 iel1 = mesh%npoel2(mesh%npoel1(is) + 1)
1185 loop4:
do iel = 2, nel - 1
1187 if (mesh%nodes(j, iel1) == is) nct = mod(j + 1, 3) + 1
1190 iel1 = mesh%nvois(nct, iel1)
1191 do id1 = ind + 1, nel
1192 if (iel1 == mesh%npoel2(mesh%npoel1(is) + id1))
then
1194 ntmp = mesh%npoel2(mesh%npoel1(is) + ind)
1195 mesh%npoel2(mesh%npoel1(is) + ind) = iel1
1196 mesh%npoel2(mesh%npoel1(is) + id1) = ntmp
1207 loop5:
do id1 = 1, nel
1208 iel1 = mesh%npoel2(mesh%npoel1(is) + id1)
1210 if (mesh%nvois(j, iel1) .le. 0 .and. mesh%nodes(j, iel1) == is)
then
1211 ntmp = mesh%npoel2(mesh%npoel1(is) + 1)
1212 mesh%npoel2(mesh%npoel1(is) + 1) = iel1
1213 mesh%npoel2(mesh%npoel1(is) + id1) = ntmp
1221 iel1 = mesh%npoel2(mesh%npoel1(is) + 1)
1223 loop6:
do iel = 2, nel - 1
1225 if (mesh%nodes(j, iel1) == is)
then
1226 nct = mod(j + 1, 3) + 1
1230 iel1 = mesh%nvois(nct, iel1)
1232 do id1 = ind + 1, nel
1233 if (iel1 == mesh%npoel2(mesh%npoel1(is) + id1))
then
1235 ntmp = mesh%npoel2(mesh%npoel1(is) + ind)
1236 mesh%npoel2(mesh%npoel1(is) + ind) = iel1
1237 mesh%npoel2(mesh%npoel1(is) + id1) = ntmp
1279 integer,
dimension(:) :: ncotcu
1280 integer,
dimension(:) :: nuctfr
1282 double precision :: det, s1, s2, s3, x21, y21
1283 double precision :: xa, ya, xb, yb
1284 integer :: nel1, nel2, indv1, indv2
1285 integer :: ic, nuctf, ind, nm1, nm2
1286 integer :: indn1, indn2, num1, num2
1287 integer :: n1, n2, ivois, nc, iel, nucti
1289 integer,
parameter :: iout = 6
1295 do is = 1, mesh%num_nodes
1296 nbti = mesh%npoel1(is + 1) - mesh%npoel1(is)
1297 mesh%nbcov(is + 1) = nbti
1298 if (mesh%refs(is) /= 0)
then
1299 mesh%nbcov(is + 1) = nbti + 1
1304 do is = 1, mesh%num_nodes
1305 mesh%nbcov(is + 1) = mesh%nbcov(is) + mesh%nbcov(is + 1)
1308 do is = 1, mesh%num_nodes
1309 nbc = mesh%nbcov(is + 1) - mesh%nbcov(is)
1310 iac = mesh%nbcov(is)
1319 do iel = 1, mesh%num_triangles
1323 ivois = mesh%nvois(nc, iel)
1327 num1 = mesh%nodes(n1, iel)
1328 num2 = mesh%nodes(n2, iel)
1329 indn1 = mesh%npoel1(num1)
1330 indn2 = mesh%npoel1(num2)
1331 indv1 = mesh%nbcov(num1)
1332 indv2 = mesh%nbcov(num2)
1333 nel1 = mesh%npoel1(num1 + 1) - mesh%npoel1(num1)
1334 nel2 = mesh%npoel1(num2 + 1) - mesh%npoel1(num2)
1338 if (ivois > iel)
then
1345 if (mesh%npoel2(indn1 + nm1) == ivois)
then
1346 mesh%nugcv(indv1 + nm1) = nucti
1351 if (mesh%npoel2(indn2 + nm2) == iel)
then
1352 mesh%nugcv(indv2 + nm2) = nucti
1358 mesh%nuvac(1, nucti) = num1
1359 mesh%nuvac(2, nucti) = num2
1361 else if (ivois < 0)
then
1364 nuctfr(ind) = nuctfr(ind) + 1
1365 nuctf = ncotcu(ind + 1) + nuctfr(ind)
1366 mesh%nugcv(indv1 + nel1 + 1) = nuctf
1367 mesh%nugcv(indv2 + nel2) = nuctf
1368 mesh%nuvac(1, nuctf) = num1
1369 mesh%nuvac(2, nuctf) = num2
1380 do ic = 1, mesh%nbtcot
1381 xa = mesh%coord(1, mesh%nuvac(1, ic))
1382 ya = mesh%coord(2, mesh%nuvac(1, ic))
1383 xb = mesh%coord(1, mesh%nuvac(2, ic))
1384 yb = mesh%coord(2, mesh%nuvac(2, ic))
1385 mesh%xlcod(ic) = sqrt((xa - xb)*(xa - xb) + (ya - yb)*(ya - yb))
1391 do ic = 1, mesh%nbtcot
1392 n1 = mesh%nuvac(1, ic)
1393 n2 = mesh%nuvac(2, ic)
1394 x21 = (mesh%coord(1, n2) - mesh%coord(1, n1))/mesh%xlcod(ic)
1395 y21 = (mesh%coord(2, n2) - mesh%coord(2, n1))/mesh%xlcod(ic)
1399 mesh%vtaux(ic) = x21
1400 mesh%vtauy(ic) = y21
1401 mesh%xmal1(n1) = mesh%xmal1(n1) + s1
1402 mesh%xmal2(n1) = mesh%xmal2(n1) + s2
1403 mesh%xmal3(n1) = mesh%xmal3(n1) + s3
1404 mesh%xmal1(n2) = mesh%xmal1(n2) + s1
1405 mesh%xmal2(n2) = mesh%xmal2(n2) + s2
1406 mesh%xmal3(n2) = mesh%xmal3(n2) + s3
1412 do is = 1, mesh%num_nodes
1413 det = mesh%xmal1(is)*mesh%xmal2(is) - mesh%xmal3(is)*mesh%xmal3(is)
1415 mesh%xmal1(is) = mesh%xmal1(is)/det
1416 mesh%xmal2(is) = mesh%xmal2(is)/det
1417 mesh%xmal3(is) = mesh%xmal3(is)/det
1433 900
format(//10x,
'Determinant des coefficients des matrices' &
1434 /10x,
'de lissage nul' &
1435 /10x,
'Il faut modifier le maillage'//)
1436 901
format(//10x,
'Le nombre de triangles communs a un noeud' &
1437 /10x,
'est superieur a 12' &
1438 /10x,
'Modifiez legerement le maillage'//)
1467 integer,
parameter :: iout = 6
1468 integer :: i, j, ifr
1471 integer,
dimension(:),
allocatable :: nuctfr
1472 integer,
dimension(:),
allocatable :: ncotcu
1474 integer :: iel, is1, is2
1475 integer :: ict, ictcl, iref, jref
1476 integer :: keltmp, kcttmp, kretmp, ks1tmp, ks2tmp
1477 integer :: nbcot, ict1, ict2, ictcl1, ictcl2
1478 real(8) :: x1, y1, x2, y2
1482 write (iout,
"(//10x,'>>> Compute come quantities from mesh <<<'/)")
1487 do i = 1, mesh%num_triangles
1488 if (mesh%nvois(1, i) < 0) mesh%nctfrt = mesh%nctfrt + 1
1489 if (mesh%nvois(2, i) < 0) mesh%nctfrt = mesh%nctfrt + 1
1490 if (mesh%nvois(3, i) < 0) mesh%nctfrt = mesh%nctfrt + 1
1495 mesh%nbtcot = (3*mesh%num_triangles + mesh%nctfrt)/2
1497 mesh%nbcoti = mesh%nbtcot - mesh%nctfrt
1501 allocate (ncotcu(mesh%nbcoti + mesh%nmxfr*mesh%nctfrt))
1504 ncotcu(1) = mesh%nbcoti
1505 ncotcu(2) = mesh%nbcoti
1507 do ifr = 1, mesh%nmxfr
1508 do i = 1, mesh%num_triangles
1510 if (mesh%nvois(j, i) == -ifr)
then
1511 ncotcu(ifr + 2) = ncotcu(ifr + 2) + 1
1517 do ifr = 1, mesh%nmxfr
1518 ncotcu(ifr + 2) = ncotcu(ifr + 1) + ncotcu(ifr + 2)
1521 allocate (mesh%vtaux(mesh%nbtcot), mesh%vtauy(mesh%nbtcot))
1522 mesh%vtaux = 0._f64; mesh%vtauy = 0._f64
1524 allocate (mesh%nuvac(2, mesh%nbtcot)); mesh%nuvac = 0
1526 allocate (mesh%xlcod(mesh%nbtcot)); mesh%xlcod = 0.0_f64
1528 allocate (mesh%xmal1(mesh%num_nodes)); mesh%xmal1 = 0._f64
1529 allocate (mesh%xmal2(mesh%num_nodes)); mesh%xmal2 = 0._f64
1530 allocate (mesh%xmal3(mesh%num_nodes)); mesh%xmal3 = 0._f64
1532 allocate (mesh%nbcov(mesh%num_nodes + 1))
1533 allocate (mesh%nugcv(10*mesh%num_nodes))
1534 allocate (nuctfr(mesh%nmxfr))
1536 call poclis(mesh, ncotcu, nuctfr)
1559 allocate (mesh%nctfrp(0:mesh%nmxfr))
1560 allocate (mesh%nctfro(mesh%nmxfr))
1561 allocate (mesh%kctfro(mesh%nctfrt))
1562 allocate (mesh%kelfro(mesh%nctfrt))
1563 allocate (mesh%krefro(mesh%nctfrt))
1564 allocate (mesh%ksofro(2, mesh%nctfrt))
1565 allocate (mesh%vnofro(2, mesh%nctfrt))
1571 do iel = 1, mesh%num_triangles
1572 if (mesh%nvois(ict, iel) < 0)
then
1574 iref = -mesh%nvois(ict, iel)
1577 mesh%kelfro(ifr) = iel
1578 mesh%kctfro(ifr) = ict
1579 mesh%krefro(ifr) = iref
1580 mesh%ksofro(1, ifr) = mesh%nodes(ict, iel)
1581 mesh%ksofro(2, ifr) = mesh%nodes(mod(ict, 3) + 1, iel)
1582 mesh%nctfro(iref) = mesh%nctfro(iref) + 1
1589 do ifr = 1, mesh%nmxfr
1590 mesh%nctfrp(ifr) = mesh%nctfrp(ifr - 1) + mesh%nctfro(ifr)
1596 do iref = 1, mesh%nmxfr
1598 nbcot = mesh%nctfro(iref)
1603 do ict = ict1, mesh%nctfrt
1604 jref = mesh%krefro(ict)
1606 if (jref == iref)
then
1608 keltmp = mesh%kelfro(ict)
1609 kcttmp = mesh%kctfro(ict)
1610 kretmp = mesh%krefro(ict)
1611 ks1tmp = mesh%ksofro(1, ict)
1612 ks2tmp = mesh%ksofro(2, ict)
1614 mesh%kelfro(ict) = mesh%kelfro(ictcl)
1615 mesh%kctfro(ict) = mesh%kctfro(ictcl)
1616 mesh%krefro(ict) = mesh%krefro(ictcl)
1617 mesh%ksofro(1, ict) = mesh%ksofro(1, ictcl)
1618 mesh%ksofro(2, ict) = mesh%ksofro(2, ictcl)
1620 mesh%kelfro(ictcl) = keltmp
1621 mesh%kctfro(ictcl) = kcttmp
1622 mesh%krefro(ictcl) = kretmp
1623 mesh%ksofro(1, ictcl) = ks1tmp
1624 mesh%ksofro(2, ictcl) = ks2tmp
1633 do iref = 1, mesh%nmxfr
1635 nbcot = mesh%nctfro(iref)
1639 if (nbcot == mesh%nctfrt)
then
1642 is2 = mesh%ksofro(2, ict1)
1643 do ict2 = ict1, mesh%nctfrt
1644 if (ict1 /= ict2)
then
1645 is1 = mesh%ksofro(1, ict2)
1646 if (is1 == is2)
then
1648 keltmp = mesh%kelfro(ict1 + 1)
1649 kcttmp = mesh%kctfro(ict1 + 1)
1650 kretmp = mesh%krefro(ict1 + 1)
1651 ks1tmp = mesh%ksofro(1, ict1 + 1)
1652 ks2tmp = mesh%ksofro(2, ict1 + 1)
1654 mesh%kelfro(ict1 + 1) = mesh%kelfro(ict2)
1655 mesh%kctfro(ict1 + 1) = mesh%kctfro(ict2)
1656 mesh%krefro(ict1 + 1) = mesh%krefro(ict2)
1657 mesh%ksofro(1, ict1 + 1) = mesh%ksofro(1, ict2)
1658 mesh%ksofro(2, ict1 + 1) = mesh%ksofro(2, ict2)
1660 mesh%kelfro(ict2) = keltmp
1661 mesh%kctfro(ict2) = kcttmp
1662 mesh%krefro(ict2) = kretmp
1663 mesh%ksofro(1, ict2) = ks1tmp
1664 mesh%ksofro(2, ict2) = ks2tmp
1666 if (ict1 < mesh%nctfrt)
then
1677 else if (nbcot > 1)
then
1679 ictcl1 = mesh%nctfrp(iref - 1) + 1
1680 ictcl2 = mesh%nctfrp(iref)
1684 is1 = mesh%ksofro(1, ict1)
1685 do ict2 = ictcl1, ictcl2
1686 if (ict1 /= ict2)
then
1687 is2 = mesh%ksofro(2, ict2)
1688 if (is1 == is2)
then
1690 if (ict1 == ictcl1)
then
1698 keltmp = mesh%kelfro(ict1)
1699 kcttmp = mesh%kctfro(ict1)
1700 kretmp = mesh%krefro(ict1)
1701 ks1tmp = mesh%ksofro(1, ict1)
1702 ks2tmp = mesh%ksofro(2, ict1)
1704 mesh%kelfro(ict1) = mesh%kelfro(ictcl1)
1705 mesh%kctfro(ict1) = mesh%kctfro(ictcl1)
1706 mesh%krefro(ict1) = mesh%krefro(ictcl1)
1708 mesh%ksofro(1, ict1) = mesh%ksofro(1, ictcl1)
1709 mesh%ksofro(2, ict1) = mesh%ksofro(2, ictcl1)
1711 mesh%kelfro(ictcl1) = keltmp
1712 mesh%kctfro(ictcl1) = kcttmp
1713 mesh%krefro(ictcl1) = kretmp
1715 mesh%ksofro(1, ictcl1) = ks1tmp
1716 mesh%ksofro(2, ictcl1) = ks2tmp
1721 is2 = mesh%ksofro(2, ict1)
1722 do ict2 = ict1, ictcl2
1723 if (ict1 /= ict2)
then
1724 is1 = mesh%ksofro(1, ict2)
1725 if (is1 == is2)
then
1727 keltmp = mesh%kelfro(ict1 + 1)
1728 kcttmp = mesh%kctfro(ict1 + 1)
1729 kretmp = mesh%krefro(ict1 + 1)
1730 ks1tmp = mesh%ksofro(1, ict1 + 1)
1731 ks2tmp = mesh%ksofro(2, ict1 + 1)
1733 mesh%kelfro(ict1 + 1) = mesh%kelfro(ict2)
1734 mesh%kctfro(ict1 + 1) = mesh%kctfro(ict2)
1735 mesh%krefro(ict1 + 1) = mesh%krefro(ict2)
1736 mesh%ksofro(1, ict1 + 1) = mesh%ksofro(1, ict2)
1737 mesh%ksofro(2, ict1 + 1) = mesh%ksofro(2, ict2)
1739 mesh%kelfro(ict2) = keltmp
1740 mesh%kctfro(ict2) = kcttmp
1741 mesh%krefro(ict2) = kretmp
1742 mesh%ksofro(1, ict2) = ks1tmp
1743 mesh%ksofro(2, ict2) = ks2tmp
1751 if (ict1 < ictcl2)
then
1771 do ict = 1, mesh%nctfrt
1773 is1 = mesh%ksofro(1, ict)
1774 is2 = mesh%ksofro(2, ict)
1776 x1 = mesh%coord(1, is1)
1777 y1 = mesh%coord(2, is1)
1778 x2 = mesh%coord(1, is2)
1779 y2 = mesh%coord(2, is2)
1781 mesh%vnofro(1, ict) = -y2 + y1
1782 mesh%vnofro(2, ict) = x2 - x1
1786 mesh%analyzed = .true.
Describe different boundary conditions.
Fortran module where set some physical and mathematical constants.
real(kind=f64), parameter, public sll_p_pi
subroutine, public sll_s_get_cell_vertices_index(x, y, mesh, s1, s2, s3)
Returns indices of the edges of a given cell.
subroutine, public sll_s_write_triangular_mesh_mtv(mesh, mtv_file)
subroutine, public sll_s_analyze_triangular_mesh(mesh)
Compute unstructured mesh quantities.
type(sll_t_triangular_mesh_2d) function, pointer new_triangular_mesh_2d_from_square(nc_eta1, eta1_min, eta1_max, nc_eta2, eta2_min, eta2_max, bc)
Allocates the memory space for a new 2D triangular mesh on the heap,.
type(sll_t_triangular_mesh_2d) function, pointer new_triangular_mesh_2d_from_hex_mesh(hex_mesh)
allocates the memory space for a new 2D triangular mesh on the heap, initializes it with the given he...
subroutine display_triangular_mesh_2d(mesh)
Displays mesh information on the terminal.
subroutine, public sll_s_triangular_mesh_2d_init_from_file(m, maafil)
Initialize a new 2D triangular mesh.
subroutine, public sll_s_read_from_file(mesh, maafil)
real(kind=f64) function global_to_x1(mesh, i)
subroutine initialize_triangular_mesh_2d(mesh, nc_eta1, eta1_min, eta1_max, nc_eta2, eta2_min, eta2_max, bc)
subroutine, public sll_s_triangular_mesh_2d_free(mesh)
type(sll_t_triangular_mesh_2d) function, pointer new_triangular_mesh_2d_from_file(maafil)
allocates the memory space for a new 2D triangular mesh on the heap, initializes it with the given ar...
subroutine compute_areas(mesh)
subroutine get_cell_center(mesh, iel, x1, x2)
real(kind=f64) function global_to_x2(mesh, i)
subroutine, public sll_s_triangular_mesh_2d_init_from_square(m, nc_eta1, eta1_min, eta1_max, nc_eta2, eta2_min, eta2_max, bc)
Initialize a new 2D triangular mesh.
subroutine poclis(mesh, ncotcu, nuctfr)
subroutine, public sll_s_map_to_circle(mesh, num_cells, order)
Map an hexagonal mesh on circle param[inout] mesh the triangular mesh built fron an hexagonal mesh pa...