IFEM  90A354
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | List of all members
ASMs3D Class Reference

Driver for assembly of structured 3D spline FE models. More...

#include <ASMs3D.h>

Inheritance diagram for ASMs3D:
Inheritance graph
[legend]
Collaboration diagram for ASMs3D:
Collaboration graph
[legend]

Classes

class  BasisFunctionCache
 Implementation of basis function cache. More...
 
struct  BlockNodes
 Struct with data for definition of global node numbers of a patch. More...
 
struct  DirichletFace
 Struct representing an inhomogeneous Dirichlet boundary condition. More...
 
struct  Edge
 Struct for edge node definitions. More...
 
struct  Face
 Struct for face node definitions. More...
 
struct  IJK
 Struct for nodal point data. More...
 
class  InterfaceChecker
 Base class that checks if an element has interface contributions. More...
 

Public Member Functions

 ASMs3D (unsigned char n_f=3)
 Default constructor.
 
 ASMs3D (const ASMs3D &patch, unsigned char n_f)
 Special copy constructor for sharing of FE data.
 
 ASMs3D (const ASMs3D &patch)
 Default copy constructor copying everything.
 
virtual ~ASMs3D ()
 Empty destructor.
 
virtual Go::SplineSurface * getBoundary (int dir, int=1)
 Returns the spline surface representing a boundary of this patch. More...
 
virtual Go::SplineVolume * getBasis (int basis=1)
 Returns the spline volume representing a basis of this patch.
 
virtual const Go::SplineVolume * getBasis (int basis=1) const
 Returns the spline volume representing a basis of this patch.
 
virtual void copyParameterDomain (const ASMbase *other)
 Copies the parameter domain from the other patch.
 
virtual bool read (std::istream &)
 Creates an instance by reading the given input stream.
 
virtual bool write (std::ostream &, int) const
 Writes the geometry of the SplineVolume object to given stream.
 
virtual bool generateFEMTopology ()
 Generates the finite element topology data for the patch. More...
 
virtual void clear (bool retainGeometry=false)
 Clears the contents of the patch, making it empty. More...
 
virtual bool addXElms (short int dim, short int item, size_t nXn, IntVec &nodes)
 Adds extraordinary elements associated with a patch boundary. More...
 
virtual size_t getNodeIndex (int globalNum, bool noAddedNodes=false) const
 Returns local 1-based index of the node with given global number. More...
 
virtual int getNodeID (size_t inod, bool noAddedNodes=false) const
 Returns the global node number for the given node. More...
 
virtual bool getElementCoordinates (Matrix &X, int iel, bool forceItg=false) const
 Returns a matrix with nodal coordinates for an element. More...
 
virtual void getNodalCoordinates (Matrix &X, bool geo=false) const
 Returns a matrix with all nodal coordinates within the patch. More...
 
virtual Vec3 getCoord (size_t inod) const
 Returns the global coordinates for the given node. More...
 
virtual Vec3 getElementCenter (int iel) const
 Returns the coordinate of the element center.
 
virtual bool updateCoords (const Vector &displ)
 Updates the nodal coordinates for this patch. More...
 
virtual void getBoundaryNodes (int lIndex, IntVec &nodes, int basis, int thick=1, int=0, bool local=false) const
 Finds the global (or patch-local) node numbers on a patch boundary. More...
 
virtual void getBoundary1Nodes (int lEdge, IntVec &nodes, int basis, int=0, bool local=false, bool open=false) const
 Finds the global (or patch-local) node numbers on a patch boundary. More...
 
virtual int getCorner (int I, int J, int K, int basis) const
 Returns the node index for a given corner. More...
 
bool assignNodeNumbers (BlockNodes &nodes, int basis=0)
 Assigns new global node numbers for all nodes of the patch. More...
 
virtual bool checkRightHandSystem ()
 Checks that the patch is modelled in a right-hand-side system. More...
 
virtual bool refine (int dir, const RealArray &xi)
 Refines the parametrization by inserting extra knots. More...
 
virtual bool uniformRefine (int dir, int nInsert)
 Refines the parametrization by inserting extra knots uniformly. More...
 
virtual bool raiseOrder (int ru, int rv, int rw, bool setOrder=false)
 Raises the order of the SplineVolume object for this patch. More...
 
virtual bool createProjectionBasis (bool init)
 Creates a separate projection basis for this patch. More...
 
virtual bool separateProjectionBasis () const
 Checks if a separate projection basis is used for this patch.
 
virtual void constrainFace (int dir, bool open, int dof, int code=0, char basis=1)
 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')
 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)
 Constrains all DOFs on a given boundary edge. More...
 
virtual void constrainLine (int fdir, int ldir, double xi, int dof, int code=0, char basis=1)
 Constrains all DOFs along a line on a given boundary face. More...
 
virtual void constrainCorner (int I, int J, int K, int dof, int code=0, char basis=1)
 Constrains a corner node identified by the three parameter indices. More...
 
virtual void constrainNode (double xi, double eta, double zeta, int dof, int code=0)
 Constrains a node identified by three relative parameter values. More...
 
virtual bool connectPatch (int face, ASM3D &neighbor, int nface, int norient, int=0, bool coordCheck=true, int thick=1)
 Connects all matching nodes on two adjacent boundary faces. More...
 
virtual void closeBoundaries (int dir, int basis, int master)
 Makes two opposite boundary faces periodic. More...
 
virtual bool collapseFace (int face, int edge=0, int basis=1)
 Collapses a degenerated face into a single node or edge. More...
 
virtual bool addRigidCpl (int lindx, int ldim, int basis, int &gMaster, const Vec3 &Xmaster, bool extraPt)
 Adds MPCs representing a rigid coupling to this patch. More...
 
virtual void setNodeNumbers (const IntVec &nodes)
 Sets the global node numbers for this patch. More...
 
virtual bool updateDirichlet (const std::map< int, RealFunc * > &func, const std::map< int, VecFunc * > &vfunc, double time, const std::map< int, int > *g2l=nullptr)
 Updates the time-dependent in-homogeneous Dirichlet coefficients. More...
 
virtual bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
 Evaluates an integral over the interior patch domain. More...
 
virtual bool integrate (Integrand &integrand, int lIndex, GlobalIntegral &glbInt, const TimeDomain &time)
 Evaluates a boundary integral over a patch face. More...
 
virtual bool integrateEdge (Integrand &integrand, int lEdge, GlobalIntegral &glbInt, const TimeDomain &time)
 Evaluates a boundary integral over a patch edge. More...
 
virtual int evalPoint (const double *xi, double *param, Vec3 &X) const
 Evaluates the geometry at a specified point. More...
 
virtual int findElementContaining (const double *param) const
 Returns the element that contains a specified spatial point. More...
 
virtual double findPoint (Vec3 &X, double *param) const
 Searches for the specified Cartesian point in the patch. More...
 
virtual bool getGridParameters (RealArray &prm, int dir, int nSegSpan) const
 Calculates parameter values for visualization nodal points. More...
 
virtual bool tesselate (ElementBlock &grid, const int *npe) const
 Creates a hexahedron element model of this patch for visualization. More...
 
virtual bool evalSolution (Matrix &sField, const Vector &locSol, const int *npe, int n_f, bool piola) const
 Evaluates the primary solution field at all visualization points. More...
 
virtual bool evalSolution (Matrix &sField, const Vector &locSol, const RealArray *gpar, bool regular=true, int deriv=0, int=0) const
 Evaluates the primary solution field at the given points. More...
 
virtual bool evalProjSolution (Matrix &sField, const Vector &locSol, const int *npe, int n_f) const
 Evaluates the projected solution field at all visualization points. More...
 
virtual bool evaluate (const ASMbase *basis, const Vector &locVec, RealArray &vec, int basisNum) const
 Evaluates and interpolates a field over a given geometry. More...
 
virtual bool evaluate (const Field *field, RealArray &vec, int basisNum) const
 Evaluates and interpolates a field over a given geometry. More...
 
virtual bool evaluate (const FunctionBase *func, RealArray &vec, int basisNum, double time) const
 Evaluates and interpolates a function over a given geometry. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const int *npe=nullptr, char project=0) const
 Evaluates the secondary solution field at all visualization points. More...
 
virtual Go::GeomObject * evalSolution (const IntegrandBase &integrand) const
 Projects the secondary solution field onto the primary basis. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const RealArray *gpar, bool regular=true) const
 Evaluates the secondary solution field at the given points. More...
 
virtual void generateThreadGroups (const Integrand &integrand, bool silence, bool ignoreGlobalLM)
 Generates element groups for multi-threading of interior integrals. More...
 
virtual void generateThreadGroups (char lIndex, bool silence, bool)
 Generates element groups for multi-threading of boundary integrals. More...
 
virtual void generateThreadGroupsFromElms (const IntVec &elms)
 Generates element groups from a partition.
 
virtual void generateProjThreadGroupsFromElms (const IntVec &elms)
 Generate element groups from a partition.
 
virtual bool getOrder (int &p1, int &p2, int &p3) const
 Returns the polynomial order in each parameter direction. More...
 
virtual bool getSize (int &n1, int &n2, int &n3, int basis=0) const
 Returns the number of nodal points in each parameter direction. More...
 
virtual bool getNoStructElms (int &n1, int &n2, int &n3) const
 Returns the number of elements in each parameter direction. More...
 
virtual void getElmConnectivities (IntMat &neigh, int basis=ASM::INTEGRATION_BASIS) const
 Calculates the matrix of element neighbour connectivities. More...
 
virtual IntMat getElmNodes (int basis) const
 Returns the matrix of nodal point correspondance for given basis.
 
virtual size_t getNoBoundaryElms (char lIndex, char ldim) const
 Returns the number of elements on a boundary.
 
virtual size_t getNoNodes (int basis=0) const
 Returns the total number of nodes in this patch.
 
virtual size_t getNoProjectionNodes () const
 Returns the number of projection nodes for this patch.
 
virtual bool getParameterDomain (Real2DMat &u, IntVec *corners) const
 Returns parameter values and node numbers of the domain corners. More...
 
virtual void evaluateBasis (double u, double v, double w, Vector &N) const
 Evaluates the basis functions at the specified point. More...
 
void extractBasis (double u, double v, double w, Vector &N, Matrix &dNdu, bool fromRight=true) const
 Establishes matrices with basis functions and 1st derivatives. More...
 
void extractBasis (double u, double v, double w, Vector &N, Matrix &dNdu, Matrix3D &d2Ndu2, bool fromRight=true) const
 Establishes matrices with basis functions, 1st and 2nd derivatives. More...
 
void extractBasis (double u, double v, double w, int dir, int p, Vector &dN, bool fromRight=true) const
 Establishes a vector with basis function derivatives. More...
 
virtual FieldgetProjectedField (const Vector &coefs) const
 Returns a field using the projection basis. More...
 
virtual FieldsgetProjectedFields (const Vector &coefs, size_t=0) const
 Returns a field using the projection basis. More...
 
- Public Member Functions inherited from ASMstruct
virtual ~ASMstruct ()
 The destructor frees the dynamically allocated spline objects.
 
virtual bool empty () const
 Checks if the patch is empty.
 
virtual bool diracPoint (Integrand &integr, GlobalIntegral &glInt, const double *u, const Vec3 &pval)
 Integrates a spatial dirac-delta function over a patch. More...
 
virtual void swapProjectionBasis ()
 Swaps between the first and second projection basis.
 
virtual bool evalSolution (Matrix &sField, const Vector &locSol, const int *npe, int n_f=0, bool piola=false) const
 Evaluates the primary solution field at all visualization points. More...
 
virtual bool evalSolution (Matrix &sField, const Vector &locSol, const RealArray *gpar, bool regular=true, int deriv=0, int n_f=0) const
 Evaluates the primary solution field at the given points. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const int *npe=nullptr, char project=0) const
 Evaluates the secondary solution field at all visualization points. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const RealArray *gpar, bool regular=true) const
 Evaluates the secondary solution field at the given points. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const IntVec &elements) const
 Evaluates the secondary solution field at element centers. More...
 
- Public Member Functions inherited from ASMbase
virtual ~ASMbase ()
 The destructor frees the dynamically allocated data objects.
 
ASMbasecloneUnShared () const
 Returns a copy of this patch with identical FE discretization. More...
 
virtual bool readBasis (std::istream &, size_t)
 Reads a basis from the given input stream.
 
virtual void addHole (double, double, double)
 Adds a circular immersed boundary in the physical geometry.
 
virtual void addHole (double, double, double, double, double)
 Adds an oval immersed boundary in the physical geometry.
 
virtual bool setGeometry (RealFunc *, double, double)
 Defines the immersed geometry from a scalar function.
 
bool addLagrangeMultipliers (size_t iel, const IntVec &mGLag, unsigned char nnLag=1)
 Adds a set of Lagrange multipliers to the specified element. More...
 
bool addGlobalLagrangeMultipliers (const IntVec &mGLag, unsigned char nnLag=1)
 Adds global Lagrange multipliers to the system. More...
 
virtual void setGauss (int ng)
 Defines the numerical integration scheme nGauss in the patch.
 
void setNoFields (unsigned char n)
 Defines the number of solution fields in the patch. More...
 
void setElementActivator (IntFunc *efunc)
 Sets the element activation function.
 
const IntFuncgetElementActivator () const
 Returns a pointer to the element activation function.
 
virtual void setMinimumSize (double)
 Sets the minimum element size for adaptive refinement.
 
virtual double getMinimumSize (int=0) const
 Defines the minimum element size for adaptive refinement.
 
virtual bool checkElementSize (int, bool=true) const
 Checks if the specified element is larger than the minimum size.
 
unsigned char getNoSpaceDim () const
 Returns the number of spatial dimensions.
 
unsigned char getNoParamDim () const
 Returns the number of parameter dimensions.
 
virtual unsigned char getNoFields (int b=0) const
 Returns the number of solution fields.
 
unsigned char getNoLagPerNode () const
 Returns the number of Lagrange multipliers per node.
 
size_t getElmIndex (int globalNum) const
 Returns local 1-based index of element with given global number. More...
 
int getElmID (size_t iel) const
 Returns the global element number for the given element. More...
 
virtual unsigned char getNodalDOFs (size_t inod) const
 Returns the number of DOFs per node. More...
 
virtual char getNodeType (size_t inod) const
 Returns the classification of a node. More...
 
bool isLMn (size_t n) const
 Returns true if node n is a Lagrange multiplier node.
 
bool isRMn (size_t n) const
 Returns true if node n is a master node of a rigid coupling.
 
char getLMType (size_t inod) const
 Returns the type of a Lagrange multiplier node. More...
 
void getBoundaryElms (int lIndex, IntVec &elms, int orient=-1, bool local=false) const
 Finds the global (or patch-local) element numbers on a boundary. More...
 
virtual int getNodeSetIdx (const std::string &) const
 Returns (1-based) index of a predefined node set in the patch.
 
virtual const IntVecgetNodeSet (int) const
 Returns an indexed predefined node set.
 
virtual bool isInNodeSet (int, int) const
 Checks if a node is within a predefined node set.
 
virtual int parseNodeSet (const std::string &, const char *)
 Defines a node set by parsing a list of node numbers.
 
virtual int parseNodeBox (const std::string &, const char *)
 Defines a node set by parsing a 3D bounding box.
 
virtual int getElementSetIdx (const std::string &) const
 Returns (1-based) index of a predefined element set in the patch.
 
virtual const IntVecgetElementSet (int) const
 Returns an indexed predefined element set.
 
virtual bool getElementSet (int, std::string &) const
 Returns the name of an indexed predefined element set.
 
virtual bool isInElementSet (int, int) const
 Checks if an element is within a predefined element set.
 
virtual int parseElemSet (const std::string &, const char *)
 Defines an element set by parsing a list of element numbers.
 
virtual int parseElemBox (const std::string &, const std::string &, const char *)
 Defines an element set by parsing a 3D bounding box.
 
virtual std::pair< size_t, double > findClosestNode (const Vec3 &) const
 Finds the node that is closest to the given point.
 
void printNodes (std::ostream &os) const
 Prints out the nodal coordinates of this patch to the given stream.
 
void printElements (std::ostream &os) const
 Prints out element connections of this patch to the given stream.
 
virtual void printElmInfo (int, const IntegrandBase *) const
 Prints out additional app-dependent element information.
 
virtual void shiftGlobalNodeNums (int nshift)
 Increase all global node numbers by nshift.
 
void setGlobalNodeNums (const IntVec &nodes)
 Sets the global node numbers for this patch.
 
const IntVecgetMyNodeNums () const
 Returns the actual global node numbers of this patch.
 
const IntVecgetGlobalNodeNums () const
 Returns the global node numbers of this patch.
 
virtual void shiftGlobalElmNums (int eshift)
 Increase all global element numbers by eshift.
 
const IntVecgetGlobalElementNums () const
 Returns the global element numbers of this patch.
 
void setActiveElements (IntVec *active)
 Sets the list of active elements during assembly.
 
bool isElementActive (int iel, double time=-1.0) const
 Returns true if element with 0-based index iel is active.
 
bool inActive (double time) const
 Returns true if none of the elements in the patch are active.
 
double getAge (int iel, double time) const
 Returns the age of the element with 0-based index iel.
 
bool isElementInPartition (int iel) const
 Returns true if element is in process partition. More...
 
const IntVecgetElementNodes (int iel) const
 Returns the nodal point correspondance array for an element. More...
 
virtual size_t getNoBasis () const
 Returns number of bases of this patch.
 
size_t getNoElms (bool includeZeroVolElms=false, bool includeXElms=false) const
 Returns the total number of elements in this patch. More...
 
int getMaxElmNo () const
 Returns the highest external element number in this patch.
 
size_t getNoMPCs () const
 Returns the total number of multi-point constraint equations.
 
virtual void getNoIntPoints (size_t &nPt, size_t &nIPt)
 Computes the total number of integration points in this patch.
 
virtual void getNoBouPoints (size_t &nPt, char ldim, char lindx)
 Computes the number of boundary integration points in this patch.
 
BCVec::const_iterator begin_BC () const
 Returns the beginning of the BCode array.
 
BCVec::const_iterator end_BC () const
 Returns the end of the BCode array.
 
IntMat::const_iterator begin_elm () const
 Returns the beginning of the MNPC array.
 
IntMat::const_iterator end_elm () const
 Returns the end of the MNPC array.
 
MPCIter begin_MPC () const
 Returns the beginning of the mpcs set.
 
MPCIter end_MPC () const
 Returns the end of the mpcs set.
 
MPCfindMPC (int node, int dof) const
 Returns a pointer to the MPC object for a specified slave, if any. More...
 
bool isShared () const
 Returns true if this patch shares FE data with another patch.
 
bool hasXNodes () const
 Returns true if this patch has additional (extraordinary) nodes.
 
bool mergeNodes (size_t inod, int globalNum, bool verbose=true)
 Merges a given node in this patch with a given global node. More...
 
int renumberNodes (std::map< int, int > &old2new, int &nNod)
 Renumbers the global node numbers in this patch. More...
 
bool renumberNodes (const std::map< int, int > &old2new, const std::vector< int > &new2old={}, int renumGN=0, std::map< int, int > *degenElm=nullptr)
 Renumbers the global node numbers referred by this patch. More...
 
virtual bool initConstraints ()
 Initializes the multi-point constraint coefficients.
 
bool hasTimeDependentDirichlet (const std::map< int, RealFunc * > &func, const std::map< int, VecFunc * > &vfunc)
 Checks for time-dependent in-homogeneous Dirichlet conditions. More...
 
virtual bool transform (const Matrix &)
 Applies a transformation matrix from local to global system.
 
virtual void initMADOF (const int *)
 Initializes the patch level MADOF array for mixed problems.
 
virtual bool validateThreadGroups (const SAM *) const
 Validates the threading groups based on the assembly data in SAM.
 
virtual ElementBlockimmersedGeometry (char *) const
 Returns an additional geometry to visualize (immersed boundaries).
 
virtual ElementBlockextraGeometry (char *) const
 Returns an additional geometry to visualize (spiders, etc.).
 
virtual void filterResults (Matrix &, const ElementBlock *) const
 Filters out result point values that are outside physical domain.
 
virtual bool getSolution (Matrix &sField, const Vector &locSol, const IntVec &nodes) const
 Extract the primary solution field at the specified nodes. More...
 
virtual bool immersedSolution (Matrix &, const Vector &) const
 Evaluates the primary solution at the immersed geometry points.
 
virtual bool extraSolution (Matrix &, const Vector &) const
 Evaluates the primary solution at the extra geometry points.
 
