Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::SplineSegment< _dim, corder > Class Template Reference

#include <SplineSegment.h>

Inheritance diagram for model::SplineSegment< _dim, corder >:
Collaboration diagram for model::SplineSegment< _dim, corder >:

Public Types

typedef Eigen::Matrix< double, 1, Ncoeff > RowNcoeff
typedef Eigen::Matrix< double, 1, Ncoeff-1 > RowNcoeffu
typedef Eigen::Matrix< double, 1, Ncoeff-2 > RowNcoeffuu
typedef Eigen::Matrix< double, Ncoeff, Ncoeff > MatrixNcoeff
typedef Eigen::Matrix< double, Ncoeff, dim > MatrixNcoeffDim
typedef Eigen::Matrix< double, Ndof, 1 > VectorNdof
typedef Eigen::Matrix< double, dim, dim > MatrixDim
typedef Eigen::Matrix< double, dim, 1 > VectorDim
typedef Eigen::Matrix< double, dim, Ndof > MatrixDimNdof
typedef Eigen::Matrix< double, Ncoeff, 1 > VectorNcoeff
typedef Eigen::Matrix< double, Ndof, Ndof > MatrixNdof
typedef SplineSegmentBase< dim, corder > SplineSegmentBaseType
typedef ParametricCurve< SplineSegment< _dim, corder >, dim > ParametricCurveType

Public Member Functions

 SplineSegment (const VectorDim &sourceP_in, const VectorDim &sinkP_in)
void updateGeometry ()
MatrixNcoeffDim hermiteDofs () const
std::pair< Eigen::Matrix< double, Ncoeff, Eigen::Dynamic >, Eigen::Matrix< double, Eigen::Dynamic, dim > > hermite2posMatrix () const
SplineSegmentBaseType::H2PmapType hermite2posMap () const
Eigen::Matrix< double, dim, Ncoeff > hermiteCoefficients () const
Eigen::Matrix< double, dim, Ncoeff > polynomialCoeff () const
MatrixNcoeff sfCoeffs () const
const VectorDim & chord () const
const double & chordLength () const
const double & chordLengthSquared () const
const VectorDim & unitDirection () const
double parametricChordLength () const
VectorDim get_r (const double &u) const
RowNcoeff sf (const double &u) const
VectorDim get_ru (const double &uin) const
VectorDim get_rmu (const double &uin) const
VectorDim get_ruu (const double &uin) const
VectorDim get_rmumu (const double &uin) const
std::pair< double, std::pair< double, VectorDim > > closestPoint (const VectorDim &P0) const
Public Member Functions inherited from model::ParametricCurve< SplineSegment< _dim, corder >, _dim >
double get_j (const double &u) const
double get_jSquare (const double &u) const
VectorDim get_rl (const double &u) const
double get_ju (const double &u) const
VectorDim get_rll (const double &u) const
double get_kappa (const double &u) const
 the scalar curvature
double arcLength () const
VectorDim rm () const
VectorDim rm_integrand (const double &u) const

Public Attributes

const VectorDim & sourceP
const VectorDim & sinkP

Static Public Attributes

static constexpr int dim = _dim
static constexpr int Ncoeff = 2*(corder+1)
static constexpr int pOrder = 2*corder+1
static constexpr int Ndof = dim*Ncoeff
static constexpr int eigenSize =pOrder*pOrder
static double alpha

Detailed Description

template<short unsigned int _dim, short unsigned int corder>
class model::SplineSegment< _dim, corder >

A SplineSegment is a special kind of parametric curve where the position vector can be written as:

r(u)=N(u)*q

where N(u) is a (dim x NdofXsegment) matrix of shape functions and q is a (NdofXsegment x 1) column vector of degrees of freedom, where NdofXsegment= dim x n and n=porder+1 is the number of shape functions:

| N1  0  0              Nn  0  0 |
N= |  0 N1  0   ...  0 Nn  0 |
|  0  0 N1               0  0 Nn |

Each shape function is a porder:

[N1 ... Nn]= [1 u ... n^porder] * SFC

where SFC is a n x n matrix of shape function coefficients that in general dependes on the knot vector. It's posible to take advantage of this particular form of shape functions to calculate ruu and ru therefore these functions are redefined here (virtual in ParametricCurve) and the flow chart of their implementation is shown below:

make_UPOWuu()     make_UPOWu()  make_UPOW()
^                                 ^                             ^
|                                 |                             |
make_SFuu()       make_SFu()    make_SF()
^                                 ^                             ^
|                                 |                             |
make_Nuu()                make_Nu()             make_N()
^                                 ^                             ^
|                                 |                             |
make_ruu()                make_ru()             make_r()        (this level is virtual in ParametricCurve)

Definition at line 73 of file SplineSegment.h.

Member Typedef Documentation

◆ MatrixDim

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double,dim,dim> model::SplineSegment< _dim, corder >::MatrixDim

Definition at line 94 of file SplineSegment.h.

◆ MatrixDimNdof

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, dim, Ndof> model::SplineSegment< _dim, corder >::MatrixDimNdof

