Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Grid_Interpolation.hpp File Reference

Particle to grid and grid to particle interpolation. More...

#include <Cabana_Grid_Array.hpp>
#include <Cabana_Grid_Halo.hpp>
#include <Cabana_Grid_LocalMesh.hpp>
#include <Cabana_Grid_Splines.hpp>
#include <Cabana_Grid_Types.hpp>
#include <Cabana_Utils.hpp>
#include <Kokkos_Core.hpp>
#include <Kokkos_ScatterView.hpp>
#include <memory>
#include <type_traits>
Include dependency graph for Cabana_Grid_Interpolation.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Cabana::Grid::P2G::is_scatter_view< T >
 Scatter-View static type checker. More...
 
struct  Cabana::Grid::ScalarValueG2P< ViewType >
 Grid-to-point scalar value functor. More...
 
struct  Cabana::Grid::VectorValueG2P< ViewType >
 Grid-to-point vector value functor. More...
 
struct  Cabana::Grid::ScalarGradientG2P< ViewType >
 Grid-to-point scalar gradient functor. More...
 
struct  Cabana::Grid::VectorGradientG2P< ViewType >
 Grid-to-point vector gradient functor. More...
 
struct  Cabana::Grid::VectorDivergenceG2P< ViewType >
 Grid-to-point vector value functor. More...
 
struct  Cabana::Grid::ScalarValueP2G< ViewType >
 Point-to-grid scalar value functor. More...
 
struct  Cabana::Grid::VectorValueP2G< ViewType >
 Point-to-grid vector value functor. More...
 
struct  Cabana::Grid::ScalarGradientP2G< ViewType >
 Point-to-grid scalar gradient functor. More...
 
struct  Cabana::Grid::VectorDivergenceP2G< ViewType >
 Point-to-grid vector divergence functor. More...
 
struct  Cabana::Grid::TensorDivergenceP2G< ViewType >
 Point-to-grid tensor divergence functor. More...
 

Namespaces

namespace  Cabana
 Core: particle data structures and algorithms.
 

