35 procedure :: final => lineelement_final
36 procedure :: genintgausslegendreintrpmat => lineelement_gen_intgausslegendreintrpmat
43 private :: construct_element
60 integer,
intent(in) :: elemOrder
61 logical,
intent(in) :: LumpedMassMatFlag
65 elem%PolyOrder = elemorder
67 elem%Np = elemorder + 1
70 elem%NfpTot = elem%Nfp*elem%Nfaces
73 call construct_element(elem)
82 subroutine lineelement_final(elem)
91 end subroutine lineelement_final
94 subroutine construct_element(elem)
109 integer :: nodes(elem%Np)
111 real(RP) :: lglPts1D(elem%Np)
112 real(DP) :: intWeight_lgl1DPts(elem%Np)
114 real(RP) :: P1D_ori(elem%Np, elem%Np)
115 real(RP) :: DP1D_ori(elem%Np, elem%Np)
116 real(RP) :: DLagr1D(elem%Np, elem%Np)
117 real(RP) :: Emat(elem%Np, elem%Nfp*elem%Nfaces)
118 real(RP) :: MassEdge(elem%Nfp, elem%Nfp)
142 elem%Fmask(:,2) = elem%Np
146 elem%Dx1(:,:) = 0.0_rp
150 elem%x1(n) = lglpts1d(n)
154 elem%V(n,l) = p1d_ori(n,l) * sqrt(dble(l-1) + 0.5_rp)
155 elem%Dx1(n,l) = dlagr1d(l,n)
165 if (elem%IsLumpedMatrix())
then
166 elem%invM(:,:) = 0.0_rp
169 elem%M(i,i) = elem%IntWeight_lgl(i)
170 elem%invM(i,i) = 1.0_rp/elem%IntWeight_lgl(i)
185 massedge(:,:) = 0.0_rp
187 massedge(l,l) = 1.0_rp
189 emat(elem%Fmask(:,f), (f-1)*elem%Nfp+1:f*elem%Nfp) = massedge
195 end subroutine construct_element
198 function lineelement_gen_intgausslegendreintrpmat( this, IntrpPolyOrder, &
199 intw_intrp, x_intrp )
result(IntrpMat)
209 integer,
intent(in) :: IntrpPolyOrder
210 real(RP),
intent(out),
optional :: intw_intrp(IntrpPolyOrder)
211 real(RP),
intent(out),
optional :: x_intrp(IntrpPolyOrder)
212 real(RP) :: IntrpMat(IntrpPolyOrder,this%Np)
214 real(RP) :: r_int1D_i(IntrpPolyOrder)
215 real(RP) :: r_int1Dw_i(IntrpPolyOrder)
216 real(RP) :: P_int1D_ori(IntrpPolyOrder,this%PolyOrder+1)
217 real(RP) :: Vint(IntrpPolyOrder,this%PolyOrder+1)
226 do p1_=1, intrppolyorder
227 if (
present(intw_intrp)) intw_intrp(p1_) = r_int1dw_i(p1_)
228 if (
present(x_intrp)) x_intrp(p1_) = r_int1d_i(p1_)
230 vint(p1_,p1) = p_int1d_ori(p1_,p1) * sqrt(real(p1-1,kind=rp) + 0.5_rp)
233 intrpmat(:,:) = matmul(vint, this%invV)
236 end function lineelement_gen_intgausslegendreintrpmat
module FElib / Element / Base
subroutine, public elementbase_construct_massmat(v, np, massmat, invmassmat)
Construct mass matrix M^-1 = V V^T M = ( M^-1 )^-1.
subroutine, public elementbase_construct_stiffmat(massmat, invmassmat, dmat, np, stiffmat)
Construct stiffness matrix StiffMat_i = M^-1 ( M D_xi )^T.
subroutine, public elementbase_construct_liftmat(invm, emat, np, nfptot, liftmat)
Construct stiffness matrix StiffMat_i = M^-1 ( M D_xi )^T.
subroutine, public elementbase1d_init(elem, lumpedmat_flag)
Initialize an object to manage a 1D reference element.
subroutine, public elementbase1d_final(elem)
Finalize an object to manage a 1D reference element.
module FElib / Element / line
subroutine lineelement_init(elem, elemorder, lumpedmassmatflag)
Initialize an object to manage a hexahedral element.
Module common / Linear algebra.
real(rp) function, dimension(size(a, 1), size(a, 2)), public linalgebra_inv(a)
Calculate a inversion of matrix A.
Module common / Polynominal.
real(rp) function, dimension(nord), public polynominal_gengausslegendreptintweight(nord)
A function to calculate the Gauss-Legendre (GL) weights.
real(rp) function, dimension(nord), public polynominal_gengausslegendrept(nord)
A function to calculate the Gauss-Legendre (GL) points.
real(rp) function, dimension(size(x), nord+1), public polynominal_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+1), public polynominal_gengausslobattopt(nord)
A function to calculate the Legendre-Gauss-Lobatto (LGL) points.
real(rp) function, dimension(size(x), nord+1), public polynominal_genlegendrepoly(nord, x)
A function to obtain the values of Legendre polynomials which are evaluated at arbitrary points.
real(rp) function, dimension(size(x), nord+1), public polynominal_gendlegendrepoly(nord, x, p)
A function to obtain differential values of Legendre polynomials which are evaluated at arbitrary poi...
real(rp) function, dimension(nord+1), public polynominal_gengausslobattoptintweight(nord)
A function to calculate the Gauss-Lobbato weights.
real(rp) function, dimension(nord+1, nord+1), public polynominal_gendlagrangepoly_lglpt(nord, x_lgl)
A function to obtain the differential values of Lagrange basis functions at the GLL points.
Derived type representing a 1D reference element.
Derived type representing a line element.