MFEM v2.0
Public Member Functions | Protected Attributes | Static Protected Attributes
KnotVector Class Reference

#include <nurbs.hpp>

Collaboration diagram for KnotVector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 KnotVector ()
 Create KnotVector.
 KnotVector (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.
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)
void CalcDShape (Vector &grad, int i, double xi)
void Difference (const KnotVector &kv, Vector &diff) const
void UniformRefinement (Vector &newknots) const
KnotVectorDegreeElevate (int t) const
void Flip ()
void Print (ostream &out) const
 ~KnotVector ()
 Destroys KnotVector.
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 15 of file nurbs.hpp.


Constructor & Destructor Documentation

KnotVector::KnotVector ( ) [inline]

Create KnotVector.

Definition at line 25 of file nurbs.hpp.

Referenced by DegreeElevate().

KnotVector::KnotVector ( istream &  input)

Definition at line 17 of file nurbs.cpp.

References GetElements(), knot, Vector::Load(), NumOfControlPoints, and Order.

KnotVector::KnotVector ( int  Order_,
int  NCP 
)

Definition at line 24 of file nurbs.cpp.

References knot, NumOfControlPoints, Order, and Vector::SetSize().

KnotVector::KnotVector ( const KnotVector kv) [inline]

Definition at line 28 of file nurbs.hpp.

KnotVector::~KnotVector ( ) [inline]

Destroys KnotVector.

Definition at line 62 of file nurbs.hpp.


Member Function Documentation

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

Definition at line 147 of file nurbs.cpp.

References getKnotLocation(), knot, MaxOrder, mfem_error(), and Order.

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

Definition at line 118 of file nurbs.cpp.

References getKnotLocation(), knot, MaxOrder, mfem_error(), and Order.

KnotVector * KnotVector::DegreeElevate ( int  t) const

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

Definition at line 45 of file nurbs.cpp.

References GetElements(), GetNCP(), knot, KnotVector(), mfem_error(), Order, and Vector::Size().

Referenced by NURBSExtension::NURBSExtension().

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

Definition at line 226 of file nurbs.cpp.

References Difference(), GetOrder(), knot, mfem_error(), Order, Vector::SetSize(), and Size().

Referenced by Difference(), and NURBSPatch::KnotInsert().

int KnotVector::findKnotSpan ( double  u) const

Definition at line 197 of file nurbs.cpp.

References knot, NumOfControlPoints, and Order.

Referenced by NURBSPatch::KnotInsert().

void KnotVector::Flip ( )

Definition at line 98 of file nurbs.cpp.

References knot, NumOfControlPoints, Order, and Vector::Size().

void KnotVector::GetElements ( )

Count the number of elements.

Definition at line 86 of file nurbs.cpp.

References knot, NumOfControlPoints, NumOfElements, and Order.

Referenced by NURBSPatch::DegreeElevate(), DegreeElevate(), Interpolate(), NURBSPatch::KnotInsert(), KnotVector(), and Revolve3D().

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

Definition at line 43 of file nurbs.hpp.

References knot.

Referenced by CalcDShape(), and CalcShape().

int KnotVector::GetNCP ( ) const [inline]
int KnotVector::GetNE ( ) const [inline]
int KnotVector::GetNKS ( ) const [inline]
int KnotVector::GetOrder ( ) const [inline]

Definition at line 35 of file nurbs.hpp.

References Order.

Referenced by NURBSPatch::DegreeElevate(), Difference(), and NURBSPatch::KnotInsert().

bool KnotVector::isElement ( int  i) const [inline]

Definition at line 41 of file nurbs.hpp.

References knot, and Order.

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

Definition at line 33 of file nurbs.cpp.

References knot, NumOfControlPoints, NumOfElements, and Order.

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

Definition at line 65 of file nurbs.hpp.

References knot.

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

Definition at line 64 of file nurbs.hpp.

References knot.

void KnotVector::Print ( ostream &  out) const

Definition at line 111 of file nurbs.cpp.

References knot, NumOfControlPoints, Order, Vector::Print(), and Vector::Size().

int KnotVector::Size ( ) const [inline]

Definition at line 36 of file nurbs.hpp.

References knot, and Vector::Size().

Referenced by Difference().

void KnotVector::UniformRefinement ( Vector newknots) const

Definition at line 72 of file nurbs.cpp.

References knot, NumOfElements, Vector::SetSize(), and Vector::Size().


Member Data Documentation

Vector KnotVector::knot [protected]
const int KnotVector::MaxOrder = 10 [static, protected]

Definition at line 18 of file nurbs.hpp.

Referenced by CalcDShape(), and CalcShape().

Definition at line 21 of file nurbs.hpp.

Referenced by findKnotSpan(), Flip(), GetElements(), GetNCP(), GetNKS(), KnotVector(), operator=(), and Print().

int KnotVector::NumOfElements [protected]

Definition at line 21 of file nurbs.hpp.

Referenced by GetElements(), GetNE(), operator=(), and UniformRefinement().

int KnotVector::Order [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines