Lagrange Derived Type

type, public, extends(Lagrange_t) :: Lagrange


Inherits

type~~lagrange~~InheritsGraph type~lagrange Lagrange type~lagrange_t Lagrange_t type~lagrange->type~lagrange_t c_ptr c_ptr type~lagrange_t->c_ptr blas_handle

Inherited by

type~~lagrange~~InheritedByGraph type~lagrange Lagrange type~self_dataobj SELF_DataObj type~self_dataobj->type~lagrange interp type~vector2d_t Vector2D_t type~vector2d_t->type~self_dataobj type~tensor3d_t Tensor3D_t type~tensor3d_t->type~self_dataobj type~scalar1d_t Scalar1D_t type~scalar1d_t->type~self_dataobj type~scalar2d_t Scalar2D_t type~scalar2d_t->type~self_dataobj type~tensor2d_t Tensor2D_t type~tensor2d_t->type~self_dataobj type~vector3d_t Vector3D_t type~vector3d_t->type~self_dataobj type~scalar3d_t Scalar3D_t type~scalar3d_t->type~self_dataobj type~tensor3d Tensor3D type~tensor3d->type~tensor3d_t type~tensor3d~2 Tensor3D type~tensor3d~2->type~tensor3d_t type~vector2d~2 Vector2D type~vector2d~2->type~vector2d_t type~scalar1d~2 Scalar1D type~scalar1d~2->type~scalar1d_t type~scalar2d~2 Scalar2D type~scalar2d~2->type~scalar2d_t type~tensor2d~2 Tensor2D type~tensor2d~2->type~tensor2d_t type~vector3d~2 Vector3D type~vector3d~2->type~vector3d_t type~vector2d Vector2D type~vector2d->type~vector2d_t type~scalar1d Scalar1D type~scalar1d->type~scalar1d_t type~scalar1d~3 Scalar1D type~scalar1d~3->type~scalar1d_t type~scalar2d Scalar2D type~scalar2d->type~scalar2d_t type~tensor2d Tensor2D type~tensor2d->type~tensor2d_t type~vector3d Vector3D type~vector3d->type~vector3d_t type~scalar3d Scalar3D type~scalar3d->type~scalar3d_t type~scalar3d~2 Scalar3D type~scalar3d~2->type~scalar3d_t type~semquad SEMQuad type~semquad->type~vector2d x, nHat type~semquad->type~scalar2d nScale, J type~semquad->type~tensor2d dxds, dsdx type~mappedscalar1d_t MappedScalar1D_t type~mappedscalar1d_t->type~scalar1d type~geometry1d Geometry1D type~mappedscalar1d_t->type~geometry1d geometry type~geometry1d->type~scalar1d x, dxds type~mappedscalar2d_t MappedScalar2D_t type~mappedscalar2d_t->type~scalar2d type~mappedscalar2d_t->type~semquad geometry type~semhex SEMHex type~semhex->type~tensor3d dxds, dsdx type~semhex->type~vector3d x, nHat type~semhex->type~scalar3d nScale, J type~mappedvector2d_t MappedVector2D_t type~mappedvector2d_t->type~vector2d type~mappedvector2d_t->type~semquad geometry type~mappedvector3d_t MappedVector3D_t type~mappedvector3d_t->type~vector3d type~mappedvector3d_t->type~semhex geometry type~mappedscalar3d_t MappedScalar3D_t type~mappedscalar3d_t->type~scalar3d type~mappedscalar3d_t->type~semhex geometry type~dgmodel1d_t DGModel1D_t type~dgmodel1d_t->type~geometry1d geometry type~mappedscalar1d MappedScalar1D type~dgmodel1d_t->type~mappedscalar1d solution, solutionGradient, flux, source, fluxDivergence, dSdt, workSol type~mappedscalar2d MappedScalar2D type~mappedscalar2d->type~mappedscalar2d_t type~mappedscalar1d~2 MappedScalar1D type~mappedscalar1d~2->type~mappedscalar1d_t type~dgmodel3d_t DGModel3D_t type~dgmodel3d_t->type~semhex geometry type~mappedscalar3d MappedScalar3D type~dgmodel3d_t->type~mappedscalar3d solution, source, fluxDivergence, dSdt, workSol type~mappedvector3d MappedVector3D type~dgmodel3d_t->type~mappedvector3d solutionGradient, flux type~mappedvector2d MappedVector2D type~mappedvector2d->type~mappedvector2d_t type~mappedvector2d~2 MappedVector2D type~mappedvector2d~2->type~mappedvector2d_t type~mappedscalar3d->type~mappedscalar3d_t type~dgmodel2d_t DGModel2D_t type~dgmodel2d_t->type~semquad geometry type~dgmodel2d_t->type~mappedscalar2d solution, source, fluxDivergence, dSdt, workSol type~dgmodel2d_t->type~mappedvector2d solutionGradient, flux type~mappedscalar1d->type~mappedscalar1d_t type~mappedscalar2d~2 MappedScalar2D type~mappedscalar2d~2->type~mappedscalar2d_t type~mappedvector3d->type~mappedvector3d_t type~mappedvector3d~2 MappedVector3D type~mappedvector3d~2->type~mappedvector3d_t type~mappedscalar3d~2 MappedScalar3D type~mappedscalar3d~2->type~mappedscalar3d_t type~dgmodel3d DGModel3D type~dgmodel3d->type~dgmodel3d_t type~dgmodel1d DGModel1D type~dgmodel1d->type~dgmodel1d_t type~dgmodel2d DGModel2D type~dgmodel2d->type~dgmodel2d_t type~dgmodel3d~2 DGModel3D type~dgmodel3d~2->type~dgmodel3d_t type~dgmodel1d~2 DGModel1D type~dgmodel1d~2->type~dgmodel1d_t type~dgmodel2d~2 DGModel2D type~dgmodel2d~2->type~dgmodel2d_t type~nulldgmodel1d_t NullDGModel1D_t type~nulldgmodel1d_t->type~dgmodel1d type~burgers1d_t Burgers1D_t type~burgers1d_t->type~dgmodel1d type~advection_diffusion_2d_t advection_diffusion_2d_t type~advection_diffusion_2d_t->type~dgmodel2d type~linearshallowwater2d_t LinearShallowWater2D_t type~linearshallowwater2d_t->type~dgmodel2d type~nulldgmodel2d_t NullDGModel2D_t type~nulldgmodel2d_t->type~dgmodel2d type~lineareuler2d_t LinearEuler2D_t type~lineareuler2d_t->type~dgmodel2d type~nulldgmodel3d_t NullDGModel3D_t type~nulldgmodel3d_t->type~dgmodel3d type~advection_diffusion_3d_t advection_diffusion_3d_t type~advection_diffusion_3d_t->type~dgmodel3d type~advection_diffusion_1d_t advection_diffusion_1d_t type~advection_diffusion_1d_t->type~dgmodel1d type~nulldgmodel1d NullDGModel1D type~nulldgmodel1d->type~nulldgmodel1d_t type~nulldgmodel1d~2 NullDGModel1D type~nulldgmodel1d~2->type~nulldgmodel1d_t type~advection_diffusion_2d~2 advection_diffusion_2d type~advection_diffusion_2d~2->type~advection_diffusion_2d_t type~linearshallowwater2d LinearShallowWater2D type~linearshallowwater2d->type~linearshallowwater2d_t type~lineareuler2d LinearEuler2D type~lineareuler2d->type~lineareuler2d_t type~advection_diffusion_3d advection_diffusion_3d type~advection_diffusion_3d->type~advection_diffusion_3d_t type~advection_diffusion_3d~2 advection_diffusion_3d type~advection_diffusion_3d~2->type~advection_diffusion_3d_t type~burgers1d~2 Burgers1D type~burgers1d~2->type~burgers1d_t type~advection_diffusion_2d advection_diffusion_2d type~advection_diffusion_2d->type~advection_diffusion_2d_t type~burgers1d Burgers1D type~burgers1d->type~burgers1d_t type~linearshallowwater2d~2 LinearShallowWater2D type~linearshallowwater2d~2->type~linearshallowwater2d_t type~nulldgmodel2d NullDGModel2D type~nulldgmodel2d->type~nulldgmodel2d_t type~nulldgmodel2d~2 NullDGModel2D type~nulldgmodel2d~2->type~nulldgmodel2d_t type~lineareuler2d~2 LinearEuler2D type~lineareuler2d~2->type~lineareuler2d_t type~nulldgmodel3d NullDGModel3D type~nulldgmodel3d->type~nulldgmodel3d_t type~nulldgmodel3d~2 NullDGModel3D type~nulldgmodel3d~2->type~nulldgmodel3d_t type~advection_diffusion_1d advection_diffusion_1d type~advection_diffusion_1d->type~advection_diffusion_1d_t type~advection_diffusion_1d~2 advection_diffusion_1d type~advection_diffusion_1d~2->type~advection_diffusion_1d_t

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: M

