| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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. |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(in) | :: | this | |||
| class(MappedScalar2D_t), | intent(in) | :: | scalar | |||
| real(kind=prec), | intent(out) | :: | values(1:this%nPoints,1:scalar%nVar) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(in) | :: | this | |||
| class(MappedScalar3D_t), | intent(in) | :: | scalar | |||
| real(kind=prec), | intent(out) | :: | values(1:this%nPoints,1:scalar%nVar) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(in) | :: | this | |||
| class(MappedScalar2D_t), | intent(in) | :: | scalar | |||
| real(kind=prec), | intent(out) | :: | values(1:this%nPoints,1:scalar%nVar) |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(in) | :: | this | |||
| class(MappedScalar3D_t), | intent(in) | :: | scalar | |||
| real(kind=prec), | intent(out) | :: | values(1:this%nPoints,1:scalar%nVar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this |
Allocate storage for a point cloud of size nPoints in nDim dimensions. nDim must be 2 or 3.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nPoints | |||
| integer, | intent(in) | :: | nDim |
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this | |||
| type(SEMQuad), | intent(in) | :: | 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this | |||
| type(SEMHex), | intent(in) | :: | 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this | |||
| type(SEMQuad), | intent(in) | :: | 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this | |||
| type(SEMHex), | intent(in) | :: | geometry |
Copy user-supplied physical coordinates into the cloud. xIn must be shape (nPoints, nDim) matching the init dimensions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Points_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | xIn(:,:) |
type,public :: Points_t
integer :: nPoints = 0
integer :: nDim = 0
integer :: 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.
real(prec),allocatable :: x(:,:)
!! Physical coordinates, shape (1:nPoints, 1:nDim). User input.
integer,pointer :: elements(:) => null()
!! Element id (rank-local) containing each point; 0 = not found.
real(prec),pointer :: coordinates(:,:) => null()
!! Reference coordinates (s,t[,u]) in [-1,1]^nDim, shape (1:nPoints, 1:nDim).
!! Defined only where elements(p) > 0.
real(prec),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(prec),pointer :: lT_cache(:,:) => null()
!! Lagrange basis at coordinates(p,2), shape (0:nCached, 1:nPoints).
real(prec),pointer :: lU_cache(:,:) => null()
!! Lagrange basis at coordinates(p,3), shape (0:nCached, 1:nPoints).
!! Allocated only for nDim = 3.
contains
procedure,public :: Init => Init_Points_t
procedure,public :: Free => Free_Points_t
procedure,public :: SetPoints => SetPoints_Points_t
generic,public :: LocatePoints => LocatePoints_2D_Points_t,LocatePoints_3D_Points_t
procedure,public :: LocatePoints_2D_Points_t
procedure,public :: LocatePoints_3D_Points_t
generic,public :: EvaluateScalar => EvalScalar_2D_Points_t,EvalScalar_3D_Points_t
procedure,public :: EvalScalar_2D_Points_t
procedure,public :: EvalScalar_3D_Points_t
endtype Points_t