2#ifndef STORMM_TRICUBIC_CELL_H
3#define STORMM_TRICUBIC_CELL_H
7#include "Accelerator/hybrid.h"
8#include "Constants/behavior.h"
9#include "Constants/scaling.h"
10#include "DataTypes/common_types.h"
11#include "DataTypes/stormm_vector_types.h"
12#include "Parsing/parse.h"
13#include "Reporting/error_format.h"
14#include "math_enumerators.h"
15#include "matrix_ops.h"
21using card::HybridTargetLevel;
22using constants::CartesianDimension;
23using constants::UnitCellAxis;
24using data_types::isFloatingPointScalarType;
55 const double*
data(HybridTargetLevel tier = HybridTargetLevel::HOST)
const;
58# ifdef STORMM_USE_CUDA
60 const double* getDeviceViewToHostData()
const;
100 const std::vector<T> &f_in,
const std::vector<T> &dx_in,
101 const std::vector<T> &dy_in,
const std::vector<T> &dz_in,
102 const std::vector<T> &dxx_in,
const std::vector<T> &dxy_in,
103 const std::vector<T> &dxz_in,
const std::vector<T> &dyy_in,
104 const std::vector<T> &dyz_in,
const std::vector<T> &dxxx_in,
105 const std::vector<T> &dxxy_in,
const std::vector<T> &dxxz_in,
106 const std::vector<T> &dxyy_in,
const std::vector<T> &dxyz_in);
109 const std::vector<T> &f_in,
const std::vector<T> &dx_in,
110 const std::vector<T> &dy_in,
const std::vector<T> &dz_in,
111 const std::vector<T> &dxy_in,
const std::vector<T> &dxz_in,
112 const std::vector<T> &dyz_in,
const std::vector<T> &dxyz_in);
138 T
getData(FunctionLevel kind,
int i,
int j,
int k)
const;
141 void setData(T value, FunctionLevel kind,
int i,
int j,
int k);
165 ExceptionResponse policy = ExceptionResponse::SILENT,
166 const char* caller =
nullptr)
const;
272double3 stencilInternalOffset(UnitCellAxis face_normal,
int a_index,
int b_index,
int c_index,
275double3 stencilInternalOffset(
int a_index,
int b_index,
int c_index,
const double* invu);
302void incorporateStencilOrigin(T orig_x, T orig_y, T orig_z,
const double3 pt_xyz,
303 double scale_factor, T *point_x, T *point_y, T *point_z);
320void fvStencilCoordinates(T orig_x, T orig_y, T orig_z,
double scale_factor,
321 UnitCellAxis face_normal,
int a_index,
int b_index,
int c_index,
322 const double* invu, T *point_x, T *point_y, T *point_z);
325void fvStencilCoordinates(T orig_x, T orig_y, T orig_z,
double scale_factor,
int a_index,
326 int b_index,
int c_index,
const double* invu, T *point_x,
327 T *point_y, T *point_z);
330void fvStencilCoordinates(T orig_x, T orig_y, T orig_z, UnitCellAxis face_normal,
int a_index,
331 int b_index,
int c_index,
const double* invu, T *point_x, T *point_y,
335void fvStencilCoordinates(T orig_x, T orig_y, T orig_z,
int a_index,
int b_index,
int c_index,
336 const double* invu, T *point_x, T *point_y, T *point_z);
342#include "tricubic_cell.tpp"
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
void setCoefficient(T value, int i, int j, int k)
Set one of the 64 coefficients Aijk for the tricubic spline. Parameter descriptions follow from above...
void thirdDerivative(T x, T y, T z, T *result) const
Evaluate the second derivatives of a tricubic mesh element at a point and return the results along Ca...
T getCoefficient(int i, int j, int k) const
Retrieve one of the 64 coefficients Aijk for the tricubic spline.
T3 derivative(T x, T y, T z) const
Evaluate the first derivatives of a tricubic mesh element at a point and return the results along Car...
std::vector< T > getCoefficients() const
Get a Standard Template Library vector containing all coefficients in the element....
void setData(T value, FunctionLevel kind, int i, int j, int k)
Set one of the data items. Parameter descriptions follow from above.
T getCellOrigin(CartesianDimension dim) const
Get the cell origin along one dimension.
void fractionalPosition(T x, T y, T z, T *a_frac, T *b_frac, T *c_frac, ExceptionResponse policy=ExceptionResponse::SILENT, const char *caller=nullptr) const
Get the fractional position of a point in Cartesian coordinates within a mesh cell....
TricubicCell()
The constructor can take nothing and simply initialize all values to zero, or accept the tricubic wei...
T getData(FunctionLevel kind, int i, int j, int k) const
Get one of the data points from the boundary. Parameter descriptions follow from above,...
T evaluate(T x, T y, T z) const
Evaluate the function at a specific point in space. This will take into account the grid cell's origi...
void secondDerivative(T x, T y, T z, T *result) const
Evaluate the second derivatives of a tricubic mesh element at a point and return the results along Ca...
T getCellLength(CartesianDimension dim) const
Get the cell length along one dimension.
A bundle of a 64 x 64 matrix, encoding the transformation of function values and derivatives at a ste...
Definition tricubic_cell.h:30
TricubicStencil(Interpolant kind_in=Interpolant::SMOOTHNESS)
The constructor accepts the stencil type. Dimensions of the matrix and the geometry of each stencil o...
Definition tricubic_cell.cpp:9
std::vector< double > exportMatrix() const
Export the matrix as a Standard-Template Library vector.
Definition tricubic_cell.cpp:165
const double * data(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get a pointer to the matrix data on the host or device.
Definition tricubic_cell.cpp:141
Interpolant getKind() const
Get the type of interpolant.
Definition tricubic_cell.cpp:136
TricubicStencil(const TricubicStencil &original)=default
The copy and move constructors as well as assignment operators can all take their default forms....
Definition stormm_vector_types.h:117
A mixed tuple for 95-bit integer accumulation. This is the proper way to take double-precision floati...
Definition stormm_vector_types.h:265