Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::Coeff2Hermite< polyDegree > Class Template Reference

Class template that performs the transformation between the polynomial coefficient matrix \( \mathbf{C}=\left[\mathbf{c}_0\ \mathbf{c}_1\ \ldots \ \mathbf{c}_P\right]\) and the Hermite coefficient matrix \( \mathbf{H}=\left[\mathbf{r}(0),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(0),\ \mathbf{r}(1),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(1)\right]\) of a spline \(\mathbf{r}(u)=\sum_{i=0}^P\mathbf{c}_it^i\) of odd degree \(P\), parametrized in \([0\ 1]\). More...

#include <Coeff2Hermite.h>

Collaboration diagram for model::Coeff2Hermite< polyDegree >:

Static Public Member Functions

template<short unsigned int dim>
static Eigen::Matrix< double, dim, polyCoeff > c2h (const Eigen::Matrix< double, dim, polyCoeff > &C)
template<short unsigned int dim>
static Eigen::Matrix< double, dim, polyCoeff > h2c (const Eigen::Matrix< double, dim, polyCoeff > &H)

Static Public Attributes

static const Eigen::Matrix< double, polyDegree+1, polyDegree+1 > C2H
static const Eigen::Matrix< double, polyDegree+1, polyDegree+1 > C2HT
static const Eigen::Matrix< double, polyDegree+1, polyDegree+1 > H2C
static const Eigen::Matrix< double, polyDegree+1, polyDegree+1 > H2CT

Detailed Description

template<short unsigned int polyDegree>
class model::Coeff2Hermite< polyDegree >

Class template that performs the transformation between the polynomial coefficient matrix \( \mathbf{C}=\left[\mathbf{c}_0\ \mathbf{c}_1\ \ldots \ \mathbf{c}_P\right]\) and the Hermite coefficient matrix \( \mathbf{H}=\left[\mathbf{r}(0),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(0),\ \mathbf{r}(1),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(1)\right]\) of a spline \(\mathbf{r}(u)=\sum_{i=0}^P\mathbf{c}_it^i\) of odd degree \(P\), parametrized in \([0\ 1]\).

Consider the spline: [ \mathbf{r}(u)=\sum_{i=0}^P\mathbf{c}_it^i ] where \(t\in[0,1]\) and P is odd. The matrix

\[ \left[\mathbf{c}_0\ \mathbf{c}_1\ \ldots \ \mathbf{c}_P\right] \]

is the coefficient matrix of the spline, while the matrix

\[ \mathbf{H}=\left[\mathbf{r}(0),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(0),\ \mathbf{r}(1),\ \ldots \frac{d^\frac{P-1}{2}\mathbf{r}}{dt^\frac{P-1}{2}}(1)\right] \]

is the Hermite matrix of the spline. We now seek a relationship between the two.

\[ \frac{d^n\mathbf{r}}{dt^n}=\sum_{i=0}^P \underbrace{i(i-1)\ldots(i-n+1)}_{n\ terms} \mathbf{c}_it^{i-n} \]

Since only terms having \(i-n+1>0\) survive in the sum, that is \(i\ge n\) then we obtain:

\[ \frac{d^n\mathbf{r}}{dt^n}=\sum_{i=n}^P \frac{i!}{(i-n)!} \mathbf{c}_it^{i-n} \]

Letting \(t=0\) and \(t=1\), one finds that the Hermite coefficients of order n (n=0...(P-1)/2) are:

\[ \frac{d^n\mathbf{r}}{dt^n}(0)=\sum_{i=n}^P \frac{i!}{(i-n)!} \mathbf{c}_i0^{i-n}=n!\mathbf{c}_n \]

\[ \frac{d^n\mathbf{r}}{dt^n}(1)=\sum_{i=n}^P \frac{i!}{(i-n)!} \mathbf{c}_i1^{i-n}=\sum_{i=n}^P \frac{i!}{(i-n)!} \mathbf{c}_i \]

In matrix form this reads:

\[\underbrace{\left[\begin{array}{l} {d^0\mathbf{r}}/{dt^0}(0)\\ {d^1\mathbf{r}}/{dt^1}(0)\\ {d^2\mathbf{r}}/{dt^2}(0)\\ \vdots\\ {d^0\mathbf{r}}/{dt^0}(1)\\ {d^1\mathbf{r}}/{dt^1}(1)\\ {d^2\mathbf{r}}/{dt^2}(1)\\ \vdots\\ \end{array}\right]}_{\mathbf{H}^T}= \left[\begin{array}{cccc} 0!& 0 & 0 & \ldots\\ 0 & 1! & 0 & \ldots\\ 0 & 0 & 2! & \ldots\\ \vdots & \vdots & \vdots & \ddots\\ \frac{0!}{(0-0)!}& \frac{1!}{(1-0)!} & \frac{2!}{(2-0)!} & \ldots\\ 0& \frac{1!}{(1-1)!} & \frac{2!}{(2-1)!} & \ldots\\ 0& 0 & \frac{2!}{(2-2)!} & \ldots\\ \vdots & \vdots & \vdots & \ddots\\ \end{array}\right] \underbrace{\left[\begin{array}{l} \mathbf{c}_0\\ \mathbf{c}_1\\ \mathbf{c}_2\\ \vdots\\ \end{array}\right]}_{\mathbf{C}^T} \]

For a linear spline (P=1, n=0) we find:

\[ \mathbf{H}=\left[\mathbf{c}_0,\ \mathbf{c}_0+\mathbf{c}_1\right] \]

\[ \mathbf{C}=\left[\mathbf{h}_0,\ \mathbf{h}_1-\mathbf{h}_0\right] \]

For a cubic spline (P=3, n=0,1) we find:

\[ \mathbf{H}=\left[\mathbf{c}_0,\ \mathbf{c}_1,\ \mathbf{c}_0+\mathbf{c}_1+\mathbf{c}_2+\mathbf{c}_3,\ \mathbf{c}_1+2\mathbf{c}_2+3\mathbf{c}_3\right] \]

\[ \mathbf{C}=\left[\mathbf{h}_0,\ \mathbf{h}_1,\ -3\mathbf{h}_0-2\mathbf{h}_1+3\mathbf{h}_2-\mathbf{h}_3,\ 2\mathbf{h}_0+\mathbf{h}_1-2\mathbf{h}_2+\mathbf{h}_3\right] \]

Definition at line 166 of file Coeff2Hermite.h.

Member Function Documentation

◆ c2h()

template<short unsigned int polyDegree>
template<short unsigned int dim>
Eigen::Matrix< double, dim, polyCoeff > model::Coeff2Hermite< polyDegree >::c2h ( const Eigen::Matrix< double, dim, polyCoeff > & C)
inlinestatic

The Hermite matrix corresponding to the polynomial coefficients C (coefficients in columns)

Definition at line 193 of file Coeff2Hermite.h.

◆ h2c()

template<short unsigned int polyDegree>
template<short unsigned int dim>
Eigen::Matrix< double, dim, polyCoeff > model::Coeff2Hermite< polyDegree >::h2c ( const Eigen::Matrix< double, dim, polyCoeff > & H)
inlinestatic

The Hermite matrix corresponding to the polynomial coefficients C (coefficients in columns)

Definition at line 203 of file Coeff2Hermite.h.

Member Data Documentation

◆ C2H

template<short unsigned int polyDegree>
const Eigen::Matrix<double,polyDegree+1,polyDegree+1> model::Coeff2Hermite< polyDegree >::C2H
static

Definition at line 184 of file Coeff2Hermite.h.

◆ C2HT

template<short unsigned int polyDegree>
const Eigen::Matrix<double,polyDegree+1,polyDegree+1> model::Coeff2Hermite< polyDegree >::C2HT
static

Definition at line 185 of file Coeff2Hermite.h.

◆ H2C

template<short unsigned int polyDegree>
const Eigen::Matrix<double,polyDegree+1,polyDegree+1> model::Coeff2Hermite< polyDegree >::H2C
static

Definition at line 187 of file Coeff2Hermite.h.

◆ H2CT

template<short unsigned int polyDegree>
const Eigen::Matrix<double,polyDegree+1,polyDegree+1> model::Coeff2Hermite< polyDegree >::H2CT
static

Definition at line 188 of file Coeff2Hermite.h.


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