Definition at line 96 of file SplineSegment.h.

◆ MatrixNcoeff

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, Ncoeff, Ncoeff> model::SplineSegment< _dim, corder >::MatrixNcoeff

Definition at line 91 of file SplineSegment.h.

◆ MatrixNcoeffDim

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, Ncoeff, dim> model::SplineSegment< _dim, corder >::MatrixNcoeffDim

Definition at line 92 of file SplineSegment.h.

◆ MatrixNdof

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double,Ndof,Ndof> model::SplineSegment< _dim, corder >::MatrixNdof

Definition at line 98 of file SplineSegment.h.

◆ ParametricCurveType

template<short unsigned int _dim, short unsigned int corder>
typedef ParametricCurve<SplineSegment<_dim,corder>,dim> model::SplineSegment< _dim, corder >::ParametricCurveType

Definition at line 100 of file SplineSegment.h.

◆ RowNcoeff

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, 1, Ncoeff> model::SplineSegment< _dim, corder >::RowNcoeff

Definition at line 88 of file SplineSegment.h.

◆ RowNcoeffu

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, 1, Ncoeff-1> model::SplineSegment< _dim, corder >::RowNcoeffu

Definition at line 89 of file SplineSegment.h.

◆ RowNcoeffuu

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, 1, Ncoeff-2> model::SplineSegment< _dim, corder >::RowNcoeffuu

Definition at line 90 of file SplineSegment.h.

◆ SplineSegmentBaseType

template<short unsigned int _dim, short unsigned int corder>
typedef SplineSegmentBase<dim,corder> model::SplineSegment< _dim, corder >::SplineSegmentBaseType

Definition at line 99 of file SplineSegment.h.

◆ VectorDim

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double,dim,1> model::SplineSegment< _dim, corder >::VectorDim

Definition at line 95 of file SplineSegment.h.

◆ VectorNcoeff

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double,Ncoeff,1> model::SplineSegment< _dim, corder >::VectorNcoeff

Definition at line 97 of file SplineSegment.h.

◆ VectorNdof

template<short unsigned int _dim, short unsigned int corder>
typedef Eigen::Matrix<double, Ndof,1> model::SplineSegment< _dim, corder >::VectorNdof

Definition at line 93 of file SplineSegment.h.

Constructor & Destructor Documentation

◆ SplineSegment()

template<short unsigned int _dim, short unsigned int corder>
model::SplineSegment< _dim, corder >::SplineSegment ( const VectorDim & sourceP_in,
const VectorDim & sinkP_in )
inline

Constructor with Nodes and flow

Definition at line 122 of file SplineSegment.h.

Member Function Documentation

◆ chord()

template<short unsigned int _dim, short unsigned int corder>
const VectorDim & model::SplineSegment< _dim, corder >::chord ( ) const
inline
Returns
the chord vector (source -> sink)

Definition at line 198 of file SplineSegment.h.

◆ chordLength()

template<short unsigned int _dim, short unsigned int corder>
const double & model::SplineSegment< _dim, corder >::chordLength ( ) const
inline
Returns
the length of the chord vector

Definition at line 205 of file SplineSegment.h.

◆ chordLengthSquared()

template<short unsigned int _dim, short unsigned int corder>
const double & model::SplineSegment< _dim, corder >::chordLengthSquared ( ) const
inline
Returns
the length of the chord vector

Definition at line 212 of file SplineSegment.h.

◆ closestPoint()

template<short unsigned int _dim, short unsigned int corder>
std::pair< double, std::pair< double, VectorDim > > model::SplineSegment< _dim, corder >::closestPoint ( const VectorDim & P0) const
inline
Parameters
[in]P0reference point
Returns
The closesest point to P0 along this segment. The return value is a pair, where pair.first is the parameter value u, and pair.second is the position P of the closest point, so that get_r(u)=P.

Definition at line 278 of file SplineSegment.h.

◆ get_r()

template<short unsigned int _dim, short unsigned int corder>
VectorDim model::SplineSegment< _dim, corder >::get_r ( const double & u) const
inline
Returns
The position vector at parameter u
Parameters
[in]uthe parametrization variable in [0:1]

\[ \mathbf{r} = \mathbf{q}\mathbf{H}\mathbf{u} \\ r_i = q_{ik}H_{km}u^{m} = q_{ik} N_k \]

with i=0..dim-1, k,m = 0... Ncoeff ACTUALLY IN THE CODE WE HAVE THE TRANSPOSE OF THIS !!!!

Definition at line 232 of file SplineSegment.h.

◆ get_rmu()

template<short unsigned int _dim, short unsigned int corder>
VectorDim model::SplineSegment< _dim, corder >::get_rmu ( const double & uin) const
inline

Definition at line 260 of file SplineSegment.h.

◆ get_rmumu()

template<short unsigned int _dim, short unsigned int corder>
VectorDim model::SplineSegment< _dim, corder >::get_rmumu ( const double & uin) const
inline

Definition at line 272 of file SplineSegment.h.

◆ get_ru()

