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

module FElib / Mesh / 1D domain More...

Data Types

type  meshlinedom1d

Functions/Subroutines

subroutine, public meshlinedom1d_init (this, neg, dom_xmin, dom_xmax, refelem, nlocalmeshperprc, nproc, myrank, fx)
 Initialize an object to manage a 1D domain.
subroutine, public meshlinedom1d_final (this)
 Finalize an object to manage a 1D domain.
subroutine, public meshlinedom1d_generate (this)
 Generate meshes for the 1D domain.

Detailed Description

module FElib / Mesh / 1D domain

Description
Manage mesh data of 1D domain for element-based methods
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ meshlinedom1d_init()

subroutine, public scale_mesh_linedom1d::meshlinedom1d_init ( class(meshlinedom1d), intent(inout) this,
integer, intent(in) neg,
real(rp), intent(in) dom_xmin,
real(rp), intent(in) dom_xmax,
type(lineelement), intent(in), target refelem,
integer, intent(in) nlocalmeshperprc,
integer, intent(in), optional nproc,
integer, intent(in), optional myrank,
real(rp), dimension(neg+1), intent(in), optional fx )

Initialize an object to manage a 1D domain.

Parameters
[in]negTotal number of elements in the 1D domain
[in]dom_xminMinimum coordinate of the 1D domain
[in]dom_xmaxMaximum coordinate of the 1D domain
[in]refelemReference element for the 1D mesh
[in]nlocalmeshperprcNumber of local meshes managed by each process
[in]nprocTotal number of processes (if not provided, it will be determined internally)
[in]myrankRank of the current process (if not provided, it will be determined internally)
[in]fxCoordinates of the element boundaries (if not provided, they will be generated internally)

Definition at line 62 of file scale_mesh_linedom1d.F90.

67
68 implicit none
69
70 class(MeshLineDom1D), intent(inout) :: this
71 integer, intent(in) :: NeG !< Total number of elements in the 1D domain
72 real(RP), intent(in) :: dom_xmin !< Minimum coordinate of the 1D domain
73 real(RP), intent(in) :: dom_xmax !< Maximum coordinate of the 1D domain
74 type(LineElement), intent(in), target :: refElem !< Reference element for the 1D mesh
75 integer, intent(in) :: NLocalMeshPerPrc !< Number of local meshes managed by each process
76 integer, intent(in), optional :: nproc !< Total number of processes (if not provided, it will be determined internally)
77 integer, intent(in), optional :: myrank !< Rank of the current process (if not provided, it will be determined internally)
78 real(RP), intent(in), optional :: FX(NeG+1) !< Coordinates of the element boundaries (if not provided, they will be generated internally)
79 !-----------------------------------------------------------------------------
80
81 call meshbase1d_init(this, &
82 neg, &
83 dom_xmin, dom_xmax, &
84 refelem, nlocalmeshperprc, &
85 nproc, myrank, fx )
86
87 this%dom_vol = (this%xmax_gl - this%xmin_gl)
88

References scale_mesh_base1d::meshbase1d_init().

Referenced by scale_mesh_linedom1d::meshlinedom1d::generate().

◆ meshlinedom1d_final()

subroutine, public scale_mesh_linedom1d::meshlinedom1d_final ( class(meshlinedom1d), intent(inout) this)

Finalize an object to manage a 1D domain.

Definition at line 92 of file scale_mesh_linedom1d.F90.

93 implicit none
94 class(MeshLineDom1D), intent(inout) :: this
95 !-----------------------------------------------------------------------------
96
97 call meshbase1d_final(this)
98

References scale_mesh_base1d::meshbase1d_final().

Referenced by scale_mesh_linedom1d::meshlinedom1d::generate().

◆ meshlinedom1d_generate()

subroutine, public scale_mesh_linedom1d::meshlinedom1d_generate ( class(meshlinedom1d), intent(inout), target this)

Generate meshes for the 1D domain.

Definition at line 103 of file scale_mesh_linedom1d.F90.

104 implicit none
105 class(MeshLineDom1D), intent(inout), target :: this
106
107 integer :: n
108 integer :: p
109 type(LocalMesh1D), pointer :: mesh
110
111 integer :: tileID_table(this%LOCAL_MESH_NUM, this%PRC_NUM)
112 integer :: panelID_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
113 integer :: pi_table(this%LOCAL_MESH_NUM*this%PRC_NUM)
114
115 !integer :: TILE_NUM_PER_PANEL
116 integer :: tileID
117
118 !-----------------------------------------------------------------------------
119
120 ! TILE_NUM_PER_PANEL = this%LOCAL_MESH_NUM_global / 1
121
122
123 !--- Construct the connectivity of patches (only master node)
124
125 call meshbase1d_assigndomid( this, & ! (in)
126 tileid_table, panelid_table, & ! (out)
127 pi_table ) ! (out)
128
129 !--- Setup local meshes managed by my process
130
131 do n=1, this%LOCAL_MESH_NUM
132 mesh => this%lcmesh_list(n)
133 tileid = tileid_table(n, mesh%PRC_myrank+1)
134 call meshbase1d_setuplocaldom( mesh, & ! (inout)
135 tileid, panelid_table(tileid), & ! (in)
136 pi_table(tileid), this%Nprc, & ! (in)
137 this%xmin_gl, this%xmax_gl, & ! (in)
138 this%NeG / this%Nprc, this%FX(:) ) ! (in)
139
140 !---
141 ! write(*,*) "** my_rank=", mesh%PRC_myrank
142 ! write(*,*) " tileID:", mesh%tileID
143 ! write(*,*) " pnlID:", mesh%panelID, "-- i (within a panel)=", pi_table(tileID)
144 ! write(*,*) " local mesh:", n, "( total", this%LOCAL_MESH_NUM, ")"
145 ! write(*,*) " panel_connect:", this%tilePanelID_globalMap(:,mesh%tileID)
146 ! write(*,*) " tile_connect:", this%tileID_globalMap(:,mesh%tileID)
147 ! write(*,*) " face_connect:", this%tileFaceID_globalMap(:,mesh%tileID)
148 ! write(*,*) " domain size"
149 ! write(*,*) " NeX:", mesh%Ne
150 ! write(*,*) " [X]:", mesh%xmin, mesh%xmax
151 end do
152
153 this%isGenerated = .true.
154
155 return

References scale_mesh_base1d::meshbase1d_assigndomid(), and scale_mesh_base1d::meshbase1d_setuplocaldom().

Referenced by scale_mesh_linedom1d::meshlinedom1d::generate().