Public Member Functions | List of all members
NURBS3DCurve Class Reference

A NURBS 3D curve. More...

Inheritance diagram for NURBS3DCurve:
Inheritance graph
[legend]
Collaboration diagram for NURBS3DCurve:
Collaboration graph
[legend]

Public Member Functions

 NURBS3DCurve (const NURBSbasis &basis, const List< vector > &CPs, const List< scalar > &weights, const scalarField &u, const label nPts, const word name="NURBS3DCurve")
 
 NURBS3DCurve (const NURBSbasis &basis, const List< vector > &CPs, const List< scalar > &weights, const label nPts, const word name="NURBS3DCurve")
 
 NURBS3DCurve (const NURBSbasis &basis, const List< vector > &CPs, const label nPts, const word name="NURBS3DCurve")
 
 NURBS3DCurve (const NURBS3DCurve &)
 
 ~NURBS3DCurve ()=default
 
void setNrm3DOrientation (const vector &givenNrm, const vector &givenTan)
 
void setNrm2DOrientation (const vector &givenNrm, const scalar zVal)
 
void flipNrmOrientation ()
 
void setCPs (const List< vector > &CPs)
 
void setWeights (const List< scalar > &weights)
 
void setName (const word &name)
 
void buildCurve ()
 
void invert ()
 
void insertKnot (const scalarField &oldKnots, const scalar uBar, const label kInsert)
 
void makeEquidistant (const label lenAcc=25, const label maxIter=10, const label spacingCorrInterval=-1, const scalar tolerance=1.e-5)
 
vector curvePoint (const scalar u) const
 
scalar findClosestCurvePoint (const vector &targetPoint, const label maxIter=1000, const scalar tolerance=1.e-13)
 
scalar findClosestCurvePoint (const vector &targetPoint, const scalar initGuess, const label maxIter=1000, const scalar tolerance=1.e-13)
 
const vector nrm3D (const vector &refTan, const scalar u) const
 
const vector nrm2D (const scalar zVal, const scalar u) const
 
scalarList genEquidistant (const label nPts=100, const label lenAcc=25, const label maxIter=10, const label spacingCorrInterval=-1, const scalar tolerance=1.e-5)
 
bool checkRange (const scalar u, const label CPI, const label degree) const
 
bool checkRange (const scalar u, const label CPI) const
 
scalar length (const label uIStart, const label uIEnd) const
 
scalar length (const scalar uStart, const scalar uEnd, const label nPts) const
 
scalar length () const
 
vector curveDerivativeU (const scalar u) const
 
vector curveDerivativeUU (const scalar u) const
 
scalar curveDerivativeCP (const scalar u, const label CPI)
 
vector curveDerivativeWeight (const scalar u, const label CPI)
 
scalar lengthDerivativeU (const scalar uStart, const scalar uEnd, const label nPts)
 
const NURBSbasisgetBasisFunction () const
 
const List< vector > & getCPs () const
 
const List< scalar > & getWeights () const
 
const List< scalar > & getParametricCoordinates () const
 
const wordgetName () const
 
label nrmOrientation () const
 
const vectorgivenInitNrm () const
 
void write ()
 
void write (const word fileName)
 
void write (const fileName dirName, const fileName fileName)
 
void writeWParses ()
 
void writeWParses (const word fileName)
 
void writeWParses (const fileName dirName, const fileName fileName)
 
- Public Member Functions inherited from Field
constexpr Field () noexcept
 
 Field (const label len)
 
 Field (const label len, const Type &val)
 
 Field (const label len, const Foam::zero)
 
 Field (const Foam::one, const Type &val)
 
 Field (const Foam::one, Type &&val)
 
 Field (const Foam::one, const Foam::zero)
 
 Field (const Field< Type > &fld)
 
 Field (const UList< Type > &list)
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 
 Field (Field< Type > &&fld)
 
 Field (List< Type > &&list)
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (Field< Type > &fld, bool reuse)
 
 Field (const tmp< Field< Type >> &tfld)
 
 Field (Istream &is)
 
 Field (const word &keyword, const dictionary &dict, const label len)
 
tmp< Field< Type > > clone () const
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void negate ()
 
tmp< Field< cmptType > > component (const direction) const
 
void replace (const direction, const UList< cmptType > &)
 
