SpECTRE  v2024.04.12
intrp::BarycentricRationalSpanInterpolator Class Reference

Performs a barycentric interpolation with an order in a range fixed at construction; this class can be chosen via the options factory mechanism as a possible SpanInterpolator. More...

#include <BarycentricRationalSpanInterpolator.hpp>

Classes

struct  MaxOrder
 
struct  MinOrder
 

Public Types

using options = tmpl::list< MinOrder, MaxOrder >
 
- Public Types inherited from intrp::SpanInterpolator
using creatable_classes = tmpl::list< LinearSpanInterpolator, CubicSpanInterpolator, BarycentricRationalSpanInterpolator >
 

Public Member Functions

 BarycentricRationalSpanInterpolator (CkMigrateMessage *)
 
 WRAPPED_PUPable_decl_template (BarycentricRationalSpanInterpolator)
 
void pup (PUP::er &p) override
 
 BarycentricRationalSpanInterpolator (const BarycentricRationalSpanInterpolator &)=default
 
BarycentricRationalSpanInterpolatoroperator= (const BarycentricRationalSpanInterpolator &)=default
 
 BarycentricRationalSpanInterpolator (BarycentricRationalSpanInterpolator &&)=default
 
BarycentricRationalSpanInterpolatoroperator= (BarycentricRationalSpanInterpolator &&)=default
 
 BarycentricRationalSpanInterpolator (size_t min_order, size_t max_order)
 
std::unique_ptr< SpanInterpolatorget_clone () const override
 Produce a std::unique_ptr that points to a copy of *this`. More...
 
double interpolate (const gsl::span< const double > &source_points, const gsl::span< const double > &values, double target_point) const override
 Perform the interpolation of function represented by values at source_points to the requested target_point, returning the interpolation result. More...
 
size_t required_number_of_points_before_and_after () const override
 The number of domain points that should be both before and after the requested target point for best interpolation. For instance, for a linear interpolator, this function would return 1 to request that the target is between the two domain points passed to source_points. More...
 
virtual double interpolate (const gsl::span< const double > &source_points, const gsl::span< const double > &values, double target_point) const=0
 Perform the interpolation of function represented by values at source_points to the requested target_point, returning the interpolation result. More...
 
std::complex< double > interpolate (const gsl::span< const double > &source_points, const gsl::span< const std::complex< double > > &values, double target_point) const
 Perform the interpolation of function represented by complex values at source_points to the requested target_point, returning the (complex) interpolation result.
 
- Public Member Functions inherited from intrp::SpanInterpolator
 WRAPPED_PUPable_abstract (SpanInterpolator)
 
virtual std::unique_ptr< SpanInterpolatorget_clone () const =0
 Produce a std::unique_ptr that points to a copy of *this`. More...
 
virtual double interpolate (const gsl::span< const double > &source_points, const gsl::span< const double > &values, double target_point) const =0
 Perform the interpolation of function represented by values at source_points to the requested target_point, returning the interpolation result. More...
 
std::complex< double > interpolate (const gsl::span< const double > &source_points, const gsl::span< const std::complex< double > > &values, double target_point) const
 Perform the interpolation of function represented by complex values at source_points to the requested target_point, returning the (complex) interpolation result.
 
virtual size_t required_number_of_points_before_and_after () const =0
 The number of domain points that should be both before and after the requested target point for best interpolation. For instance, for a linear interpolator, this function would return 1 to request that the target is between the two domain points passed to source_points. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

Performs a barycentric interpolation with an order in a range fixed at construction; this class can be chosen via the options factory mechanism as a possible SpanInterpolator.

Details

This will call a barycentric interpolation on a fixed minimum length, so that buffers that adjust length based on required_points_before_and_after() can be forced to use an interpolator of a target order.

Member Function Documentation

◆ get_clone()

std::unique_ptr< SpanInterpolator > intrp::BarycentricRationalSpanInterpolator::get_clone ( ) const
inlineoverridevirtual

Produce a std::unique_ptr that points to a copy of *this`.

Implements intrp::SpanInterpolator.

◆ interpolate() [1/2]

double intrp::BarycentricRationalSpanInterpolator::interpolate ( const gsl::span< const double > &  source_points,
const gsl::span< const double > &  values,
double  target_point 
) const
overridevirtual

Perform the interpolation of function represented by values at source_points to the requested target_point, returning the interpolation result.

Implements intrp::SpanInterpolator.

◆ interpolate() [2/2]

virtual double intrp::SpanInterpolator::interpolate ( const gsl::span< const double > &  source_points,
const gsl::span< const double > &  values,
double  target_point 
) const
virtual

Perform the interpolation of function represented by values at source_points to the requested target_point, returning the interpolation result.

Implements intrp::SpanInterpolator.

◆ required_number_of_points_before_and_after()

size_t intrp::BarycentricRationalSpanInterpolator::required_number_of_points_before_and_after ( ) const
inlineoverridevirtual

The number of domain points that should be both before and after the requested target point for best interpolation. For instance, for a linear interpolator, this function would return 1 to request that the target is between the two domain points passed to source_points.

Implements intrp::SpanInterpolator.

Member Data Documentation

◆ help

constexpr Options::String intrp::BarycentricRationalSpanInterpolator::help
staticconstexpr
Initial value:
= {
"Barycentric interpolator of option-defined maximum and minimum order."}

The documentation for this class was generated from the following file: