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>
Go to the source code of this file.
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. | |
Particle to grid and grid to particle interpolation.
ScalarGradientG2P< ViewType > Cabana::Grid::createScalarGradientG2P | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for grid-to-point with scalar gradient.
ScalarGradientP2G< ViewType > Cabana::Grid::createScalarGradientP2G | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for point-to-grid with scalar gradient.
ScalarValueG2P< ViewType > Cabana::Grid::createScalarValueG2P | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for grid-to-point with scalar value.
ScalarValueP2G< ViewType > Cabana::Grid::createScalarValueP2G | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for point-to-grid with scalar value.
TensorDivergenceP2G< ViewType > Cabana::Grid::createTensorDivergenceP2G | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for point-to-grid with tensor divergence.
VectorDivergenceG2P< ViewType > Cabana::Grid::createVectorDivergenceG2P | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for grid-to-point with vector divergence.
VectorDivergenceP2G< ViewType > Cabana::Grid::createVectorDivergenceP2G | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for point-to-grid with vector divergence.
VectorGradientG2P< ViewType > Cabana::Grid::createVectorGradientG2P | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for grid-to-point with vector gradient.
VectorValueG2P< ViewType > Cabana::Grid::createVectorValueG2P | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for grid-to-point with vector value.
VectorValueP2G< ViewType > Cabana::Grid::createVectorValueP2G | ( | const ViewType & | x, |
const typename ViewType::value_type & | multiplier ) |
Creation function for point-to-grid with vector value.
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector divergence at the point. |
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector divergence at the point. |
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.
point_data | The vector at the point who's divergence to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of vector divergence grid data to interpolate to. |
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.
point_data | The tensor at the point who's divergence to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of tensor divergence grid data to interpolate to. |
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.
point_data | The vector at the point who's divergence to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of vector divergence grid data to interpolate to. |
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.
point_data | The tensor at the point who's divergence to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of tensor divergence grid data to interpolate to. |
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.
PointEvalFunctor | Functor type used to evaluate the interpolated data for a given point at a given entity. |
PointCoordinates | Container type with view traits containing the point coordinates. Will be indexed as (point,dim). |
ArrayScalar | The scalar type used for the interpolated data. |
MeshScalar | The scalar type used for the geometry/interpolation data. |
NumSpaceDim | The spatial dimension of the mesh. |
EntityType | The entitytype to which the points will interpolate. |
SplineOrder | The order of spline interpolation to use. |
MemorySpace | The memory space to use for interplation |
ArrayParams | Parameters for the array type. |
array | The grid array from which the point data will be interpolated. |
halo | The halo associated with the grid array. This hallo will be used to gather the array data before interpolation. |
points | The 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_point | The number of points. This is the size of the first dimension of points. |
functor | A functor that interpolates from a given entity to a given point. |
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.
ExecutionSpace | Kokkos execution space. |
PointEvalFunctor | Functor type used to evaluate the interpolated data for a given point at a given entity. |
PointCoordinates | Container type with view traits containing the point coordinates. Will be indexed as (point,dim). |
ArrayScalar | The scalar type used for the interpolated data. |
MeshScalar | The scalar type used for the geometry/interpolation data. |
NumSpaceDim | The spatial dimension of the mesh. |
EntityType | The entitytype to which the points will interpolate. |
SplineOrder | The order of spline interpolation to use. |
MemorySpace | The memory space to use for interplation |
ArrayParams | Parameters for the array type. |
array | The grid array from which the point data will be interpolated. |
halo | The halo associated with the grid array. This hallo will be used to gather the array data before interpolation. |
points | The 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_point | The number of points. This is the size of the first dimension of points. |
functor | A functor that interpolates from a given entity to a given point. |
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.
view | A functor with view semantics of scalar grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The scalar gradient at the point. |
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector gradient at the point. |
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.
view | A functor with view semantics of scalar grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The scalar gradient at the point. |
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector gradient at the point. |
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.
point_data | The scalar at the point who's gradient to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of scalar gradient grid data to interpolate to. |
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.
point_data | The scalar at the point who's gradient to interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of scalar gradient grid data to interpolate to. |
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.
PointEvalFunctor | Functor type used to evaluate the interpolated data for a given point at a given entity. |
PointCoordinates | Container type with view traits containing the point coordinates. Will be indexed as (point,dim). |
ArrayScalar | The scalar type used for the interpolated data. |
MeshScalar | The scalar type used for the geometry/interpolation data. |
NumSpaceDim | The spatial dimension of the mesh. |
EntityType | The entitytype to which the points will interpolate. |
SplineOrder | The order of spline interpolation to use. |
MemorySpace | The memory space to use for interplation |
ArrayParams | Parameters for the array type. |
functor | A functor that interpolates from a given point to a given entity. |
points | The 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_point | The number of points. This is the size of the first dimension of points. |
halo | The halo associated with the grid array. This hallo will be used to scatter the interpolated data. |
array | The grid array to which the point data will be interpolated. |
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.
ExecutionSpace | Kokkos execution space. |
PointEvalFunctor | Functor type used to evaluate the interpolated data for a given point at a given entity. |
PointCoordinates | Container type with view traits containing the point coordinates. Will be indexed as (point,dim). |
ArrayScalar | The scalar type used for the interpolated data. |
MeshScalar | The scalar type used for the geometry/interpolation data. |
NumSpaceDim | The spatial dimension of the mesh. |
EntityType | The entitytype to which the points will interpolate. |
SplineOrder | The order of spline interpolation to use. |
MemorySpace | The memory space to use for interplation |
ArrayParams | Parameters for the array type. |
functor | A functor that interpolates from a given point to a given entity. |
points | The 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_point | The number of points. This is the size of the first dimension of points. |
halo | The halo associated with the grid array. This hallo will be used to scatter the interpolated data. |
array | The grid array to which the point data will be interpolated. |
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.
view | A functor with view semantics of scalar grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The scalar value at the point. |
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.
view | A functor with view semantics of scalar grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The scalar value at the point. |
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector value at the point. |
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.
view | A functor with view semantics of vector grid data from which to interpolate. |
sd | The spline data to use for the interpolation. |
result | The vector value at the point. |
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.
point_data | The scalar value to at the point interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of scalar grid data to interpolate to. |
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.
point_data | The scalar value to at the point interpolate to the grid. |
sd | The spline data to use for the interpolation. |
view | The scatter view of scalar grid data to interpolate to. |
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.
point_data | The vector value at the point to interpolate to the grid. interpolate. |
sd | The spline data to use for the interpolation. |
view | The scatter view of vector grid data to interpolate to. |
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.
point_data | The vector value at the point to interpolate to the grid. interpolate. |
sd | The spline data to use for the interpolation. |
view | The scatter view of vector grid data to interpolate to. |