void replace (const direction, const tmp< Field< cmptType >> &)
 
void replace (const direction, const cmptType &)
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 
void writeEntry (const word &keyword, Ostream &os) const
 
SubField< Type > slice (const label pos, label len=-1)
 
const SubField< Type > slice (const label pos, label len=-1) const
 
SubField< Type > slice (const labelRange &range)
 
const SubField< Type > slice (const labelRange &range) const
 
void operator= (const Field< Type > &)
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
template<class Addr >
void operator= (const IndirectListBase< Type, Addr > &rhs)
 
void operator= (Field< Type > &&rhs)
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 
void operator= (const Foam::zero)
 
template<class Form , class Cmpt , direction nCmpt>
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator+= (const UList< Type > &)
 
void operator+= (const tmp< Field< Type >> &)
 
void operator-= (const UList< Type > &)
 
void operator-= (const tmp< Field< Type >> &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar >> &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar >> &)
 
void operator+= (const Type &)
 
void operator-= (const Type &)
 
void operator*= (const scalar &)
 
void operator/= (const scalar &)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const word &keyword, const dictionary &dict, const label len)
 
template<class Type >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
constexpr Field () noexcept
 
template<class Type >
 Field (const label len)
 
template<class Type >
 Field (const label len, const Type &val)
 
template<class Type >
 Field (const label len, const Foam::zero)
 
template<class Type >
 Field (const Foam::one, const Type &val)
 
template<class Type >
 Field (const Foam::one, Type &&val)
 
template<class Type >
 Field (const Foam::one, const Foam::zero)
 
template<class Type >
 Field (const Field< Type > &fld)
 
template<class Type >
 Field (const UList< Type > &list)
 
template<class Type >
 Field (Field< Type > &&fld)
 
template<class Type >
 Field (List< Type > &&list)
 
template<class Type >
 Field (Field< Type > &fld, bool reuse)
 
template<class Type >
 Field (const tmp< Field< Type >> &tfld)
 
template<class Type >
 Field (Istream &is)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (Field< Type > &&rhs)
 
template<class Type >
void operator= (List< Type > &&rhs)
 
template<class Type >
void operator= (const Type &val)
 
template<class Type >
void operator= (const Foam::zero)
 

Additional Inherited Members

- Public Types inherited from Field
typedef pTraits< Type >::cmptType cmptType
 
typedef SubField< Type > subField
 
- Static Public Member Functions inherited from Field
static const Field< Type > & null ()
 
static autoPtr< Field< Type > > New (Istream &is)
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 

Detailed Description

A NURBS 3D curve.

Source files

Definition at line 51 of file NURBS3DCurve.H.

Constructor & Destructor Documentation

◆ NURBS3DCurve() [1/4]

NURBS3DCurve ( const NURBSbasis basis,
const List< vector > &  CPs,
const List< scalar > &  weights,
const scalarField u,
const label  nPts,
const word  name = "NURBS3DCurve" 
)

Definition at line 203 of file NURBS3DCurve.C.

◆ NURBS3DCurve() [2/4]

NURBS3DCurve ( const NURBSbasis basis,
const List< vector > &  CPs,
const List< scalar > &  weights,
const label  nPts,
const word  name = "NURBS3DCurve" 
)

Definition at line 229 of file NURBS3DCurve.C.

◆ NURBS3DCurve() [3/4]

NURBS3DCurve ( const NURBSbasis basis,
const List< vector > &  CPs,
const label  nPts,
const word  name = "NURBS3DCurve" 
)

Definition at line 255 of file NURBS3DCurve.C.

◆ NURBS3DCurve() [4/4]

NURBS3DCurve ( const NURBS3DCurve )

◆ ~NURBS3DCurve()

~NURBS3DCurve ( )
default

Member Function Documentation

◆ setNrm3DOrientation()

void setNrm3DOrientation ( const vector givenNrm,
const vector givenTan 
)

Definition at line 284 of file NURBS3DCurve.C.

References Foam::endl(), Foam::Info, Foam::tan(), and Foam::Zero.

Here is the call graph for this function:

◆ setNrm2DOrientation()

void setNrm2DOrientation ( const vector givenNrm,
const scalar  zVal 
)

Definition at line 310 of file NURBS3DCurve.C.

