10#include "scaleFElib.h"
34 real(rp),
allocatable :: ic2f(:,:,:)
35 integer,
allocatable :: ic2f_emap(:)
36 integer,
allocatable :: if2c_emap(:,:)
38 integer,
allocatable :: coarselocalmesh_tileidlist(:)
39 integer,
allocatable :: coarselocalmesh_lcdomidlist(:)
45 integer :: hierarchy_type
46 integer :: level_id = 0
51 integer :: num_tot_level
52 integer :: num_hmg_level
53 integer :: num_pmg_level
88 integer,
intent(in) :: p_level_num
89 integer,
intent(in) :: h_level_num
92 this%NUM_TOT_LEVEL = 0
93 this%NUM_hMG_LEVEL = h_level_num
94 this%NUM_pMG_LEVEL = p_level_num
96 this%NUM_TOT_LEVEL = this%NUM_hMG_LEVEL + this%NUM_pMG_LEVEL
118 integer,
intent(in) :: np_i
119 integer,
intent(in) :: np_o
120 real(rp),
intent(out) :: mat1d(np_o,np_i)
125 real(rp),
allocatable :: lag_i(:,:)
126 real(rp),
allocatable :: lag_o(:,:)
129 real(rp),
allocatable :: int_w(:)
130 real(rp),
allocatable :: int_pts(:)
135 call elem1d_i%Init( np_i-1, .false. )
136 call elem1d_o%Init( np_o-1, .false. )
139 np_int = max(np_i,np_o)
141 allocate( int_pts(np_int) )
144 allocate( int_w(np_int) )
148 allocate( lag_i(np_int,np_i) )
151 allocate( lag_o(np_int,np_o) )
156 mat1d(po,pi) = sum( int_w(:) * lag_i(:,pi) * lag_o(:,po) )
159 mat1d(:,:) = matmul( elem1d_o%invM, mat1d )
162 call elem1d_i%Final()
163 call elem1d_o%Final()
178 allocate( this%Ic2f(lcmesh%refElem%Np,lcmesh%refElem%Nv,lcmesh%NeA) )
179 allocate( this%Ic2f_emap(lcmesh%Ne) )
181 allocate( this%CoarseLocalMesh_tileIDlist(1) )
182 allocate( this%CoarseLocalMesh_lcdomIDlist(1) )
192 deallocate( this%Ic2f )
193 deallocate( this%Ic2f_emap )
194 deallocate( this%CoarseLocalMesh_tileIDlist )
195 deallocate( this%CoarseLocalMesh_lcdomIDlist )
module FElib / Element / line
module FElib / Mesh / Local, Base
module FElib / Mesh / Hierarchy base
subroutine, public meshhierarchy_construct_pmg_mat1d(mat1d, np_i, np_o)
Construct a 1D p-multigrid matrix used for transfer between different p-levels.
integer, parameter, public mesh_hierarchy_type_pmg
Type ID of mesh hierarchy: p-MG.
integer, parameter, public mesh_hierarchy_hmg_finest_level
Finest level index in h-MG.
subroutine, public meshhierarchybase_init(this, p_level_num, h_level_num)
Initialize a base object for mesh hierarchy.
integer, parameter, public mesh_hierarchy_type_hmg
Type ID of mesh hierarchy: h-MG.
subroutine, public meshhierarchylocalmgdatabase_final(this)
Finalize a base object to manage local multigrid data for mesh hierarchy.
subroutine, public meshhierarchybase_final(this)
Finalize a base object for mesh hierarchy.
integer, parameter, public mesh_hierarchy_pmg_finest_level
Finest level index in p-MG.
subroutine, public meshhierarchylocalmgdatabase_init(this, lcmesh)
Initialize a base object to manage local multigrid data for mesh hierarchy.
Module common / Polynomial.
real(rp) function, dimension(nord), public polynomial_gengausslegendreptintweight(nord)
A function to calculate the Gauss-Legendre (GL) weights.
real(rp) function, dimension(size(x), nord+1), public polynomial_genlagrangepoly(nord, x_lgl, x)
A function to obtain the Lagrange basis functions related to the Gauss-Legendre-Lobatto (GLL) points.
real(rp) function, dimension(nord), public polynomial_gengausslegendrept(nord)
A function to calculate the Gauss-Legendre (GL) points.
Derived type representing a line element.
Derived type to manage a local computational domain (base type)
Base type for mesh hierarchy.
Base type to manage local mesh data for multigrid.