STORMM Source Documentation
Loading...
Searching...
No Matches
bspline.h
1// -*-c++-*-
2#ifndef STORMM_BSPLINE_H
3#define STORMM_BSPLINE_H
4
5#include "copyright.h"
6#include "Accelerator/hybrid.h"
7#include "DataTypes/common_types.h"
8
9namespace stormm {
10namespace stmath {
11
12using card::Hybrid;
13using data_types::isSignedIntegralScalarType;
14
28template <typename Tcoord, typename Tcalc>
29void bSplineInputChecks(const std::vector<Tcoord> &xcrd, const std::vector<Tcoord> &ycrd,
30 const std::vector<Tcoord> &zcrd, const int order,
31 std::vector<Tcalc> *a_coefs, std::vector<Tcalc> *b_coefs,
32 std::vector<Tcalc> *c_coefs, std::vector<int> *a_init,
33 std::vector<int> *b_init, std::vector<int> *c_init);
34
78template <typename T> void bSpline(T x, int order, T* coefs, T* dcoefs = nullptr);
79
80template <typename T> std::vector<T> bSpline(T x, int order);
81
82template <typename Tcoord, typename Tcalc>
83void bSpline(const Tcoord* xcrd, const Tcoord* ycrd, const Tcoord* zcrd, int order,
84 const Tcalc* umat_cell, const Tcoord* invu_cell, int mesh_na, int mesh_nb,
85 int mesh_nc, const Tcoord* invu_mesh, Tcalc* a_coefs, Tcalc* b_coefs, Tcalc* c_coefs,
86 int* a_init, int* b_init, int* c_init, Tcalc* da_coefs = nullptr,
87 Tcalc* db_coefs = nullptr, Tcalc* dc_coefs = nullptr, Tcalc coordinate_scale = 1.0);
88
89template <typename Tcoord, typename Tcalc>
90void bSpline(const std::vector<Tcoord> &xcrd, const std::vector<Tcoord> &ycrd,
91 const std::vector<Tcoord> &zcrd, int order, const Tcalc* umat_cell,
92 const Tcoord* invu_cell, int mesh_na, int mesh_nb, int mesh_nc,
93 const Tcoord* invu_mesh, std::vector<Tcalc> *a_coefs, std::vector<Tcalc> *b_coefs,
94 std::vector<Tcalc> *c_coefs, std::vector<int> *a_init, std::vector<int> *b_init,
95 std::vector<int> *c_init, std::vector<Tcalc> *da_coefs = nullptr,
96 std::vector<Tcalc> *db_coefs = nullptr, std::vector<Tcalc> *dc_coefs = nullptr,
97 Tcalc coordinate_scale = 1.0);
98
99template <typename Tcoord, typename Tcalc>
100void bSpline(const Hybrid<Tcoord> &xcrd, const Hybrid<Tcoord> &ycrd, const Hybrid<Tcoord> &zcrd,
101 int order, const Tcalc* umat_cell, const Tcoord* invu_cell, int mesh_na, int mesh_nb,
102 int mesh_nc, const Tcoord* invu_mesh, Hybrid<Tcalc> *a_coefs, Hybrid<Tcalc> *b_coefs,
103 Hybrid<Tcalc> *c_coefs, Hybrid<int> *a_init, Hybrid<int> *b_init,
104 Hybrid<int> *c_init, Hybrid<Tcalc> *da_coefs = nullptr,
105 Hybrid<Tcalc> *db_coefs = nullptr, Hybrid<Tcalc> *dc_coefs = nullptr,
106 Tcalc coordinate_scale = 1.0);
108
115template <typename T> std::vector<T> bSplineNoUnity(T x, int order);
116
129template <typename T> std::vector<T> dBSpline(T x, int order, bool exploit_partition = true);
130
131} // namespace stmath
132} // namespace stormm
133
134#include "bspline.tpp"
135
136#endif
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202