MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::NURBSPatch Class Reference

#include <nurbs.hpp>

Collaboration diagram for mfem::NURBSPatch:
[legend]

Public Member Functions

 NURBSPatch (const NURBSPatch &orig)
 
 NURBSPatch (std::istream &input)
 
 NURBSPatch (const KnotVector *kv0, const KnotVector *kv1, int dim_)
 
 NURBSPatch (const KnotVector *kv0, const KnotVector *kv1, const KnotVector *kv2, int dim_)
 
 NURBSPatch (Array< const KnotVector * > &kv, int dim_)
 
NURBSPatchoperator= (const NURBSPatch &)=delete
 
 ~NURBSPatch ()
 
void Print (std::ostream &os) const
 
void DegreeElevate (int dir, int t)
 
void KnotInsert (int dir, const KnotVector &knot)
 Insert knots from knot determined by Difference, in direction dir.
 
void KnotInsert (int dir, const Vector &knot)
 Insert knots from knot, in direction dir.
 
void KnotInsert (Array< Vector * > &knot)
 Insert knots from knot, in each direction.
 
void KnotInsert (Array< KnotVector * > &knot)
 Insert knots from knot determined by Difference, in each direction.
 
int KnotRemove (int dir, real_t knot, int ntimes=1, real_t tol=1.0e-12)
 Remove knot with value knot from direction dir.
 
void KnotRemove (int dir, Vector const &knot, real_t tol=1.0e-12)
 Remove all knots in knot once.
 
void KnotRemove (Array< Vector * > &knot, real_t tol=1.0e-12)
 Remove all knots in knot once, for each direction.
 
void DegreeElevate (int t)
 
void UniformRefinement (int rf=2)
 Refine with optional refinement factor rf. Uniform means refinement is done everywhere by the same factor, although nonuniform spacing functions may be used.
 
void UniformRefinement (Array< int > const &rf)
 
void Coarsen (int cf=2, real_t tol=1.0e-12)
 Coarsen with optional coarsening factor cf which divides the number of elements in each dimension. Nonuniform spacing functions may be used in each direction.
 
void Coarsen (Array< int > const &cf, real_t tol=1.0e-12)
 
void GetCoarseningFactors (Array< int > &f) const
 Calls KnotVector::GetCoarseningFactor for each direction.
 
void SetKnotVectorsCoarse (bool c)
 Marks the KnotVector in each dimension as coarse.
 
int GetNC () const
 
int GetNKV () const
 
KnotVectorGetKV (int i)
 
real_toperator() (int i, int j)
 
const real_toperator() (int i, int j) const
 
real_toperator() (int i, int j, int l)
 
const real_toperator() (int i, int j, int l) const
 
real_toperator() (int i, int j, int k, int l)
 
const real_toperator() (int i, int j, int k, int l) const
 
void FlipDirection (int dir)
 
void SwapDirections (int dir1, int dir2)
 
void Rotate (real_t angle, real_t normal[]=NULL)
 Rotate the NURBSPatch.
 
void Rotate2D (real_t angle)
 
void Rotate3D (real_t normal[], real_t angle)
 
int MakeUniformDegree (int degree=-1)
 

Static Public Member Functions

static void Get2DRotationMatrix (real_t angle, DenseMatrix &T)
 
static void Get3DRotationMatrix (real_t n[], real_t angle, real_t r, DenseMatrix &T)
 

Protected Member Functions

int SetLoopDirection (int dir)
 
real_tslice (int i, int j)
 
const real_tslice (int i, int j) const
 
 NURBSPatch (NURBSPatch *parent, int dir, int Order, int NCP)
 
void swap (NURBSPatch *np)
 
void init (int dim_)
 

Protected Attributes

int ni
 
int nj
 
int nk
 
int Dim
 
real_tdata
 
Array< KnotVector * > kv
 
int nd
 
int ls
 
int sd
 

Friends

NURBSPatchInterpolate (NURBSPatch &p1, NURBSPatch &p2)
 
NURBSPatchRevolve3D (NURBSPatch &patch, real_t n[], real_t ang, int times)
 

Detailed Description

Definition at line 129 of file nurbs.hpp.

Constructor & Destructor Documentation

◆ NURBSPatch() [1/6]

mfem::NURBSPatch::NURBSPatch ( NURBSPatch * parent,
int dir,
int Order,
int NCP )
protected

Definition at line 782 of file nurbs.cpp.

◆ NURBSPatch() [2/6]

mfem::NURBSPatch::NURBSPatch ( const NURBSPatch & orig)

Definition at line 696 of file nurbs.cpp.

◆ NURBSPatch() [3/6]

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

Definition at line 712 of file nurbs.cpp.

◆ NURBSPatch() [4/6]

mfem::NURBSPatch::NURBSPatch ( const KnotVector * kv0,
const KnotVector * kv1,
int dim_ )

Definition at line 754 of file nurbs.cpp.

◆ NURBSPatch() [5/6]

mfem::NURBSPatch::NURBSPatch ( const KnotVector * kv0,
const KnotVector * kv1,
const KnotVector * kv2,
int dim_ )

Definition at line 762 of file nurbs.cpp.

