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

Driver for assembly of unstructured 2D spline FE models. More...

#include <ASMu2D.h>

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

Classes

class  BasisFunctionCache
 Implementation of basis function cache. More...
 
struct  DirichletEdge
 Struct representing an inhomogeneous Dirichlet boundary condition. More...
 
class  InterfaceChecker
 Base class that checks if an element has interface contributions. More...
 

Public Member Functions

 ASMu2D (unsigned char n_s=2, unsigned char n_f=2)
 Default constructor.
 
 ASMu2D (const ASMu2D &patch, unsigned char n_f=0)
 Copy constructor.
 
virtual ~ASMu2D ()
 Empty destructor.
 
virtual const LR::LRSplineSurface * getBasis (int basis=1) const
 Returns the spline surface representing a basis of this patch.
 
virtual LR::LRSplineSurface * getBasis (int basis=1)
 Returns the spline surface representing a basis of this 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 SplineSurface 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 getElementCoordinates (Matrix &X, int iel, bool forceItg=false) const
 Returns a matrix with nodal coordinates for an element. More...
 
virtual void getElmConnectivities (IntMat &neighs, 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 void getNodalCoordinates (Matrix &X, bool=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 bool updateCoords (const Vector &displ)
 Updates the nodal coordinates for this patch. More...
 
virtual void getBoundaryNodes (int lIndex, IntVec &nodes, int basis, int=1, int orient=0, bool local=false) const
 Finds the global (or patch-local) node numbers on a patch boundary. More...
 
virtual bool getOrder (int &p1, int &p2, int &p3) const
 Returns the polynomial order in each parameter direction. More...
 
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.
 
bool diagonalRefine (int minBasisfunctions)
 Refines along the diagonal of the LR-spline patch. More...
 
bool cornerRefine (int minBasisfunctions)
 Refines the lower-left corner of the LR-spline patch. More...
 
bool uniformRefine (int minBasisfunctions)
 Refines the LR-spline patch uniformly. More...
 
virtual bool uniformRefine (int dir, int nInsert)
 Refines the parametrization by inserting tensor knots uniformly. More...
 
virtual bool refine (int dir, const RealArray &xi, double scale)
 Refines the parametrization by inserting extra tensor knots. More...
 
virtual bool refine (const LR::RefineData &prm, Vectors &sol)
 Refines the mesh adaptively. More...
 
virtual bool raiseOrder (int ru, int rv)
 Raises the order of the tensor spline object for this patch. More...
 
virtual bool createProjectionBasis (bool init)
 Creates a separate projection basis for this patch. More...
 
virtual void setMinimumSize (double size)
 Sets the minimum element area for adaptive refinement.
 
virtual double getMinimumSize (int nrefinements) const
 Defines the minimum element area for adaptive refinement. More...
 
virtual bool checkElementSize (int elmId, bool globalNum=true) const
 Checks if the specified element is larger than the minimum size. More...
 
virtual void extractElmRes (const Matrix &globRes, Matrix &elmRes, size_t internalFirst) const
 Extracts element results for this patch from a global vector. More...
 
void copyRefinement (LR::LRSplineSurface *basis, int multiplicity=1) const
 Copies the refinement to another surface. More...
 
virtual void constrainEdge (int dir, bool open, int dof, int code, char basis)
 Constrains all DOFs on a given boundary edge. More...
 
virtual size_t constrainEdgeLocal (int dir, bool open, int dof, int code, bool project=false)
 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)
 Constrains a corner node identified by the two parameter indices. More...
 
virtual void constrainNode (double xi, double eta, int dof, int code=0)
 Constrains a node identified by two relative parameter values. More...
 
virtual bool connectPatch (int edge, ASM2D &neighbor, int nedge, bool revers, int=0, bool coordCheck=true, int thick=1)
 Connects all matching nodes on two adjacent boundary edges. 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 edge. More...
 
virtual bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time, const ASM::InterfaceChecker &iChk)
 Evaluates an integral over element interfaces in the patch. More...
 
virtual bool diracPoint (Integrand &integrand, GlobalIntegral &glbInt, const double *param, const Vec3 &pval)
 Integrates a spatial dirac-delta function over a 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 int getCorner (int I, int J, int basis) const
 Returns the node index for a given corner. 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 quad 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=false, 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 FunctionBase *func, RealArray &vec, int, double time) const
 Evaluates and interpolates a function over a given geometry. More...
 
virtual bool evalSolution (Matrix &sField, const IntegrandBase &integrand, const int *npe, char project='\0') const
 Evaluates the secondary solution field at all visualization points. More...
 
virtual bool separateProjectionBasis () const
 Checks if a separate projection basis is used for this patch.
 
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...
 
virtual void storeMesh (const std::string &fName, int fType) const
 Stores the mesh basis to encapsulated postscript files. More...
 
void setOutputMaster (const ASMu2D *pch)
 Set master patch for VTF output. More...
 
virtual LR::LRSpline * 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=false) const
 Evaluates the secondary solution field at the given points. More...
 
bool edgeL2projection (const DirichletEdge &edge, const FunctionBase &values, Real2DMat &result, double time) const
 Projects inhomogenuous dirichlet conditions by continuous L2-fit. More...
 
virtual bool transferGaussPtVars (const LR::LRSpline *old_basis, const RealArray &oldVar, RealArray &newVar, int nGauss) const
 Transfers Gauss point variables from old basis to this patch. More...
 
virtual bool transferGaussPtVarsN (const LR::LRSpline *old_basis, const RealArray &oldVar, RealArray &newVar, int nGauss) const
 Transfers Gauss point variables from old basis to this patch. More...
 
virtual bool transferCntrlPtVars (const LR::LRSpline *old_basis, RealArray &newVar, int nGauss) const
 Transfers control point variables from old basis to this patch. More...
 
virtual size_t getNoBoundaryElms (char lIndex, char ldim) const
 Returns the number of elements on a boundary.
 
bool rational () const
 Query whether basis is rational or not.
 
virtual bool refine (const LR::RefineData &prm, Vectors &sol)
 Refines the mesh adaptively. More...
 
virtual bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)=0
 Evaluates an integral over the interior patch domain. More...
 
virtual bool integrate (Integrand &integrand, int lIndex, GlobalIntegral &glbInt, const TimeDomain &time)=0
 Evaluates a boundary integral over a patch face/edge. More...
 
virtual bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time, const ASM::InterfaceChecker &iChk)
 Evaluates an integral over element interfaces in the patch. More...
 
