45 const int dim = T_GRID::dim;
52 const auto &dx = grid.dX();
53 const auto &one_over_dx = grid.oneOverDX();
55 T eta = (x_interp[0] - x_base[0]) * one_over_dx[0];
58 levelset.phiPrev()(base_node_id), levelset.psiPrev()(base_node_id)[axis], levelset.phiPrev()(base_node_id_p1),
59 levelset.psiPrev()(base_node_id_p1)[axis], dx[axis], use_gradient_limiting);
62 control_points.
c_12 *
B2(eta) + control_points.
c_03 *
B3(eta);
81 return hermite_fields;
92 const T_GRID &grid = levelset.grid();
96 for (
int i = 0; i < num_cells_interp[0]; ++i)
97 for (
int j = 0; j < num_cells_interp[1]; ++j)
98 for (
int k = 0; k < num_cells_interp[2]; ++k) {
99 const auto &hermite_fields = this->interpolate(grid, x_interp(i, j, k), levelset);
101 levelset.phiInterpPrev()(i, j, k) = hermite_fields.phi_interpolated;
102 levelset.psiInterpPrev()(i, j, k) = hermite_fields.psi_interpolated;
T B0(T eta)
cubic Bernstein polynomials
T_VECTOR psi_interpolated
const Vec3< T > & dX() const
static struct ControlPoints< T > get_control_points(const T &phi_0, const T &phi_x_0, const T &phi_1, const T &phi_x_1, const T &dx, bool use_gradient_limiting=false)