◆ NURBSPatch() [6/6]

mfem::NURBSPatch::NURBSPatch ( Array< const KnotVector * > & kv,
int dim_ )

Definition at line 772 of file nurbs.cpp.

◆ ~NURBSPatch()

mfem::NURBSPatch::~NURBSPatch ( )

Definition at line 823 of file nurbs.cpp.

Member Function Documentation

◆ Coarsen() [1/2]

void mfem::NURBSPatch::Coarsen ( Array< int > const & cf,
real_t tol = 1.0e-12 )

Definition at line 955 of file nurbs.cpp.

◆ Coarsen() [2/2]

void mfem::NURBSPatch::Coarsen ( int cf = 2,
real_t tol = 1.0e-12 )

Coarsen with optional coarsening factor cf which divides the number of elements in each dimension. Nonuniform spacing functions may be used in each direction.

Parameters
[in]cfOptional coarsening factor. If scalar, the factor is used for all dimensions. If an array, factors can be specified for each dimension.
[in]tolNURBS geometry deviation tolerance, cf. Algorithm A5.8 of "The NURBS Book", 2nd ed, Piegl and Tiller.

Definition at line 977 of file nurbs.cpp.

◆ DegreeElevate() [1/2]

void mfem::NURBSPatch::DegreeElevate ( int dir,
int t )

Definition at line 1368 of file nurbs.cpp.

◆ DegreeElevate() [2/2]

void mfem::NURBSPatch::DegreeElevate ( int t)

Definition at line 1359 of file nurbs.cpp.

◆ FlipDirection()

void mfem::NURBSPatch::FlipDirection ( int dir)

Definition at line 1622 of file nurbs.cpp.

◆ Get2DRotationMatrix()

void mfem::NURBSPatch::Get2DRotationMatrix ( real_t angle,
DenseMatrix & T )
static

Definition at line 1676 of file nurbs.cpp.

◆ Get3DRotationMatrix()

void mfem::NURBSPatch::Get3DRotationMatrix ( real_t n[],
real_t angle,
real_t r,
DenseMatrix & T )
static

Definition at line 1714 of file nurbs.cpp.

◆ GetCoarseningFactors()

void mfem::NURBSPatch::GetCoarseningFactors ( Array< int > & f) const

Calls KnotVector::GetCoarseningFactor for each direction.

Definition at line 984 of file nurbs.cpp.

◆ GetKV()

KnotVector * mfem::NURBSPatch::GetKV ( int i)
inline
Note
The returned object should NOT be deleted by the caller.

Definition at line 235 of file nurbs.hpp.

◆ GetNC()

int mfem::NURBSPatch::GetNC ( ) const
inline

Definition at line 232 of file nurbs.hpp.

◆ GetNKV()

int mfem::NURBSPatch::GetNKV ( ) const
inline

Definition at line 233 of file nurbs.hpp.

◆ init()

void mfem::NURBSPatch::init ( int dim_)
protected

Definition at line 640 of file nurbs.cpp.

◆ KnotInsert() [1/4]

void mfem::NURBSPatch::KnotInsert ( Array< KnotVector * > & knot)

Insert knots from knot determined by Difference, in each direction.

Definition at line 993 of file nurbs.cpp.

◆ KnotInsert() [2/4]

void mfem::NURBSPatch::KnotInsert ( Array< Vector * > & knot)

Insert knots from knot, in each direction.

Definition at line 1027 of file nurbs.cpp.

◆ KnotInsert() [3/4]

void mfem::NURBSPatch::KnotInsert ( int dir,
const KnotVector & knot )

Insert knots from knot determined by Difference, in direction dir.

Definition at line 1001 of file nurbs.cpp.

◆ KnotInsert() [4/4]

void mfem::NURBSPatch::KnotInsert ( int dir,
const Vector & knot )

Insert knots from knot, in direction dir.

Definition at line 1053 of file nurbs.cpp.

◆ KnotRemove() [1/3]

void mfem::NURBSPatch::KnotRemove ( Array< Vector * > & knot,
real_t tol = 1.0e-12 )

Remove all knots in knot once, for each direction.

Definition at line 1035 of file nurbs.cpp.

◆ KnotRemove() [2/3]

int mfem::NURBSPatch::KnotRemove ( int dir,
real_t knot,
int ntimes = 1,
real_t tol = 1.0e-12 )

Remove knot with value knot from direction dir.

The optional input parameter ntimes specifies the number of times the knot should be removed, default 1. The knot is removed only if the new curve (in direction dir) deviates from the old curve by less than tol.

Returns
The number of times the knot was successfully removed.

Definition at line 1161 of file nurbs.cpp.

◆ KnotRemove() [3/3]

void mfem::NURBSPatch::KnotRemove ( int dir,
Vector const & knot,
real_t tol = 1.0e-12 )

Remove all knots in knot once.

Definition at line 1043 of file nurbs.cpp.

◆ MakeUniformDegree()

int mfem::NURBSPatch::MakeUniformDegree ( int degree = -1)

Definition at line 1779 of file nurbs.cpp.

◆ operator()() [1/6]

