IFEM  90A354
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
ASM3D Class Referenceabstract

Abstract interface for 3D spline patches. More...

#include <ASM3D.h>

Inheritance diagram for ASM3D:
Inheritance graph
[legend]

Public Types

typedef std::vector< unsigned char > CharVec
 Convenience type.
 

Public Member Functions

virtual ~ASM3D ()
 Empty destructor.
 
ASMbaseclone (const CharVec &nf=CharVec()) const
 Returns a copy of this patch with identical FE discretization. More...
 
virtual bool checkRightHandSystem ()
 Checks that the patch is modelled in a right-hand-side system.
 
virtual bool uniformRefine (int dir, int nInsert)=0
 Refines the parametrization by inserting extra knots uniformly. More...
 
virtual bool raiseOrder (int ru, int rv, int rw, bool setOrder=false)=0
 Raises the order of the spline object for this patch. More...
 
virtual bool refine (int dir, const std::vector< double > &xi)=0
 Refines the parametrization by inserting extra knots. More...
 
virtual void constrainFace (int dir, bool open, int dof, int code=0, char basis=1)=0
 Constrains all DOFs on a given boundary face. More...
 
virtual size_t constrainFaceLocal (int dir, bool open, int dof, int code=0, bool project=false, char T1='\0')=0
 Constrains all DOFs in local directions on a given boundary face. More...
 
virtual void constrainEdge (int lEdge, bool open, int dof, int code=0, char basis=1)=0
 Constrains all DOFs on a given boundary edge. More...
 
virtual void constrainLine (int fdir, int ldir, double xi, int dof=123, int code=0, char basis=1)=0
 Constrains all DOFs along a line on a given boundary face. More...
 
virtual void constrainCorner (int I, int J, int K, int dof=123, int code=0, char basis=1)=0
 Constrains a corner node identified by the three parameter indices. More...
 
virtual void constrainNode (double xi, double eta, double zeta, int dof=123, int code=0)=0
 Constrains a node identified by three relative parameter values. More...
 
virtual bool getGridParameters (std::vector< double > &prm, int dir, int nSegSpan) const =0
 Calculates parameter values for visualization nodal points. More...
 
virtual int getCorner (int I, int J, int K, int basis) const =0
 Returns the node index for a given corner.
 
virtual bool connectPatch (int face, ASM3D &neighbor, int nface, int norient, int=0, bool coordCheck=true, int thick=1)=0
 Connects all matching nodes on two adjacent boundary faces. More...
 

Static Public Member Functions

static ASMbasecreate (ASM::Discretization type, const CharVec &nf, bool mixedFEM=false)
 Creates a three-parametric patch of specified discretization type. More...
 
static ASMbasecreate (ASM::Discretization type, unsigned char nf=1)
 Creates a three-parametric patch of specified discretization type. More...
 

Protected Member Functions

 ASM3D ()
 The constructor is protected to allow objects of sub-classes only.
 

Static Protected Member Functions

static double getElementSize (const std::vector< Vec3 > &XC)
 Returns characteristic element size based on corner coordinates.
 

Detailed Description

Abstract interface for 3D spline patches.

This class contains an interface to methods common for structured and unstructured 3D patches, such that these methods can be invoked without the need to type-cast the patch object to the actual class type.

Member Function Documentation

◆ clone()

ASMbase * ASM3D::clone ( const CharVec nf = CharVec()) const

Returns a copy of this patch with identical FE discretization.

Parameters
[in]nfNumber of unknown per basis function in the patch
Note
The copied patch shares the FE data structures with the copy, in order to save memory. Thus, the copy cannot be read from file, refined, or changed in other ways that affect the FE geometry and/or topology. The other properties of the patch (boundary conditions, constraints, loads, etc.) are however not copied.

Referenced by SIM3D::clonePatches(), and ASMbase::cloneUnShared().

◆ connectPatch()

