MFEM  v4.6.0 Finite element discretization library
mfem::KnotVector Class Reference

#include <nurbs.hpp>

Collaboration diagram for mfem::KnotVector:
[legend]

## Public Member Functions

KnotVector ()
Create KnotVector. More...

KnotVector (std::istream &input)

KnotVector (int Order_, int NCP)

KnotVector (const KnotVector &kv)

KnotVectoroperator= (const KnotVector &kv)

int GetNE () const

int GetNKS () const

int GetNCP () const

int GetOrder () const

int Size () const

void GetElements ()
Count the number of elements. More...

bool isElement (int i) const

double getKnotLocation (double xi, int ni) const

int findKnotSpan (double u) const

void CalcShape (Vector &shape, int i, double xi) const

void CalcDShape (Vector &grad, int i, double xi) const

void CalcDnShape (Vector &gradn, int n, int i, double xi) const

void CalcD2Shape (Vector &grad2, int i, double xi) const

void FindMaxima (Array< int > &ks, Vector &xi, Vector &u)

void FindInterpolant (Array< Vector *> &x)

void Difference (const KnotVector &kv, Vector &diff) const

void UniformRefinement (Vector &newknots) const

KnotVectorDegreeElevate (int t) const

void Flip ()

void Print (std::ostream &out) const

void PrintFunctions (std::ostream &out, int samples=11) const

~KnotVector ()
Destroys KnotVector. More...

double & operator[] (int i)

const double & operator[] (int i) const

## Protected Attributes

Vector knot

int Order

int NumOfControlPoints

int NumOfElements

## Static Protected Attributes

static const int MaxOrder = 10

## Detailed Description

Definition at line 32 of file nurbs.hpp.

## ◆ KnotVector() [1/4]

 mfem::KnotVector::KnotVector ( )
inline

Create KnotVector.

Definition at line 42 of file nurbs.hpp.

## ◆ KnotVector() [2/4]

 mfem::KnotVector::KnotVector ( std::istream & input )

Definition at line 30 of file nurbs.cpp.

## ◆ KnotVector() [3/4]

 mfem::KnotVector::KnotVector ( int Order_, int NCP )

Definition at line 37 of file nurbs.cpp.

## ◆ KnotVector() [4/4]

 mfem::KnotVector::KnotVector ( const KnotVector & kv )
inline

Definition at line 45 of file nurbs.hpp.

## ◆ ~KnotVector()

 mfem::KnotVector::~KnotVector ( )
inline

Destroys KnotVector.

Definition at line 94 of file nurbs.hpp.

## ◆ CalcD2Shape()

 void mfem::KnotVector::CalcD2Shape ( Vector & grad2, int i, double xi ) const
inline

Definition at line 68 of file nurbs.hpp.

## ◆ CalcDnShape()

 void mfem::KnotVector::CalcDnShape ( Vector & gradn, int n, int i, double xi ) const

Definition at line 245 of file nurbs.cpp.

## ◆ CalcDShape()

 void mfem::KnotVector::CalcDShape ( Vector & grad, int i, double xi ) const

Definition at line 188 of file nurbs.cpp.

## ◆ CalcShape()

 void mfem::KnotVector::CalcShape ( Vector & shape, int i, double xi ) const

Definition at line 161 of file nurbs.cpp.

## ◆ DegreeElevate()

 KnotVector * mfem::KnotVector::DegreeElevate ( int t ) const

Return a new KnotVector with elevated degree by repeating the endpoints of the knot vector.

Note
The returned object should be deleted by the caller.

Definition at line 58 of file nurbs.cpp.

## ◆ Difference()

 void mfem::KnotVector::Difference ( const KnotVector & kv, Vector & diff ) const

Definition at line 471 of file nurbs.cpp.

## ◆ FindInterpolant()

 void mfem::KnotVector::FindInterpolant ( Array< Vector *> & x )

Global curve interpolation through the points x. x is an array with the length of the spatial dimension containing vectors with spatial coordinates. The controlpoints of the interpolated curve are given in x in the same form.

Definition at line 409 of file nurbs.cpp.

## ◆ findKnotSpan()

 int mfem::KnotVector::findKnotSpan ( double u ) const

Definition at line 442 of file nurbs.cpp.

## ◆ FindMaxima()

 void mfem::KnotVector::FindMaxima ( Array< int > & ks, Vector & xi, Vector & u )

Gives the locations of the maxima of the knotvector in reference space. The function gives the knotspan ks, the coordinate in the knotspan xi and the coordinate of the maximum in parameter space u

Definition at line 346 of file nurbs.cpp.

## ◆ Flip()

 void mfem::KnotVector::Flip ( )

Definition at line 113 of file nurbs.cpp.

## ◆ GetElements()

 void mfem::KnotVector::GetElements ( )

Count the number of elements.

Definition at line 101 of file nurbs.cpp.

## ◆ getKnotLocation()

 double mfem::KnotVector::getKnotLocation ( double xi, int ni ) const
inline

Definition at line 60 of file nurbs.hpp.

## ◆ GetNCP()

 int mfem::KnotVector::GetNCP ( ) const
inline

Definition at line 51 of file nurbs.hpp.

## ◆ GetNE()

 int mfem::KnotVector::GetNE ( ) const
inline

Definition at line 49 of file nurbs.hpp.

## ◆ GetNKS()

 int mfem::KnotVector::GetNKS ( ) const
inline

Definition at line 50 of file nurbs.hpp.

## ◆ GetOrder()

 int mfem::KnotVector::GetOrder ( ) const
inline

Definition at line 52 of file nurbs.hpp.

## ◆ isElement()

 bool mfem::KnotVector::isElement ( int i ) const
inline

Definition at line 58 of file nurbs.hpp.

## ◆ operator=()

 KnotVector & mfem::KnotVector::operator= ( const KnotVector & kv )

Definition at line 46 of file nurbs.cpp.

## ◆ operator[]() [1/2]

 double& mfem::KnotVector::operator[] ( int i )
inline

Definition at line 96 of file nurbs.hpp.

## ◆ operator[]() [2/2]

 const double& mfem::KnotVector::operator[] ( int i ) const
inline

Definition at line 97 of file nurbs.hpp.

## ◆ Print()

 void mfem::KnotVector::Print ( std::ostream & out ) const

Definition at line 126 of file nurbs.cpp.

## ◆ PrintFunctions()

 void mfem::KnotVector::PrintFunctions ( std::ostream & out, int samples = 11 ) const

Definition at line 133 of file nurbs.cpp.

## ◆ Size()

 int mfem::KnotVector::Size ( ) const
inline

Definition at line 53 of file nurbs.hpp.

## ◆ UniformRefinement()

 void mfem::KnotVector::UniformRefinement ( Vector & newknots ) const

Definition at line 87 of file nurbs.cpp.

## ◆ knot

 Vector mfem::KnotVector::knot
protected

Definition at line 37 of file nurbs.hpp.

## ◆ MaxOrder

 const int mfem::KnotVector::MaxOrder = 10
staticprotected

Definition at line 35 of file nurbs.hpp.

## ◆ NumOfControlPoints

 int mfem::KnotVector::NumOfControlPoints
protected

Definition at line 38 of file nurbs.hpp.

## ◆ NumOfElements

 int mfem::KnotVector::NumOfElements
protected

Definition at line 38 of file nurbs.hpp.

## ◆ Order

 int mfem::KnotVector::Order
protected

Definition at line 38 of file nurbs.hpp.

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