virtual bool evalSolutionPiola (Matrix &sField, const Vector &locSol, const RealArray *gpar, bool regular) const
 Evaluates the primary solution field with Piola mapping. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const IntVec &elements) const
 Evaluates the secondary solution field at element centers. More...
 
bool globalL2projection (Matrix &sField, const L2Integrand &integrand, bool continuous=false, bool enforceEnds=false) const
 Projects the secondary solution using a (discrete) global L2-fit. More...
 
bool L2projection (Matrix &sField, IntegrandBase *integrand, const TimeDomain &time)
 Projects the secondary solution using a continuous global L2-fit. More...
 
bool L2projection (Matrix &fVals, FunctionBase *function, double t=0.0)
 Projects an explicit function using a continuous global L2-fit. More...
 
bool L2projection (const std::vector< Matrix * > &fVals, const std::vector< FunctionBase * > &function, double t=0.0)
 Projects explicit functions using a continuous global L2-fit. More...
 
virtual size_t getNoRefineNodes () const
 Returns the number of nodes on refinement basis for this patch.
 
virtual size_t getNoRefineElms () const
 Returns the number of elements on refinement basis for this patch.
 
virtual void extractElmRes (const Vector &globRes, Vector &elmRes, size_t internalFirst=0) const
 Extracts element results for this patch from a global vector. More...
 
virtual void extractElmRes (const Matrix &globRes, Matrix &elmRes, size_t internalFirst=0) const
 Extracts element results for this patch from a global vector. More...
 
bool extractNodalVec (const RealArray &globVec, RealArray &nodeVec, const int *madof, int ngnod=-1) const
 Extracts nodal results for this patch from the global vector. More...
 
virtual void extractNodeVec (const RealArray &globVec, RealArray &nodeVec, unsigned char nndof=0, int basis=0) const
 Extracts nodal results for this patch from the global vector. More...
 
virtual bool injectNodeVec (const RealArray &nodeVec, RealArray &globVec, unsigned char nndof=0, int basis=0) const
 Injects nodal results for this patch into the global vector. More...
 
bool injectNodalVec (const RealArray &nodeVec, RealArray &globVec, const IntVec &madof, int basis=0) const
 Injects nodal results for this patch into the global vector. More...
 
bool add2PC (int slave, int dir, int master, int code=0)
 Creates and adds a two-point constraint to this patch. More...
 
bool addMPC (MPC *&mpc, int code=0, bool verbose=false, bool overrideD=false)
 Adds a general multi-point-constraint (MPC) equation to this patch. More...
 
void addRigidCouplings (int gMaster, const Vec3 &Xmaster, const IntVec &slaveNodes)
 Adds MPC-equations representing a rigid coupling to this patch. More...
 
void constrainPatch (int dof, int code=0)
 Constrains all nodes in the patch. More...
 
void constrainNodes (const IntVec &nodes, int dof, int code=0, bool overrideD=false)
 Constrains a list of nodes in the patch. More...
 
bool constrainXnode (int node, int dof, int code=0)
 Constrains an extraordinary node in the patch. More...
 
int prescribe (size_t inod, int dirs, int code, bool overrideD=false)
 Constrains DOFs in the given node to the given value. More...
 
int fix (size_t inod, int dirs=123)
 Constrains DOFs in the given node to zero. More...
 
bool isFixed (int node, int dof, bool all=false) const
 Checks if the given DOFs are fixed. More...
 
- Public Member Functions inherited from ASM3D
virtual ~ASM3D ()
 Empty destructor.
 
ASMbaseclone (const CharVec &nf=CharVec()) const
 Returns a copy of this patch with identical FE discretization. More...
 
virtual bool refine (int dir, const std::vector< double > &xi)=0
 Refines the parametrization by inserting extra knots. More...
 
virtual bool getGridParameters (std::vector< double > &prm, int dir, int nSegSpan) const =0
 Calculates parameter values for visualization nodal points. More...
 

Static Public Member Functions

static void scatterInd (int n1, int n2, int n3, int p1, int p2, int p3, const int *start, IntVec &index)
 Auxilliary function for computation of basis function indices.
 
- Static Public Member Functions inherited from ASMbase
static void resetNumbering (int n=0)
 Resets the global element and node counters.
 
static int renumberNodes (const ASMVec &model, std::map< int, int > &old2new)
 Renumbers all global node numbers in the entire model. More...
 
static void mergeAndGetAllMPCs (const ASMVec &model, MPCSet &allMPCs)
 Computes the set of all MPC-equations over the whole model. More...
 
static void resolveMPCchains (const MPCSet &allMPCs, const ASMVec &model, bool setPtrOnly=false)
 Resolves (possibly multi-level) chaining in MPC-equations. More...
 
- Static Public Member Functions inherited from ASM3D
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

bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time, const Real3DMat &itgPts)
 Evaluates an integral over the interior patch domain. More...
 
bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time, const ASM::InterfaceChecker &iChk)
 Evaluates an integral over element interfaces in the patch. More...
 
virtual void findBoundaryElms (IntVec &elms, int lIndex, int=0) const
 Finds the patch-local element numbers on a patch boundary. More...
 
virtual bool assembleL2matrices (SystemMatrix &A, SystemVector &B, const L2Integrand &integrand, bool continuous) const
 Assembles L2-projection matrices for the secondary solution. More...
 
bool connectBasis (int face, ASMs3D &neighbor, int nface, int norient, int basis=1, int slave=0, int master=0, bool coordCheck=true, int thick=1)
 Connects all matching nodes on two adjacent boundary faces. More...
 
void getGaussPointParameters (RealArray &uGP, int dir, int nGauss, const double *xi) const
 Extracts parameter values of the Gauss points in one direction. More...
 
bool getGrevilleParameters (RealArray &prm, int dir, int basisNum=1) const
 Calculates parameter values for the Greville points. More...
 
bool getQuasiInterplParameters (RealArray &prm, int dir) const
 Calculates parameter values for the Quasi-Interpolation points. More...
 
bool getElementCoordinatesPrm (Matrix &X, double u, double v, double w) const
 Returns a matrix with nodal coordinates for element spanning given parameters. More...
 
double getParametricVolume (int iel) const
 Returns the volume in the parameter space for an element. More...
 
double getParametricArea (int iel, int dir) const
 Returns boundary face area in the parameter space for an element. More...
 
virtual void getElementBorders (int iel, double *u) const
 Computes the element border parameters. More...
 
void getElementBorders (int i1, int i2, int i3, double *u, double *v, double *w) const
 Computes the element border parameters. More...
 
double getElementCorners (int i1, int i2, int i3, std::vector< Vec3 > &XC, RealArray *uC=nullptr) const
 Computes the element corner coordinates. More...
 
void getCornerPoints (int i1, int i2, int i3, std::vector< utl::Point > &XC) const
 Computes the element corner coordinates and parameters. More...
 
void generateThreadGroups (size_t strip1, size_t strip2, size_t strip3, bool silence, bool ignoreGlobalLM)
 Generates element groups for multi-threading of interior integrals. More...
 
void generateThreadGroups (size_t strip1, size_t strip2, size_t strip3, char lIndex, bool silence, bool)
 Generates element groups for multi-threading of boundary integrals. More...
 
virtual void changeNumThreads ()
 Hook for changing number of threads.
 
virtual int getFirstItgElmNode () const
 Returns 0-based index of first node on integration basis.
 
virtual int getLastItgElmNode () const
 Returns 0-based index of last node on integration basis.
 
- Protected Member Functions inherited from ASMstruct
 ASMstruct (unsigned char n_p, unsigned char n_s, unsigned char n_f)
 The constructor sets the number of space dimensions and fields. More...
 
 ASMstruct (const ASMstruct &patch, unsigned char n_f)
 Special copy constructor for sharing of FE data. More...
 
bool addXNodes (unsigned short int dim, size_t nXn, IntVec &nodes)
 Adds extraordinary nodes associated with a patch boundary. More...
 
bool checkThreadGroups (const std::vector< std::set< int >> &nodes, int group, bool ignoreGlobalLM)
 Performs a sanity check on the thread groups. More...
 
- Protected Member Functions inherited from ASMbase
 ASMbase (unsigned char n_p, unsigned char n_s, unsigned char n_f)
 The constructor sets the number of space dimensions and fields. More...
 
 ASMbase (const ASMbase &patch, unsigned char n_f)
 Special copy constructor for sharing of FE data. More...
 
 ASMbase (const ASMbase &patch)
 Default copy constructor, copying everything except neighbors. More...
 
void addLocal2GlobalCpl (int iSlave, int master, const Tensor &Tlg)
 Creates constraint equations coupling global DOFs to local DOFs. More...
 
bool add3PC (int slave, int dir, int master1, int master2, int code=0)
 Creates and adds a three-point constraint to this patch. More...
 
bool addPeriodicity (size_t master, size_t slave, int dir)
 Creates and adds a periodicity constraint to this patch. More...
 
void makePeriodic (size_t master, size_t slave, int dirs=123)
 Creates periodicity constraints between two nodes in this patch. More...
 
void addNeighbor (ASMbase *pch)
 Adds a patch to the list of neighbors of this patch. More...
 
bool createRgdMasterNode (int &gMaster, const Vec3 &Xmaster)
 Creates an additional master node for a rigid coupling. More...
 
void addRigidMPC (int gSlave, int gMaster, const Vec3 &dX)
 Adds MPC-equations representing a rigid arm to a 6-DOF node. More...
 
int getNoGaussPt (int p, bool neumann=false) const
 Returns the number of Gauss points to use in one direction. More...
 
int searchCtrlPt (RealArray::const_iterator cit, RealArray::const_iterator end, const Vec3 &X, int dimension, double tol=0.001) const
 Helper method used by evalPoint to search for a control point. More...
 
bool allDofs (int dirs) const
 Returns true if dirs constains all local DOFs in the patch.
 
bool writeLagBasis (std::ostream &os, const char *type) const
 Writes a Lagrangian basis to the given stream.
 
- Protected Member Functions inherited from ASM3D
 ASM3D ()
 The constructor is protected to allow objects of sub-classes only.
 

Protected Attributes

std::shared_ptr< Go::SplineVolume > svol
 The actual spline volume object.
 
bool swapW
 Has the w-parameter direction been swapped?
 
const IndexVecnodeInd
 IJK-triplets for the control points (nodes)
 
