Points Derived Type

type, public, extends(Points_t) :: Points


Inherits

type~~points~2~~InheritsGraph type~points~2 Points type~points_t Points_t type~points~2->type~points_t

Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
character(len=3), public :: backend ="cpu"
real(kind=prec), public, pointer:: coordinates(:,:)=> null()

Reference coordinates (s,t[,u]) in [-1,1]^nDim, shape (1:nPoints, 1:nDim). Defined only where elements(p) > 0.

integer, public, pointer:: elements(:)=> null()

Element id (rank-local) containing each point; 0 = not found.

real(kind=prec), public, pointer:: lS_cache(:,:)=> null()

Lagrange basis at coordinates(p,1), shape (0:nCached, 1:nPoints). Filled by LocatePoints for points with elements(p) > 0.

real(kind=prec), public, pointer:: lT_cache(:,:)=> null()

Lagrange basis at coordinates(p,2), shape (0:nCached, 1:nPoints).

real(kind=prec), public, pointer:: lU_cache(:,:)=> null()

Lagrange basis at coordinates(p,3), shape (0:nCached, 1:nPoints). Allocated only for nDim = 3.

integer, public :: nCached =0

Polynomial degree at which the per-point Lagrange basis cache is valid. Zero means no cache. The cache is filled by LocatePoints and consumed by EvaluateScalar when the field's interpolant degree matches.

integer, public :: nDim =0
integer, public :: nPoints =0
real(kind=prec), public, allocatable:: x(:,:)

Physical coordinates, shape (1:nPoints, 1:nDim). User input.


Type-Bound Procedures

procedure, public :: EvalScalar_2D_Points_t

  • public subroutine EvalScalar_2D_Points_t(this, scalar, values)

    Evaluate a 2D MappedScalar at all located points by tensor-product Lagrange interpolation at the stored reference coordinates. Points with elements(p) == 0 receive a value of zero. When LocatePoints has cached the per-point basis at the matching polynomial degree, this routine reuses it and skips Lagrange-polynomial evaluation altogether.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(in) :: this
    class(MappedScalar2D_t), intent(in) :: scalar
    real(kind=prec), intent(out) :: values(1:this%nPoints,1:scalar%nVar)

procedure, public :: EvalScalar_3D_Points_t

  • public subroutine EvalScalar_3D_Points_t(this, scalar, values)

    Evaluate a 3D MappedScalar at all located points by tensor-product Lagrange interpolation. Points with elements(p) == 0 receive zero. When LocatePoints has cached the basis at the matching degree, this routine reuses it.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(in) :: this
    class(MappedScalar3D_t), intent(in) :: scalar
    real(kind=prec), intent(out) :: values(1:this%nPoints,1:scalar%nVar)

generic, public :: EvaluateScalar => EvalScalar_2D_Points_t, EvalScalar_3D_Points_t

  • public subroutine EvalScalar_2D_Points_t(this, scalar, values)

    Evaluate a 2D MappedScalar at all located points by tensor-product Lagrange interpolation at the stored reference coordinates. Points with elements(p) == 0 receive a value of zero. When LocatePoints has cached the per-point basis at the matching polynomial degree, this routine reuses it and skips Lagrange-polynomial evaluation altogether.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(in) :: this
    class(MappedScalar2D_t), intent(in) :: scalar
    real(kind=prec), intent(out) :: values(1:this%nPoints,1:scalar%nVar)
  • public subroutine EvalScalar_3D_Points_t(this, scalar, values)

    Evaluate a 3D MappedScalar at all located points by tensor-product Lagrange interpolation. Points with elements(p) == 0 receive zero. When LocatePoints has cached the basis at the matching degree, this routine reuses it.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(in) :: this
    class(MappedScalar3D_t), intent(in) :: scalar
    real(kind=prec), intent(out) :: values(1:this%nPoints,1:scalar%nVar)

procedure, public :: Free => Free_Points_t

  • public subroutine Free_Points_t(this)

    Arguments

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

procedure, public :: Init => Init_Points_t

  • public subroutine Init_Points_t(this, nPoints, nDim)

    Allocate storage for a point cloud of size nPoints in nDim dimensions. nDim must be 2 or 3.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(out) :: this
    integer, intent(in) :: nPoints
    integer, intent(in) :: nDim

generic, public :: LocatePoints => LocatePoints_2D_Points_t, LocatePoints_3D_Points_t

  • public subroutine LocatePoints_2D_Points_t(this, geometry)

    Locate each stored physical point inside the 2D SEMQuad geometry. On exit, elements(p) holds the (rank-local) element id and coordinates(p,:) holds the (s,t) reference coordinates, both for points that resolve. Points that resolve to no element are marked with elements(p) = 0.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(inout) :: this
    type(SEMQuad), intent(in) :: geometry
  • public subroutine LocatePoints_3D_Points_t(this, geometry)

    Locate each stored physical point inside the 3D SEMHex geometry. On exit, elements(p) and coordinates(p,1:3) hold the located element id and reference (s,t,u) for points that resolve; elements(p) = 0 otherwise.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(inout) :: this
    type(SEMHex), intent(in) :: geometry

procedure, public :: LocatePoints_2D_Points_t

  • public subroutine LocatePoints_2D_Points_t(this, geometry)

    Locate each stored physical point inside the 2D SEMQuad geometry. On exit, elements(p) holds the (rank-local) element id and coordinates(p,:) holds the (s,t) reference coordinates, both for points that resolve. Points that resolve to no element are marked with elements(p) = 0.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(inout) :: this
    type(SEMQuad), intent(in) :: geometry

procedure, public :: LocatePoints_3D_Points_t

  • public subroutine LocatePoints_3D_Points_t(this, geometry)

    Locate each stored physical point inside the 3D SEMHex geometry. On exit, elements(p) and coordinates(p,1:3) hold the located element id and reference (s,t,u) for points that resolve; elements(p) = 0 otherwise.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(inout) :: this
    type(SEMHex), intent(in) :: geometry

procedure, public :: SetPoints => SetPoints_Points_t

  • public subroutine SetPoints_Points_t(this, xIn)

    Copy user-supplied physical coordinates into the cloud. xIn must be shape (nPoints, nDim) matching the init dimensions.

    Arguments

    TypeIntentOptionalAttributesName
    class(Points_t), intent(inout) :: this
    real(kind=prec), intent(in) :: xIn(:,:)

Source Code

  type,extends(Points_t),public :: Points
    character(3) :: backend = "cpu"
  endtype Points