virtual bool ASM3D::connectPatch ( int  face,
ASM3D neighbor,
int  nface,
int  norient,
int  = 0,
bool  coordCheck = true,
int  thick = 1 
)
pure virtual

Connects all matching nodes on two adjacent boundary faces.

Parameters
[in]faceLocal face index of this patch, in range [1,6]
neighborThe neighbor patch
[in]nfaceLocal face index of neighbor patch, in range [1,6]
[in]norientRelative face orientation flag (see below)
[in]coordCheckFalse to disable coordinate checks (periodic connections)
[in]thickThickness of connection

The face orientation flag norient must be in range [0,7]. When interpreted as a binary number, its 3 digits are decoded as follows:

  • left digit = 1: The u and v parameters of the neighbor face are swapped
  • middle digit = 1: Parameter u in neighbor patch face is reversed
  • right digit = 1: Parameter v in neighbor patch face is reversed

Implemented in ASMu3D, ASMs3D, ASMs3DmxLag, and ASMs3Dmx.

Referenced by SIM3D::connectPatches().

◆ constrainCorner()

virtual void ASM3D::constrainCorner ( int  I,
int  J,
int  K,
int  dof = 123,
int  code = 0,
char  basis = 1 
)
pure virtual

Constrains a corner node identified by the three parameter indices.

Parameters
[in]IParameter index in u-direction
[in]JParameter index in v-direction
[in]KParameter index in w-direction
[in]dofWhich DOFs to constrain at the node
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain corner for

The sign of the three indices is used to define whether we want the node at the beginning or the end of that parameter direction. The magnitude of the indices are not used.

Implemented in ASMu3D, and ASMs3D.

Referenced by SIM3D::addConstraint().

◆ constrainEdge()

virtual void ASM3D::constrainEdge ( int  lEdge,
bool  open,
int  dof,
int  code = 0,
char  basis = 1 
)
pure virtual

Constrains all DOFs on a given boundary edge.

Parameters
[in]lEdgeLocal index [1,12] of the edge to constrain
[in]openIf true, exclude the end points of the edge
[in]dofWhich DOFs to constrain at each node on the edge
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain edge for

Implemented in ASMu3D, ASMs3DLag, and ASMs3D.

Referenced by SIM3D::addConstraint().

◆ constrainFace()

virtual void ASM3D::constrainFace ( int  dir,
bool  open,
int  dof,
int  code = 0,
char  basis = 1 
)
pure virtual

Constrains all DOFs on a given boundary face.

Parameters
[in]dirParameter direction defining the face to constrain
[in]openIf true, exclude all points along the face boundary
[in]dofWhich DOFs to constrain at each node on the face
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain face for

Implemented in ASMu3D, ASMs3DLag, and ASMs3D.

Referenced by SIM3D::addConstraint().

◆ constrainFaceLocal()

virtual size_t ASM3D::constrainFaceLocal ( int  dir,
bool  open,
int  dof,
int  code = 0,
bool  project = false,
char  T1 = '\0' 
)
pure virtual

Constrains all DOFs in local directions on a given boundary face.

Parameters
[in]dirParameter direction defining the face to constrain
[in]openIf true, exclude all points along the face boundary
[in]dofWhich local DOFs to constrain at each node on the face
[in]codeInhomogeneous dirichlet condition code
[in]projectIf true, the local axis directions are projected
[in]T1Desired global direction of first local tangent direction
Returns
Number of additional nodes added due to local axis constraints

Implemented in ASMu3D, and ASMs3D.

Referenced by SIM3D::addConstraint().

◆ constrainLine()

virtual void ASM3D::constrainLine ( int  fdir,
int  ldir,
double  xi,
int  dof = 123,
int  code = 0,
char  basis = 1 
)
pure virtual

Constrains all DOFs along a line on a given boundary face.

Parameters
[in]fdirParameter direction defining the face to constrain
[in]ldirParameter direction defining the line to constrain
[in]xiParameter value defining the line to constrain
[in]dofWhich DOFs to constrain at each node along the line
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain line for

