File interpolation_z.hxx#

Typedefs

template<class DerivedType>
using RegisterZInterpolation = ZInterpolationFactory::RegisterInFactory<DerivedType>#
class ZInterpolation#

Subclassed by ZHermiteSpline

Public Functions

explicit ZInterpolation(int y_offset = 0, Mesh *mesh = nullptr, Region<Ind3D> region_in = {})#
virtual ~ZInterpolation() = default#
virtual void calcWeights(const Field3D &delta_z) = 0#
virtual Field3D interpolate(const Field3D &f, const std::string &region_str = "DEFAULT") const = 0#
virtual Field3D interpolate(const Field3D &f, const Field3D &delta_z, const std::string &region_str = "DEFAULT") = 0#
inline void setRegion(Region<Ind3D> new_region)#
inline virtual std::vector<ParallelTransform::PositionsAndWeights> getWeightsForYUpApproximation(int i, int j, int k) const#
inline virtual std::vector<ParallelTransform::PositionsAndWeights> getWeightsForYDownApproximation(int i, int j, int k) const#
inline virtual std::vector<ParallelTransform::PositionsAndWeights> getWeightsForYApproximation(int i, int j, int k, int yoffset) const#

Public Members

const int y_offset#

Protected Attributes

Mesh *localmesh = {nullptr}#
Region<Ind3D> region#
class ZInterpolationFactory : public Factory<ZInterpolation, ZInterpolationFactory, int, Mesh*, Region<Ind3D>>#

Public Functions

inline ReturnType create(Options *options, int y_offset = 0, Mesh *mesh = nullptr, Region<Ind3D> region_in = {}) const#
inline ReturnType create(int y_offset = 0, Mesh *mesh = nullptr, Region<Ind3D> region_in = {}) const#
inline ReturnType create(const std::string &type, [[maybe_unused]] Options *options) const#

Public Static Functions

static void ensureRegistered()#

Public Static Attributes

static constexpr auto type_name = "ZInterpolation"#
static constexpr auto section_name = "zinterpolation"#
static constexpr auto option_name = "type"#
static constexpr auto default_type = "hermitespline"#
class ZHermiteSpline : public ZInterpolation#

Public Functions

explicit ZHermiteSpline(int y_offset = 0, Mesh *mesh = nullptr, Region<Ind3D> region_in = {})#
virtual void calcWeights(const Field3D &delta_z) override#
virtual Field3D interpolate(const Field3D &f, const std::string &region_str = "DEFAULT") const override#
virtual Field3D interpolate(const Field3D &f, const Field3D &delta_z, const std::string &region_str = "DEFAULT") override#
virtual std::vector<ParallelTransform::PositionsAndWeights> getWeightsForYApproximation(int i, int j, int k, int yoffset) const override#

Return position and weight of points needed to approximate the function value at the point that the field line through (i,j,k) meets the (j+1)-plane. For the case where only the z-direction is not aligned to grid points, the approximation is: f(i,j+1,k*) = h00 * f(i,j+1,k) + h01 * f(i,j+1,k+1)

  • h10 * dfdz(i,j+1,k) + h11 * dfdz(i,j+1,k+1) = h00 * f(i,j+1,k) + h01 * f(i,j+1,k+1)

  • h10 * ( f(i,j+1,k+1) - f(i,j+1,k-1) ) / 2

  • h11 * ( f(i,j+1,k+2) - f(i,j+1,k) ) / 2 for k* a point between k and k+1. Therefore, this function returns position weight (i, j+1, k-1) - h10 / 2 (i, j+1, k) h00 - h11 / 2 (i, j+1, k+1) h01 + h10 / 2 (i, j+1, k+2) h11 / 2

Private Members

const std::string fz_region#
Array<Ind3D> k_corner#
Field3D h00#
Field3D h01#
Field3D h10#
Field3D h11#