33 character(len=H_SHORT) :: name
34 character(len=H_MID) :: desc
35 character(len=H_SHORT) :: unit
36 logical :: positive_down
41 integer :: local_mesh_num
43 integer :: local_mesh_num_global
45 integer,
allocatable :: tileid_globalmap(:,:)
46 integer,
allocatable :: tilefaceid_globalmap(:,:)
47 integer,
allocatable :: tilepanelid_globalmap(:,:)
48 integer,
allocatable :: tileid_global2localmap(:)
49 integer,
allocatable :: prcrank_globalmap(:)
56 logical :: isgenerated
59 procedure :: setdiminfo => meshbase_setdiminfo
66 class(
meshbase),
target,
intent(in) :: this
67 integer,
intent(in) :: id
95 ndimtype, refElem, NLocalMeshPerPrc, NsideTile, &
98 use scale_prc,
only: &
102 class(
meshbase),
intent(inout) :: this
103 integer,
intent(in) :: ndimtype
105 integer,
intent(in) :: nlocalmeshperprc
106 integer,
intent(in) :: nsidetile
107 integer,
intent(in),
optional :: nprocs
112 if (
present(nprocs) )
then
113 this%PRC_NUM = nprocs
115 this%PRC_NUM = prc_nprocs
118 this%LOCAL_MESH_NUM = nlocalmeshperprc
119 this%LOCAL_MESH_NUM_global = this%PRC_NUM * this%LOCAL_MESH_NUM
121 this%refElem => refelem
123 allocate( this%tileID_globalMap(nsidetile, this%LOCAL_MESH_NUM_global) )
124 allocate( this%tileFaceID_globalMap(nsidetile, this%LOCAL_MESH_NUM_global) )
125 allocate( this%tilePanelID_globalMap(nsidetile, this%LOCAL_MESH_NUM_global) )
126 allocate( this%tileID_global2localMap(this%LOCAL_MESH_NUM_global) )
127 allocate( this%PRCRank_globalMap(this%LOCAL_MESH_NUM_global) )
128 allocate( this%dimInfo(ndimtype) )
132 this%isGenerated = .false.
141 class(
meshbase),
intent(inout) :: this
144 if (
allocated(this%tileID_globalMap) )
then
147 deallocate( this%tileID_globalMap )
148 deallocate( this%tileFaceID_globalMap )
149 deallocate( this%tilePanelID_globalMap )
150 deallocate( this%tileID_global2localMap )
151 deallocate( this%PRCRank_globalMap )
152 deallocate( this%dimInfo )
164 integer,
intent(in) :: ndim
169 refelem => mesh%refElem
171 allocate( mesh%pos_en(refelem%Np,mesh%Ne,ndim) )
174 allocate( mesh%normal_fn(refelem%NfpTot,mesh%Ne,ndim) )
175 allocate( mesh%sJ(refelem%NfpTot,mesh%Ne) )
176 allocate( mesh%J(refelem%Np,mesh%Ne) )
177 allocate( mesh%Fscale(refelem%NfpTot,mesh%Ne) )
178 allocate( mesh%Escale(refelem%Np,mesh%Ne,ndim,ndim) )
179 allocate( mesh%Gsqrt(refelem%Np,mesh%NeA) )
187 subroutine meshbase_setdiminfo( this, &
188 dimID, name, unit, desc, positive_down )
190 class(
meshbase),
intent(inout) :: this
191 integer,
intent(in) :: dimid
192 character(len=*),
intent(in) :: name
193 character(len=*),
intent(in) :: unit
194 character(len=*),
intent(in) :: desc
195 logical,
intent(in),
optional :: positive_down
199 this%dimInfo(dimid)%name = name
200 this%dimInfo(dimid)%unit = unit
201 this%dimInfo(dimid)%desc = desc
202 if (
present(positive_down) )
then
203 this%dimInfo(dimid)%positive_down = positive_down
205 this%dimInfo(dimid)%positive_down = .false.
209 end subroutine meshbase_setdiminfo
module FElib / Element / Base
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Mesh / Base
subroutine, public meshbase_final(this)
Finalize an object to manage a computational mesh.
subroutine, public meshbase_setgeometricinfo(mesh, ndim)
subroutine, public meshbase_init(this, ndimtype, refelem, nlocalmeshperprc, nsidetile, nprocs)
Initialize an object to manage a computational mesh.
Derived type representing a 3D reference element.
Derived type representing an arbitrary finite element.
Derived type to manage a local 3D computational domain.
Derived type to manage a local computational domain (base type)
Base type to manage a computational mesh.
Derived type to manage an information of a mesh dimension.