IndexVec myNodeInd
 The actual IJK-triplet container.
 
std::map< size_t, size_t > xnMap
 Node index map used by getCoord()
 
std::map< size_t, size_t > nxMap
 Node index map used by getNodeID()
 
std::vector< DirichletFacedirich
 Inhomogeneous Dirichlet boundary condition data.
 
ThreadGroups threadGroupsVol
 Element groups for multi-threaded volume assembly.
 
std::map< char, ThreadGroupsthreadGroupsFace
 Element groups for multi-threaded face assembly.
 
std::vector< std::unique_ptr< BasisFunctionCache > > myCache
 Basis function cache.
 
- Protected Attributes inherited from ASMstruct
std::shared_ptr< Go::GeomObject > geomB
 Pointer to spline object of the geometry basis.
 
std::shared_ptr< Go::GeomObject > projB
 Pointer to spline object of the projection basis.
 
std::shared_ptr< Go::GeomObject > projB2
 Pointer to spline object of the secondary projection basis.
 
ThreadGroups projThreadGroups
 Element groups for multi-threaded assembly - projection basis.
 
ThreadGroups proj2ThreadGroups
 Element groups for multi-threaded assembly - second projection basis.
 
- Protected Attributes inherited from ASMbase
unsigned char ndim
 Number of parametric dimensions (1, 2 or 3)
 
unsigned char nsd
 Number of space dimensions (ndim <= nsd <= 3)
 
unsigned char nf
 Number of primary solution fields (1 or larger)
 
unsigned char nLag
 Number of Lagrange multipliers per node.
 
size_t nel
 Number of regular elements in this patch.
 
size_t nnod
 Number of regular nodes in this patch.
 
const IntVecMLGE
 Matrix of Local to Global Element numbers.
 
const IntVecMLGN
 Matrix of Local to Global Node numbers.
 
const IntMatMNPC
 Matrix of Nodal Point Correspondance.
 
const char shareFE
 Flag telling whether this patch shares its data with another patch. More...
 
BCVec BCode
 Array of Boundary Condition codes.
 
MPCMap dCode
 Inhomogeneous Dirichlet condition codes for the MPCs.
 
MPCSet mpcs
 All multi-point constraints with the slave in this patch.
 
IntVec myMLGE
 The actual Matrix of Local to Global Element numbers.
 
IntVec myMLGN
 The actual Matrix of Local to Global Node numbers.
 
IntMat myMNPC
 The actual Matrix of Nodal Point Correspondance.
 
IntVec myElms
 Elements on patch - used with partitioning.
 
int nGauss
 Numerical integration scheme for this patch. More...
 
size_t firstEl
 Global index to first element within this patch.
 
size_t firstIp
 Global index to first interior integration point.
 
std::map< char, size_t > firstBp
 Global indices to first integration point for the Neumann boundaries.
 
ASMVec neighbors
 Patches having nodes in common with this one.
 
std::map< size_t, XYZmyRmaster
 Rigid master nodal points.
 

Private Types

typedef std::vector< IJKIndexVec
 Node index container.
 
typedef std::pair< int, int > Ipair
 Convenience type.
 

Private Member Functions

Go::SplineVolume * projectSolution (const IntegrandBase &integrand) const
 Projects the secondary solution field onto the primary basis. More...
 
Go::SplineVolume * projectSolutionLocal (const IntegrandBase &) const
 Projects the secondary solution using Quasi-Interpolation.
 
Go::SplineVolume * projectSolutionLocalApprox (const IntegrandBase &) const
 Projects the secondary solution using Variation Diminishing Spline Approximation.
 
Go::SplineVolume * projectSolutionLeastSquare (const IntegrandBase &) const
 Projects the secondary solution using Least-Square Approximation.
 
int coeffInd (size_t inod) const
 Returns an index into the internal coefficient array for a node. More...
 
int findStartNode (int &n1, int &n2, int &n3, char basis) const
 Find the start node and size for a basis. More...
 
bool getFaceSize (int &n1, int &n2, int basis, int face) const
 Find local sizes for a given face. More...
 

Static Private Member Functions

static void createMNPC (const Go::SplineVolume *svol, IntMat &MNPC)
 Creates matrix of nodal point correspondance for a spline surface.
 

Additional Inherited Members

- Public Types inherited from ASMbase
using BCVec = std::vector< BC >
 Nodal boundary condition container.
 
- Public Types inherited from ASM3D
typedef std::vector< unsigned char > CharVec
 Convenience type.
 
- Public Attributes inherited from ASMbase
size_t idx
 Index of this patch in the multi-patch model.
 
- Static Public Attributes inherited from ASMbase
static bool fixHomogeneousDirichlet = true
 If true, pre-eliminate fixed DOFs.
 
static int dbgElm = 0
 One-based element index to print debugging info for.
 
static double modelSize = 1.0
 Characteristic model size. More...
 
- Protected Types inherited from ASMbase
using XYZ = std::array< double, 3 >
 Convenience type definition.
 
- Static Protected Member Functions inherited from ASMbase
static bool deformedConfig (const Matrix &Xnod, Vectors &eVec, bool force2nd=false)
 Calculates the deformed configuration for current element. More...
 
static bool collapseNodes (ASMbase &pch1, int node1, ASMbase &pch2, int node2)
 Collapses the given two nodes into one. More...
 
- Static Protected Member Functions inherited from ASM3D
static double getElementSize (const std::vector< Vec3 > &XC)
 Returns characteristic element size based on corner coordinates.
 
- Static Protected Attributes inherited from ASMbase
static std::map< int, int > xNode
 Auxilliary node number map used when establishing Dirichlet constraints.
 
static int gEl = 0
 Global element counter.
 
static int gNod = 0
 Global node counter.
 

Detailed Description

Driver for assembly of structured 3D spline FE models.

This class contains methods common for structured 3D spline patches.

Member Function Documentation

◆ addRigidCpl()

bool ASMs3D::addRigidCpl ( int  lindx,
int  ldim,
int  basis,
int &  gMaster,
const Vec3 Xmaster,
bool  extraPt 
)
virtual

Adds MPCs representing a rigid coupling to this patch.

Parameters
[in]lindxLocal index of the boundary item that should be rigid
[in]ldimDimension of the boundary item that should be rigid
[in]basisWhich basis to add rigid coupling for (mixed methods)
gMasterGlobal node number of the master node
[in]XmasterPosition of the master nodal point
[in]extraPtIf true, the master point is not a patch node
Returns
true if a new global node was added, otherwise false

Reimplemented from ASMbase.

References ASMbase::addRigidCpl(), IFEM::cout, ASMbase::idx, ThreadGroups::stripDir, threadGroupsFace, and threadGroupsVol.

◆ addXElms()

bool ASMs3D::addXElms ( short int  dim,
short int  item,
size_t  nXn,
IntVec nodes 
)
virtual

Adds extraordinary elements associated with a patch boundary.

Parameters
[in]dimDimension of the boundary (should be 2)
[in]itemLocal index of the boundary face
[in]nXnNumber of extraordinary nodes
[out]nodesGlobal numbers assigned to the extraordinary nodes

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag.

References ASMstruct::addXNodes(), ASMbase::MLGE, and svol.

◆ assembleL2matrices()

bool ASMs3D::assembleL2matrices ( SystemMatrix A,
SystemVector B,
const L2Integrand integrand,
bool  continuous 
) const
protectedvirtual

Assembles L2-projection matrices for the secondary solution.

Parameters
[out]ALeft-hand-side matrix
[out]BRight-hand-side vectors
[in]integrandObject with problem-specific data and methods
[in]continuousIf false, a discrete L2-projection is used

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag.

References L2Integrand::evaluate(), ASM::GEOMETRY_BASIS, getBasis(), GaussQuadrature::getCoord(), getElmNodes(), SplineUtils::getGaussParameters(), ASMbase::getNoBasis(), ASMbase::getNoGaussPt(), getNoProjectionNodes(), GaussQuadrature::getWeight(), ASMbase::idx, ASMbase::nnod, SystemMatrix::preAssemble(), and ASM::PROJECTION_BASIS.

◆ assignNodeNumbers()

bool ASMs3D::assignNodeNumbers ( BlockNodes nodes,
int  basis = 0 
)

Assigns new global node numbers for all nodes of the patch.

Parameters
nodesObject with global nodes numbers to assign to this patch
[in]basisWhich basis to assign node numbers for in mixed methods

The global node numbers generated by generateFEMTopology() are non-unique in the sense that a node that is shared by two (or more) patches along a common interface has a different number in each patch. This method therefore assigns a new global number to each node in the patch. The data provided through the nodes argument is sufficient to determine the unique global number under the assumption that they are ordered in the sequence determined by the local orientation of the patch, its faces and edges.

◆ checkRightHandSystem()

bool ASMs3D::checkRightHandSystem ( )
virtual

Checks that the patch is modelled in a right-hand-side system.

If it isn't, the w-parameter direction is swapped.

Reimplemented from ASM3D.

References ASMbase::shareFE, svol, and swapW.

◆ clear()

void ASMs3D::clear ( bool  retainGeometry = false)
virtual

Clears the contents of the patch, making it empty.

Parameters
[in]retainGeometryIf true, the spline geometry is not cleared. This is used to reinitialize the patch after it has been refined.

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag, ASMs3DmxLag, and ASMs3Dmx.

References ASMbase::clear(), ASMstruct::geomB, myCache, myNodeInd, nxMap, ASMstruct::projB, svol, threadGroupsFace, threadGroupsVol, and xnMap.

Referenced by ASMs3Dmx::clear(), and ASMs3DLag::clear().

◆ closeBoundaries()

void ASMs3D::closeBoundaries ( int  dir,
int  basis,
int  master 
)
virtual

Makes two opposite boundary faces periodic.

Parameters
[in]dirParameter direction defining the periodic faces
[in]basisWhich basis to connect (mixed methods)
[in]master1-based index of the first master node in this basis

Reimplemented from ASMbase.

Reimplemented in ASMs3DmxLag, and ASMs3Dmx.

References utl::getDirs(), ASMbase::getNoFields(), getSize(), ASMbase::makePeriodic(), ThreadGroups::stripDir, and threadGroupsVol.

Referenced by ASMs3Dmx::closeBoundaries(), and ASMs3DmxLag::closeBoundaries().

◆ coeffInd()

int ASMs3D::coeffInd ( size_t  inod) const
private