virtual bool transferCntrlPtVars (const LR::LRSpline *oldBasis, RealArray &newVar, int nGauss) const=0
 Transfers control point variables from old basis to this patch. More...
 
bool transferCntrlPtVars (LR::LRSpline *oldBasis, const RealArray &oldVar, RealArray &newVar, int nGauss, int nf=1) const
 Transfers control point variables from old basis to this patch. More...
 
- Public Member Functions inherited from ASMLRSpline
virtual ~ASMLRSpline ()
 Empty destructor.
 
virtual bool empty () const
 Checks if the patch is empty.
 
virtual bool getParameterDomain (Real2DMat &, IntVec *) const
 Returns parameter values and node numbers of the domain corners.
 
const LR::LRSpline * getRefinementBasis () const
 Returns a const pointer to refinement basis.
 
IntVec getFunctionsForElements (const IntVec &elements, bool globalId=false) const
 Returns a list of basis functions having support on given elements.
 
void getFunctionsForElements (IntSet &functions, const IntVec &elements, bool globalId=true) const
 Returns a list of basis functions having support on given elements.
 
virtual IntVec getBoundaryCovered (const IntSet &nodes) const
 Returns all boundary functions that are covered by the given nodes. More...
 
IntVec getOverlappingNodes (const IntSet &nodes, int dir=7) const
 Returns all functions whose support overlap with the input nodes. More...
 
IntVec getOverlappingNodes (int node, int dir=7) const
 Returns all functions whose support overlap with the input node. More...
 
bool transferCntrlPtVars (LR::LRSpline *oldBasis, const RealArray &oldVar, RealArray &newVar, int nGauss, int nf=1) const
 Transfers control point variables from old basis to this patch. More...
 
virtual std::pair< size_t, double > findClosestNode (const Vec3 &X) const
 Finds the node that is closest to the given point X.
 
virtual Vec3 getElementCenter (int iel) const
 Returns the coordinates of the element center.
 
virtual void getNoIntPoints (size_t &nPt, size_t &nIPt)
 Computes the total number of integration points in this patch.
 
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.
 
virtual bool addXElms (short int dim, short int item, size_t nXn, IntVec &nodes)
 Adds extraordinary elements associated with a patch boundary. More...
 
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.
 
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.
 
virtual size_t getNodeIndex (int globalNum, bool=false) const
 Returns local 1-based index of the node with given global number. More...
 
virtual int getNodeID (size_t inod, bool=false) const
 Returns the global node number for the given node. More...
 
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...
 
virtual void getBoundary1Nodes (int lIndex, IntVec &nodes, int basis=0, int orient=-1, bool local=false, bool open=false) const
 Finds the global (or patch-local) node numbers on a patch boundary. 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.
 
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 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.
 
virtual void copyParameterDomain (const ASMbase *)
 Copies the parameter domain from another patch.
 
virtual void closeBoundaries (int dir=1, int basis=0, int master=1)
 Makes two opposite boundaries periodic. More...
 
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.
 
virtual void setNodeNumbers (const IntVec &nodes)
 Sets the global node numbers for this patch. More...
 
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 void generateThreadGroups (char, bool, bool)
 Generates element groups for multi-threading of boundary integrals.
 
virtual bool validateThreadGroups (const SAM *) const
 Validates the threading groups based on the assembly data in SAM.
 
virtual bool integrateEdge (Integrand &integrand, int lEdge, GlobalIntegral &glbInt, const TimeDomain &time)
 Evaluates a boundary integral over a patch edge. More...
 
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 evaluate (const ASMbase *basis, const Vector &locVec, RealArray &vec, int basisNum=1) const
 Evaluates and interpolates a field over a given geometry. More...
 
virtual bool evaluate (const Field *f, RealArray &vec, int basisNum=1) const
 Evaluates and interpolates a scalar field over a given geometry. 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...
 
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...
 
virtual bool addRigidCpl (int lindx, int ldim, int basis, int &gMaster, const Vec3 &Xmaster, bool extraPt=true)
 Adds MPC-equations representing a rigid coupling 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 ASMunstruct
virtual ~ASMunstruct ()
 Empty destructor.
 
- Public Member Functions inherited from ASM2D
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 refine (int dir, const std::vector< double > &xi, double scale=1.0)=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 computeBasisNurbs (double u, double v, Go::BasisPtsSf &bas, int iel, const LR::LRSplineSurface &spline)
 Evaluate NURBS basis functions in a point.
 
static void computeBasisNurbs (double u, double v, Go::BasisDerivsSf &bas, int iel, const LR::LRSplineSurface &spline)
 Evaluate NURBS basis functions and first derivatives in a point.
 
static void computeBasisNurbs (double u, double v, Go::BasisDerivsSf2 &bas, int iel, const LR::LRSplineSurface &spline)
 Evaluate NURBS basis functions and two derivatives in a point.
 
static void computeBasisNurbs (double u, double v, Go::BasisDerivsSf3 &bas, int iel, const LR::LRSplineSurface &spline)
 Evaluate NURBS basis functions and three derivatives in a point.
 
static bool getCoordinates (Matrix &X, unsigned char nsd, const LR::LRSplineSurface &spline, int iel=-1)
 Returns a matrix with control point coordinates. More...
 
- Static Public Member Functions inherited from ASMLRSpline
static Go::BsplineBasis getBezierBasis (int p, double start=-1.0, double end=1.0)
 Returns a Bezier basis of order p.
 
static void Sort (int u, int v, int orient, std::vector< LR::Basisfunction * > &functions)
 Sort basis functions based on local knot vectors.
 
- 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 ASM2D
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

bool integrate (Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time, const Real3DMat &itgPts)
 Evaluates an integral over the interior patch domain. More...
 
LR::LRSplineSurface * projectSolution (const IntegrandBase &integrand) const
 Projects the secondary solution field onto the primary basis. More...
 
LR::LRSplineSurface * scRecovery (const IntegrandBase &integrand) const
 Projects the secondary solution using a superconvergent approach. More...
 
LR::LRSplineSurface * regularInterpolation (const RealArray &upar, const RealArray &vpar, const Matrix &points, int basis) const
 Interpolates an LR spline at a given set of parametric coordinates. More...
 
virtual void findBoundaryElms (IntVec &elms, int lIndex, int orient) 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 edge, ASMu2D &neighbor, int nedge, bool revers, int basis=1, int slave=0, int master=0, bool coordCheck=true, int thick=1)
 Connects all matching nodes on two adjacent boundary edges. More...
 
