KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | List of all members
Kratos::SplineCurveUtilities Class Reference

Short class definition. More...

#include <spline_curve_utilities.hpp>

Collaboration diagram for Kratos::SplineCurveUtilities:

Classes

struct  SplineType
 

Public Types

Type Definitions
typedef ModelPart::NodesContainerType NodesContainerType
 
typedef array_1d< double, 3 > PointType
 
typedef Node NodeType
 
typedef NodeType::Pointer NodePointerType
 
typedef std::vector< NodePointerTypeNodePointerTypeVector
 
typedef std::vector< NodeTypeNodeTypeVector
 
typedef NodePointerTypeVector::iterator NodePointerIterator
 
typedef std::vector< doubleDistanceVector
 
typedef std::vector< double >::iterator DistanceIterator
 
typedef Bucket< 3, NodeType, NodePointerTypeVector, NodePointerType, NodePointerIterator, DistanceIteratorBucketType
 
typedef Tree< KDTreePartition< BucketType > > KdtreeType
 

Public Member Functions

Life Cycle
 SplineCurveUtilities ()
 Default constructor. More...
 
 SplineCurveUtilities (bool Parallel)
 
 ~SplineCurveUtilities ()
 Destructor. More...
 

Operations

void CreateParametrizedCurve (NodePointerTypeVector &rGeneratrixPoints, NodePointerTypeVector &rKnotsList, int m)
 
double AdaptiveIntegration (SplineType &rSpline)
 
double IntegrateSubInterval (SplineType &rSpline, int n=0)
 
double ArchLengthGeometricIntegration (SplineType &rSpline, double &a, double &b)
 
double SimpsonRuleIntegration (SplineType &rSpline, double &a, double &b, double n=1)
 
double SplineGeometricLength (SplineType &rSpline, double &t)
 
void SetSpline (SplineType &rOutputSpline, const SplineType &rInputSpline)
 
void SetSpline (SplineType &rSpline, const PointType &P0, const PointType &P1, const PointType &P2, const PointType &P3)
 
void SetSpline (SplineType &rSpline, const NodePointerTypeVector &rKnotsList, int &id)
 
PointTypeCalculatePointProjection (const PointType &rPoint, KdtreeType &rKnotsKdtree, const NodePointerTypeVector &rKnotsList, PointType &rPointProjection)
 
int GetClosestKnotId (const PointType &rPoint, KdtreeType &rKnotsKdtree, double &rPointDistance)
 
double CombinedMethod (const PointType &rPoint, const NodePointerTypeVector &rKnotsList, SplineType &rSpline, double s=0.5)
 
double NewtonsMethod (const PointType &rPoint, const NodePointerTypeVector &rKnotsList, SplineType &rSpline, double Spredict=0, double iters=20, double s=0.5)
 
double QuadraticMinimizationMethod (const PointType &rPoint, const NodePointerTypeVector &rKnotsList, SplineType &rSpline, double iters, double s=0.5)
 
double EvaluateDistancePolynomial (const Vector &rFunction, const Vector &rEstimates, double &Sk)
 
VectorCalculateArchLengthDifferences (Vector &rDifference, const Vector &rEstimates)
 
VectorCalculateSquareArchLengthDifferences (Vector &rSquareDifference, const Vector &rEstimates)
 
VectorCalculateDistancePolynomialBasis (Vector &rPolynomialBasis, const Vector &rEstimates, double &rValue)
 
double SquareDistancePointToSpline (const PointType &rPoint, const SplineType &rSpline, double &t)
 
double FirstDerivativeSquareDistancePointToSpline (const PointType &rPoint, const SplineType &rSpline, double &t)
 
double SecondDerivativeSquareDistancePointToSpline (const PointType &rPoint, const SplineType &rSpline, double &t)
 
PointTypePointOnCurve (PointType &rPoint, const SplineType &rSpline, double &t, double s=0.5)
 
PointType PointOnCurveFirstDerivative (const SplineType &rSpline, double &t, double s=0.5)
 
PointType PointOnCurveSecondDerivative (const SplineType &rSpline, double &t, double s=0.5)
 
