PolyFEM
Loading...
Searching...
No Matches
polyfem::utils::PiecewiseInterpolation Class Referenceabstract

#include <Interpolation.hpp>

Inheritance diagram for polyfem::utils::PiecewiseInterpolation:
[legend]
Collaboration diagram for polyfem::utils::PiecewiseInterpolation:
[legend]

Public Types

enum class  Extend { CONSTANT , EXTRAPOLATE , REPEAT , REPEAT_OFFSET }
 

Public Member Functions

virtual void init (const json &params) override
 
double eval (const double t) const override
 
double extend (const double t) const
 
- Public Member Functions inherited from polyfem::utils::Interpolation
virtual ~Interpolation ()
 

Public Attributes

std::vector< double > points_
 
std::vector< double > values_
 
Extend extend_
 

Protected Member Functions

virtual double eval_piece (const double t, const int i) const =0
 
double dy_dt (const double t) const
 
virtual double dy_dt_piece (const double t, const int i) const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from polyfem::utils::Interpolation
static std::shared_ptr< Interpolationbuild (const json &params)
 

Detailed Description

Definition at line 43 of file Interpolation.hpp.

Member Enumeration Documentation

◆ Extend

Enumerator
CONSTANT 
EXTRAPOLATE 
REPEAT 
REPEAT_OFFSET 

Definition at line 54 of file Interpolation.hpp.

Member Function Documentation

◆ dy_dt()

double polyfem::utils::PiecewiseInterpolation::dy_dt ( const double  t) const
protected

Definition at line 129 of file Interpolation.cpp.

References dy_dt_piece(), and points_.

Referenced by extend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dy_dt_piece()

virtual double polyfem::utils::PiecewiseInterpolation::dy_dt_piece ( const double  t,
const int  i 
) const
protectedpure virtual

Implemented in polyfem::utils::PiecewiseConstantInterpolation, polyfem::utils::PiecewiseLinearInterpolation, and polyfem::utils::PiecewiseCubicInterpolation.

Referenced by dy_dt().

Here is the caller graph for this function:

◆ eval()

double polyfem::utils::PiecewiseInterpolation::eval ( const double  t) const
overridevirtual

Implements polyfem::utils::Interpolation.

Definition at line 73 of file Interpolation.cpp.

References eval_piece(), extend(), points_, and values_.

Referenced by extend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eval_piece()

virtual double polyfem::utils::PiecewiseInterpolation::eval_piece ( const double  t,
const int  i 
) const
protectedpure virtual

Implemented in polyfem::utils::PiecewiseConstantInterpolation, polyfem::utils::PiecewiseLinearInterpolation, and polyfem::utils::PiecewiseCubicInterpolation.

Referenced by eval().

Here is the caller graph for this function:

◆ extend()

double polyfem::utils::PiecewiseInterpolation::extend ( const double  t) const

Definition at line 90 of file Interpolation.cpp.

References CONSTANT, dy_dt(), eval(), extend_, EXTRAPOLATE, points_, REPEAT, REPEAT_OFFSET, and values_.

Referenced by eval().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void polyfem::utils::PiecewiseInterpolation::init ( const json params)
overridevirtual

Reimplemented from polyfem::utils::Interpolation.

Reimplemented in polyfem::utils::PiecewiseCubicInterpolation.

Definition at line 58 of file Interpolation.cpp.

References extend_, polyfem::log_and_throw_error(), points_, and values_.

Referenced by polyfem::utils::PiecewiseCubicInterpolation::init().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ extend_

Extend polyfem::utils::PiecewiseInterpolation::extend_

◆ points_

◆ values_


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