Returns an index into the internal coefficient array for a node.

Parameters
[in]inod0-based node index local to current patch

References ASMbase::nnod, nodeInd, and svol.

Referenced by getCoord(), and getElementCoordinates().

◆ collapseFace()

bool ASMs3D::collapseFace ( int  face,
int  edge = 0,
int  basis = 1 
)
virtual

Collapses a degenerated face into a single node or edge.

Parameters
[in]faceWhich face to collapse, in range [1,6]
[in]edgeWhich edge to callapse on to, in range [0,12], 0 means collapse on to vertex
[in]basisWhich basis to collapse face for

References ASMbase::collapseNodes(), Vec3::equal(), findStartNode(), getCoord(), ThreadGroups::stripDir, swapW, and threadGroupsVol.

Referenced by SIM3D::parseGeometryTag().

◆ connectBasis()

bool ASMs3D::connectBasis ( int  face,
ASMs3D neighbor,
int  nface,
int  norient,
int  basis = 1,
int  slave = 0,
int  master = 0,
bool  coordCheck = true,
int  thick = 1 
)
protected

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 connectPatch()
[in]basisWhich basis to connect the nodes for (mixed methods)
[in]slave0-based index of the first slave node in this basis
[in]master0-based index of the first master node in this basis
[in]coordCheckFalse to disable coordinate checks (periodic connections)
[in]thickThickness of connection

References ASMbase::collapseNodes(), Vec3::equal(), getBoundaryNodes(), getCoord(), getFaceSize(), and ASMbase::isShared().

Referenced by ASMs3Dmx::connectPatch(), ASMs3DmxLag::connectPatch(), and connectPatch().

◆ connectPatch()

bool ASMs3D::connectPatch ( int  face,
ASM3D neighbor,
int  nface,
int  norient,
int  = 0,
bool  coordCheck = true,
int  thick = 1 
)
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

Implements ASM3D.

Reimplemented in ASMs3DmxLag, and ASMs3Dmx.

References ASMbase::addNeighbor(), connectBasis(), and swapW.

◆ constrainCorner()

void ASMs3D::constrainCorner ( int  I,
int  J,
int  K,
int  dof,
int  code = 0,
char  basis = 1 
)
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 node 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.

Implements ASM3D.

References getCorner(), K, and ASMbase::prescribe().

◆ constrainEdge()

void ASMs3D::constrainEdge ( int  lEdge,
bool  open,
int  dof,
int  code = 0,
char  basis = 1 
)
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 along the edge
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain edge for

Implements ASM3D.

Reimplemented in ASMs3DLag.

References getBoundary1Nodes(), and ASMbase::prescribe().

Referenced by ASMs3DLag::constrainEdge().

◆ constrainFace()

void ASMs3D::constrainFace ( int  dir,
bool  open,
int  dof,
int  code = 0,
char  basis = 1 
)
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

A negative code value implies direct evaluation of the Dirichlet condition function at the control point. Positive code implies projection onto the spline basis representing the boundary surface (needed for curved faces and/or non-constant functions).

Implements ASM3D.

Reimplemented in ASMs3DLag.

References dirich, findStartNode(), getBoundary(), ASMbase::prescribe(), and swapW.

Referenced by ASMs3DLag::constrainFace().

◆ constrainFaceLocal()

size_t ASMs3D::constrainFaceLocal ( int  dir,
bool  open,
int  dof,
int  code = 0,
bool  project = false,
char  T1 = '\0' 
)
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

The local coordinate systems in which the constraints are applied, are constructed from the tangent directions of the boundary surface, evaluated at the Greville points. The local Z-direction is then the outward-directed normal, computed as the cross product of the two tangents. If project is true, the normal vector is projected onto the surface basis of the face in order to obtain corresponding control point values. Otherwise, it is used directly.

A negative code value implies direct evaluation of the Dirichlet condition function at the control point. Positive code implies projection onto the spline basis representing the boundary surface (needed for curved faces and/or non-constant functions).

Implements ASM3D.

References MPC::addMaster(), ASMbase::addMPC(), dirich, getBoundary(), getGrevilleParameters(), getSize(), ASMbase::gNod, ASMbase::isFixed(), ASMbase::MLGN, ASMbase::myMLGN, ASMbase::nf, nxMap, ASMbase::prescribe(), SplineUtils::project(), ASMbase::shareFE, swapW, T1, SplineUtils::toVec3(), Vec3::x, xnMap, ASMbase::xNode, Vec3::y, and Vec3::z.

◆ constrainLine()

void ASMs3D::constrainLine ( int  fdir,
int  ldir,
double  xi,
int  dof,
int  code = 0,
char  basis = 1 
)
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.

Implements ASM3D.

References findStartNode(), ASMbase::prescribe(), and swapW.

◆ constrainNode()

void ASMs3D::constrainNode ( double  xi,
double  eta,
double  zeta,
int  dof,
int  code = 0 
)
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.

Implements ASM3D.

References getSize(), ASMbase::prescribe(), and swapW.

◆ createProjectionBasis()

bool ASMs3D::createProjectionBasis ( bool  init)
virtual

Creates a separate projection basis for this patch.

This method is supposed to be invoked twice during the model generation. In the first call, with init = true, the spline volume object *svol is cloned into *proj and the two pointers are then swapped, such that the subsequent refine and raiseOrder operations will apply to the projection basis and not on the geometry basis. In the second call, the pointers are swapped back.

The method can also be invoked twice with init = false in case the projection basis is to be read from a file.

Reimplemented from ASMbase.

References ASMstruct::geomB, ASMstruct::projB, and svol.

◆ evalPoint()

int ASMs3D::evalPoint ( const double *  xi,
double *  param,
Vec3 X 
) const
virtual

Evaluates the geometry at a specified point.

Parameters
[in]xiDimensionless parameters in range [0.0,1.0] of the point
[out]paramThe (u,v,w) parameters of the point in knot-span domain
[out]XThe Cartesian coordinates of the point
Returns
Local node number within the patch that matches the point, if any
0 if no node (control point) matches this point

Implements ASMbase.

Reimplemented in ASMs3Dmx, and ASMs3DLag.

References ASM::GEOMETRY_BASIS, getBasis(), SplineUtils::point(), ASMbase::searchCtrlPt(), and svol.

◆ evalProjSolution()

bool ASMs3D::evalProjSolution ( Matrix sField,
const Vector locSol,
const int *  npe,
int  n_f 
) const
virtual

Evaluates the projected solution field at all visualization points.

Parameters
[out]sFieldSolution field
[in]locSolSolution vector local to current patch
[in]npeNumber of visualization nodes over each knot span
[in]n_fIf nonzero, mixed evaluates n_f fields on first basis

Reimplemented from ASMbase.

References ASMstruct::evalSolution(), utl::matrix< T >::fillColumn(), getGridParameters(), Fields::getNoFields(), getProjectedFields(), utl::matrix< T >::resize(), separateProjectionBasis(), and Fields::valueFE().

◆ evalSolution() [1/5]

Go::GeomObject * ASMs3D::evalSolution ( const IntegrandBase integrand) const
virtual

Projects the secondary solution field onto the primary basis.

Parameters
[in]integrandObject with problem-specific data and methods

Implements ASMstruct.

References projectSolution().

◆ evalSolution() [2/5]

bool ASMs3D::evalSolution ( Matrix sField,
const IntegrandBase integrand,
const int *  npe = nullptr,
char  project = 0 
) const
virtual

Evaluates the secondary solution field at all visualization points.

Parameters
[out]sFieldSolution field
[in]integrandObject with problem-specific data and methods
[in]npeNumber of visualization nodes over each knot span
[in]projectFlag indicating result recovery method (0=none, 'D'=direct evaluation, 'S'=superconvergent recovery)

The secondary solution is derived from the primary solution, which is assumed to be stored within the integrand for current patch. If npe is null, the solution is recovered or evaluated at the Greville points and then projected onto the spline basis to obtain the control point values, which then are returned through sField. If npe is not null and project is defined, the solution is also projected onto the spline basis, and then evaluated at the npe points.

Reimplemented from ASMbase.

Reimplemented in ASMs3DmxLag, and ASMs3DLag.

References ASMstruct::evalSolution(), utl::matrix< T >::fill(), getGridParameters(), SplineUtils::project(), projectSolution(), projectSolutionLeastSquare(), projectSolutionLocal(), projectSolutionLocalApprox(), and utl::matrix< T >::resize().

◆ evalSolution() [3/5]

bool ASMs3D::evalSolution ( Matrix sField,
const IntegrandBase integrand,
const RealArray gpar,
bool  regular = true 
) const
virtual

Evaluates the secondary solution field at the given points.

Parameters
[out]sFieldSolution field
[in]integrandObject with problem-specific data and methods
[in]gparParameter values of the result sampling points
[in]regularFlag indicating how the sampling points are defined

The secondary solution is derived from the primary solution, which is assumed to be stored within the integrand for current patch. When regular is true, it is assumed that the parameter value array gpar forms a regular tensor-product point grid of dimension gpar[0].size() X gpar[1].size() X gpar[2].size(). Otherwise, we assume that it contains the u, v and w parameters directly for each sampling point.

Reimplemented from ASMbase.

Reimplemented in ASMs3DmxLag, ASMs3Dmx, ASMs3DLag, and ASMs3DSpec.

References FiniteElement::age, Vec4::assign(), FiniteElement::d2NdX2, FiniteElement::detJxW, FiniteElement::dNdX, utl::matrixBase< T >::empty(), IntegrandBase::evalSol(), SplineUtils::extractBasis(), utl::matrix< T >::fillColumn(), findElementContaining(), ASMbase::firstEl, ASMbase::firstIp, utl::gather(), Integrand::getIntegrandType(), getNodalCoordinates(), IntegrandBase::getTimeLevel(), utl::Hessian(), ItgPoint::idx, ItgPoint::iel, ItgPoint::iGP, utl::Jacobian(), ASMbase::MLGE, FiniteElement::N, PROFILE2, utl::matrix< T >::resize(), scatterInd(), Integrand::SECOND_DERIVATIVES, utl::vector< T >::size(), svol, Vec4::t, ItgPoint::u, ItgPoint::v, and ItgPoint::w.

◆ evalSolution() [4/5]

bool ASMs3D::evalSolution ( Matrix sField,
const Vector locSol,
const int *  npe,
int  n_f,
bool  piola 
) const
virtual