References Foam::endl(), Foam::Info, Foam::tan(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.

Here is the call graph for this function:

◆ flipNrmOrientation()

void flipNrmOrientation ( )

Definition at line 339 of file NURBS3DCurve.C.

◆ setCPs()

void setCPs ( const List< vector > &  CPs)

Definition at line 352 of file NURBS3DCurve.C.

◆ setWeights()

void setWeights ( const List< scalar > &  weights)

Definition at line 358 of file NURBS3DCurve.C.

◆ setName()

void setName ( const word name)

Definition at line 364 of file NURBS3DCurve.C.

References Foam::name().

Here is the call graph for this function:

◆ buildCurve()

void buildCurve ( )

Definition at line 370 of file NURBS3DCurve.C.

References NURBSbasis::basisValue(), NURBSbasis::degree(), forAll, VectorSpace< Vector< scalar >, scalar, 3 >::zero, and Foam::Zero.

Referenced by NURBS3DCurve::invert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invert()

void invert ( )

Definition at line 401 of file NURBS3DCurve.C.

References NURBS3DCurve::buildCurve(), Foam::endl(), Foam::Info, and Foam::Zero.

Here is the call graph for this function:

◆ insertKnot()

void insertKnot ( const scalarField oldKnots,
const scalar  uBar,
const label  kInsert 
)

Definition at line 639 of file NURBS3DCurve.C.

References Foam::Zero.

◆ makeEquidistant()

void makeEquidistant ( const label  lenAcc = 25,
const label  maxIter = 10,
const label  spacingCorrInterval = -1,
const scalar  tolerance = 1.e-5 
)

Definition at line 423 of file NURBS3DCurve.C.

◆ curvePoint()

vector curvePoint ( const scalar  u) const

Definition at line 450 of file NURBS3DCurve.C.

References NURBSbasis::basisValue(), NURBSbasis::degree(), forAll, and Foam::Zero.

Here is the call graph for this function:

◆ findClosestCurvePoint() [1/2]

scalar findClosestCurvePoint ( const vector targetPoint,
const label  maxIter = 1000,
const scalar  tolerance = 1.e-13 
)

Definition at line 477 of file NURBS3DCurve.C.

References Foam::bound(), Foam::endl(), forAll, Foam::mag(), and WarningInFunction.

Here is the call graph for this function:

◆ findClosestCurvePoint() [2/2]

scalar findClosestCurvePoint ( const vector targetPoint,
const scalar  initGuess,
const label  maxIter = 1000,
const scalar  tolerance = 1.e-13 
)

Definition at line 547 of file NURBS3DCurve.C.

References Foam::bound(), Foam::endl(), Foam::mag(), and WarningInFunction.

Here is the call graph for this function:

◆ nrm3D()

const vector nrm3D ( const vector refTan,
const scalar  u 
) const

Definition at line 605 of file NURBS3DCurve.C.

References NURBS3DCurve::curveDerivativeU(), Vector< Cmpt >::normalise(), and Foam::Zero.

Here is the call graph for this function:

◆ nrm2D()

const vector nrm2D ( const scalar  zVal,
const scalar  u 
) const

Definition at line 624 of file NURBS3DCurve.C.

References NURBS3DCurve::curveDerivativeU(), Foam::mag(), Foam::tan(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.

Here is the call graph for this function:

◆ genEquidistant()

scalarList genEquidistant ( const label  nPts = 100,
const label  lenAcc = 25,
const label  maxIter = 10,
const label  spacingCorrInterval = -1,
const scalar  tolerance = 1.e-5 
)

Definition at line 681 of file NURBS3DCurve.C.

References U, and Foam::Zero.

◆ checkRange() [1/2]

bool checkRange ( const scalar  u,
const label  CPI,
const label  degree 
) const

Definition at line 712 of file NURBS3DCurve.C.

◆ checkRange() [2/2]

bool checkRange ( const scalar  u,
const label  CPI 
) const

Definition at line 722 of file NURBS3DCurve.C.

References NURBSbasis::checkRange(), and NURBSbasis::degree().

Here is the call graph for this function:

◆ length() [1/3]

scalar length ( const label  uIStart,
const label  uIEnd 
) const

Definition at line 729 of file NURBS3DCurve.C.

References NURBS3DCurve::curveDerivativeU(), forAll, NURBS3DCurve::length(), Foam::mag(), and Foam::Zero.

Here is the call graph for this function:

◆ length() [2/3]

scalar length ( const scalar  uStart,
const scalar  uEnd,
const label  nPts 
) const

Definition at line 755 of file NURBS3DCurve.C.

References forAll, Foam::mag(), and Foam::Zero.

Here is the call graph for this function:

◆ length() [3/3]

scalar length ( ) const

Definition at line 785 of file NURBS3DCurve.C.

Referenced by NURBS3DCurve::length().

Here is the caller graph for this function:

◆ curveDerivativeU()

vector curveDerivativeU ( const scalar  u) const

Definition at line 793 of file NURBS3DCurve.C.

References NURBSbasis::basisDerivativeU(), NURBSbasis::basisValue(), NURBSbasis::degree(), forAll, and Foam::Zero.

Referenced by NURBS3DCurve::length(), NURBS3DCurve::nrm2D(), and NURBS3DCurve::nrm3D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ curveDerivativeUU()

vector curveDerivativeUU ( const scalar  u) const

Definition at line 818 of file NURBS3DCurve.C.

References NURBSbasis::basisDerivativeU(), NURBSbasis::basisDerivativeUU(), NURBSbasis::basisValue(), NURBSbasis::degree(), forAll, and Foam::Zero.

Here is the call graph for this function:

◆ curveDerivativeCP()

scalar curveDerivativeCP ( const scalar  u,
const label  CPI 
)

Definition at line 857 of file NURBS3DCurve.C.

References forAll, and Foam::Zero.

◆ curveDerivativeWeight()

vector curveDerivativeWeight ( const scalar  u,
const label  CPI 
)

Definition at line 879 of file NURBS3DCurve.C.

References forAll, and Foam::Zero.

◆ lengthDerivativeU()

scalar lengthDerivativeU ( const scalar  uStart,
const scalar  uEnd,
const label  nPts 
)

Definition at line 905 of file NURBS3DCurve.C.

References forAll, Foam::mag(), and Foam::Zero.

Here is the call graph for this function:

◆ getBasisFunction()

const NURBSbasis& getBasisFunction ( ) const
inline

Definition at line 321 of file NURBS3DCurve.H.

◆ getCPs()

const List<vector>& getCPs ( ) const
inline

Definition at line 327 of file NURBS3DCurve.H.

◆ getWeights()

const List<scalar>& getWeights ( ) const
inline

Definition at line 333 of file NURBS3DCurve.H.

◆ getParametricCoordinates()

const List<scalar>& getParametricCoordinates ( ) const
inline

Definition at line 339 of file NURBS3DCurve.H.

◆ getName()

const word& getName ( ) const
inline

Definition at line 345 of file NURBS3DCurve.H.

◆ nrmOrientation()

label nrmOrientation ( ) const
inline

Definition at line 351 of file NURBS3DCurve.H.

◆ givenInitNrm()

const vector& givenInitNrm ( ) const
inline

Definition at line 357 of file NURBS3DCurve.H.

◆ write() [1/3]

void write ( )

Definition at line 947 of file NURBS3DCurve.C.

◆ write() [2/3]

void write ( const word  fileName)

Definition at line 954 of file NURBS3DCurve.C.

References Foam::endl(), field(), forAll, and UPstream::master().

Here is the call graph for this function:

◆ write() [3/3]

void write ( const fileName  dirName,
const fileName  fileName 
)

Definition at line 1003 of file NURBS3DCurve.C.

References Foam::endl(), field(), forAll, and UPstream::master().

Here is the call graph for this function:

◆ writeWParses() [1/3]

void writeWParses ( )

Definition at line 1052 of file NURBS3DCurve.C.

◆ writeWParses() [2/3]

void writeWParses ( const word  fileName)

Definition at line 1059 of file NURBS3DCurve.C.

References Foam::endl(), field(), forAll, and UPstream::master().

Here is the call graph for this function:

◆ writeWParses() [3/3]

void writeWParses ( const fileName  dirName,
const fileName  fileName 
)

Definition at line 1110 of file NURBS3DCurve.C.

References Foam::endl(), field(), forAll, and UPstream::master().

Here is the call graph for this function:

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