void getGaussPointParameters (RealArray &uGP, int dir, int nGauss, int iel, const double *xi, const LR::LRSplineSurface *spline=nullptr) 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...
 
double getParametricLength (int iel, int dir) const
 Returns boundary edge length in the parameter space for an element. More...
 
double getElementCorners (int iel, std::vector< Vec3 > &XC, RealArray *uC=nullptr) const
 Computes the element corner coordinates. More...
 
void getCornerPoints (int iel, std::vector< utl::Point > &XC) const
 Computes the element corner coordinates and parameters. More...
 
bool evaluateBasis (int iel, FiniteElement &fe, int derivs=0) const
 Evaluates the basis functions and derivatives of an element. More...
 
void computeBasis (double u, double v, Go::BasisPtsSf &bas, int iel, const LR::LRSplineSurface *spline=nullptr) const
 Evaluate basis functions in a point.
 
void computeBasis (double u, double v, Go::BasisDerivsSf &bas, int iel, const LR::LRSplineSurface *spline=nullptr) const
 Evaluate basis functions and first derivatives in a point.
 
void computeBasis (double u, double v, Go::BasisDerivsSf2 &bas, int iel, const LR::LRSplineSurface *spline=nullptr) const
 Evaluate basis functions and two derivatives in a point.
 
void computeBasis (double u, double v, Go::BasisDerivsSf3 &bas, int iel, const LR::LRSplineSurface *spline=nullptr) const
 Evaluate basis functions and three derivatives in a point.
 
virtual int evalPoint (int iel, const double *param, Vec3 &X) const
 Evaluates the geometry at a specified point. More...
 
void generateThreadGroups (const Integrand &integrand, bool silence, bool ignoreGlobalLM)
 Generates element groups for multi-threading of interior integrals. More...
 
virtual void generateThreadGroupsFromElms (const IntVec &elms)
 Generate element groups from a partition.
 
virtual void generateProjThreadGroupsFromElms (const IntVec &elms)
 Generate element groups from a partition.
 
virtual void changeNumThreads ()
 Hook for changing number of threads.
 
virtual void remapErrors (RealArray &errors, const RealArray &origErr, bool elemErrors) const
 Remap element wise errors to basis functions. More...
 
virtual void extendRefinementDomain (IntSet &refineIndices, const IntSet &neighborIndices) const
 Extends the refinement domain with information for neighbors. More...
 
std::shared_ptr< LR::LRSplineSurface > createLRfromTensor ()
 Converts current tensor spline object to LR-spline.
 
void generateBezierBasis ()
 Generate bezier basis.
 
void generateBezierExtraction ()
 Generate bezier extraction operators.
 
void writePostscriptElementsNurbs (std::shared_ptr< LR::LRSplineSurface > mesh, std::ostream &out, bool close=true, int nu=2, int nv=2)
 Write NURBS elements as postscript file.
 
void writePostscriptMeshWithControlPointsNurbs (std::shared_ptr< LR::LRSplineSurface > mesh, std::ostream &out, int nu=2, int nv=2)
 Write NURBS elements as postscript file.
 
- Protected Member Functions inherited from ASMLRSpline
 ASMLRSpline (unsigned char n_p, unsigned char n_s, unsigned char n_f)
 The constructor sets the space dimensions. More...
 
 ASMLRSpline (const ASMLRSpline &patch, unsigned char n_f)
 Special copy constructor for sharing of FE data. More...
 
bool doRefine (const LR::RefineData &prm, LR::LRSpline *lrspline)
 Refines the mesh adaptively. More...
 
virtual int evalPoint (const double *xi, double *param, Vec3 &X) const=0
 Evaluates the geometry at a specified point. 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 ASMunstruct
 ASMunstruct ()
 The constructor is protected to allow objects of sub-classes only.
 
- Protected Member Functions inherited from ASM2D
 ASM2D ()
 The constructor is protected to allow objects of sub-classes only.
 

Static Protected Member Functions

static std::shared_ptr< LR::LRSplineSurface > createLRNurbs (const Go::SplineSurface &srf)
 Converts a rational spline surface to a LR NURBS surface.
 
- Static Protected Member Functions inherited from ASMLRSpline
static bool checkThreadGroups (const IntMat &groups, const std::vector< const LR::LRSpline * > &bases, const LR::LRSpline *threadBasis)
 Santity check thread groups. More...
 
- 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 ASM2D
static double getElementSize (const std::vector< Vec3 > &XC)
 Returns characteristic element size based on corner coordinates.
 

Protected Attributes

std::shared_ptr< LR::LRSplineSurface > lrspline
 The LR-spline surface object.
 
bool is_rational = false
 True if basis is rational.
 
const ASMu2DoutputMaster = nullptr
 Master patch to use for VTF output.
 
Go::SplineSurface * tensorspline
 Pointer to original tensor spline object.
 
Go::SplineSurface * tensorPrjBas
 Pointer to tensor spline projection base.
 
std::vector< DirichletEdgedirich
 Inhomogeneous Dirichlet boundary condition data.
 
const MatricesbezierExtract
 Bezier extraction matrices.
 
Matrices myBezierExtract
 Bezier extraction matrices.
 
Go::BsplineBasis bezier_u
 Bezier basis in the u-direction.
 
Go::BsplineBasis bezier_v
 Bezier basis in the v-direction.
 
std::vector< std::unique_ptr< BasisFunctionCache > > myCache
 Basis function cache.
 
- Protected Attributes inherited from ASMLRSpline
std::shared_ptr< LR::LRSpline > geomB
 Pointer to spline object of the geometry basis.
 
std::shared_ptr< LR::LRSpline > projB
 Pointer to spline object of the projection basis.
 
std::shared_ptr< LR::LRSpline > projB2
 Pointer to spline object of the secondary projection basis.
 
std::shared_ptr< LR::LRSpline > refB
 Pointer to spline object of the refinement basis.
 
ThreadGroups threadGroups
 Element groups for multi-threaded assembly.
 
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 Member Functions

bool evaluateBasisNurbs (int iel, FiniteElement &fe, int derivs) const
 Evaluates the NURBS basis functions and derivatives of an element. More...
 

Private Attributes

double aMin
 Minimum element area for adaptive refinement.
 

Additional Inherited Members

- Public Types inherited from ASMbase
using BCVec = std::vector< BC >
 Nodal boundary condition container.
 
- Public Types inherited from ASM2D
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 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 unstructured 2D spline FE models.

This class contains methods common for 2D LR-spline patches.

Member Function Documentation

◆ assembleL2matrices()

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

◆ checkElementSize()

bool ASMu2D::checkElementSize ( int  elmId,
bool  globalNum = true 
) const
virtual

Checks if the specified element is larger than the minimum size.

Parameters
[in]elmIdGlobal/patch-local element index
[in]globalNumIf true, elmId is global otherwise patch-local

Reimplemented from ASMbase.

◆ clear()

void ASMu2D::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 ASMu2Dmx.

References ASMbase::clear(), dirich, ASMLRSpline::geomB, lrspline, myCache, ASMLRSpline::projThreadGroups, ASMbase::shareFE, tensorPrjBas, and tensorspline.

Referenced by ASMu2Dmx::clear().

◆ connectBasis()

bool ASMu2D::connectBasis ( int  edge,
ASMu2D neighbor,
int  nedge,
bool  revers,
int  basis = 1,
int  slave = 0,
int  master = 0,
bool  coordCheck = true,
int  thick = 1 
)
protected

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]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
[in]thickThickness of connection

References getBoundaryNodes(), and ASMbase::isShared().

Referenced by ASMu2Dmx::connectPatch(), and connectPatch().

◆ connectPatch()

bool ASMu2D::connectPatch ( int  edge,
ASM2D neighbor,
int  nedge,
bool  revers,
int  = 0,
bool  coordCheck = true,
int  thick = 1 
)
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
[in]thickThickness of connection

Implements ASM2D.

Reimplemented in ASMu2Dmx.

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

◆ constrainCorner()

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

Implements ASM2D.

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

◆ constrainEdge()

void ASMu2D::constrainEdge ( int  dir,
bool  open,
int  dof,
int  code,
char  basis 
)
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 along the edge
[in]codeInhomogeneous dirichlet condition code
[in]basisWhich basis to constrain edge 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 curve (needed for curved edges and/or non-constant functions).

Implements ASM2D.

Reimplemented in ASMu2DC1.

References dirich, ASMu2D::DirichletEdge::edg, utl::findIndex(), getBasis(), getNoNodes(), ASMu2D::DirichletEdge::isCorner(), ASMu2D::DirichletEdge::lr, lrspline, ASMu2D::DirichletEdge::MLGE, ASMu2D::DirichletEdge::MLGN, ASMu2D::DirichletEdge::MNPC, and ASMbase::prescribe().

Referenced by ASMu2DC1::constrainEdge().

◆ constrainEdgeLocal()

size_t ASMu2D::constrainEdgeLocal ( int  dir,
bool  open,
int  dof,
int  code,
bool  project = false 
)
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

Implements ASM2D.

◆ constrainNode()

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

Implements ASM2D.

References IFEM::cout, ASMLRSpline::evalPoint(), getCoord(), ASMbase::nnod, and ASMbase::prescribe().

◆ copyRefinement()

void ASMu2D::copyRefinement ( LR::LRSplineSurface *  basis,
int  multiplicity = 1 
) const

Copies the refinement to another surface.

Parameters
basisSurface to copy refinement to
[in]multiplicityWanted multiplicity

References getBasis(), and ASM::REFINEMENT_BASIS.

Referenced by ASMu2Dmx::refine().

◆ cornerRefine()

bool ASMu2D::cornerRefine ( int  minBasisfunctions)

Refines the lower-left corner of the LR-spline patch.

Progressively refine until the LR-spline object contains at least minBasisfunctions basis functions.

Parameters
[in]minBasisfunctionslower bound on number of basis functions

References lrspline, and ASMbase::shareFE.

◆ createProjectionBasis()

bool ASMu2D::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 surface object is cloned 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 tensorspline.

◆ diagonalRefine()

bool ASMu2D::diagonalRefine ( int  minBasisfunctions)

Refines along the diagonal of the LR-spline patch.

Progressively refine until the LR-spline object contains at least minBasisfunctions basis functions.

Parameters
[in]minBasisfunctionslower bound on number of basis functions

References lrspline, and ASMbase::shareFE.

◆ diracPoint()

bool ASMu2D::diracPoint ( Integrand integrand,
GlobalIntegral glbInt,
const double *  param,
const Vec3 pval 
)
virtual

Integrates a spatial dirac-delta function over a patch.

Parameters
integrandObject with problem-specific data and methods
glbIntThe integrated quantity
[in]paramParameters of the non-zero point of dirac-delta function
[in]pvalFunction value at the specified point

Reimplemented from ASMbase.

References GlobalIntegral::assemble(), LocalIntegral::destruct(), Integrand::evalPoint(), evaluateBasis(), ASMbase::firstEl, Integrand::getLocalIntegral(), ItgPoint::idx, ItgPoint::iel, lrspline, ASMbase::MLGE, ASMbase::MNPC, ItgPoint::u, and ItgPoint::v.

◆ edgeL2projection()

bool ASMu2D::edgeL2projection ( const DirichletEdge edge,
const FunctionBase values,
Real2DMat result,
double  time 
) const

Projects inhomogenuous dirichlet conditions by continuous L2-fit.

Parameters
[in]edgelow-level edge information needed to do integration
[in]valuesinhomogenuous function which is to be fitted
[out]resultfitted value in terms of control-point values
[in]timetime used in dynamic problems

References FunctionBase::dim(), ASMu2D::DirichletEdge::edg, ASM::GEOMETRY_BASIS, getBasis(), GaussQuadrature::getCoord(), getElementCoordinates(), getGaussPointParameters(), ASMbase::getNoGaussPt(), getParametricLength(), GaussQuadrature::getWeight(), lrspline, ASMu2D::DirichletEdge::MLGE, ASMu2D::DirichletEdge::MLGN, ASMu2D::DirichletEdge::MNPC, and SparseMatrix::resize().

Referenced by updateDirichlet().

◆ evalPoint() [1/2]

int ASMu2D::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) 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

If param is NULL, then xi is taken to be in the parameter domain of the LR-spline object instead of the dimensionless [0,1] domain.

Implements ASMbase.

References ASMLRSpline::evalPoint(), ASM::GEOMETRY_BASIS, getBasis(), lrspline, and ASMbase::nel.

◆ evalPoint() [2/2]

int ASMu2D::evalPoint ( int  iel,
const double *  param,
Vec3 X 
) const
protectedvirtual

Evaluates the geometry at a specified point.

Parameters
[in]iel0-based local element index
[in]paramThe (u,v) 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 ASMLRSpline.

References computeBasis(), ASM::GEOMETRY_BASIS, getBasis(), getElementCoordinates(), and lrspline.

◆ evalProjSolution()

bool ASMu2D::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 ASMLRSpline::evalSolution(), utl::matrix< T >::fillColumn(), getGridParameters(), Fields::getNoFields(), getProjectedFields(), utl::matrix< T >::resize(), separateProjectionBasis(), and Fields::valueFE().

◆ evalSolution() [1/5]

LR::LRSpline * ASMu2D::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 ASMLRSpline.

◆ evalSolution() [2/5]

bool ASMu2D::evalSolution ( Matrix sField,
const IntegrandBase integrand,
const int *  npe,
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.

References ASMLRSpline::evalSolution(), utl::matrix< T >::fillColumn(), getGridParameters(), SplineUtils::project(), projectSolution(), utl::matrix< T >::resize(), and scRecovery().

◆ evalSolution() [3/5]

bool ASMu2D::evalSolution ( Matrix sField,
const IntegrandBase integrand,
const RealArray gpar,
bool  = false 
) 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

The secondary solution is derived from the primary solution, which is assumed to be stored within the integrand for current patch. We assume that the parameter value array gpar contains the u and v parameters directly for each sampling point.

Reimplemented from ASMbase.

Reimplemented in ASMu2Dmx.

References computeBasis(), FiniteElement::d2NdX2, FiniteElement::d3NdX3, ASMbase::deformedConfig(), FiniteElement::detJxW, FiniteElement::dNdX, utl::matrixBase< T >::empty(), IntegrandBase::evalSol(), SplineUtils::extractBasis(), utl::matrix< T >::fillColumn(), ASMbase::firstIp, FiniteElement::G, getElementCoordinates(), Integrand::getIntegrandType(), getNodalCoordinates(), FiniteElement::H, utl::Hessian(), utl::Hessian2(), ItgPoint::iGP, utl::Jacobian(), lrspline, ASMbase::MNPC, FiniteElement::N, ASMbase::nsd, FiniteElement::p, PROFILE2, FiniteElement::q, utl::matrix< T >::resize(), Integrand::SECOND_DERIVATIVES, utl::vector< T >::size(), Integrand::THIRD_DERIVATIVES, ItgPoint::u, Integrand::UPDATED_NODES, and ItgPoint::v.

◆ evalSolution() [4/5]

bool ASMu2D::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.

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

◆ evalSolution() [5/5]

bool ASMu2D::evalSolution ( Matrix sField,
const Vector locSol,
const RealArray gpar,
bool  = false,
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]derivDerivative order to return

Reimplemented from ASMbase.

Reimplemented in ASMu2Dmx.

References computeBasis(), FiniteElement::dNdX, evaluateBasis(), SplineUtils::extractBasis(), utl::matrix< T >::fillColumn(), utl::gather(), getElementCoordinates(), getNoNodes(), utl::Hessian(), utl::Jacobian(), lrspline, ASMbase::MNPC, utl::matrix< T >::multiply(), utl::matrix3d< T >::multiply(), FiniteElement::N, FiniteElement::p, PROFILE2, FiniteElement::q, utl::matrix< T >::resize(), utl::vector< T >::size(), ItgPoint::u, and ItgPoint::v.

◆ evaluate()

bool ASMu2D::evaluate ( const FunctionBase func,
RealArray vec,
int  ,
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]timeCurrent time

Reimplemented from ASMbase.

References ASMbase::L2projection().

◆ evaluateBasis()

bool ASMu2D::evaluateBasis ( int  iel,
FiniteElement fe,
int  derivs = 0 
) const
protected

Evaluates the basis functions and derivatives of an element.

Parameters
[in]iel0-based element index
feIntegration point data for current element
[in]derivsDerivative order of the basis functions

References bezier_u, ItgPoint::eta, evaluateBasisNurbs(), is_rational, lrspline, PROFILE3, ItgPoint::u, ItgPoint::v, and ItgPoint::xi.

Referenced by diracPoint(), and evalSolution().

◆ evaluateBasisNurbs()

bool ASMu2D::evaluateBasisNurbs ( int  iel,
FiniteElement fe,
int  derivs 
) const
private

Evaluates the NURBS basis functions and derivatives of an element.

Parameters
[in]iel0-based element index
feIntegration point data for current element
[in]derivsDerivative order of the basis functions

References bezier_u, bezier_v, bezierExtract, FiniteElement::detJxW, FiniteElement::dNdX, utl::vector< T >::dot(), ItgPoint::eta, getElementCoordinates(), ItgPoint::iGP, utl::Jacobian(), lrspline, utl::matrix< T >::multiply(), FiniteElement::N, utl::matrix< T >::outer_product(), PROFILE3, utl::vector< T >::size(), utl::matrixBase< T >::sum(), utl::vector< T >::sum(), ItgPoint::u, ItgPoint::v, and ItgPoint::xi.

Referenced by evaluateBasis().

◆ extendRefinementDomain()

void ASMu2D::extendRefinementDomain ( IntSet refineIndices,
const IntSet neighborIndices 
) const
protectedvirtual

Extends the refinement domain with information for neighbors.

Parameters
refineIndicesList of basis functions to refine
neighborIndicesBasis functions to refine from neighbor patches

Reimplemented from ASMunstruct.

References getBasis(), GlobalNodes::getBoundaryNodes(), and ASM::REFINEMENT_BASIS.

◆ extractElmRes()

void ASMu2D::extractElmRes ( const Matrix globRes,
Matrix elmRes,
size_t  internalFirst 
) const
virtual

Extracts element results for this patch from a global vector.

Parameters
[in]globResGlobal matrix of element results
[out]elmResElement results for this patch
[in]internalFirstGlobal index of first element in the patch

Reimplemented from ASMbase.

References extractElmRes(), ASMbase::extractElmRes(), and outputMaster.

Referenced by extractElmRes().

◆ findBoundaryElms()

void ASMu2D::findBoundaryElms ( IntVec elms,
int  lIndex,
int  orient 
) const
protectedvirtual

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

Parameters
[out]elmsArray of element numbers
[in]lIndexLocal index of the boundary edge
[in]orientOrientation of boundary (used for sorting)

Implements ASMbase.

References getBasis(), and getEdgeEnum().

◆ findElementContaining()

int ASMu2D::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 lrspline.

◆ findPoint()

double ASMu2D::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.

◆ generateFEMTopology()

bool ASMu2D::generateFEMTopology ( )
virtual

Generates the finite element topology data for the patch.

The data generated are the element-to-node connectivity array, and the arrays of global node and element numbers.

Implements ASMbase.

Reimplemented in ASMu2Dmx, ASMu2DIB, and ASMu2DC1.

References createLRfromTensor(), createLRNurbs(), LR::createMNPC(), ASMbase::firstEl, ASMbase::gEl, generateBezierBasis(), generateBezierExtraction(), ASMLRSpline::geomB, ASMbase::gNod, lrspline, ASMbase::MLGN, ASMbase::myMLGE, ASMbase::myMLGN, ASMbase::myMNPC, ASMbase::nel, ASMbase::nnod, ASMLRSpline::projB, ASMLRSpline::refB, ASMbase::shareFE, and tensorPrjBas.

Referenced by ASMu2DC1::generateFEMTopology(), and ASMu2DIB::generateFEMTopology().

◆ generateThreadGroups()

void ASMu2D::generateThreadGroups ( const Integrand integrand,
bool  silence,
bool  ignoreGlobalLM 
)
protectedvirtual

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]ignoreGlobalLMIf true ignore global multipliers in sanity check