Evaluates the primary solution field at all visualization points.

Parameters
[out]sFieldSolution field
[in]locSolSolution vector in DOF-order
[in]npeNumber of visualization nodes over each knot span
[in]n_fIf nonzero, mixed evaluates n_f fields on first basis
[in]piolaIf true, use piola mapping

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag.

References ASMstruct::evalSolution(), ASMbase::evalSolutionPiola(), and getGridParameters().

Referenced by evaluate().

◆ evalSolution() [5/5]

bool ASMs3D::evalSolution ( Matrix sField,
const Vector locSol,
const RealArray gpar,
bool  regular = true,
int  deriv = 0,
int  = 0 
) const
virtual

Evaluates the primary solution field at the given points.

Parameters
[out]sFieldSolution field
[in]locSolSolution vector local to current patch
[in]gparParameter values of the result sampling points
[in]regularFlag indicating how the sampling points are defined
[in]derivDerivative order to return

When regular is true, it is assumed that the parameter value array gpar forms a regular tensor-product point grid of dimension gpar[0].size() X gpar[1].size() X gpar[2].size(). Otherwise, we assume that it contains the u, v and w parameters directly for each sampling point.

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag, ASMs3Dmx, and ASMs3DmxLag.

References SplineUtils::extractBasis(), utl::matrix< T >::fillColumn(), utl::gather(), getNodalCoordinates(), utl::Hessian(), utl::Jacobian(), utl::matrix< T >::multiply(), utl::matrix3d< T >::multiply(), PROFILE2, utl::matrix< T >::resize(), scatterInd(), utl::vector< T >::size(), and svol.

◆ evaluate() [1/3]

bool ASMs3D::evaluate ( const ASMbase basis,
const Vector locVec,
RealArray vec,
int  basisNum 
) const
virtual

Evaluates and interpolates a field over a given geometry.

Parameters
[in]basisThe basis of the field to evaluate
[in]locVecThe coefficients of the field to evaluate
[out]vecThe obtained coefficients after interpolation
[in]basisNumBasis number (mixed)

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag.

References evalSolution(), getBasis(), getGrevilleParameters(), utl::matrix< T >::rows(), and svol.

◆ evaluate() [2/3]

bool ASMs3D::evaluate ( const Field field,
RealArray vec,
int  basisNum 
) const
virtual

Evaluates and interpolates a field over a given geometry.

Parameters
[in]fieldThe field to evaluate
[out]vecThe obtained coefficients after interpolation
[in]basisNumBasis number (mixed)
Note
A Variation Diminishing Spline Approximation is used here as the regular interpolation method in GoTools only works with uniform knots.

Reimplemented from ASMbase.

References getBasis(), getGrevilleParameters(), utl::vector< T >::push_back(), utl::vector< T >::reserve(), and Field::valueFE().

◆ evaluate() [3/3]

bool ASMs3D::evaluate ( const FunctionBase func,
RealArray vec,
int  basisNum,
double  time 
) const
virtual

Evaluates and interpolates a function over a given geometry.

Parameters
[in]funcThe function to evaluate
[out]vecThe obtained coefficients after interpolation
[in]basisNumBasis number (mixed)
[in]timeCurrent time

Reimplemented from ASMbase.

References FunctionBase::dim(), getBasis(), and SplineUtils::project().

◆ evaluateBasis()

void ASMs3D::evaluateBasis ( double  u,
double  v,
double  w,
Vector N 
) const
virtual

Evaluates the basis functions at the specified point.

Parameters
[in]uFirst parameter value of evaluation point
[in]vSecond parameter value of evaluation point
[in]wThird parameter value of evaluation point
[out]NBasis function values

Implements ASMstruct.

References svol.

◆ extractBasis() [1/3]

void ASMs3D::extractBasis ( double  u,
double  v,
double  w,
int  dir,
int  p,
Vector dN,
bool  fromRight = true 
) const

Establishes a vector with basis function derivatives.

Parameters
[in]uFirst parameter value of current integration point
[in]vSecond parameter value of current integration point
[in]wThird parameter value of current integration point
[in]dirWhich parameter to establish derivatives with respect to
[in]pThe derivation order
[out]dNBasis function derivatives
[in]fromRightIf true, evaluate from right if at a knot

◆ extractBasis() [2/3]

void ASMs3D::extractBasis ( double  u,
double  v,
double  w,
Vector N,
Matrix dNdu,
bool  fromRight = true 
) const

Establishes matrices with basis functions and 1st derivatives.

Parameters
[in]uFirst parameter value of current integration point
[in]vSecond parameter value of current integration point
[in]wThird parameter value of current integration point
[out]NBasis function values
[out]dNduFirst derivatives of basis functions
[in]fromRightIf true, evaluate from right if at a knot

References SplineUtils::extractBasis(), and svol.

◆ extractBasis() [3/3]

void ASMs3D::extractBasis ( double  u,
double  v,
double  w,
Vector N,
Matrix dNdu,
Matrix3D d2Ndu2,
bool  fromRight = true 
) const

Establishes matrices with basis functions, 1st and 2nd derivatives.

Parameters
[in]uFirst parameter value of current integration point
[in]vSecond parameter value of current integration point
[in]wThird parameter value of current integration point
[out]NBasis function values
[out]dNduFirst derivatives of basis functions
[out]d2Ndu2Second derivatives of basis functions
[in]fromRightIf true, evaluate from right if at a knot

References SplineUtils::extractBasis(), and svol.

◆ findBoundaryElms()

void ASMs3D::findBoundaryElms ( IntVec elms,
int  lIndex,
int  = 0 
) const
protectedvirtual

Finds the patch-local element numbers on a patch boundary.

Parameters
[out]elmsArray of element numbers
[in]lIndexLocal index of the boundary face

Implements ASMbase.

Reimplemented in ASMs3DLag.

References svol.

Referenced by generateThreadGroups().

◆ findElementContaining()

int ASMs3D::findElementContaining ( const double *  param) const
virtual

Returns the element that contains a specified spatial point.

Parameters
[in]paramThe parameters of the point in the knot-span domain
Returns
Local element number within the patch that contains the point

Implements ASMbase.

References svol.

Referenced by evalSolution().

◆ findPoint()

double ASMs3D::findPoint ( Vec3 X,
double *  param 
) const
virtual

Searches for the specified Cartesian point in the patch.

Parameters
XThe Cartesian coordinates of the point, updated on output
[out]paramThe parameters of the point in the knot-span domain
Returns
Distance from the point X to the found point

Implements ASMbase.

References svol, Vec3::x, Vec3::y, and Vec3::z.

◆ findStartNode()

int ASMs3D::findStartNode ( int &  n1,
int &  n2,
int &  n3,
char  basis 
) const
private

Find the start node and size for a basis.

Parameters
[out]n1Size of basis in first parameter direction
[out]n2Size of basis in second parameter direction
[out]n3Size of basis in third parameter direction
[in]basisBasis to find data for
Returns
1-based index of start node for basis

References getSize().

Referenced by collapseFace(), constrainFace(), constrainLine(), getBoundary1Nodes(), getBoundaryNodes(), and getCorner().

◆ generateFEMTopology()

bool ASMs3D::generateFEMTopology ( )
virtual

Generates the finite element topology data for the patch.

The data generated are the element-to-node connectivity array, the node-to-IJK-index array, as well as global node and element numbers.

Implements ASMbase.

Reimplemented in ASMs3DmxLag, ASMs3Dmx, and ASMs3DLag.

References createMNPC(), ASMbase::firstEl, ASMbase::gEl, ASMbase::gNod, ASMbase::MLGN, ASMbase::myMLGE, ASMbase::myMLGN, ASMbase::myMNPC, myNodeInd, ASMbase::nel, ASMbase::nnod, nodeInd, ASMstruct::projB, ASMbase::shareFE, and svol.

◆ generateThreadGroups() [1/4]

void ASMs3D::generateThreadGroups ( char  lIndex,
bool  silence,
bool   
)
virtual

Generates element groups for multi-threading of boundary integrals.

Parameters
[in]lIndexLocal index [1,6] of the boundary face
[in]silenceIf true, suppress threading group outprint

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag, and ASMs3Dmx.

References generateThreadGroups(), ASMbase::nel, svol, and threadGroupsFace.

◆ generateThreadGroups() [2/4]

void ASMs3D::generateThreadGroups ( const Integrand integrand,
bool  silence,
bool  ignoreGlobalLM 
)
virtual

Generates element groups for multi-threading of interior integrals.

Parameters
[in]integrandObject with problem-specific data and methods
[in]silenceIf true, suppress threading group outprint
[in]ignoreGlobalLMSanity check option

Reimplemented from ASMbase.

Reimplemented in ASMs3Dmx, and ASMs3DLag.

References generateThreadGroups(), getBasis(), ASMbase::nel, ThreadGroups::oneGroup(), ASMstruct::proj2ThreadGroups, ASM::PROJECTION_BASIS_2, ASMstruct::projThreadGroups, ThreadGroups::stripDir, svol, and threadGroupsVol.

◆ generateThreadGroups() [3/4]

void ASMs3D::generateThreadGroups ( size_t  strip1,
size_t  strip2,
size_t  strip3,
bool  silence,
bool  ignoreGlobalLM 
)
protected

Generates element groups for multi-threading of interior integrals.

Parameters
[in]strip1Strip width in first direction
[in]strip2Strip width in second direction
[in]strip3Strip width in third direction
[in]silenceIf true, suppress threading group outprint
[in]ignoreGlobalLMSanity check option

Lamda for setting up thread groups for a basis.

References ThreadGroups::calcGroups(), ASMstruct::checkThreadGroups(), IFEM::cout, getBasis(), ASMbase::MLGE, ASMbase::MNPC, ASMstruct::proj2ThreadGroups, ASM::PROJECTION_BASIS, ASM::PROJECTION_BASIS_2, ASMstruct::projThreadGroups, separateProjectionBasis(), ThreadGroups::size(), svol, and threadGroupsVol.

Referenced by generateThreadGroups(), and ASMs3Dmx::generateThreadGroups().

◆ generateThreadGroups() [4/4]

void ASMs3D::generateThreadGroups ( size_t  strip1,
size_t  strip2,
size_t  strip3,
char  lIndex,
bool  silence,
bool   
)
protected

Generates element groups for multi-threading of boundary integrals.