Functions

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value (const ViewType &view, const SplineDataType &sd, PointDataType &result, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar value to a point. 3D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value (const ViewType &view, const SplineDataType &sd, PointDataType &result, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar value to a point. 2D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value (const ViewType &view, const SplineDataType &sd, PointDataType result[3], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector value to a point. 3D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value (const ViewType &view, const SplineDataType &sd, PointDataType result[2], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector value to a point. 2D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient (const ViewType &view, const SplineDataType &sd, PointDataType result[3], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar gradient to a point. 3D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient (const ViewType &view, const SplineDataType &sd, PointDataType result[2], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar gradient to a point. 2D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient (const ViewType &view, const SplineDataType &sd, PointDataType result[3][3], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector gradient to a point. 3D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient (const ViewType &view, const SplineDataType &sd, PointDataType result[2][2], typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector gradient to a point. 2D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::divergence (const ViewType &view, const SplineDataType &sd, PointDataType &result, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector divergence to a point. 3D specialization.
 
template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::divergence (const ViewType &view, const SplineDataType &sd, PointDataType &result, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector divergence to a point. 2D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value (const PointDataType &point_data, const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar value to the grid. 3D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value (const PointDataType &point_data, const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a scalar value to the grid. 2D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value (const PointDataType point_data[3], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector value to the grid. 3D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value (const PointDataType point_data[2], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate a vector value to the grid. 2D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::gradient (const PointDataType point_data, const SplineDataType &sd, const ScatterViewType &view)
 Interpolate the gradient of a scalar to the grid. 3D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::gradient (const PointDataType point_data, const SplineDataType &sd, const ScatterViewType &view)
 Interpolate the gradient of a scalar to the grid. 2D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence (const PointDataType point_data[3], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate the divergence of a vector to the grid. 3D specialization.
 
template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence (const PointDataType point_data[2], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate the divergence of a vector to the grid. 2D specialization.
 
template<class ScatterViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence (const PointDataType point_data[3][3], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate the divergence of a tensor to the grid. 3D specialization.
 
template<class ScatterViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence (const PointDataType point_data[2][2], const SplineDataType &sd, const ScatterViewType &view, typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type=0)
 Interpolate the divergence of a tensor to the grid. 2D specialization.
 
template<class ExecutionSpace, class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, class EntityType, int SplineOrder, std::size_t NumSpaceDim, class MemorySpace, class... ArrayParams>
void Cabana::Grid::g2p (ExecutionSpace, const Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > &array, const Halo< MemorySpace > &halo, const PointCoordinates &points, const std::size_t num_point, Spline< SplineOrder >, const PointEvalFunctor &functor)
 Global Grid-to-Point interpolation.
 
template<class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, class EntityType, int SplineOrder, std::size_t NumSpaceDim, class MemorySpace, class... ArrayParams>
void Cabana::Grid::g2p (const Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > &array, const Halo< MemorySpace > &halo, const PointCoordinates &points, const std::size_t num_point, Spline< SplineOrder >, const PointEvalFunctor &functor)
 Global Grid-to-Point interpolation.
 
template<class ViewType>
ScalarValueG2P< ViewType > Cabana::Grid::createScalarValueG2P (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for grid-to-point with scalar value.
 
template<class ViewType>
VectorValueG2P< ViewType > Cabana::Grid::createVectorValueG2P (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for grid-to-point with vector value.
 
template<class ViewType>
ScalarGradientG2P< ViewType > Cabana::Grid::createScalarGradientG2P (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for grid-to-point with scalar gradient.
 
template<class ViewType>
VectorGradientG2P< ViewType > Cabana::Grid::createVectorGradientG2P (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for grid-to-point with vector gradient.
 
template<class ViewType>
VectorDivergenceG2P< ViewType > Cabana::Grid::createVectorDivergenceG2P (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for grid-to-point with vector divergence.
 
template<class ExecutionSpace, class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, std::size_t NumSpaceDim, class EntityType, int SplineOrder, class MemorySpace, class... ArrayParams>
void Cabana::Grid::p2g (ExecutionSpace, const PointEvalFunctor &functor, const PointCoordinates &points, const std::size_t num_point, Spline< SplineOrder >, const Halo< MemorySpace > &halo, Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > &array)
 Global Point-to-Grid interpolation.
 
template<class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, std::size_t NumSpaceDim, class EntityType, int SplineOrder, class MemorySpace, class... ArrayParams>
void Cabana::Grid::p2g (const PointEvalFunctor &functor, const PointCoordinates &points, const std::size_t num_point, Spline< SplineOrder >, const Halo< MemorySpace > &halo, Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > &array)
 Global Point-to-Grid interpolation.
 
template<class ViewType>
ScalarValueP2G< ViewType > Cabana::Grid::createScalarValueP2G (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for point-to-grid with scalar value.
 
template<class ViewType>
VectorValueP2G< ViewType > Cabana::Grid::createVectorValueP2G (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for point-to-grid with vector value.
 
template<class ViewType>
ScalarGradientP2G< ViewType > Cabana::Grid::createScalarGradientP2G (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for point-to-grid with scalar gradient.
 
template<class ViewType>
VectorDivergenceP2G< ViewType > Cabana::Grid::createVectorDivergenceP2G (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for point-to-grid with vector divergence.
 
template<class ViewType>
TensorDivergenceP2G< ViewType > Cabana::Grid::createTensorDivergenceP2G (const ViewType &x, const typename ViewType::value_type &multiplier)
 Creation function for point-to-grid with tensor divergence.
 

Detailed Description

Particle to grid and grid to particle interpolation.

Function Documentation

◆ createScalarGradientG2P()

template<class ViewType>
ScalarGradientG2P< ViewType > Cabana::Grid::createScalarGradientG2P ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for grid-to-point with scalar gradient.

Returns
ScalarGradientG2P interpolation functor.

◆ createScalarGradientP2G()

template<class ViewType>
ScalarGradientP2G< ViewType > Cabana::Grid::createScalarGradientP2G ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for point-to-grid with scalar gradient.

Returns
ScalarGradientP2G interpolation functor.

◆ createScalarValueG2P()

template<class ViewType>
ScalarValueG2P< ViewType > Cabana::Grid::createScalarValueG2P ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for grid-to-point with scalar value.

Returns
ScalarValueG2P interpolation functor.

◆ createScalarValueP2G()

template<class ViewType>
ScalarValueP2G< ViewType > Cabana::Grid::createScalarValueP2G ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for point-to-grid with scalar value.

Returns
ScalarValueP2G interpolation functor.

◆ createTensorDivergenceP2G()

template<class ViewType>
TensorDivergenceP2G< ViewType > Cabana::Grid::createTensorDivergenceP2G ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for point-to-grid with tensor divergence.

Returns
TensorDivergenceP2G interpolation functor.

◆ createVectorDivergenceG2P()

template<class ViewType>
VectorDivergenceG2P< ViewType > Cabana::Grid::createVectorDivergenceG2P ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for grid-to-point with vector divergence.

Returns
VectorDivergenceG2P interpolation functor.

◆ createVectorDivergenceP2G()

template<class ViewType>
VectorDivergenceP2G< ViewType > Cabana::Grid::createVectorDivergenceP2G ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for point-to-grid with vector divergence.

Returns
VectorDivergenceP2G interpolation functor.

◆ createVectorGradientG2P()

template<class ViewType>
VectorGradientG2P< ViewType > Cabana::Grid::createVectorGradientG2P ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for grid-to-point with vector gradient.

Returns
VectorGradientG2P interpolation functor.

◆ createVectorValueG2P()

template<class ViewType>
VectorValueG2P< ViewType > Cabana::Grid::createVectorValueG2P ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for grid-to-point with vector value.

Returns
VectorValueG2P interpolation functor.

◆ createVectorValueP2G()

template<class ViewType>
VectorValueP2G< ViewType > Cabana::Grid::createVectorValueP2G ( const ViewType & x,
const typename ViewType::value_type & multiplier )

Creation function for point-to-grid with vector value.

Returns
VectorValueP2G interpolation functor.

◆ divergence() [1/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::divergence ( const ViewType & view,
const SplineDataType & sd,
PointDataType & result,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector divergence to a point. 3D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector divergence at the point.

◆ divergence() [2/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::divergence ( const ViewType & view,
const SplineDataType & sd,
PointDataType & result,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector divergence to a point. 2D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector divergence at the point.

◆ divergence() [3/6]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence ( const PointDataType point_data[2],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate the divergence of a vector to the grid. 2D specialization.

Parameters
point_dataThe vector at the point who's divergence to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of vector divergence grid data to interpolate to.

◆ divergence() [4/6]

template<class ScatterViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence ( const PointDataType point_data[2][2],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate the divergence of a tensor to the grid. 2D specialization.

Parameters
point_dataThe tensor at the point who's divergence to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of tensor divergence grid data to interpolate to.

◆ divergence() [5/6]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence ( const PointDataType point_data[3],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate the divergence of a vector to the grid. 3D specialization.

Parameters
point_dataThe vector at the point who's divergence to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of vector divergence grid data to interpolate to.

◆ divergence() [6/6]

template<class ScatterViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::divergence ( const PointDataType point_data[3][3],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate the divergence of a tensor to the grid. 3D specialization.

Parameters
point_dataThe tensor at the point who's divergence to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of tensor divergence grid data to interpolate to.

◆ g2p() [1/2]

template<class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, class EntityType, int SplineOrder, std::size_t NumSpaceDim, class MemorySpace, class... ArrayParams>
void Cabana::Grid::g2p ( const Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > & array,
const Halo< MemorySpace > & halo,
const PointCoordinates & points,
const std::size_t num_point,
Spline< SplineOrder > ,
const PointEvalFunctor & functor )

Global Grid-to-Point interpolation.

Template Parameters
PointEvalFunctorFunctor type used to evaluate the interpolated data for a given point at a given entity.
PointCoordinatesContainer type with view traits containing the point coordinates. Will be indexed as (point,dim).
ArrayScalarThe scalar type used for the interpolated data.
MeshScalarThe scalar type used for the geometry/interpolation data.
NumSpaceDimThe spatial dimension of the mesh.
EntityTypeThe entitytype to which the points will interpolate.
SplineOrderThe order of spline interpolation to use.
MemorySpaceThe memory space to use for interplation
ArrayParamsParameters for the array type.
Parameters
arrayThe grid array from which the point data will be interpolated.
haloThe halo associated with the grid array. This hallo will be used to gather the array data before interpolation.
pointsThe points over which to perform the interpolation. Will be indexed as (point,dim). The subset of indices in each point's interpolation stencil must be contained within the local grid that will be used for the interpolation
num_pointThe number of points. This is the size of the first dimension of points.
functorA functor that interpolates from a given entity to a given point.
Note
Spline of SplineOrder passed for interpolation.

◆ g2p() [2/2]

template<class ExecutionSpace, class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, class EntityType, int SplineOrder, std::size_t NumSpaceDim, class MemorySpace, class... ArrayParams>
void Cabana::Grid::g2p ( ExecutionSpace ,
const Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > & array,
const Halo< MemorySpace > & halo,
const PointCoordinates & points,
const std::size_t num_point,
Spline< SplineOrder > ,
const PointEvalFunctor & functor )

Global Grid-to-Point interpolation.

Template Parameters
ExecutionSpaceKokkos execution space.
PointEvalFunctorFunctor type used to evaluate the interpolated data for a given point at a given entity.
PointCoordinatesContainer type with view traits containing the point coordinates. Will be indexed as (point,dim).
ArrayScalarThe scalar type used for the interpolated data.
MeshScalarThe scalar type used for the geometry/interpolation data.
NumSpaceDimThe spatial dimension of the mesh.
EntityTypeThe entitytype to which the points will interpolate.
SplineOrderThe order of spline interpolation to use.
MemorySpaceThe memory space to use for interplation
ArrayParamsParameters for the array type.
Parameters
arrayThe grid array from which the point data will be interpolated.
haloThe halo associated with the grid array. This hallo will be used to gather the array data before interpolation.
pointsThe points over which to perform the interpolation. Will be indexed as (point,dim). The subset of indices in each point's interpolation stencil must be contained within the local grid that will be used for the interpolation
num_pointThe number of points. This is the size of the first dimension of points.
functorA functor that interpolates from a given entity to a given point.
Note
Spline of SplineOrder passed for interpolation.

◆ gradient() [1/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[2],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar gradient to a point. 2D specialization.

Parameters
viewA functor with view semantics of scalar grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe scalar gradient at the point.

◆ gradient() [2/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[2][2],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector gradient to a point. 2D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector gradient at the point.

◆ gradient() [3/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[3],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar gradient to a point. 3D specialization.

Parameters
viewA functor with view semantics of scalar grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe scalar gradient at the point.

◆ gradient() [4/6]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::gradient ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[3][3],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector gradient to a point. 3D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector gradient at the point.

◆ gradient() [5/6]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::gradient ( const PointDataType point_data,
const SplineDataType & sd,
const ScatterViewType & view )

Interpolate the gradient of a scalar to the grid. 3D specialization.

Parameters
point_dataThe scalar at the point who's gradient to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of scalar gradient grid data to interpolate to.

◆ gradient() [6/6]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::gradient ( const PointDataType point_data,
const SplineDataType & sd,
const ScatterViewType & view )

Interpolate the gradient of a scalar to the grid. 2D specialization.

Parameters
point_dataThe scalar at the point who's gradient to interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of scalar gradient grid data to interpolate to.

◆ p2g() [1/2]

template<class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, std::size_t NumSpaceDim, class EntityType, int SplineOrder, class MemorySpace, class... ArrayParams>
void Cabana::Grid::p2g ( const PointEvalFunctor & functor,
const PointCoordinates & points,
const std::size_t num_point,
Spline< SplineOrder > ,
const Halo< MemorySpace > & halo,
Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > & array )

Global Point-to-Grid interpolation.

Template Parameters
PointEvalFunctorFunctor type used to evaluate the interpolated data for a given point at a given entity.
PointCoordinatesContainer type with view traits containing the point coordinates. Will be indexed as (point,dim).
ArrayScalarThe scalar type used for the interpolated data.
MeshScalarThe scalar type used for the geometry/interpolation data.
NumSpaceDimThe spatial dimension of the mesh.
EntityTypeThe entitytype to which the points will interpolate.
SplineOrderThe order of spline interpolation to use.
MemorySpaceThe memory space to use for interplation
ArrayParamsParameters for the array type.
Parameters
functorA functor that interpolates from a given point to a given entity.
pointsThe points over which to perform the interpolation. Will be indexed as (point,dim). The subset of indices in each point's interpolation stencil must be contained within the local grid that will be used for the interpolation
num_pointThe number of points. This is the size of the first dimension of points.
haloThe halo associated with the grid array. This hallo will be used to scatter the interpolated data.
arrayThe grid array to which the point data will be interpolated.
Note
Spline of SplineOrder passed for interpolation.

◆ p2g() [2/2]

template<class ExecutionSpace, class PointEvalFunctor, class PointCoordinates, class ArrayScalar, class MeshScalar, std::size_t NumSpaceDim, class EntityType, int SplineOrder, class MemorySpace, class... ArrayParams>
void Cabana::Grid::p2g ( ExecutionSpace ,
const PointEvalFunctor & functor,
const PointCoordinates & points,
const std::size_t num_point,
Spline< SplineOrder > ,
const Halo< MemorySpace > & halo,
Array< ArrayScalar, EntityType, UniformMesh< MeshScalar, NumSpaceDim >, ArrayParams... > & array )

Global Point-to-Grid interpolation.

Template Parameters
ExecutionSpaceKokkos execution space.
PointEvalFunctorFunctor type used to evaluate the interpolated data for a given point at a given entity.
PointCoordinatesContainer type with view traits containing the point coordinates. Will be indexed as (point,dim).
ArrayScalarThe scalar type used for the interpolated data.
MeshScalarThe scalar type used for the geometry/interpolation data.
NumSpaceDimThe spatial dimension of the mesh.
EntityTypeThe entitytype to which the points will interpolate.
SplineOrderThe order of spline interpolation to use.
MemorySpaceThe memory space to use for interplation
ArrayParamsParameters for the array type.
Parameters
functorA functor that interpolates from a given point to a given entity.
pointsThe points over which to perform the interpolation. Will be indexed as (point,dim). The subset of indices in each point's interpolation stencil must be contained within the local grid that will be used for the interpolation
num_pointThe number of points. This is the size of the first dimension of points.
haloThe halo associated with the grid array. This hallo will be used to scatter the interpolated data.
arrayThe grid array to which the point data will be interpolated.
Note
Spline of SplineOrder passed for interpolation.

◆ value() [1/8]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value ( const ViewType & view,
const SplineDataType & sd,
PointDataType & result,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar value to a point. 3D specialization.

Parameters
viewA functor with view semantics of scalar grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe scalar value at the point.

◆ value() [2/8]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value ( const ViewType & view,
const SplineDataType & sd,
PointDataType & result,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar value to a point. 2D specialization.

Parameters
viewA functor with view semantics of scalar grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe scalar value at the point.

◆ value() [3/8]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[2],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector value to a point. 2D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector value at the point.

◆ value() [4/8]

template<class ViewType, class SplineDataType, class PointDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::G2P::value ( const ViewType & view,
const SplineDataType & sd,
PointDataType result[3],
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector value to a point. 3D specialization.

Parameters
viewA functor with view semantics of vector grid data from which to interpolate.
sdThe spline data to use for the interpolation.
resultThe vector value at the point.

◆ value() [5/8]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value ( const PointDataType & point_data,
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar value to the grid. 3D specialization.

Parameters
point_dataThe scalar value to at the point interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of scalar grid data to interpolate to.

◆ value() [6/8]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value ( const PointDataType & point_data,
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a scalar value to the grid. 2D specialization.

Parameters
point_dataThe scalar value to at the point interpolate to the grid.
sdThe spline data to use for the interpolation.
viewThe scatter view of scalar grid data to interpolate to.

◆ value() [7/8]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value ( const PointDataType point_data[2],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector value to the grid. 2D specialization.

Parameters
point_dataThe vector value at the point to interpolate to the grid. interpolate.
sdThe spline data to use for the interpolation.
viewThe scatter view of vector grid data to interpolate to.

◆ value() [8/8]

template<class PointDataType, class ScatterViewType, class SplineDataType>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==SplineDataType::num_space_dim, void > Cabana::Grid::P2G::value ( const PointDataType point_data[3],
const SplineDataType & sd,
const ScatterViewType & view,
typename std::enable_if<(std::rank< PointDataType >::value==0), void * >::type = 0 )

Interpolate a vector value to the grid. 3D specialization.

Parameters
point_dataThe vector value at the point to interpolate to the grid. interpolate.
sdThe spline data to use for the interpolation.
viewThe scatter view of vector grid data to interpolate to.