Reimplemented from ASMbase.

Reimplemented in ASMu2Dmx.

References ThreadGroups::analyzeUnstruct(), IFEM::cout, LR::generateThreadGroups(), getBasis(), ASM::PROJECTION_BASIS, ASM::PROJECTION_BASIS_2, ASMLRSpline::projThreadGroups, ThreadGroups::size(), and ASMLRSpline::threadGroups.

◆ getBoundaryNodes()

void ASMu2D::getBoundaryNodes ( int  lIndex,
IntVec nodes,
int  basis,
int  = 1,
int  orient = 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 edge
nodesArray of node numbers
[in]basisWhich basis to grab nodes for (for mixed methods)
[in]orientOrientation of boundary (used for sorting)
[in]localIf true, return patch-local node numbers

Implements ASMbase.

Reimplemented in ASMu2Dmx.

References getBasis(), getEdgeEnum(), getNoNodes(), ASMbase::idx, and ASMLRSpline::Sort().

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

◆ getCoord()

Vec3 ASMu2D::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 ASMu2Dmx.

References lrspline, and ASMbase::nsd.

Referenced by constrainNode().

◆ getCoordinates()

bool ASMu2D::getCoordinates ( Matrix X,
unsigned char  nsd,
const LR::LRSplineSurface &  spline,
int  iel = -1 
)
static

Returns a matrix with control point coordinates.

Parameters
[out]X3 \(\times\)n-matrix, where n is the number of points
[in]nsdNumber of spatial dimensions
[in]splineSpline to extract coefficients from
[in]iel1-based element index, if -1 return for all control points

In case of NURBS, this is not strictly correct as we then return the rational spline coefficients rather than nodal (control point) coordinates. But since these are used as coefficients, and not coordinates at caller sites, we do this for simplicity.

Consider introducing ASMbase::getCoefficients() to lessen confusion.

References utl::matrix< T >::fillColumn(), ASMbase::nsd, and utl::matrix< T >::resize().

Referenced by LRSplineField::evalMapping(), getElementCoordinates(), and getNodalCoordinates().

◆ getCorner()

int ASMu2D::getCorner ( int  I,
int  J,
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]basiswhich basis to consider (for mixed methods)

Implements ASM2D.

References getBasis(), and getNoNodes().

Referenced by constrainCorner().

◆ getCornerPoints()

void ASMu2D::getCornerPoints ( int  iel,
std::vector< utl::Point > &  XC 
) const
protected

Computes the element corner coordinates and parameters.

Parameters
[in]iel1-based element index
[out]XCCoordinates and parameters of the element corners

References getElementCorners().

Referenced by ASMu2DIB::generateFEMTopology().

◆ getElementCoordinates()

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

Returns a matrix with nodal coordinates for an element.

Parameters
[in]iel1-based element index
[out]X3 \(\times\)n-matrix, where n is the number of nodes in one element
[in]forceItgIf true return integration basis element coordinates

Implements ASMbase.

References ASM::GEOMETRY_BASIS, getBasis(), getCoordinates(), ASM::INTEGRATION_BASIS, lrspline, and ASMbase::nsd.

Referenced by assembleL2matrices(), edgeL2projection(), evalPoint(), ASMu2Dmx::evalSolution(), evalSolution(), ASMu2Dmx::evalSolutionPiola(), evaluateBasisNurbs(), integrate(), and ASMu2Dmx::integrate().

◆ getElementCorners()

double ASMu2D::getElementCorners ( int  iel,
std::vector< Vec3 > &  XC,
RealArray uC = nullptr 
) const
protected

Computes the element corner coordinates.

Parameters
[in]iel1-based element index
[out]XCCoordinates of the element corners
[out]uCSpline parameters of the element corners (optional)
Returns
Characteristic element size

References ASMLRSpline::evalPoint(), ASM2D::getElementSize(), and lrspline.

Referenced by getCornerPoints(), integrate(), and ASMu2Dmx::integrate().

◆ getElmConnectivities()

void ASMu2D::getElmConnectivities ( IntMat neighs,
int  basis = ASM::INTEGRATION_BASIS 
) const
virtual

Calculates the matrix of element neighbour connectivities.

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

Implements ASMbase.

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

◆ getGaussPointParameters()

void ASMu2D::getGaussPointParameters ( RealArray uGP,
int  dir,
int  nGauss,
int  iel,
const double *  xi,
const LR::LRSplineSurface *  spline = nullptr 
) 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)
[in]nGaussNumber of Gauss points along a knot-span
[in]iel1-based element index
[in]xiDimensionless Gauss point coordinates [-1,1]
[in]splineIf given get gauss points for this spline instead of integration basis

References LR::getGaussPointParameters(), lrspline, and ASMbase::nGauss.

Referenced by assembleL2matrices(), edgeL2projection(), integrate(), ASMu2Dmx::integrate(), and scRecovery().

◆ getGrevilleParameters()

bool ASMu2D::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)
[in]basisNumWhich basis to get Greville point parameters for

References getBasis().

Referenced by projectSolution(), and scRecovery().

◆ getGridParameters()

bool ASMu2D::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)
[in]nSegSpanNumber of visualization segments over each knot-span

