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

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

#include <ASM2D.h>

Inheritance diagram for ASM2D:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

virtual ~ASM2D ()
 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)=0
 Raises the order of the spline object for this patch. More...
 
virtual bool refine (int dir, const std::vector< double > &xi, double scale=1.0)=0
 Refines the parametrization by inserting extra knots. More...
 
virtual void constrainEdge (int dir, bool open, int dof, int code=0, char basis=1)=0
 Constrains all DOFs on a given boundary edge. More...
 
virtual size_t constrainEdgeLocal (int dir, bool open, int dof, int code=0, bool project=false)=0
 Constrains all DOFs in local directions on a given boundary edge. More...
 
virtual void constrainCorner (int I, int J, int dof, int code=0, char basis=1)=0
 Constrains a corner node identified by the two parameter indices. More...
 
virtual void constrainNode (double xi, double eta, int dof, int code=0)=0
 Constrains a node identified by two 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 basis) const =0
 Returns the node index for a given corner.
 
virtual bool connectPatch (int edge, ASM2D &neighbor, int nedge, bool revers, int=0, bool coordCheck=true, int thick=1)=0
 Connects all matching nodes on two adjacent boundary edges. More...
 

Static Public Member Functions

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

Protected Member Functions

 ASM2D ()
 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 2D spline patches.

This class contains an interface to methods common for structured and unstructured 2D 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 * ASM2D::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 SIM2D::clonePatches(), and ASMbase::cloneUnShared().

◆ connectPatch()

virtual bool ASM2D::connectPatch ( int  edge,
ASM2D neighbor,
int  nedge,
bool  revers,
int  = 0,
bool  coordCheck = true,
int  thick = 1 
)
pure virtual

Connects all matching nodes on two adjacent boundary edges.

Parameters
[in]edgeLocal edge index of this patch, in range [1,4]
neighborThe neighbor patch
[in]nedgeLocal edge index of neighbor patch, in range [1,4]
[in]reversIndicates whether the two edges have opposite directions
[in]coordCheckFalse to disable coordinate checks (periodic connections)
[in]thickThickness of connection

Implemented in ASMu2D, ASMs2D, ASMu2Dmx, ASMs2DmxLag, and ASMs2Dmx.

Referenced by SIM2D::connectPatches().

◆ constrainCorner()

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

Constrains a corner node identified by the two parameter indices.

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

The sign of the two 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 ASMu2D, and ASMs2D.

Referenced by SIM2D::addConstraint().

◆ constrainEdge()

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

Constrains all DOFs on a given boundary edge.

Parameters
[in]dirParameter direction defining 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 ASMs2DC1, ASMu2DC1, ASMu2D, ASMs2DLag, and ASMs2D.

Referenced by SIM2D::addConstraint().

◆ constrainEdgeLocal()

virtual size_t ASM2D::constrainEdgeLocal ( int  dir,
bool  open,
int  dof,
int  code = 0,
bool  project = false 
)
pure virtual

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

Parameters
[in]dirParameter direction defining the edge to constrain
[in]openIf true, exclude the end points of the edge
[in]dofWhich local DOFs to constrain at each node on the edge
[in]codeInhomogeneous dirichlet condition code
[in]projectIf true, the local axis directions are projected
Returns
Number of additional nodes added due to local axis constraints

Implemented in ASMu2D, and ASMs2D.

Referenced by SIM2D::addConstraint().

◆ constrainNode()

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

Constrains a node identified by two relative parameter values.

Parameters
[in]xiParameter in u-direction
[in]etaParameter in v-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 ASMs2DC1, ASMu2D, and ASMs2D.

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

◆ create() [1/2]

ASMbase * ASM2D::create ( ASM::Discretization  type,
unsigned char  nd,
const CharVec nf,
bool  mixedFEM = false 
)
static

Creates a two-parametric patch of specified discretization type.

Parameters
[in]typeThe discretization method to use
[in]ndNumber of spatial dimensions
[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(), SIM2D::parseGeometryTag(), and SIM2D::readPatch().

◆ create() [2/2]

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

Creates a two-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 ASM2D::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 ASM2D::raiseOrder ( int  ru,
int  rv 
)
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

Implemented in ASMu2D, and ASMs2D.

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

◆ refine()

virtual bool ASM2D::refine ( int  dir,
const std::vector< double > &  xi,
double  scale = 1.0 
)
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
[in]scaleScaling factor for the added knot values

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

◆ uniformRefine()

virtual bool ASM2D::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 ASMu2D, and ASMs2D.

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


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