Parameters
[in]strip1Strip width in first direction
[in]strip2Strip width in second direction
[in]strip3Strip width in third direction
[in]lIndexLocal index [1,6] of the boundary face
[in]silenceIf true, suppress threading group outprint

References ThreadGroups::applyMap(), ThreadGroups::calcGroups(), IFEM::cout, findBoundaryElms(), ThreadGroups::size(), svol, and threadGroupsFace.

◆ getBoundary()

Go::SplineSurface * ASMs3D::getBoundary ( int  dir,
int  = 1 
)
virtual

Returns the spline surface representing a boundary of this patch.

Parameters
[in]dirParameter direction defining which boundary to return

Reimplemented in ASMs3Dmx.

References svol.

Referenced by constrainFace(), and constrainFaceLocal().

◆ getBoundary1Nodes()

void ASMs3D::getBoundary1Nodes ( int  lEdge,
IntVec nodes,
int  basis,
int  = 0,
bool  local = false,
bool  open = false 
) const
virtual

Finds the global (or patch-local) node numbers on a patch boundary.

Parameters
[in]lEdgeLocal index of the boundary edge
nodesArray of node numbers
[in]basisWhich basis to grab nodes for (for mixed methods)
[in]localIf true, return patch-local numbers
[in]openIf true, exclude edge end points

Reimplemented from ASMbase.

References findStartNode(), ASMbase::idx, and swapW.

Referenced by constrainEdge().

◆ getBoundaryNodes()

void ASMs3D::getBoundaryNodes ( int  lIndex,
IntVec nodes,
int  basis,
int  thick = 1,
int  = 0,
bool  local = false 
) const
virtual

Finds the global (or patch-local) node numbers on a patch boundary.

Parameters
[in]lIndexLocal index of the boundary face
nodesArray of node numbers
[in]basisWhich basis to grab nodes for (for mixed methods)
[in]thickThickness of connection
[in]localIf true, return patch-local node numbers

Implements ASMbase.

Reimplemented in ASMs3Dmx.

References findStartNode(), ASMbase::idx, and swapW.

Referenced by connectBasis(), and ASMs3Dmx::getBoundaryNodes().

◆ getCoord()

Vec3 ASMs3D::getCoord ( size_t  inod) const
virtual

Returns the global coordinates for the given node.

Parameters
[in]inod1-based node index local to current patch

Implements ASMbase.

Reimplemented in ASMs3Dmx, and ASMs3DLag.

References coeffInd(), ASMbase::MLGN, ASMbase::myRmaster, ASMbase::nnod, svol, and xnMap.

Referenced by collapseFace(), and connectBasis().

◆ getCorner()

int ASMs3D::getCorner ( int  I,
int  J,
int  K,
int  basis 
) const
virtual

Returns the node index for a given corner.

Parameters
[in]I-1 or +1 for either umin or umax corner
[in]J-1 or +1 for either vmin or vmax corner
[in]K-1 or +1 for either wmin or wmax corner
[in]basiswhich basis to consider (for mixed methods)

Implements ASM3D.

References findStartNode(), K, and swapW.

Referenced by constrainCorner().

◆ getCornerPoints()

void ASMs3D::getCornerPoints ( int  i1,
int  i2,
int  i3,
std::vector< utl::Point > &  XC 
) const
protected

Computes the element corner coordinates and parameters.

Parameters
[in]i1Parameter index in u-direction
[in]i2Parameter index in v-direction
[in]i3Parameter index in w-direction
[out]XCCoordinates and parameters of the element corners

References getElementCorners().

◆ getElementBorders() [1/2]

void ASMs3D::getElementBorders ( int  i1,
int  i2,
int  i3,
double *  u,
double *  v,
double *  w 
) const
protected

Computes the element border parameters.

Parameters
[in]i1Parameter index in u-direction
[in]i2Parameter index in v-direction
[in]i3Parameter index in w-direction
[out]uParameter values of the west-east borders
[out]vParameter values of the south-north borders
[out]wParameter values of the back-front borders

References svol.

◆ getElementBorders() [2/2]

void ASMs3D::getElementBorders ( int  iel,
double *  u 
) const
protectedvirtual

Computes the element border parameters.

Parameters
[in]iel1-based element index
[out]uParameter values of the element borders

Implements ASMstruct.

References svol.

Referenced by getElementCorners(), and ASMs3Dmx::integrate().

◆ getElementCoordinates()

bool ASMs3D::getElementCoordinates ( Matrix X,
int  iel,
bool  forceItg = false 
) const
virtual

Returns a matrix with nodal coordinates for an element.

Parameters
[out]X3 \(\times\)n-matrix, where n is the number of nodes in one element
[in]iel1-based element index local to current patch
[in]forceItgIf true, return the integration basis coordinates otherwise the geometry basis coordinates are returned

Implements ASMbase.

Reimplemented in ASMs3DLag.

References coeffInd(), utl::matrix< T >::cols(), ASM::GEOMETRY_BASIS, getBasis(), getElementCoordinatesPrm(), getFirstItgElmNode(), ASMs3D::IJK::I, ASMs3D::IJK::J, ASMs3D::IJK::K, ASMbase::MNPC, nodeInd, utl::matrix< T >::resize(), and svol.

Referenced by ASMs3DmxLag::evalSolution(), integrate(), ASMs3Dmx::integrate(), and integrateEdge().

◆ getElementCoordinatesPrm()

bool ASMs3D::getElementCoordinatesPrm ( Matrix X,
double  u,
double  v,
double  w 
) const
protected

Returns a matrix with nodal coordinates for element spanning given parameters.

Parameters
[out]X3 \(\times\)n-matrix, where n is the number of nodes
[in]uFirst parameter of point
[in]vSecond parameter of point
[in]wThird parameter of point

References utl::matrix< T >::cols(), ASM::GEOMETRY_BASIS, getBasis(), and utl::matrix< T >::resize().

Referenced by ASMs3DmxLag::evalSolution(), and getElementCoordinates().

◆ getElementCorners()

double ASMs3D::getElementCorners ( int  i1,
int  i2,
int  i3,
std::vector< Vec3 > &  XC,
RealArray uC = nullptr 
) const
protected

Computes the element corner coordinates.

Parameters
[in]i1Parameter index in u-direction
[in]i2Parameter index in v-direction
[in]i3Parameter index in w-direction
[out]XCCoordinates of the element corners
[out]uCSpline parameters of the element corners (optional)
Returns
Characteristic element size

References getElementBorders(), ASM3D::getElementSize(), ASMbase::nsd, and svol.

Referenced by getCornerPoints(), integrate(), ASMs3Dmx::integrate(), and ASMs3DmxLag::integrate().

◆ getElmConnectivities()

void ASMs3D::getElmConnectivities ( IntMat neigh,
int  basis = ASM::INTEGRATION_BASIS 
) const
virtual

Calculates the matrix of element neighbour connectivities.

Parameters
[out]neighList of element neighbors for each element
[in]basisBasis to obtain connectivities for

Implements ASMbase.

References getBasis(), ASMbase::idx, ASM::INTEGRATION_BASIS, and ASMbase::MLGE.

◆ getFaceSize()

bool ASMs3D::getFaceSize ( int &  n1,
int &  n2,
int  basis,
int  face 
) const
private

Find local sizes for a given face.

Parameters
[out]n1Number of nodes in first local parameter direction on face
[out]n2Number of nodes in second local parameter direction face
[in]basisBasis to obtain sizes for
[in]faceFace to obtain sizes for

References getSize().

Referenced by connectBasis().

◆ getGaussPointParameters()

void ASMs3D::getGaussPointParameters ( RealArray uGP,
int  dir,
int  nGauss,
const double *  xi 
) const
protected

Extracts parameter values of the Gauss points in one direction.

Parameters
[out]uGPParameter values in given direction for all points
[in]dirParameter direction (0,1,2)
[in]nGaussNumber of Gauss points along a knot-span
[in]xiDimensionless Gauss point coordinates [-1,1]

References SplineUtils::getGaussParameters(), ASMbase::nGauss, and svol.

◆ getGrevilleParameters()

bool ASMs3D::getGrevilleParameters ( RealArray prm,
int  dir,
int  basisNum = 1 
) const
protected

Calculates parameter values for the Greville points.

Parameters
[out]prmParameter values in given direction for all points
[in]dirParameter direction (0,1,2)
[in]basisNumWhich basis to get Greville point parameters for

References getBasis().

Referenced by constrainFaceLocal(), evaluate(), projectSolution(), projectSolutionLocal(), and projectSolutionLocalApprox().

◆ getGridParameters()

bool ASMs3D::getGridParameters ( RealArray prm,
int  dir,
int  nSegSpan 
) const
virtual

Calculates parameter values for visualization nodal points.

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

Reimplemented in ASMs3DSpec, and ASMs3DLag.

References svol.

Referenced by evalProjSolution(), evalSolution(), ASMs3DLag::getGridParameters(), and tesselate().

◆ getNodalCoordinates()

void ASMs3D::getNodalCoordinates ( Matrix X,
bool  geo = false 
) const
virtual

Returns a matrix with all nodal coordinates within the patch.

Parameters
[out]X3 \(\times\)n-matrix, where n is the number of nodes
[in]geoIf true, coordinates for the geometry basis are returned otherwise the integration basis coordinates are returned

Implements ASMbase.

Reimplemented in ASMs3DLag.

References ASM::GEOMETRY_BASIS, getBasis(), utl::matrix< T >::resize(), and svol.

Referenced by ASMs3Dmx::evalSolution(), and evalSolution().

◆ getNodeID()

int ASMs3D::getNodeID ( size_t  inod,
bool  noAddedNodes = false 
) const
virtual

Returns the global node number for the given node.

Parameters
[in]inod1-based node index local to current patch
[in]noAddedNodesIf true, use nxMap to find the real node

Reimplemented from ASMbase.

References ASMbase::MLGN, and nxMap.

◆ getNodeIndex()

size_t ASMs3D::getNodeIndex ( int  globalNum,
bool  noAddedNodes = false 
) const
virtual

Returns local 1-based index of the node with given global number.

If the given node number is not present, 0 is returned.

Parameters
[in]globalNumGlobal node number
[in]noAddedNodesIf true, use xnMap to find the real node

Reimplemented from ASMbase.

References utl::findIndex(), ASMbase::MLGN, ASMbase::nnod, and xnMap.

