14 #ifndef _ASM_LR_SPLINE_H
15 #define _ASM_LR_SPLINE_H
21 #include "GoTools/geometry/BsplineBasis.h"
53 int d,
int nGauss,
int iel,
const double* xi);
61 const std::vector<LRSpline*>& addConstraints = {});
82 ASMLRSpline(
unsigned char n_p,
unsigned char n_s,
unsigned char n_f);
113 double start = -1.0,
double end = 1.0);
117 bool globalId =
false)
const;
120 bool globalId =
true)
const;
123 static void Sort(
int u,
int v,
int orient,
124 std::vector<LR::Basisfunction*>& functions);
210 const std::vector<const LR::LRSpline*>& bases,
211 const LR::LRSpline* threadBasis);
213 std::shared_ptr<LR::LRSpline>
geomB;
214 std::shared_ptr<LR::LRSpline>
projB;
216 std::shared_ptr<LR::LRSpline>
refB;
Base class for spline-based finite element (FE) assembly drivers.
std::vector< int > IntVec
General integer vector.
Definition: ASMbase.h:25
std::vector< IntVec > IntMat
General 2D integer matrix.
Definition: ASMbase.h:26
Abstract interface for unstructured FE assembly drivers.
std::set< int > IntSet
General integer set.
Definition: ASMunstruct.h:22
std::vector< RealArray > Real2DMat
A real-valued two-dimensional array without algebraic operations.
Definition: ImmersedBoundaries.h:34
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition: ImmersedBoundaries.h:29
std::vector< Vector > Vectors
An array of real-valued vectors with algebraic operations.
Definition: MatVec.h:37
Threading group partitioning.
Base class for LR B-spline FE assembly drivers.
Definition: ASMLRSpline.h:76
std::shared_ptr< LR::LRSpline > refB
Pointer to spline object of the refinement basis.
Definition: ASMLRSpline.h:216
IntVec getOverlappingNodes(const IntSet &nodes, int dir=7) const
Returns all functions whose support overlap with the input nodes.
Definition: ASMLRSpline.C:387
virtual void swapProjectionBasis()
Swaps between the first and second projection basis.
Definition: ASMLRSpline.C:583
bool doRefine(const LR::RefineData &prm, LR::LRSpline *lrspline)
Refines the mesh adaptively.
Definition: ASMLRSpline.C:280
virtual bool transferGaussPtVarsN(const LR::LRSpline *oldBasis, const RealArray &oldVar, RealArray &newVar, int nGauss) const =0
Transfers Gauss point variables from old basis to this patch.
std::shared_ptr< LR::LRSpline > projB
Pointer to spline object of the projection basis.
Definition: ASMLRSpline.h:214
ASMLRSpline(unsigned char n_p, unsigned char n_s, unsigned char n_f)
The constructor sets the space dimensions.
Definition: ASMLRSpline.C:202
ThreadGroups proj2ThreadGroups
Element groups for multi-threaded assembly - second projection basis.
Definition: ASMLRSpline.h:220
virtual void getNoIntPoints(size_t &nPt, size_t &nIPt)
Computes the total number of integration points in this patch.
Definition: ASMLRSpline.C:555
virtual bool refine(const LR::RefineData &prm, Vectors &sol)
Refines the mesh adaptively.
Definition: ASMLRSpline.C:219
ThreadGroups projThreadGroups
Element groups for multi-threaded assembly - projection basis.
Definition: ASMLRSpline.h:219
virtual std::pair< size_t, double > findClosestNode(const Vec3 &X) const
Finds the node that is closest to the given point X.
Definition: ASMLRSpline.C:449
virtual bool getParameterDomain(Real2DMat &, IntVec *) const
Returns parameter values and node numbers of the domain corners.
Definition: ASMLRSpline.C:519
virtual Vec3 getElementCenter(int iel) const
Returns the coordinates of the element center.
Definition: ASMLRSpline.C:467
virtual bool transferCntrlPtVars(const LR::LRSpline *oldBasis, RealArray &newVar, int nGauss) const =0
Transfers control point variables from old basis to this patch.
const LR::LRSpline * getRefinementBasis() const
Returns a const pointer to refinement basis.
Definition: ASMLRSpline.h:99
std::shared_ptr< LR::LRSpline > projB2
Pointer to spline object of the secondary projection basis.
Definition: ASMLRSpline.h:215
ThreadGroups threadGroups
Element groups for multi-threaded assembly.
Definition: ASMLRSpline.h:218
virtual ~ASMLRSpline()
Empty destructor.
Definition: ASMLRSpline.h:90
virtual bool empty() const
Checks if the patch is empty.
Definition: ASMLRSpline.h:93
static Go::BsplineBasis getBezierBasis(int p, double start=-1.0, double end=1.0)
Returns a Bezier basis of order p.
Definition: ASMLRSpline.C:336
std::shared_ptr< LR::LRSpline > geomB
Pointer to spline object of the geometry basis.
Definition: ASMLRSpline.h:213
IntVec getFunctionsForElements(const IntVec &elements, bool globalId=false) const
Returns a list of basis functions having support on given elements.
Definition: ASMLRSpline.C:345
virtual int evalPoint(int iel, const double *param, Vec3 &X) const =0
Evaluates the geometry at a specified point.
static bool checkThreadGroups(const IntMat &groups, const std::vector< const LR::LRSpline * > &bases, const LR::LRSpline *threadBasis)
Santity check thread groups.
Definition: ASMLRSpline.C:491
IntVec getOverlappingNodes(int node, int dir=7) const
Returns all functions whose support overlap with the input node.
Definition: ASMLRSpline.h:146
virtual IntVec getBoundaryCovered(const IntSet &nodes) const
Returns all boundary functions that are covered by the given nodes.
Definition: ASMLRSpline.C:369
static void Sort(int u, int v, int orient, std::vector< LR::Basisfunction * > &functions)
Sort basis functions based on local knot vectors.
Definition: ASMLRSpline.C:413
virtual bool transferGaussPtVars(const LR::LRSpline *oldBasis, const RealArray &oldVar, RealArray &newVar, int nGauss) const =0
Transfers Gauss point variables from old basis to this patch.
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.
Definition: ASMbase.C:1735
Base class for spline-based finite element (FE) assembly drivers.
Definition: ASMbase.h:70
unsigned char nf
Number of primary solution fields (1 or larger)
Definition: ASMbase.h:1033
virtual int evalPoint(const double *xi, double *param, Vec3 &X) const =0
Evaluates the geometry at a specified point.
int nGauss
Numerical integration scheme for this patch.
Definition: ASMbase.h:1064
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.
Definition: ASMbase.C:1735
Abstract interface for unstructured spline patches.
Definition: ASMunstruct.h:64
Base class representing a system level integrated quantity.
Definition: IntegrandBase.h:42
Class containing threading group partitioning.
Definition: ThreadGroups.h:26
Simple class for representing a point in 3D space.
Definition: Vec3.h:27
A vector class with some added algebraic operations.
Definition: matrix.h:64
Utilities for LR-splines.
Definition: AdaptiveSetup.h:22
void generateThreadGroups(ThreadGroups &threadGroups, const LRSpline *lr, const std::vector< LRSpline * > &addConstraints={})
Generates thread groups for a LR-spline mesh.
Definition: ASMLRSpline.C:95
void getGaussPointParameters(const LRSpline *spline, RealArray &uGP, int d, int nGauss, int iel, const double *xi)
Extracts parameter values of the Gauss points in one direction.
Definition: ASMLRSpline.C:73
void createMNPC(const LR::LRSpline *basis, IntMat &result)
Createss the matrix of nodal point correspondance for a LR-spline.
Definition: ASMLRSpline.C:187
int extendControlPoints(LRSpline *basis, const Vector &v, int nf, int ofs=0)
Expands the basis coefficients of an LR-spline object.
Definition: ASMLRSpline.C:32
void contractControlPoints(LRSpline *basis, Vector &v, int nf, int ofs=0)
Contracts the basis coefficients of an LR-spline object.
Definition: ASMLRSpline.C:58
A struct of data to control the mesh refinement.
Definition: ASMunstruct.h:44