template<short unsigned int _dim, short unsigned int corder>
VectorDim model::SplineSegment< _dim, corder >::get_ru ( const double & uin) const
inline

Definition at line 254 of file SplineSegment.h.

◆ get_ruu()

template<short unsigned int _dim, short unsigned int corder>
VectorDim model::SplineSegment< _dim, corder >::get_ruu ( const double & uin) const
inline

Definition at line 266 of file SplineSegment.h.

◆ hermite2posMap()

template<short unsigned int _dim, short unsigned int corder>
SplineSegmentBaseType::H2PmapType model::SplineSegment< _dim, corder >::hermite2posMap ( ) const
inline

Definition at line 157 of file SplineSegment.h.

◆ hermite2posMatrix()

template<short unsigned int _dim, short unsigned int corder>
std::pair< Eigen::Matrix< double, Ncoeff, Eigen::Dynamic >, Eigen::Matrix< double, Eigen::Dynamic, dim > > model::SplineSegment< _dim, corder >::hermite2posMatrix ( ) const
inline

Definition at line 151 of file SplineSegment.h.

◆ hermiteCoefficients()

template<short unsigned int _dim, short unsigned int corder>
Eigen::Matrix< double, dim, Ncoeff > model::SplineSegment< _dim, corder >::hermiteCoefficients ( ) const
inline

Definition at line 163 of file SplineSegment.h.

◆ hermiteDofs()

template<short unsigned int _dim, short unsigned int corder>
MatrixNcoeffDim model::SplineSegment< _dim, corder >::hermiteDofs ( ) const
inline

Definition at line 145 of file SplineSegment.h.

◆ parametricChordLength()

template<short unsigned int _dim, short unsigned int corder>
double model::SplineSegment< _dim, corder >::parametricChordLength ( ) const
inline
Returns
the length of the chord vector to the power alpha

Definition at line 226 of file SplineSegment.h.

◆ polynomialCoeff()

template<short unsigned int _dim, short unsigned int corder>
Eigen::Matrix< double, dim, Ncoeff > model::SplineSegment< _dim, corder >::polynomialCoeff ( ) const
inline

The matrix of coefficients of the polynomial associated to this SplineSegmentBase. If C=polynomialCoeff() then the polynomial is: P(u)=C.col(0)+u*C.col(1)+u^2*C.col(2)+...

Definition at line 169 of file SplineSegment.h.

◆ sf()

template<short unsigned int _dim, short unsigned int corder>
RowNcoeff model::SplineSegment< _dim, corder >::sf ( const double & u) const
inline

Definition at line 246 of file SplineSegment.h.

◆ sfCoeffs()

template<short unsigned int _dim, short unsigned int corder>
MatrixNcoeff model::SplineSegment< _dim, corder >::sfCoeffs ( ) const
inline

Definition at line 178 of file SplineSegment.h.

◆ unitDirection()

template<short unsigned int _dim, short unsigned int corder>
const VectorDim & model::SplineSegment< _dim, corder >::unitDirection ( ) const
inline
Returns
the chord vector (source -> sink)

Definition at line 219 of file SplineSegment.h.

◆ updateGeometry()

template<short unsigned int _dim, short unsigned int corder>
void model::SplineSegment< _dim, corder >::updateGeometry ( )
inline

Definition at line 136 of file SplineSegment.h.

Member Data Documentation

◆ alpha

template<short unsigned int _dim, short unsigned int corder>
double model::SplineSegment< _dim, corder >::alpha
static

Definition at line 118 of file SplineSegment.h.

◆ dim

template<short unsigned int _dim, short unsigned int corder>
int model::SplineSegment< _dim, corder >::dim = _dim
staticconstexpr

Definition at line 82 of file SplineSegment.h.

◆ eigenSize

template<short unsigned int _dim, short unsigned int corder>
int model::SplineSegment< _dim, corder >::eigenSize =pOrder*pOrder
staticconstexpr

Definition at line 86 of file SplineSegment.h.

◆ Ncoeff

template<short unsigned int _dim, short unsigned int corder>
int model::SplineSegment< _dim, corder >::Ncoeff = 2*(corder+1)
staticconstexpr

Definition at line 83 of file SplineSegment.h.

◆ Ndof

template<short unsigned int _dim, short unsigned int corder>
int model::SplineSegment< _dim, corder >::Ndof = dim*Ncoeff
staticconstexpr

Definition at line 85 of file SplineSegment.h.

◆ pOrder

template<short unsigned int _dim, short unsigned int corder>
int model::SplineSegment< _dim, corder >::pOrder = 2*corder+1
staticconstexpr

Definition at line 84 of file SplineSegment.h.

◆ sinkP

template<short unsigned int _dim, short unsigned int corder>
const VectorDim& model::SplineSegment< _dim, corder >::sinkP

Definition at line 105 of file SplineSegment.h.

◆ sourceP

template<short unsigned int _dim, short unsigned int corder>
const VectorDim& model::SplineSegment< _dim, corder >::sourceP

Definition at line 104 of file SplineSegment.h.


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