References ElementBlock::eps, getGridParameters(), lrspline, and outputMaster.

Referenced by evalProjSolution(), evalSolution(), and getGridParameters().

◆ getMinimumSize()

double ASMu2D::getMinimumSize ( int  nrefinements) const
virtual

Defines the minimum element area for adaptive refinement.

Parameters
[in]nrefinementsMaximum number of adaptive refinement levels

Reimplemented from ASMbase.

References aMin, and lrspline.

◆ getNodalCoordinates()

virtual void ASMu2D::getNodalCoordinates ( Matrix X,
bool  = false 
) const
inlinevirtual

Returns a matrix with all nodal coordinates within the patch.

Parameters
[out]X3 \(\times\)n-matrix, where n is the number of nodes in the patch

Implements ASMbase.

References getCoordinates(), lrspline, and ASMbase::nsd.

Referenced by evalSolution().

◆ getOrder()

bool ASMu2D::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.

References lrspline.

◆ getParametricLength()

double ASMu2D::getParametricLength ( int  iel,
int  dir 
) const
protected

Returns boundary edge length in the parameter space for an element.

Parameters
[in]iel1-based element index
[in]dirLocal index of the boundary edge

References lrspline.

Referenced by edgeL2projection(), integrate(), and ASMu2Dmx::integrate().

◆ getProjectedField()

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

Returns a field using the projection basis.

Parameters
[in]coefsThe coefficients for the field

Reimplemented from ASMbase.

References getBasis(), getNoProjectionNodes(), is_rational, ASM::PROJECTION_BASIS, and utl::vector< T >::size().

◆ getProjectedFields()

Fields * ASMu2D::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 getBasis(), getNoProjectionNodes(), is_rational, ASM::PROJECTION_BASIS, and utl::vector< T >::size().

Referenced by evalProjSolution().

◆ integrate() [1/7]

bool ASMu2D::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 ASMu2Dmx, and ASMu2DIB.

References utl::vector< T >::add(), GlobalIntegral::assemble(), Vec4::assign(), Integrand::AVERAGE, ASM::cachePolicy, BasisFunctionCache< Dim >::clear(), BasisFunctionCache< Dim >::coord(), BasisFunctionVals::d2Ndu2, FiniteElement::d2NdX2, BasisFunctionVals::d3Ndu3, FiniteElement::d3NdX3, ASMbase::dbgElm, ASMbase::deformedConfig(), LocalIntegral::destruct(), FiniteElement::detJxW, BasisFunctionVals::dNdu, FiniteElement::dNdX, Integrand::ELEMENT_CENTER, Integrand::ELEMENT_CORNERS, ItgPoint::eta, Integrand::evalInt(), ASMLRSpline::evalPoint(), Integrand::finalizeElement(), TimeDomain::first, ASMbase::firstEl, ASMbase::firstIp, FiniteElement::G, Integrand::G_MATRIX, getElementCoordinates(), getElementCorners(), utl::getGmat(), Integrand::getIntegrandType(), Integrand::getLocalIntegral(), BasisFunctionCache< Dim >::getParam(), BasisFunctionCache< Dim >::getVals(), FiniteElement::H, FiniteElement::h, utl::Hessian(), utl::Hessian2(), ItgPoint::idx, ItgPoint::iel, ItgPoint::iGP, BasisFunctionCache< Dim >::init(), Integrand::initElement(), TimeDomain::it, utl::Jacobian(), lrspline, ASMbase::MLGE, ASMbase::MNPC, myCache, ASMbase::myElms, BasisFunctionVals::N, FiniteElement::N, FiniteElement::Navg, ASMbase::nel, BasisFunctionCache< Dim >::nGauss(), ASMbase::nsd, ThreadGroups::oneGroup(), FiniteElement::p, ASM::PRE_CACHE, PROFILE2, PROFILE3, FiniteElement::q, Integrand::reducedInt(), LocalIntegral::ref(), utl::vector< T >::resize(), Integrand::SECOND_DERIVATIVES, BasisFunctionCache< Dim >::setIntegrand(), utl::vector< T >::size(), TimeDomain::t, Integrand::THIRD_DERIVATIVES, ASMLRSpline::threadGroups, GlobalIntegral::threadSafe(), ItgPoint::u, Integrand::UPDATED_NODES, ItgPoint::v, LocalIntegral::vec, BasisFunctionCache< Dim >::weight(), FiniteElement::XC, and ItgPoint::xi.

◆ integrate() [2/7]

virtual bool ASMbase::integrate

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

Referenced by ASMu2DIB::integrate().

◆ integrate() [3/7]

virtual bool ASMbase::integrate
inline

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

◆ integrate() [4/7]

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

◆ integrate() [5/7]

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

◆ integrate() [6/7]

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

◆ integrate() [7/7]

virtual bool ASMbase::integrate

Evaluates a boundary integral over a patch face/edge.

Parameters
integrandObject with problem-specific data and methods
[in]lIndexLocal index of the boundary face/edge
glbIntThe integrated quantity
[in]timeParameters for nonlinear/time-dependent simulations

◆ projectSolution()

LR::LRSplineSurface * ASMu2D::projectSolution ( const IntegrandBase integrand) const
protected

Projects the secondary solution field onto the primary basis.

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

References ASMLRSpline::evalSolution(), getGrevilleParameters(), PROFILE2, and regularInterpolation().

Referenced by evalSolution().

◆ raiseOrder()

bool ASMu2D::raiseOrder ( int  ru,
int  rv 
)
virtual

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

Implements ASM2D.

References ASMbase::shareFE, and tensorspline.

◆ refine() [1/3]

bool ASMLRSpline::refine

Refines the mesh adaptively.

Parameters
[in]prmInput data used to control the mesh refinement
solControl point results values that are transferred to new mesh

◆ refine() [2/3]

bool ASMu2D::refine ( const LR::RefineData prm,
Vectors sol 
)
virtual

Refines the mesh adaptively.

Parameters
[in]prmInput data used to control the mesh refinement
solControl point results values that are transferred to new mesh

Reimplemented from ASMLRSpline.

Reimplemented in ASMu2Dmx.

References IFEM::cout, LR::RefineData::elements, LR::RefineData::errors, getBasis(), lrspline, ASM::PROJECTION_BASIS, ASMLRSpline::refine(), and separateProjectionBasis().

◆ refine() [3/3]

bool ASMu2D::refine ( int  dir,
const RealArray xi,
double  scale 
)
virtual

Refines the parametrization by inserting extra tensor 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

