Evaluates the one-dimensional basis functions used by the solver. More...
#include "bspline.hpp"
Static Public Member Functions | |
| static void | beval3 (Real ai, int i, int n, Real *Bik, int *pos) |
Evaluate the bounded quadratic basis in cell i. | |
| static void | beval3D (Real ai, int i, int n, Real *Bik, int *pos) |
| Evaluate bounded quadratic derivatives with respect to \(\xi\). | |
| static void | beval4 (Real ai, int i, int n, Real *Bik, int *pos) |
Evaluate the bounded cubic basis in cell i. | |
| static void | beval4D (Real ai, int i, int n, Real *Bik, int *pos) |
| Evaluate bounded cubic derivatives with respect to \(\xi\). | |
| static void | eval (Real ai, int degree, Real *Bik, int *pos) |
| Dispatch to the cardinal evaluator selected by ORB5 degree. | |
| static void | eval1 (Real ai, Real *Bik, int *pos) |
| Evaluate the constant cardinal basis. | |
| static void | eval1D (Real ai, Real *Bik, int *pos) |
| Evaluate the \(\xi\) derivative of the constant cardinal basis. | |
| static void | eval2 (Real ai, Real *Bik, int *pos) |
| Evaluate the two linear cardinal basis functions. | |
| static void | eval2D (Real ai, Real *Bik, int *pos) |
| Evaluate the \(\xi\) derivatives of the linear cardinal basis. | |
| static void | eval3 (Real ai, Real *Bik, int *pos) |
| Evaluate the three quadratic cardinal basis functions. | |
| static void | eval3D (Real ai, Real *Bik, int *pos) |
| Evaluate the \(\xi\) derivatives of the quadratic cardinal basis. | |
| static void | eval4 (Real ai, Real *Bik, int *pos) |
| Evaluate the four cubic cardinal basis functions. | |
| static void | eval4D (Real ai, Real *Bik, int *pos) |
| Evaluate the \(\xi\) derivatives of the cubic cardinal basis. | |
| static void | evald (Real ai, int degree, Real *Bik, int *pos) |
| Dispatch to the cardinal derivative evaluator selected by degree. | |
| static int | find_cell (Real x, Real x0, Real dx_inv) |
| Convert a coordinate to its zero-based uniform-mesh cell index. | |
| static Real | normalize_ksi (Real x, Real x_cell, Real dx) |
| Normalize a coordinate to its local cell coordinate. | |
Evaluates the one-dimensional basis functions used by the solver.
The cardinal routines operate on a uniform mesh. The bounded variants replace the cardinal coefficients in the first and last cells so that the physical end points are represented correctly. In this API degree follows the historical ORB5 convention: it is the number of nonzero basis functions (1–4), so values 1, 2, 3, and 4 denote constant, linear, quadratic, and cubic polynomials, respectively.
All derivative routines return derivatives with respect to the dimensionless cell coordinate \(\xi\). A derivative with respect to the physical coordinate is obtained by multiplying by the inverse cell width.
solver/BSplines.F90, modules BSplinesCardinalDegree1 through BSplinesCardinalDegree4, BSplinesBoundedDegree3, and BSplinesBoundedDegree4. Evaluate the bounded quadratic basis in cell i.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [in] | i | Zero-based cell index; i == n denotes the final grid point. |
| [in] | n | Number of mesh intervals. |
| [out] | Bik | Array of at least three elements receiving basis values. |
| [out] | pos | Array of at least three elements receiving offsets {-2,-1,0}. |
Evaluate bounded quadratic derivatives with respect to \(\xi\).
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [in] | i | Zero-based cell index; i == n denotes the final grid point. |
| [in] | n | Number of mesh intervals. |
| [out] | Bik | Array of at least three elements receiving derivative values. |
| [out] | pos | Array of at least three elements receiving offsets {-2,-1,0}. |
Evaluate the bounded cubic basis in cell i.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [in] | i | Zero-based cell index; i == n denotes the final grid point. |
| [in] | n | Number of mesh intervals. |
| [out] | Bik | Array of at least four elements receiving basis values. |
| [out] | pos | Array of at least four elements receiving offsets {-3,-2,-1,0}. |
Evaluate bounded cubic derivatives with respect to \(\xi\).
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [in] | i | Zero-based cell index; i == n denotes the final grid point. |
| [in] | n | Number of mesh intervals. |
| [out] | Bik | Array of at least four elements receiving derivative values. |
| [out] | pos | Array of at least four elements receiving offsets {-3,-2,-1,0}. |
Dispatch to the cardinal evaluator selected by ORB5 degree.
| [in] | ai | Dimensionless coordinate \(\xi\) within the cell. |
| [in] | degree | Number of active basis functions, in the range 1–4. |
| [out] | Bik | Array of at least degree elements receiving basis values. |
| [out] | pos | Array of at least degree elements receiving index offsets. |
Evaluate the constant cardinal basis.
| [in] | ai | Dimensionless coordinate within the cell; unused for this degree. |
| [out] | Bik | Array of at least one element receiving the basis value. |
| [out] | pos | Array of at least one element receiving the basis-index offset. |
Evaluate the \(\xi\) derivative of the constant cardinal basis.
| [in] | ai | Dimensionless coordinate within the cell; unused for this degree. |
| [out] | Bik | Array of at least one element receiving the derivative value. |
| [out] | pos | Array of at least one element receiving the basis-index offset. |
Evaluate the two linear cardinal basis functions.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [out] | Bik | Array of at least two elements receiving the basis values. |
| [out] | pos | Array of at least two elements receiving offsets {-1,0}. |
Evaluate the \(\xi\) derivatives of the linear cardinal basis.
| [in] | ai | Dimensionless coordinate within the cell; derivatives are constant. |
| [out] | Bik | Array of at least two elements receiving derivative values. |
| [out] | pos | Array of at least two elements receiving offsets {-1,0}. |
Evaluate the three quadratic cardinal basis functions.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [out] | Bik | Array of at least three elements receiving the basis values. |
| [out] | pos | Array of at least three elements receiving offsets {-2,-1,0}. |
Evaluate the \(\xi\) derivatives of the quadratic cardinal basis.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [out] | Bik | Array of at least three elements receiving derivative values. |
| [out] | pos | Array of at least three elements receiving offsets {-2,-1,0}. |
Evaluate the four cubic cardinal basis functions.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [out] | Bik | Array of at least four elements receiving the basis values. |
| [out] | pos | Array of at least four elements receiving offsets {-3,-2,-1,0}. |
Evaluate the \(\xi\) derivatives of the cubic cardinal basis.
| [in] | ai | Dimensionless coordinate \(\xi\in[0,1]\) within the cell. |
| [out] | Bik | Array of at least four elements receiving derivative values. |
| [out] | pos | Array of at least four elements receiving offsets {-3,-2,-1,0}. |
Dispatch to the cardinal derivative evaluator selected by degree.
| [in] | ai | Dimensionless coordinate \(\xi\) within the cell. |
| [in] | degree | Number of active basis functions, in the range 1–4. |
| [out] | Bik | Array of at least degree elements receiving \(dB/d\xi\). |
| [out] | pos | Array of at least degree elements receiving index offsets. |
Convert a coordinate to its zero-based uniform-mesh cell index.
| [in] | x | Coordinate to locate, in the same units as x0. |
| [in] | x0 | Coordinate of grid point zero. |
| [in] | dx_inv | Inverse mesh spacing, in inverse units of x. |
Normalize a coordinate to its local cell coordinate.
| [in] | x | Coordinate to normalize. |
| [in] | x_cell | Coordinate of the left cell boundary, in units of x. |
| [in] | dx | Cell width, in units of x. |