specfem::algorithms::interpolate

template<typename PolynomialViewType, typename FunctionViewType, std::enable_if_t<((PolynomialViewType::rank() == 2) && (FunctionViewType::rank() == 2)), int> = 0>
FunctionViewType::value_type interpolate_function(const PolynomialViewType &polynomial, const FunctionViewType &function)

Interpolate a 2D function using polynomial basis.

Interpolate a 3D function using polynomial basis.

Template Parameters:
  • PolynomialViewType – Type of the polynomial view (must be 2D)

  • FunctionViewType – Type of the function view (must be 2D)

  • PolynomialViewType – Type of the polynomial view (must be 3D)

  • FunctionViewType – Type of the function view (must be 3D)

Parameters:
  • polynomial – Polynomial basis functions

  • function – Function values to interpolate

  • polynomial – Polynomial basis functions

  • function – Function values to interpolate

Returns:

Interpolated function value

Returns:

Interpolated function value

template<typename ChunkIndex, typename PolynomialViewType, typename FunctionViewType, typename ResultType, std::enable_if_t<PolynomialViewType::rank() == 4 && FunctionViewType::rank() == 4, int> = 0>
void interpolate_function(const ChunkIndex &chunk_index, const PolynomialViewType &polynomial, const FunctionViewType &function, ResultType &result)

Interpolate a 2D function using polynomial basis (Chunk version)

Interpolate a 3D function using polynomial basis (Chunk version)

Template Parameters:
  • ChunkIndex – Chunk index type

  • PolynomialViewType – Type of the polynomial view (rank 4)

  • FunctionViewType – Type of the function view (rank 4)

  • ResultType – Type of the result view (rank 2)

  • ChunkIndex – Chunk index type

  • PolynomialViewType – Type of the polynomial view (rank 5)

  • FunctionViewType – Type of the function view (rank 5)

  • ResultType – Type of the result view (rank 2)

Parameters:
  • chunk_index – Chunk index

  • polynomial – Polynomial basis functions

  • function – Function values to interpolate

  • result – Result view

  • chunk_index – Chunk index

  • polynomial – Polynomial basis functions

  • function – Function values to interpolate

  • result – Result view

Implementation Details

template<typename PolynomialViewType, typename FunctionViewType>
struct InterpolateFunctor

Functor for performing polynomial interpolation.

Template Parameters:
  • PolynomialViewType – Type of the polynomial view

  • FunctionViewType – Type of the function view

Public Functions

inline InterpolateFunctor(const PolynomialViewType &polynomial, const FunctionViewType &function)

Constructor.

Parameters:
  • polynomial – Polynomial basis functions

  • function – Function values to interpolate

Public Members

const PolynomialViewType polynomial

Polynomial basis functions.

const FunctionViewType function

Function values to interpolate.

Public Static Attributes

static constexpr int rank = PolynomialViewType::rank()

Rank of the polynomial view.