The number of target points.

integer, public :: N

The number of control points.

real(kind=prec), public, pointer, contiguous, dimension(:,:):: bMatrix

The boundary interpolation matrix that is used to map a grid of nodal values at the control points to the element boundaries.

real(kind=prec), public, pointer, contiguous, dimension(:):: bWeights

The barycentric weights that are calculated from the controlPoints and used for interpolation.

character(len=3), public :: backend ='cpu'
type(c_ptr), public :: blas_handle =c_null_ptr

A handle for working with hipblas

integer, public :: controlNodeType
real(kind=prec), public, pointer, contiguous, dimension(:):: controlPoints

The set of nodes in one dimension where data is known. To create higher dimension interpolation and differentiation operators, structured grids in two and three dimensions are created by tensor products of the controlPoints. This design decision implies that all spectral element methods supported by the Lagrange class have the same polynomial degree in each computational/spatial dimension. In practice, the controlPoints are the Legendre-Gauss, Legendre-Gauss-Lobatto, Legendre-Gauss-Radau, Chebyshev-Gauss, Chebyshev-Gauss-Lobatto, or Chebyshev-Gauss-Radau quadrature points over the domain [-1,1] (computational space). The Init routine for this class restricts controlPoints to one of these quadrature types or uniform points on [-1,1].

