GPU-resident backend for the Points class.
Construction, point location, and basis-cache computation happen on the
host (inherited from Points_t). After LocatePoints, all per-point state
(elements, coordinates, lS/lT/lU caches) is mirrored to the device via
UpdateDevice. EvaluateScalar then runs entirely on the device using the
precomputed cached basis values — no Lagrange polynomial evaluation
happens in the kernel, only the tensor-product contraction against a
scalar field already resident on the device.
Uses
module~~self_points~~UsesGraph
module~self_points
SELF_Points
module~self_gpu
SELF_GPU
module~self_points->module~self_gpu
module~self_geometry_2d
SELF_Geometry_2D
module~self_points->module~self_geometry_2d
module~self_mappedscalar_3d~2
SELF_MappedScalar_3D
module~self_points->module~self_mappedscalar_3d~2
module~self_geometry_3d
SELF_Geometry_3D
module~self_points->module~self_geometry_3d
module~self_constants
SELF_Constants
module~self_points->module~self_constants
module~self_mappedscalar_2d~2
SELF_MappedScalar_2D
module~self_points->module~self_mappedscalar_2d~2
module~self_points_t
SELF_Points_t
module~self_points->module~self_points_t
iso_c_binding
iso_c_binding
module~self_points->iso_c_binding
module~self_gpu->iso_c_binding
module~self_gpu_enums
SELF_GPU_enums
module~self_gpu->module~self_gpu_enums
module~self_geometry_2d->module~self_constants
module~self_mesh_2d
SELF_Mesh_2D
module~self_geometry_2d->module~self_mesh_2d
module~self_supportroutines
SELF_SupportRoutines
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_data
SELF_Data
module~self_geometry_2d->module~self_data
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_lagrange~3
SELF_Lagrange
module~self_geometry_2d->module~self_lagrange~3
module~self_mappedscalar_3d_t
SELF_MappedScalar_3D_t
module~self_mappedscalar_3d~2->module~self_mappedscalar_3d_t
module~self_geometry_3d->module~self_constants
module~self_mesh_3d
SELF_Mesh_3D
module~self_geometry_3d->module~self_mesh_3d
module~self_geometry_3d->module~self_supportroutines
module~self_geometry_3d->module~self_data
module~self_geometry_3d->module~self_lagrange~3
module~self_scalar_3d~2
SELF_Scalar_3D
module~self_geometry_3d->module~self_scalar_3d~2
module~self_vector_3d~2
SELF_Vector_3D
module~self_geometry_3d->module~self_vector_3d~2
module~self_tensor_3d~2
SELF_Tensor_3D
module~self_geometry_3d->module~self_tensor_3d~2
module~self_constants->iso_c_binding
iso_fortran_env
iso_fortran_env
module~self_constants->iso_fortran_env
module~self_mappedscalar_2d_t
SELF_MappedScalar_2D_t
module~self_mappedscalar_2d~2->module~self_mappedscalar_2d_t
module~self_points_t->module~self_geometry_2d
module~self_points_t->module~self_mappedscalar_3d~2
module~self_points_t->module~self_geometry_3d
module~self_points_t->module~self_constants
module~self_points_t->module~self_mappedscalar_2d~2
module~self_points_t->module~self_lagrange~3
module~self_gpu_enums->iso_c_binding
module~self_mesh_2d_t
SELF_Mesh_2D_t
module~self_mesh_2d->module~self_mesh_2d_t
module~self_mesh_3d_t
SELF_Mesh_3D_t
module~self_mesh_3d->module~self_mesh_3d_t
module~self_mappedscalar_2d_t->module~self_geometry_2d
module~self_mappedscalar_2d_t->module~self_constants
module~self_mappedscalar_2d_t->iso_c_binding
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->module~self_lagrange~3
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_supportroutines->module~self_constants
module~self_supportroutines->iso_fortran_env
module~self_vector_2d_t
SELF_Vector_2D_t
module~self_vector_2d~2->module~self_vector_2d_t
module~self_data->module~self_constants
module~self_data->iso_c_binding
module~self_data->module~self_lagrange~3
module~self_data->FEQParse
module~self_metadata
SELF_Metadata
module~self_data->module~self_metadata
HDF5
HDF5
module~self_data->HDF5
module~self_hdf5
SELF_HDF5
module~self_data->module~self_hdf5
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_lagrange~3->module~self_gpu
module~self_lagrange~3->module~self_constants
module~self_lagrange~3->iso_c_binding
module~self_lagrange~3->iso_fortran_env
module~self_lagrange_t
SELF_Lagrange_t
module~self_lagrange~3->module~self_lagrange_t
module~self_mappedscalar_3d_t->module~self_geometry_3d
module~self_mappedscalar_3d_t->module~self_constants
module~self_mappedscalar_3d_t->iso_c_binding
module~self_mappedscalar_3d_t->module~self_mesh_3d
module~self_mappedscalar_3d_t->module~self_lagrange~3
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->module~self_domaindecomposition~2
module~self_mappedscalar_3d_t->FEQParse
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_vector_3d_t
SELF_Vector_3D_t
module~self_vector_3d~2->module~self_vector_3d_t
module~self_tensor_3d_t
SELF_Tensor_3D_t
module~self_tensor_3d~2->module~self_tensor_3d_t
module~self_domaindecomposition_t
SELF_DomainDecomposition_t
module~self_domaindecomposition~2->module~self_domaindecomposition_t
module~self_vector_2d_t->module~self_constants
module~self_vector_2d_t->iso_c_binding
module~self_vector_2d_t->module~self_data
module~self_vector_2d_t->module~self_lagrange~3
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_metadata->HDF5
module~self_metadata->module~self_hdf5
module~self_scalar_2d_t->module~self_constants
module~self_scalar_2d_t->iso_c_binding
module~self_scalar_2d_t->module~self_data
module~self_scalar_2d_t->module~self_lagrange~3
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_tensor_2d_t->module~self_constants
module~self_tensor_2d_t->iso_c_binding
module~self_tensor_2d_t->module~self_data
module~self_tensor_2d_t->module~self_lagrange~3
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_scalar_3d_t->module~self_constants
module~self_scalar_3d_t->iso_c_binding
module~self_scalar_3d_t->module~self_data
module~self_scalar_3d_t->module~self_lagrange~3
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_vector_3d_t->module~self_constants
module~self_vector_3d_t->iso_c_binding
module~self_vector_3d_t->module~self_data
module~self_vector_3d_t->module~self_lagrange~3
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->iso_c_binding
module~self_tensor_3d_t->module~self_data
module~self_tensor_3d_t->module~self_lagrange~3
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_mesh_2d_t->module~self_constants
module~self_mesh_2d_t->iso_c_binding
module~self_mesh_2d_t->module~self_supportroutines
module~self_mesh_2d_t->module~self_lagrange~3
module~self_mesh_2d_t->module~self_domaindecomposition~2
module~self_mesh_2d_t->HDF5
module~self_mesh_2d_t->module~self_hdf5
module~self_quadrature
SELF_Quadrature
module~self_mesh_2d_t->module~self_quadrature
module~self_mesh
SELF_Mesh
module~self_mesh_2d_t->module~self_mesh
module~self_mesh_3d_t->module~self_constants
module~self_mesh_3d_t->iso_c_binding
module~self_mesh_3d_t->module~self_supportroutines
module~self_mesh_3d_t->module~self_lagrange~3
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_3d_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_lagrange_t->module~self_constants
module~self_lagrange_t->iso_c_binding
module~self_lagrange_t->iso_fortran_env
module~self_lagrange_t->module~self_supportroutines
module~self_lagrange_t->HDF5
module~self_lagrange_t->module~self_hdf5
module~self_lagrange_t->module~self_quadrature
module~self_domaindecomposition_t->module~self_constants
module~self_domaindecomposition_t->iso_c_binding
module~self_domaindecomposition_t->module~self_supportroutines
module~self_domaindecomposition_t->module~self_lagrange~3
module~self_domaindecomposition_t->mpi
module~self_quadrature->module~self_constants
module~self_quadrature->iso_fortran_env
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.
Interfaces
interface
public subroutine EvalScalarPoints_2D_gpu(values, elements, lS, lT, scalar, N, nPoints, nElem, nVar) bind(c,name="0")
Arguments
Type Intent Optional Attributes Name
type(c_ptr),
value ::
values
type(c_ptr),
value ::
elements
type(c_ptr),
value ::
lS
type(c_ptr),
value ::
lT
type(c_ptr),
value ::
scalar
integer(kind=c_int),
value ::
N
integer(kind=c_int),
value ::
nPoints
integer(kind=c_int),
value ::
nElem
integer(kind=c_int),
value ::
nVar
interface
public subroutine EvalScalarPoints_3D_gpu(values, elements, lS, lT, lU, scalar, N, nPoints, nElem, nVar) bind(c,name="0")
Arguments
Type Intent Optional Attributes Name
type(c_ptr),
value ::
values
type(c_ptr),
value ::
elements
type(c_ptr),
value ::
lS
type(c_ptr),
value ::
lT
type(c_ptr),
value ::
lU
type(c_ptr),
value ::
scalar
integer(kind=c_int),
value ::
N
integer(kind=c_int),
value ::
nPoints
integer(kind=c_int),
value ::
nElem
integer(kind=c_int),
value ::
nVar
Derived Types
Components
Type Visibility Attributes Name Initial
character(len=3),
public ::
backend = "gpu"
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.
type(c_ptr),
public ::
coordinates_gpu = c_null_ptr
integer,
public, pointer ::
elements (:)=> null() Element id (rank-local) containing each point; 0 = not found.
type(c_ptr),
public ::
elements_gpu = c_null_ptr
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.
type(c_ptr),
public ::
lS_cache_gpu = c_null_ptr
real(kind=prec),
public, pointer ::
lT_cache (:,:)=> null() Lagrange basis at coordinates(p,2), shape (0:nCached, 1:nPoints).
type(c_ptr),
public ::
lT_cache_gpu = c_null_ptr
real(kind=prec),
public, pointer ::
lU_cache (:,:)=> null() Lagrange basis at coordinates(p,3), shape (0:nCached, 1:nPoints).
Allocated only for nDim = 3.
type(c_ptr),
public ::
lU_cache_gpu = c_null_ptr
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 ::
nCachedAlloc = 0 Capacity (polynomial degree) of l*_cache_gpu; 0 = unallocated.
integer,
public ::
nDim = 0
integer,
public ::
nPoints = 0
integer,
public ::
nPointsAlloc = 0 Capacity of elements_gpu / coordinates_gpu (set in Init).
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, private :: EvalScalar_2D_dev_Points
procedure, public :: EvalScalar_3D_Points_t
procedure, private :: EvalScalar_3D_dev_Points
generic, public :: EvaluateScalar => EvalScalar_2D_Points_t, EvalScalar_3D_Points_t, EvalScalar_2D_dev_Points, EvalScalar_3D_dev_Points
procedure, public :: Free => Free_Points
procedure, public :: Init => Init_Points
generic, public :: LocatePoints => LocatePoints_2D_Points_t, LocatePoints_3D_Points_t
procedure, public :: LocatePoints_2D_Points_t => LocatePoints_2D_Points
procedure, public :: LocatePoints_3D_Points_t => LocatePoints_3D_Points
procedure, public :: SetPoints => SetPoints_Points_t
procedure, public :: UpdateDevice => UpdateDevice_Points
Subroutines
Evaluate a 2D MappedScalar at the cached points on the device. The
caller is responsible for hipMalloc-ing values_dev with capacity
nPointsnVar prec bytes. Layout is column-major (nPoints, nVar).
Read more…
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(in)
::
this
class(MappedScalar2D ),
intent(in)
::
scalar
type(c_ptr),
intent(inout)
::
values_dev
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(in)
::
this
class(MappedScalar3D ),
intent(in)
::
scalar
type(c_ptr),
intent(inout)
::
values_dev
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(inout)
::
this
Allocate host + device storage for nPoints in nDim dimensions. The
basis-cache device buffers are allocated lazily in UpdateDevice once
the polynomial degree N is known (it is set by LocatePoints).
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(out)
::
this
integer,
intent(in)
::
nPoints
integer,
intent(in)
::
nDim
Run the host spatial-hash + Newton search (inherited from Points_t),
then mirror per-point state to the device.
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(inout)
::
this
type(SEMQuad ),
intent(in)
::
geometry
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(inout)
::
this
type(SEMHex ),
intent(in)
::
geometry
Copy elements, coordinates, and the per-point Lagrange basis cache
from host to device. Lazily (re)allocates the cache buffers if their
degree changed since the previous call.
Arguments
Type Intent Optional Attributes Name
class(Points ),
intent(inout)
::
this