A point-cloud container with type-bound procedures to (1) locate each
physical point inside a SEMQuad/SEMHex element-of-elements and recover its
reference (computational) coordinates via a Newton inverse-map, and (2)
sample MappedScalar2D / MappedScalar3D fields at the located points.
The point-location uses a uniform-grid spatial hash built from per-element
axis-aligned bounding boxes of the discrete control-grid (geometry%x). For
each candidate element, a Newton iteration on
X(xi) = sum_{i,j[,k]} x_node(i,j[,k]) * l_i(s) * l_j(t) [* l_k(u)]
is driven to convergence using the high-order Jacobian dX/dxi (interpolated
covariant-basis tensor dxds). Points that fall outside every element this
rank owns are marked with the sentinel elements(p) = 0 and their evaluated
field values are returned as zero.
Uses
module~~self_points_t~~UsesGraph
module~self_points_t
SELF_Points_t
module~self_geometry_3d
SELF_Geometry_3D
module~self_points_t->module~self_geometry_3d
module~self_geometry_2d
SELF_Geometry_2D
module~self_points_t->module~self_geometry_2d
module~self_mappedscalar_3d~2
SELF_MappedScalar_3D
module~self_points_t->module~self_mappedscalar_3d~2
module~self_constants
SELF_Constants
module~self_points_t->module~self_constants
module~self_mappedscalar_2d~2
SELF_MappedScalar_2D
module~self_points_t->module~self_mappedscalar_2d~2
module~self_lagrange~3
SELF_Lagrange
module~self_points_t->module~self_lagrange~3
module~self_geometry_3d->module~self_constants
module~self_geometry_3d->module~self_lagrange~3
module~self_mesh_3d
SELF_Mesh_3D
module~self_geometry_3d->module~self_mesh_3d
module~self_scalar_3d~2
SELF_Scalar_3D
module~self_geometry_3d->module~self_scalar_3d~2
module~self_data
SELF_Data
module~self_geometry_3d->module~self_data
module~self_vector_3d~2
SELF_Vector_3D
module~self_geometry_3d->module~self_vector_3d~2
module~self_supportroutines
SELF_SupportRoutines
module~self_geometry_3d->module~self_supportroutines
module~self_tensor_3d~2
SELF_Tensor_3D
module~self_geometry_3d->module~self_tensor_3d~2
module~self_geometry_2d->module~self_constants
module~self_geometry_2d->module~self_lagrange~3
module~self_mesh_2d
SELF_Mesh_2D
module~self_geometry_2d->module~self_mesh_2d
module~self_geometry_2d->module~self_data
module~self_geometry_2d->module~self_supportroutines
module~self_vector_2d~2
SELF_Vector_2D
module~self_geometry_2d->module~self_vector_2d~2
module~self_scalar_2d
SELF_Scalar_2D
module~self_geometry_2d->module~self_scalar_2d
module~self_tensor_2d~2
SELF_Tensor_2D
module~self_geometry_2d->module~self_tensor_2d~2
module~self_mappedscalar_3d_t
SELF_MappedScalar_3D_t
module~self_mappedscalar_3d~2->module~self_mappedscalar_3d_t
iso_fortran_env
iso_fortran_env
module~self_constants->iso_fortran_env
iso_c_binding
iso_c_binding
module~self_constants->iso_c_binding
module~self_mappedscalar_2d_t
SELF_MappedScalar_2D_t
module~self_mappedscalar_2d~2->module~self_mappedscalar_2d_t
module~self_lagrange~3->module~self_constants
module~self_lagrange~3->iso_fortran_env
module~self_gpu
SELF_GPU
module~self_lagrange~3->module~self_gpu
module~self_lagrange_t
SELF_Lagrange_t
module~self_lagrange~3->module~self_lagrange_t
module~self_lagrange~3->iso_c_binding
module~self_mesh_3d_t
SELF_Mesh_3D_t
module~self_mesh_3d->module~self_mesh_3d_t
module~self_mesh_2d_t
SELF_Mesh_2D_t
module~self_mesh_2d->module~self_mesh_2d_t
module~self_mappedscalar_2d_t->module~self_geometry_2d
module~self_mappedscalar_2d_t->module~self_constants
module~self_mappedscalar_2d_t->module~self_lagrange~3
module~self_mappedscalar_2d_t->module~self_mesh_2d
module~self_mappedscalar_2d_t->module~self_scalar_2d
module~self_mappedscalar_2d_t->module~self_tensor_2d~2
module~self_mappedscalar_2d_t->iso_c_binding
module~self_domaindecomposition~2
SELF_DomainDecomposition
module~self_mappedscalar_2d_t->module~self_domaindecomposition~2
FEQParse
FEQParse
module~self_mappedscalar_2d_t->FEQParse
module~self_gpu->iso_c_binding
module~self_gpu_enums
SELF_GPU_enums
module~self_gpu->module~self_gpu_enums
module~self_lagrange_t->module~self_constants
module~self_lagrange_t->iso_fortran_env
module~self_lagrange_t->module~self_supportroutines
module~self_lagrange_t->iso_c_binding
module~self_quadrature
SELF_Quadrature
module~self_lagrange_t->module~self_quadrature
HDF5
HDF5
module~self_lagrange_t->HDF5
module~self_hdf5
SELF_HDF5
module~self_lagrange_t->module~self_hdf5
module~self_scalar_3d~2->module~self_constants
module~self_scalar_3d~2->iso_c_binding
module~self_scalar_3d_t
SELF_Scalar_3D_t
module~self_scalar_3d~2->module~self_scalar_3d_t
module~self_data->module~self_constants
module~self_data->module~self_lagrange~3
module~self_data->iso_c_binding
module~self_data->FEQParse
module~self_metadata
SELF_Metadata
module~self_data->module~self_metadata
module~self_data->HDF5
module~self_data->module~self_hdf5
module~self_vector_3d_t
SELF_Vector_3D_t
module~self_vector_3d~2->module~self_vector_3d_t
module~self_supportroutines->module~self_constants
module~self_supportroutines->iso_fortran_env
module~self_tensor_3d_t
SELF_Tensor_3D_t
module~self_tensor_3d~2->module~self_tensor_3d_t
module~self_vector_2d_t
SELF_Vector_2D_t
module~self_vector_2d~2->module~self_vector_2d_t
module~self_scalar_2d->module~self_constants
module~self_scalar_2d->iso_c_binding
module~self_scalar_2d_t
SELF_Scalar_2D_t
module~self_scalar_2d->module~self_scalar_2d_t
module~self_tensor_2d_t
SELF_Tensor_2D_t
module~self_tensor_2d~2->module~self_tensor_2d_t
module~self_mappedscalar_3d_t->module~self_geometry_3d
module~self_mappedscalar_3d_t->module~self_constants
module~self_mappedscalar_3d_t->module~self_lagrange~3
module~self_mappedscalar_3d_t->module~self_mesh_3d
module~self_mappedscalar_3d_t->module~self_scalar_3d~2
module~self_mappedscalar_3d_t->module~self_tensor_3d~2
module~self_mappedscalar_3d_t->iso_c_binding
module~self_mappedscalar_3d_t->module~self_domaindecomposition~2
module~self_mappedscalar_3d_t->FEQParse
module~self_gpu_enums->iso_c_binding
module~self_domaindecomposition_t
SELF_DomainDecomposition_t
module~self_domaindecomposition~2->module~self_domaindecomposition_t
module~self_quadrature->module~self_constants
module~self_quadrature->iso_fortran_env
module~self_scalar_3d_t->module~self_constants
module~self_scalar_3d_t->module~self_lagrange~3
module~self_scalar_3d_t->module~self_data
module~self_scalar_3d_t->iso_c_binding
module~self_scalar_3d_t->FEQParse
module~self_scalar_3d_t->module~self_metadata
module~self_scalar_3d_t->HDF5
module~self_scalar_3d_t->module~self_hdf5
module~self_metadata->HDF5
module~self_metadata->module~self_hdf5
module~self_vector_3d_t->module~self_constants
module~self_vector_3d_t->module~self_lagrange~3
module~self_vector_3d_t->module~self_data
module~self_vector_3d_t->iso_c_binding
module~self_vector_3d_t->FEQParse
module~self_vector_3d_t->module~self_metadata
module~self_vector_3d_t->HDF5
module~self_vector_3d_t->module~self_hdf5
module~self_tensor_3d_t->module~self_constants
module~self_tensor_3d_t->module~self_lagrange~3
module~self_tensor_3d_t->module~self_data
module~self_tensor_3d_t->iso_c_binding
module~self_tensor_3d_t->FEQParse
module~self_tensor_3d_t->module~self_metadata
module~self_tensor_3d_t->HDF5
module~self_tensor_3d_t->module~self_hdf5
module~self_vector_2d_t->module~self_constants
module~self_vector_2d_t->module~self_lagrange~3
module~self_vector_2d_t->module~self_data
module~self_vector_2d_t->iso_c_binding
module~self_vector_2d_t->FEQParse
module~self_vector_2d_t->module~self_metadata
module~self_vector_2d_t->HDF5
module~self_vector_2d_t->module~self_hdf5
module~self_scalar_2d_t->module~self_constants
module~self_scalar_2d_t->module~self_lagrange~3
module~self_scalar_2d_t->module~self_data
module~self_scalar_2d_t->iso_c_binding
module~self_scalar_2d_t->FEQParse
module~self_scalar_2d_t->module~self_metadata
module~self_scalar_2d_t->HDF5
module~self_scalar_2d_t->module~self_hdf5
module~self_mesh_3d_t->module~self_constants
module~self_mesh_3d_t->module~self_lagrange~3
module~self_mesh_3d_t->module~self_supportroutines
module~self_mesh_3d_t->iso_c_binding
module~self_mesh_3d_t->module~self_domaindecomposition~2
module~self_mesh_3d_t->HDF5
module~self_mesh_3d_t->module~self_hdf5
module~self_mesh
SELF_Mesh
module~self_mesh_3d_t->module~self_mesh
module~self_mesh_2d_t->module~self_constants
module~self_mesh_2d_t->module~self_lagrange~3
module~self_mesh_2d_t->module~self_supportroutines
module~self_mesh_2d_t->iso_c_binding
module~self_mesh_2d_t->module~self_domaindecomposition~2
module~self_mesh_2d_t->module~self_quadrature
module~self_mesh_2d_t->HDF5
module~self_mesh_2d_t->module~self_hdf5
module~self_mesh_2d_t->module~self_mesh
module~self_hdf5->module~self_constants
module~self_hdf5->iso_fortran_env
module~self_hdf5->HDF5
mpi
mpi
module~self_hdf5->mpi
module~self_tensor_2d_t->module~self_constants
module~self_tensor_2d_t->module~self_lagrange~3
module~self_tensor_2d_t->module~self_data
module~self_tensor_2d_t->iso_c_binding
module~self_tensor_2d_t->FEQParse
module~self_tensor_2d_t->module~self_metadata
module~self_tensor_2d_t->HDF5
module~self_tensor_2d_t->module~self_hdf5
module~self_domaindecomposition_t->module~self_constants
module~self_domaindecomposition_t->module~self_lagrange~3
module~self_domaindecomposition_t->module~self_supportroutines
module~self_domaindecomposition_t->iso_c_binding
module~self_domaindecomposition_t->mpi
module~self_mesh->module~self_constants
module~self_mesh->iso_c_binding
module~self_mesh->module~self_domaindecomposition~2
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Used by
module~~self_points_t~~UsedByGraph
module~self_points_t
SELF_Points_t
module~self_points~2
SELF_Points
module~self_points~2->module~self_points_t
module~self_points
SELF_Points
module~self_points->module~self_points_t
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Derived Types
Components
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.
Type-Bound Procedures
procedure, public :: EvalScalar_2D_Points_t
procedure, public :: EvalScalar_3D_Points_t
generic, public :: EvaluateScalar => EvalScalar_2D_Points_t, EvalScalar_3D_Points_t
procedure, public :: Free => Free_Points_t
procedure, public :: Init => Init_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
procedure, public :: SetPoints => SetPoints_Points_t
Functions
public pure function ClampCell (rIdx, nCells) result(c)
Convert a (signed, possibly out-of-range) real cell index to an integer
cell index clamped to [0, nCells-1].
Arguments
Type Intent Optional Attributes Name
real(kind=prec),
intent(in)
::
rIdx
integer,
intent(in)
::
nCells
Return Value integer
Subroutines
Axis-aligned bounding box of geometry%x%interior nodes for each element.
Arguments
Type Intent Optional Attributes Name
type(SEMQuad ),
intent(in)
::
geometry
integer,
intent(in)
::
N
integer,
intent(in)
::
nElem
real(kind=prec),
intent(out)
::
bbMin (1:2,1:nElem)
real(kind=prec),
intent(out)
::
bbMax (1:2,1:nElem)
Arguments
Type Intent Optional Attributes Name
type(SEMHex ),
intent(in)
::
geometry
integer,
intent(in)
::
N
integer,
intent(in)
::
nElem
real(kind=prec),
intent(out)
::
bbMin (1:3,1:nElem)
real(kind=prec),
intent(out)
::
bbMax (1:3,1:nElem)
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
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.
Arguments
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)
Arguments
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.
Arguments
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.
Arguments
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.
Arguments
Type Intent Optional Attributes Name
class(Points_t ),
intent(inout)
::
this
type(SEMHex ),
intent(in)
::
geometry
Newton inverse-map for the 2D SEM element iEl: solve X(xi) = xTarget for
the reference coordinate xi in R^2, where X is the high-order
interpolant. The Jacobian dX/dxi is taken from geometry%dxds (the
covariant basis tensor), interpolated to xi via Lagrange basis.
Read more…
Arguments
Type Intent Optional Attributes Name
type(SEMQuad ),
intent(in)
::
geometry
integer,
intent(in)
::
iEl
integer,
intent(in)
::
N
real(kind=prec),
intent(in)
::
xTarget (2)
real(kind=prec),
intent(out)
::
xi (2)
logical,
intent(out)
::
converged
Newton inverse-map for the 3D SEM element iEl. See NewtonInverse_2D.
Arguments
Type Intent Optional Attributes Name
type(SEMHex ),
intent(in)
::
geometry
integer,
intent(in)
::
iEl
integer,
intent(in)
::
N
real(kind=prec),
intent(in)
::
xTarget (3)
real(kind=prec),
intent(out)
::
xi (3)
logical,
intent(out)
::
converged
Copy user-supplied physical coordinates into the cloud.
xIn must be shape (nPoints, nDim) matching the init dimensions.
Arguments
Type Intent Optional Attributes Name
class(Points_t ),
intent(inout)
::
this
real(kind=prec),
intent(in)
::
xIn (:,:)