real(kind=prec), public, pointer, contiguous, dimension(:,:):: dMatrix

The derivative matrix for mapping function nodal values to a nodal values of the derivative estimate. The dMatrix is based on a strong form of the derivative.

real(kind=prec), public, pointer, contiguous, dimension(:,:):: dgMatrix

The derivative matrix for mapping function nodal values to a nodal values of the derivative estimate. The dgMatrix is based on a weak form of the derivative. It must be used with bMatrix to account for boundary contributions in the weak form.

real(kind=prec), public, pointer, contiguous, dimension(:,:):: iMatrix

The interpolation matrix (transpose) for mapping data from the control grid to the target grid.

real(kind=prec), public, pointer, contiguous, dimension(:):: qWeights

The quadrature weights for discrete integration. The quadradture weights depend on the type of controlPoints provided; one of Legendre-Gauss, Legendre-Gauss-Lobatto, Legendre-Gauss-Radau, Chebyshev-Gauss, Chebyshev-Gauss-Lobatto, Chebyshev-Gauss Radau, or Uniform. If Uniform, the quadrature weights are constant .

integer, public :: targetNodeType
real(kind=prec), public, pointer, contiguous, dimension(:):: targetPoints

The set of nodes in one dimension where data is to be interpolated to. To create higher dimension interpolation and differentiation operators, structured grids in two and three dimensions are created by tensor products of the targetPoints. In practice, the targetPoints are set to a uniformly distributed set of points between [-1,1] (computational space) to allow for interpolation from unevenly spaced quadrature points to a plotting grid.


Type-Bound Procedures

procedure, public :: CalculateBarycentricWeights

procedure, public :: CalculateDerivativeMatrix

procedure, public :: CalculateInterpolationMatrix

procedure, public :: CalculateLagrangePolynomials

  • public function CalculateLagrangePolynomials(this, sE) result(lAtS)

    Arguments

    TypeIntentOptionalAttributesName
    class(Lagrange_t) :: this
    real(kind=prec) :: sE

    Return Value real(kind=prec)(0:this%N)

procedure, public :: Free => Free_Lagrange_t

  • public subroutine Free_Lagrange_t(this)

    Frees all memory (host and device) associated with an instance of the Lagrange_t class

    Arguments

    TypeIntentOptionalAttributesName
    class(Lagrange_t), intent(inout) :: this

    Lagrange_t class instance

procedure, public :: Init => Init_Lagrange_t

  • public subroutine Init_Lagrange_t(this, N, controlNodeType, M, targetNodeType)

    Initialize an instance of the Lagrange_t class On output, all of the attributes for the Lagrange_t class are allocated and values are initialized according to the number of control points, number of target points, and the types for the control and target nodes. If a GPU is available, device pointers for the Lagrange_t attributes are allocated and initialized.

    Arguments

    TypeIntentOptionalAttributesName
    class(Lagrange_t), intent(out) :: this

    Lagrange_t class instance

    integer, intent(in) :: N

    The number of control points for interpolant

    integer, intent(in) :: controlNodeType

    The integer code specifying the type of control points. Parameters are defined in SELF_Constants.f90. One of GAUSS(=1), GAUSS_LOBATTO(=2), or UNIFORM(=3)

    integer, intent(in) :: M

    The number of target points for the interpolant

    integer, intent(in) :: targetNodeType

    The integer code specifying the type of target points. Parameters are defined in SELF_Constants.f90. One of GAUSS(=1), GAUSS_LOBATTO(=2), or UNIFORM(=3)

procedure, public :: WriteHDF5 => WriteHDF5_Lagrange_t

  • public subroutine WriteHDF5_Lagrange_t(this, fileId)

    Arguments

    TypeIntentOptionalAttributesName
    class(Lagrange_t), intent(in) :: this
    integer(kind=HID_T), intent(in) :: fileId

Source Code

  type,extends(Lagrange_t),public :: Lagrange
    character(3) :: backend = 'cpu'
  endtype Lagrange