static std::vector< Vector > & SplineCoefficients (const SplineType &rSpline, std::vector< Vector > &rCoefficients, double s=0.5)
 
static VectorSplineBasis (Vector &Basis, double &t, double s=0.5)
 
static VectorFirstDerivativeSplineBasis (Vector &Basis, double &t, double s=0.5)
 
static VectorSecondDerivativeSplineBasis (Vector &Basis, double &t, double s=0.5)
 

Detailed Description

Short class definition.

Computes the energy

Member Typedef Documentation

◆ BucketType

◆ DistanceIterator

◆ DistanceVector

◆ KdtreeType

◆ NodePointerIterator

typedef NodePointerTypeVector::iterator Kratos::SplineCurveUtilities::NodePointerIterator

◆ NodePointerType

◆ NodePointerTypeVector

◆ NodesContainerType

◆ NodeType

◆ NodeTypeVector

◆ PointType

Constructor & Destructor Documentation

◆ SplineCurveUtilities() [1/2]

Kratos::SplineCurveUtilities::SplineCurveUtilities ( )
inline

Default constructor.

◆ SplineCurveUtilities() [2/2]

Kratos::SplineCurveUtilities::SplineCurveUtilities ( bool  Parallel)
inline

◆ ~SplineCurveUtilities()

Kratos::SplineCurveUtilities::~SplineCurveUtilities ( )
inline

Destructor.

Member Function Documentation

◆ AdaptiveIntegration()

double Kratos::SplineCurveUtilities::AdaptiveIntegration ( SplineType rSpline)
inline

◆ ArchLengthGeometricIntegration()

double Kratos::SplineCurveUtilities::ArchLengthGeometricIntegration ( SplineType rSpline,
double a,
double b 
)
inline

◆ CalculateArchLengthDifferences()

Vector& Kratos::SplineCurveUtilities::CalculateArchLengthDifferences ( Vector rDifference,
const Vector rEstimates 
)
inline

◆ CalculateDistancePolynomialBasis()

Vector& Kratos::SplineCurveUtilities::CalculateDistancePolynomialBasis ( Vector rPolynomialBasis,
const Vector rEstimates,
double rValue 
)
inline

◆ CalculatePointProjection()

PointType& Kratos::SplineCurveUtilities::CalculatePointProjection ( const PointType rPoint,
KdtreeType rKnotsKdtree,
const NodePointerTypeVector rKnotsList,
PointType rPointProjection 
)
inline

◆ CalculateSquareArchLengthDifferences()

Vector& Kratos::SplineCurveUtilities::CalculateSquareArchLengthDifferences ( Vector rSquareDifference,
const Vector rEstimates 
)
inline

◆ CombinedMethod()

double Kratos::SplineCurveUtilities::CombinedMethod ( const PointType rPoint,
const NodePointerTypeVector rKnotsList,
SplineType rSpline,
double  s = 0.5 
)
inline

◆ CreateParametrizedCurve()

void Kratos::SplineCurveUtilities::CreateParametrizedCurve ( NodePointerTypeVector rGeneratrixPoints,
NodePointerTypeVector rKnotsList,
int  m 
)
inline

◆ EvaluateDistancePolynomial()

double Kratos::SplineCurveUtilities::EvaluateDistancePolynomial ( const Vector rFunction,
const Vector rEstimates,
double Sk 
)
inline

◆ FirstDerivativeSplineBasis()

static Vector& Kratos::SplineCurveUtilities::FirstDerivativeSplineBasis ( Vector Basis,
double t,
double  s = 0.5 
)
inlinestatic

Return the cubic basis for a Catmull-Rom spline first derivative set a normalized distance t, and the spline parameter s

◆ FirstDerivativeSquareDistancePointToSpline()

double Kratos::SplineCurveUtilities::FirstDerivativeSquareDistancePointToSpline ( const PointType rPoint,
const SplineType rSpline,
double t 
)
inline

◆ GetClosestKnotId()

int Kratos::SplineCurveUtilities::GetClosestKnotId ( const PointType rPoint,
KdtreeType rKnotsKdtree,
double rPointDistance 
)
inline