◆ getNoStructElms()

bool ASMs3D::getNoStructElms ( int &  n1,
int &  n2,
int &  n3 
) const
virtual

Returns the number of elements in each parameter direction.

Parameters
[out]n1Number of nodes in first (u) direction
[out]n2Number of nodes in second (v) direction
[out]n3Number of nodes in third (w) direction

Implements ASMstruct.

References svol.

◆ getOrder()

bool ASMs3D::getOrder ( int &  p1,
int &  p2,
int &  p3 
) const
virtual

Returns the polynomial order in each parameter direction.

Parameters
[out]p1Order in first (u) direction
[out]p2Order in second (v) direction
[out]p3Order in third (w) direction

Reimplemented from ASMbase.

Reimplemented in ASMs3DLag.

References svol.

◆ getParameterDomain()

bool ASMs3D::getParameterDomain ( Real2DMat u,
IntVec corners 
) const
virtual

Returns parameter values and node numbers of the domain corners.

Parameters
[out]uParameter values of the domain corners
[out]corners1-based indices of the corner nodes (optional)

Implements ASMbase.

References svol.

◆ getParametricArea()

double ASMs3D::getParametricArea ( int  iel,
int  dir 
) const
protected

Returns boundary face area in the parameter space for an element.

Parameters
[in]ielElement index
[in]dirLocal face index of the boundary face

References ASMbase::MNPC.

Referenced by integrate(), and ASMs3Dmx::integrate().

◆ getParametricVolume()

double ASMs3D::getParametricVolume ( int  iel) const
protected

Returns the volume in the parameter space for an element.

Parameters
[in]ielElement index

References ASMbase::MNPC.

Referenced by ASMs3DmxLag::evalSolution(), integrate(), and ASMs3Dmx::integrate().

◆ getProjectedField()

Field * ASMs3D::getProjectedField ( const Vector coefs) const
virtual

Returns a field using the projection basis.

Parameters
[in]coefsThe coefficients for the field

Reimplemented from ASMbase.

References getNoProjectionNodes(), ASMstruct::projB, and utl::vector< T >::size().

◆ getProjectedFields()

Fields * ASMs3D::getProjectedFields ( const Vector coefs,
size_t  = 0 
) const
virtual

Returns a field using the projection basis.

Parameters
[in]coefsThe coefficients for the field

Reimplemented from ASMbase.

References getNoProjectionNodes(), ASMstruct::projB, and utl::vector< T >::size().

Referenced by evalProjSolution().

◆ getQuasiInterplParameters()

bool ASMs3D::getQuasiInterplParameters ( RealArray prm,
int  dir 
) const
protected

Calculates parameter values for the Quasi-Interpolation points.

Parameters
[out]prmParameter values in given direction for all points
[in]dirParameter direction (0,1,2)

References svol.

Referenced by projectSolutionLocal().

◆ getSize()

bool ASMs3D::getSize ( int &  n1,
int &  n2,
int &  n3,
int  basis = 0 
) const
virtual

Returns the number of nodal points in each parameter direction.

Parameters
[out]n1Number of nodes in first (u) direction
[out]n2Number of nodes in second (v) direction
[out]n3Number of nodes in third (w) direction
[in]basisWhich basis to return size parameters for (mixed methods)

Implements ASMstruct.

Reimplemented in ASMs3DLag, ASMs3DmxLag, and ASMs3Dmx.

References svol.

Referenced by closeBoundaries(), constrainFaceLocal(), constrainNode(), findStartNode(), getFaceSize(), and ASMs3Dmx::getSize().

◆ integrate() [1/4]

bool ASMs3D::integrate ( Integrand integrand,
GlobalIntegral glbInt,
const TimeDomain time 
)
virtual

Evaluates an integral over the interior patch domain.

Parameters
integrandObject with problem-specific data and methods
glbIntThe integrated quantity
[in]timeParameters for nonlinear/time-dependent simulations

Implements ASMbase.

Reimplemented in ASMs3DSpec, ASMs3DmxLag, ASMs3Dmx, and ASMs3DLag.

References utl::vector< T >::add(), FiniteElement::age, GlobalIntegral::assemble(), Vec4::assign(), Integrand::AVERAGE, ASM::cachePolicy, BasisFunctionCache< Dim >::clear(), BasisFunctionCache< Dim >::coord(), BasisFunctionVals::d2Ndu2, FiniteElement::d2NdX2, ASMbase::dbgElm, LocalIntegral::destruct(), FiniteElement::detJxW, BasisFunctionVals::dNdu, FiniteElement::dNdX, Integrand::ELEMENT_CENTER, Integrand::ELEMENT_CORNERS, ItgPoint::eta, Integrand::evalInt(), Integrand::finalizeElement(), ASMbase::firstEl, ASMbase::firstIp, FiniteElement::G, Integrand::G_MATRIX, getElementCoordinates(), getElementCorners(), utl::getGmat(), Integrand::getIntegrandType(), Integrand::getLocalIntegral(), BasisFunctionCache< Dim >::getParam(), getParametricVolume(), BasisFunctionCache< Dim >::getVals(), FiniteElement::h, utl::Hessian(), ItgPoint::idx, ItgPoint::iel, ItgPoint::iGP, BasisFunctionCache< Dim >::init(), Integrand::initElement(), utl::Jacobian(), ASMbase::MLGE, ASMbase::MNPC, myCache, ASMbase::myElms, BasisFunctionVals::N, FiniteElement::N, FiniteElement::Navg, ASMbase::nel, BasisFunctionCache< Dim >::nGauss(), ThreadGroups::oneStripe(), SplineUtils::point(), ASM::PRE_CACHE, PROFILE2, PROFILE3, Integrand::reducedInt(), LocalIntegral::ref(), utl::vector< T >::resize(), Integrand::SECOND_DERIVATIVES, BasisFunctionCache< Dim >::setIntegrand(), utl::vector< T >::size(), ThreadGroups::size(), svol, TimeDomain::t, threadGroupsVol, GlobalIntegral::threadSafe(), ItgPoint::u, ItgPoint::v, ItgPoint::w, BasisFunctionCache< Dim >::weight(), FiniteElement::XC, ItgPoint::xi, and ItgPoint::zeta.

◆ integrate() [2/4]

bool ASMs3D::integrate ( Integrand integrand,
GlobalIntegral glbInt,
const TimeDomain time,
const ASM::InterfaceChecker iChk 
)
protectedvirtual

Evaluates an integral over element interfaces in the patch.

Parameters
integrandObject with problem-specific data and methods
glbIntThe integrated quantity
[in]timeParameters for nonlinear/time-dependent simulations
[in]iChkObject checking if an element interface has contributions

Reimplemented from ASMbase.

Reimplemented in ASMs3Dmx.

References Integrand::getIntegrandType(), Integrand::INTERFACE_TERMS, and svol.

◆ integrate() [3/4]

bool ASMs3D::integrate ( Integrand integrand,
GlobalIntegral glbInt,
const TimeDomain time,
const Real3DMat itgPts 
)
protected

◆ integrate() [4/4]

bool ASMs3D::integrate ( Integrand integrand,
int  lIndex,
GlobalIntegral glbInt,
const TimeDomain time 
)
virtual

◆ integrateEdge()

bool ASMs3D::integrateEdge ( Integrand integrand,
int  lEdge,
GlobalIntegral glbInt,
const TimeDomain time 
)
virtual

◆ projectSolution()

Go::SplineVolume * ASMs3D::projectSolution ( const IntegrandBase integrand) const
private

Projects the secondary solution field onto the primary basis.

Parameters
[in]integrandObject with problem-specific data and methods

References ASMstruct::evalSolution(), getBasis(), getGrevilleParameters(), PROFILE2, and utl::matrix< T >::rows().

Referenced by evalSolution().

◆ raiseOrder()

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

Raises the order of the SplineVolume 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

Implements ASM3D.

References ASMbase::shareFE, and svol.

◆ refine()

bool ASMs3D::refine ( int  dir,
const RealArray xi 
)
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

References ASMbase::shareFE, and svol.

◆ setNodeNumbers()

void ASMs3D::setNodeNumbers ( const IntVec nodes)
virtual

Sets the global node numbers for this patch.

Parameters
[in]nodesVector of global node numbers (zero-based)

Reimplemented from ASMbase.

References ASMbase::myMLGN, ASMbase::setNodeNumbers(), svol, and swapW.

◆ tesselate()

bool ASMs3D::tesselate ( ElementBlock grid,
const int *  npe 
) const
virtual

Creates a hexahedron element model of this patch for visualization.

Parameters
[out]gridThe generated hexahedron grid
[in]npeNumber of visualization nodes over each knot span
Note
The number of element nodes must be set in grid on input.

Implements ASMbase.

Reimplemented in ASMs3DLag.

References getGridParameters(), ElementBlock::getNoNodes(), ElementBlock::resize(), ElementBlock::setCoor(), ElementBlock::setElmId(), ElementBlock::setNode(), ElementBlock::setParams(), and svol.

Referenced by ASMs3DLag::tesselate().

◆ uniformRefine()

bool ASMs3D::uniformRefine ( int  dir,
int  nInsert 
)
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

Implements ASM3D.

References ASMbase::shareFE, and svol.

◆ updateCoords()

bool ASMs3D::updateCoords ( const Vector displ)
virtual

Updates the nodal coordinates for this patch.

Parameters
[in]displIncremental displacements to update the coordinates with

Implements ASMbase.

Reimplemented in ASMs3DLag.

References ASMbase::MLGN, ASMbase::shareFE, utl::vector< T >::size(), and svol.

◆ updateDirichlet()

bool ASMs3D::updateDirichlet ( const std::map< int, RealFunc * > &  func,
const std::map< int, VecFunc * > &  vfunc,
double  time,
const std::map< int, int > *  g2l = nullptr 
)
virtual

Updates the time-dependent in-homogeneous Dirichlet coefficients.

Parameters
[in]funcScalar property fields
[in]vfuncVector property fields
[in]timeCurrent time
[in]g2lPointer to global-to-local node number mapping

This method projects the function describing the in-homogeneous Dirichlet boundary condition onto the spline basis defining the boundary surface, in order to find the control point values which are used as the prescribed values of the boundary DOFs.

Reimplemented from ASMbase.

References dirich, ASMbase::MLGN, ASMbase::mpcs, SplineUtils::project(), and ASMbase::updateDirichlet().


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