References ASMbase::shareFE, and tensorspline.

◆ regularInterpolation()

LR::LRSplineSurface * ASMu2D::regularInterpolation ( const RealArray upar,
const RealArray vpar,
const Matrix points,
int  basis 
) const
protected

Interpolates an LR spline at a given set of parametric coordinates.

Parameters
[in]uparParametric interpolation points in the u-direction
[in]vparParametric interpolation points in the v-direction
[in]pointsInterpolation values stored as one point per matrix row
[in]basisWhich basis to interpolate onto
Returns
A LRSplineSurface representation of the interpolated points

References utl::matrix< T >::cols(), computeBasis(), StdVector::dim(), getBasis(), utl::interleave(), lrspline, SparseMatrix::resize(), utl::matrix< T >::rows(), and SparseMatrix::solve().

Referenced by projectSolution(), and scRecovery().

◆ remapErrors()

void ASMu2D::remapErrors ( RealArray errors,
const RealArray origErr,
bool  elemErrors 
) const
protectedvirtual

Remap element wise errors to basis functions.

Parameters
errorsThe remapped errors
[in]origErrThe element wise errors on the geometry mesh
[in]elemErrorsIf true, map to elements instead of basis functions

Reimplemented from ASMunstruct.

Reimplemented in ASMu2Dmx.

References getBasis().

◆ scRecovery()

LR::LRSplineSurface * ASMu2D::scRecovery ( const IntegrandBase integrand) const
protected

Projects the secondary solution using a superconvergent approach.

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

References IntegrandBase::derivativeOrder(), evalMonomials(), ASMLRSpline::evalSolution(), expandTensorGrid(), GaussQuadrature::getCoord(), getGaussPointParameters(), getGrevilleParameters(), IntegrandBase::getNoFields(), lrspline, PROFILE2, regularInterpolation(), and DenseMatrix::solve().

Referenced by evalSolution().

◆ setOutputMaster()

void ASMu2D::setOutputMaster ( const ASMu2D pch)
inline

Set master patch for VTF output.

Parameters
pchMaster patch to use

References outputMaster.

◆ storeMesh()

void ASMu2D::storeMesh ( const std::string &  fName,
int  fType 
) const
virtual

Stores the mesh basis to encapsulated postscript files.

Parameters
[in]fNamePrefix for file names
[in]fTypeFlag telling which file type(s) to write

Reimplemented from ASMunstruct.

Reimplemented in ASMu2Dmx.

References is_rational, lrspline, writePostscriptElementsNurbs(), and writePostscriptMeshWithControlPointsNurbs().

◆ tesselate()

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

Creates a quad element model of this patch for visualization.

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

Each nodal point in grid is generated once for each element using it. This results in a lot of unnecessary duplicates (if ElementBlock::eps is 0.0), but is preferable instead of figuring out all element topology information.

Setting ElementBlock::eps > 0.0 will handle the case of internal C-1 continuities automatically, in that result quantities along the discontinuity will not be unique.

Implements ASMbase.

References ElementBlock::eps, ASMLRSpline::evalPoint(), lrspline, ElementBlock::setCoor(), ElementBlock::setElmId(), ElementBlock::setNode(), ElementBlock::setParams(), and ElementBlock::unStructResize().

◆ transferCntrlPtVars() [1/3]

bool ASMu2D::transferCntrlPtVars ( const LR::LRSpline *  old_basis,
RealArray newVar,
int  nGauss 
) const
virtual

Transfers control point variables from old basis to this patch.

Parameters
[in]old_basisThe LR-spline basis to transfer from
[out]newVarGauss point variables associated with this patch
[in]nGaussNumber of Gauss points along a knot-span

Implements ASMLRSpline.

◆ transferCntrlPtVars() [2/3]

virtual bool ASMLRSpline::transferCntrlPtVars

Transfers control point variables from old basis to this patch.

Parameters
[in]oldBasisThe LR-spline basis to transfer from
[out]newVarGauss point variables associated with this patch
[in]nGaussNumber of Gauss points along a knot-span

◆ transferCntrlPtVars() [3/3]

bool ASMLRSpline::transferCntrlPtVars

Transfers control point variables from old basis to this patch.

Parameters
[in]oldBasisThe LR-spline basis to transfer from
[in]oldVarControl point variables associated with oldBasis
[out]newVarGauss point variables associated with this patch
[in]nGaussNumber of Gauss points along a knot-span
[in]nfNumber of field components

◆ transferGaussPtVars()

bool ASMu2D::transferGaussPtVars ( const LR::LRSpline *  old_basis,
const RealArray oldVar,
RealArray newVar,
int  nGauss 
) const
virtual

Transfers Gauss point variables from old basis to this patch.

Parameters
[in]old_basisThe LR-spline basis to transfer from
[in]oldVarGauss point variables associated with oldBasis
[out]newVarGauss point variables associated with this patch
[in]nGaussNumber of Gauss points along a knot-span

Implements ASMLRSpline.

◆ transferGaussPtVarsN()

bool ASMu2D::transferGaussPtVarsN ( const LR::LRSpline *  old_basis,
const RealArray oldVar,
RealArray newVar,
int  nGauss 
) const
virtual

Transfers Gauss point variables from old basis to this patch.

Parameters
[in]old_basisThe LR-spline basis to transfer from
[in]oldVarGauss point variables associated with oldBasis
[out]newVarGauss point variables associated with this patch
[in]nGaussNumber of Gauss points along a knot-span

Implements ASMLRSpline.

◆ uniformRefine() [1/2]

bool ASMu2D::uniformRefine ( int  dir,
int  nInsert 
)
virtual

Refines the parametrization by inserting tensor knots uniformly.

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

Implements ASM2D.

References ASMbase::shareFE, and tensorspline.

◆ uniformRefine() [2/2]

bool ASMu2D::uniformRefine ( int  minBasisfunctions)

Refines the LR-spline patch uniformly.

Inserts one (global) line at a time until the LR-spline object contains at least minBasisfunctions basis functions.

Parameters
[in]minBasisfunctionslower bound on number of basis functions

References lrspline, and ASMbase::shareFE.

◆ updateCoords()

bool ASMu2D::updateCoords ( const Vector displ)
virtual

Updates the nodal coordinates for this patch.

Parameters
[in]displIncremental displacements to update the coordinates with

Implements ASMbase.

◆ updateDirichlet()

bool ASMu2D::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

Reimplemented from ASMbase.

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


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