◆ IntegrateSubInterval()

double Kratos::SplineCurveUtilities::IntegrateSubInterval ( SplineType rSpline,
int  n = 0 
)
inline

◆ NewtonsMethod()

double Kratos::SplineCurveUtilities::NewtonsMethod ( const PointType rPoint,
const NodePointerTypeVector rKnotsList,
SplineType rSpline,
double  Spredict = 0,
double  iters = 20,
double  s = 0.5 
)
inline

◆ PointOnCurve()

PointType& Kratos::SplineCurveUtilities::PointOnCurve ( PointType rPoint,
const SplineType rSpline,
double t,
double  s = 0.5 
)
inline

Return a point on the curve between P1 and P2 with P0 and P3 describing curvature, at the normalized distance t, and the spline parameter s

◆ PointOnCurveFirstDerivative()

PointType Kratos::SplineCurveUtilities::PointOnCurveFirstDerivative ( const SplineType rSpline,
double t,
double  s = 0.5 
)
inline

Return a point on the curve between P1 and P2 with P0 and P3 describing curvature, at the normalized distance t, and the spline parameter s

◆ PointOnCurveSecondDerivative()

PointType Kratos::SplineCurveUtilities::PointOnCurveSecondDerivative ( const SplineType rSpline,
double t,
double  s = 0.5 
)
inline

Return a point on the curve between P1 and P2 with P0 and P3 describing curvature, at the normalized distance t, and the spline parameter s

◆ QuadraticMinimizationMethod()

double Kratos::SplineCurveUtilities::QuadraticMinimizationMethod ( const PointType rPoint,
const NodePointerTypeVector rKnotsList,
SplineType rSpline,
double  iters,
double  s = 0.5 
)
inline

◆ SecondDerivativeSplineBasis()

static Vector& Kratos::SplineCurveUtilities::SecondDerivativeSplineBasis ( Vector Basis,
double t,
double  s = 0.5 
)
inlinestatic

Return the cubic basis for a Catmull-Rom spline second derivative set a normalized distance t, and the spline parameter s

◆ SecondDerivativeSquareDistancePointToSpline()

double Kratos::SplineCurveUtilities::SecondDerivativeSquareDistancePointToSpline ( const PointType rPoint,
const SplineType rSpline,
double t 
)
inline

◆ SetSpline() [1/3]

void Kratos::SplineCurveUtilities::SetSpline ( SplineType rOutputSpline,
const SplineType rInputSpline 
)
inline

◆ SetSpline() [2/3]

void Kratos::SplineCurveUtilities::SetSpline ( SplineType rSpline,
const NodePointerTypeVector rKnotsList,
int id 
)
inline

◆ SetSpline() [3/3]

void Kratos::SplineCurveUtilities::SetSpline ( SplineType rSpline,
const PointType P0,
const PointType P1,
const PointType P2,
const PointType P3 
)
inline

◆ SimpsonRuleIntegration()

double Kratos::SplineCurveUtilities::SimpsonRuleIntegration ( SplineType rSpline,
double a,
double b,
double  n = 1 
)
inline

◆ SplineBasis()

static Vector& Kratos::SplineCurveUtilities::SplineBasis ( Vector Basis,
double t,
double  s = 0.5 
)
inlinestatic

Return the cubic basis for a Catmull-Rom spline set a normalized distance t, and the spline parameter s

◆ SplineCoefficients()

static std::vector<Vector>& Kratos::SplineCurveUtilities::SplineCoefficients ( const SplineType rSpline,
std::vector< Vector > &  rCoefficients,
double  s = 0.5 
)
inlinestatic

Return the cubic basis for a Catmull-Rom spline set spline general coefficients for a given segment

◆ SplineGeometricLength()

double Kratos::SplineCurveUtilities::SplineGeometricLength ( SplineType rSpline,
double t 
)
inline

◆ SquareDistancePointToSpline()

double Kratos::SplineCurveUtilities::SquareDistancePointToSpline ( const PointType rPoint,
const SplineType rSpline,
double t 
)
inline

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