real_t & mfem::NURBSPatch::operator() ( int i,
int j )
inline

Definition at line 709 of file nurbs.hpp.

◆ operator()() [2/6]

const real_t & mfem::NURBSPatch::operator() ( int i,
int j ) const
inline

Definition at line 722 of file nurbs.hpp.

◆ operator()() [3/6]

real_t & mfem::NURBSPatch::operator() ( int i,
int j,
int k,
int l )
inline

Definition at line 761 of file nurbs.hpp.

◆ operator()() [4/6]

const real_t & mfem::NURBSPatch::operator() ( int i,
int j,
int k,
int l ) const
inline

Definition at line 774 of file nurbs.hpp.

◆ operator()() [5/6]

real_t & mfem::NURBSPatch::operator() ( int i,
int j,
int l )
inline

Definition at line 735 of file nurbs.hpp.

◆ operator()() [6/6]

const real_t & mfem::NURBSPatch::operator() ( int i,
int j,
int l ) const
inline

Definition at line 748 of file nurbs.hpp.

◆ operator=()

NURBSPatch & mfem::NURBSPatch::operator= ( const NURBSPatch & )
delete

◆ Print()

void mfem::NURBSPatch::Print ( std::ostream & os) const

Definition at line 836 of file nurbs.cpp.

◆ Rotate()

void mfem::NURBSPatch::Rotate ( real_t angle,
real_t normal[] = NULL )

Rotate the NURBSPatch.

A rotation of a 2D NURBS-patch requires an angle only. Rotating a 3D NURBS-patch requires a normal as well.

Definition at line 1659 of file nurbs.cpp.

◆ Rotate2D()

void mfem::NURBSPatch::Rotate2D ( real_t angle)

Definition at line 1688 of file nurbs.cpp.

◆ Rotate3D()

void mfem::NURBSPatch::Rotate3D ( real_t normal[],
real_t angle )

Definition at line 1753 of file nurbs.cpp.

◆ SetKnotVectorsCoarse()

void mfem::NURBSPatch::SetKnotVectorsCoarse ( bool c)

Marks the KnotVector in each dimension as coarse.

Definition at line 1909 of file nurbs.cpp.

◆ SetLoopDirection()

int mfem::NURBSPatch::SetLoopDirection ( int dir)
protected

Definition at line 860 of file nurbs.cpp.

◆ slice() [1/2]

real_t & mfem::NURBSPatch::slice ( int i,
int j )
inlineprotected

Definition at line 686 of file nurbs.hpp.

◆ slice() [2/2]

const real_t & mfem::NURBSPatch::slice ( int i,
int j ) const
inlineprotected

Definition at line 697 of file nurbs.hpp.

◆ swap()

void mfem::NURBSPatch::swap ( NURBSPatch * np)
protected

Definition at line 797 of file nurbs.cpp.

◆ SwapDirections()

void mfem::NURBSPatch::SwapDirections ( int dir1,
int dir2 )

Definition at line 1634 of file nurbs.cpp.

◆ UniformRefinement() [1/2]

void mfem::NURBSPatch::UniformRefinement ( Array< int > const & rf)

Definition at line 935 of file nurbs.cpp.

◆ UniformRefinement() [2/2]

void mfem::NURBSPatch::UniformRefinement ( int rf = 2)

Refine with optional refinement factor rf. Uniform means refinement is done everywhere by the same factor, although nonuniform spacing functions may be used.

Parameters
[in]rfOptional refinement factor. If scalar, the factor is used for all dimensions. If an array, factors can be specified for each dimension.

Definition at line 948 of file nurbs.cpp.

Friends And Related Symbol Documentation

◆ Interpolate

NURBSPatch * Interpolate ( NURBSPatch & p1,
NURBSPatch & p2 )
friend
Note
The returned object should be deleted by the caller.

Definition at line 1802 of file nurbs.cpp.

◆ Revolve3D

NURBSPatch * Revolve3D ( NURBSPatch & patch,
real_t n[],
real_t ang,
int times )
friend
Note
The returned object should be deleted by the caller.

Definition at line 1849 of file nurbs.cpp.

Member Data Documentation

◆ data

real_t* mfem::NURBSPatch::data
protected

Definition at line 133 of file nurbs.hpp.

◆ Dim

int mfem::NURBSPatch::Dim
protected

Definition at line 132 of file nurbs.hpp.

◆ kv

Array<KnotVector *> mfem::NURBSPatch::kv
protected

Definition at line 136 of file nurbs.hpp.

◆ ls

int mfem::NURBSPatch::ls
protected

Definition at line 150 of file nurbs.hpp.

◆ nd

int mfem::NURBSPatch::nd
protected

Definition at line 149 of file nurbs.hpp.

◆ ni

int mfem::NURBSPatch::ni
protected

Definition at line 132 of file nurbs.hpp.

◆ nj

int mfem::NURBSPatch::nj
protected

Definition at line 132 of file nurbs.hpp.

◆ nk

int mfem::NURBSPatch::nk
protected

Definition at line 132 of file nurbs.hpp.

◆ sd

int mfem::NURBSPatch::sd
protected

Definition at line 151 of file nurbs.hpp.


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