Project Chrono: chrono::ChCubicSpline Class Reference

Public Types | Public Member Functions | List of all members
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).
void | SetLeftBC (BCType type, double val)
| Set the boundary condition at the left endpoint.
void | SetRightBC (BCType type, double val)
| Set the boundary condition at the right endpoint.
void | Evaluate (double t, double &y, double &yp, double &ypp)
| Evaluate the cubic spline at the specified value t.

## Member Enumeration Documentation

## ◆ BCType

enum chrono::ChCubicSpline::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:

- D:/W/B/src/chrono-9.0.1/src/chrono/core/ChCubicSpline.h
- D:/W/B/src/chrono-9.0.1/src/chrono/core/ChCubicSpline.cpp