The parameter xi has to be in the domain [0.0,1.0], where 0.0 means the beginning of the domain and 1.0 means the end. The line to constrain goes along the parameter direction ldir in the face with with normal in parameter direction fdir, and positioned along the third parameter direction as indicated by xi. The actual value of xi is converted to the integer value closest to xi*n, where n is the number of nodes (control points) in that parameter direction.

Implemented in ASMu3D, and ASMs3D.

◆ constrainNode()

virtual void ASM3D::constrainNode ( double  xi,
double  eta,
double  zeta,
int  dof = 123,
int  code = 0 
)
pure virtual

Constrains a node identified by three relative parameter values.

Parameters
[in]xiParameter in u-direction
[in]etaParameter in v-direction
[in]zetaParameter in w-direction
[in]dofWhich DOFs to constrain at the node
[in]codeInhomogeneous dirichlet condition code

The parameter values have to be in the domain [0.0,1.0], where 0.0 means the beginning of the domain and 1.0 means the end. For values in between, the actual index is taken as the integer value closest to r*n, where r denotes the given relative parameter value, and n is the number of nodes along that parameter direction.

Implemented in ASMu3D, and ASMs3D.

Referenced by SIM3D::parse(), and SIM3D::parseBCTag().

◆ create() [1/2]

ASMbase * ASM3D::create ( ASM::Discretization  type,
const CharVec nf,
bool  mixedFEM = false 
)
static

Creates a three-parametric patch of specified discretization type.

Parameters
[in]typeThe discretization method to use
[in]nfNumber of unknowns per basis function in the patch
[in]mixedFEMIf true, force mixed formulation even if nf[1]=0

Referenced by create(), FieldFuncHDF5::load(), SIM3D::parseGeometryTag(), SIMsupel::readPatch(), and SIM3D::readPatch().

◆ create() [2/2]

ASMbase * ASM3D::create ( ASM::Discretization  type,
unsigned char  nf = 1 
)
static

Creates a three-parametric patch of specified discretization type.

Parameters
[in]typeThe discretization method to use
[in]nfNumber of unknowns per basis function in the patch

References create().

◆ getGridParameters()

virtual bool ASM3D::getGridParameters ( std::vector< double > &  prm,
int  dir,
int  nSegSpan 
) const
pure virtual

Calculates parameter values for visualization nodal points.

Parameters
[out]prmParameter values in given direction for all points
[in]dirParameter direction (0,1)
[in]nSegSpanNumber of visualization segments over each knot-span

◆ raiseOrder()

virtual bool ASM3D::raiseOrder ( int  ru,
int  rv,
int  rw,
bool  setOrder = false 
)
pure virtual

Raises the order of the spline object for this patch.

Parameters
[in]ruNumber of times to raise the order in u-direction
[in]rvNumber of times to raise the order in v-direction
[in]rwNumber of times to raise the order in w-direction
[in]setOrderIf true, raise order to ru, rv and rw

Implemented in ASMs3D, and ASMu3D.

Referenced by SIM3D::parse(), and SIM3D::parseGeometryTag().

◆ refine()

virtual bool ASM3D::refine ( int  dir,
const std::vector< double > &  xi 
)
pure virtual

Refines the parametrization by inserting extra knots.

Parameters
[in]dirParameter direction to refine
[in]xiRelative positions of added knots in each existing knot span

Referenced by SIM3D::parse(), and SIM3D::parseGeometryTag().

◆ uniformRefine()

virtual bool ASM3D::uniformRefine ( int  dir,
int  nInsert 
)
pure virtual

Refines the parametrization by inserting extra knots uniformly.

Parameters
[in]dirParameter direction to refine
[in]nInsertNumber of extra knots to insert in each knot-span

Implemented in ASMu3D, and ASMs3D.

Referenced by SIM3D::parse(), and SIM3D::parseGeometryTag().


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