chrono::ChCubicSpline Class Reference

Description

Implementation of 1-D piece-wise cubic spline curves.

#include <ChCubicSpline.h>

Public Types

enum  BCType { DEFAULT_BC, FIRST_BC, SECOND_BC }
 

Public Member Functions

 ChCubicSpline (const std::vector< double > &t, const std::vector< double > &y)
 Construct a cubic spline y = y(t). More...
 
void SetLeftBC (BCType type, double val)
 Set the boundary condition at the left endpoint. More...
 
void SetRightBC (BCType type, double val)
 Set the boundary condition at the right endpoint. More...
 
void Evaluate (double t, double &y, double &yp, double &ypp)
 Evaluate the cubic spline at the specified value t.
 

Member Enumeration Documentation

◆ BCType

Enumerator
DEFAULT_BC 

quadratic function over corresponding interval (first/last)

FIRST_BC 

imposed first derivative at corresponding endpoint (left/right)

SECOND_BC 

imposed second derivative at corresponding endpoint (left/right)

Constructor & Destructor Documentation

◆ ChCubicSpline()

chrono::ChCubicSpline::ChCubicSpline ( const std::vector< double > &  t,
const std::vector< double > &  y 
)

Construct a cubic spline y = y(t).

It is assumed that the t values are sorted in ascending order.

Member Function Documentation

◆ SetLeftBC()

void chrono::ChCubicSpline::SetLeftBC ( BCType  type,
double  val 
)

Set the boundary condition at the left endpoint.

The specified value is ignored if type = DEFAULT_BC.

◆ SetRightBC()

void chrono::ChCubicSpline::SetRightBC ( BCType  type,
double  val 
)

Set the boundary condition at the right endpoint.

The specified value is ignored if type = DEFAULT_BC.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/core/ChCubicSpline.h
  • /builds/uwsbel/chrono/src/chrono/core/ChCubicSpline.cpp