IFEM 90A354
ASMs3D.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _ASM_S3D_H
15#define _ASM_S3D_H
16
17#include "ASMstruct.h"
18#include "ASM3D.h"
19#include "BasisFunctionCache.h"
20#include "Interface.h"
21#include "ThreadGroups.h"
22
23namespace utl {
24 class Point;
25}
26
27namespace Go {
28 class SplineSurface;
29 class SplineVolume;
30}
31
32
38class ASMs3D : public ASMstruct, public ASM3D
39{
41 struct IJK
42 {
43 int I = 0;
44 int J = 0;
45 int K = 0;
46 };
47
48 using IndexVec = std::vector<IJK> ;
49
51 struct Edge
52 {
53 int icnod = 0;
54 int incr = 0;
55 int next();
56 };
57
59 struct Face
60 {
61 int isnod = 0;
62 int incrI = 0;
63 int incrJ = 0;
64 int nnodI = 0;
65 int indxI = 1;
66 int next();
67 };
68
69protected:
72 {
73 public:
76 BasisFunctionCache(const ASMs3D& pch);
77
81 BasisFunctionCache(const BasisFunctionCache& cache, int b);
82
84 const std::array<size_t,3>& noElms() const { return nel; }
85
86 protected:
88 bool internalInit() override;
89
94 BasisFunctionVals calculatePt(size_t el, size_t gp,
95 bool reduced) const override;
96
98 void calculateAll() override;
99
104 size_t index(size_t el, size_t gp, bool reduced) const override;
105
107 virtual void setupParameters();
108
110 bool setupQuadrature();
111
112 const ASMs3D& patch;
113
114 std::array<size_t,3> nel{};
115
116 private:
119 std::array<size_t,3> elmIndex(size_t el) const;
120 };
121
122public:
125 {
126 int ibnod[8];
129 int iinod;
130 int inc[3];
131 int nnodI;
132 int nnodJ;
133 int indxI;
134 int indxJ;
135
138 {
139 memset(ibnod,0,8*sizeof(int));
140 iinod = inc[0] = inc[1] = inc[2] = nnodI = nnodJ = 0;
141 indxI = indxJ = 1;
142 }
144 int next();
145 };
146
147private:
150 {
151 Go::SplineSurface* surf;
152 int dof;
153 int code;
154 std::vector<Ipair> nodes;
155
157 DirichletFace(Go::SplineSurface* ss = nullptr, int d = 0, int c = 0)
158 : surf(ss), dof(d), code(c) {}
159 };
160
161public:
164 {
165 protected:
167 public:
169 explicit InterfaceChecker(const ASMs3D& pch) : myPatch(pch) {}
174 virtual short int hasContribution(int, int I, int J, int K) const;
175 };
176
178 explicit ASMs3D(unsigned char n_f = 3);
180 ASMs3D(const ASMs3D& patch, unsigned char n_f);
182 ASMs3D(const ASMs3D& patch);
183
186 virtual Go::SplineSurface* getBoundary(int dir, int = 1);
188 virtual Go::SplineVolume* getBasis(int basis = 1);
190 virtual const Go::SplineVolume* getBasis(int basis = 1) const;
192 virtual void copyParameterDomain(const ASMbase* other);
193
194
195 // Methods for model generation
196 // ============================
197
199 virtual bool read(std::istream&);
201 virtual bool write(std::ostream&, int) const;
202
206 virtual bool generateFEMTopology();
207
211 virtual void clear(bool retainGeometry = false);
212
218 virtual bool addXElms(short int dim, short int item,
219 size_t nXn, IntVec& nodes);
220
225 virtual size_t getNodeIndex(int globalNum, bool noAddedNodes = false) const;
229 virtual int getNodeID(size_t inod, bool noAddedNodes = false) const;
230
237 virtual bool getElementCoordinates(Matrix& X, int iel,
238 bool forceItg = false) const;
239
244 virtual void getNodalCoordinates(Matrix& X, bool geo = false) const;
245
248 virtual Vec3 getCoord(size_t inod) const;
249
251 virtual Vec3 getElementCenter(int iel) const;
252
255 virtual bool updateCoords(const Vector& displ);
256
263 virtual void getBoundaryNodes(int lIndex, IntVec& nodes,
264 int basis, int thick = 1,
265 int = 0, bool local = false) const;
272 virtual void getBoundary1Nodes(int lEdge, IntVec& nodes, int basis, int = 0,
273 bool local = false, bool open = false) const;
274
280 virtual int getCorner(int I, int J, int K, int basis) const;
281
294 bool assignNodeNumbers(BlockNodes& nodes, int basis = 0);
295
298 virtual bool checkRightHandSystem();
299
303 virtual bool refine(int dir, const RealArray& xi);
307 virtual bool uniformRefine(int dir, int nInsert);
313 virtual bool raiseOrder(int ru, int rv, int rw, bool setOrder = false);
314
316 virtual bool createProjectionBasis(bool init);
317
319 virtual bool separateProjectionBasis() const;
320
321
322 // Various methods for preprocessing of boundary conditions and patch topology
323 // ===========================================================================
324
331 virtual void constrainFace(int dir, bool open, int dof,
332 int code = 0, char basis = 1);
341 virtual size_t constrainFaceLocal(int dir, bool open, int dof, int code = 0,
342 bool project = false, char T1 = '\0');
343
350 virtual void constrainEdge(int lEdge, bool open, int dof,
351 int code = 0, char basis = 1);
352
368 virtual void constrainLine(int fdir, int ldir, double xi, int dof,
369 int code = 0, char basis = 1);
370
382 virtual void constrainCorner(int I, int J, int K, int dof,
383 int code = 0, char basis = 1);
396 virtual void constrainNode(double xi, double eta, double zeta, int dof,
397 int code = 0);
398
412 virtual bool connectPatch(int face, ASM3D& neighbor, int nface, int norient,
413 int = 0, bool coordCheck = true, int thick = 1);
414
419 virtual void closeBoundaries(int dir, int basis, int master);
420
426 virtual bool collapseFace(int face, int edge = 0, int basis = 1);
427
436 virtual bool addRigidCpl(int lindx, int ldim, int basis,
437 int& gMaster, const Vec3& Xmaster, bool extraPt);
438
441 virtual void setNodeNumbers(const IntVec& nodes);
442
449 virtual bool updateDirichlet(const std::map<int,RealFunc*>& func,
450 const std::map<int,VecFunc*>& vfunc, double time,
451 const std::map<int,int>* g2l, bool tangent);
452
456 virtual bool selfInterconnect(const std::vector<Ipair>& nodes, double xtol);
457
458
459 // Methods for integration of finite element quantities.
460 // These are the main computational methods of the ASM class hierarchy.
461 // ====================================================================
462
467 virtual bool integrate(Integrand& integrand,
468 GlobalIntegral& glbInt, const TimeDomain& time);
469
475 virtual bool integrate(Integrand& integrand, int lIndex,
476 GlobalIntegral& glbInt, const TimeDomain& time);
477
483 virtual bool integrateEdge(Integrand& integrand, int lEdge,
484 GlobalIntegral& glbInt, const TimeDomain& time);
485
486protected:
492 bool integrate(Integrand& integrand, GlobalIntegral& glbInt,
493 const TimeDomain& time, const Real3DMat& itgPts);
494
500 bool integrate(Integrand& integrand, GlobalIntegral& glbInt,
501 const TimeDomain& time, const ASM::InterfaceChecker& iChk);
502
503public:
504
505 // Post-processing methods
506 // =======================
507
514 virtual int evalPoint(const double* xi, double* param, Vec3& X) const;
515
519 virtual int findElementContaining(const double* param) const;
520
525 virtual double findPoint(Vec3& X, double* param) const;
526
531 virtual bool getGridParameters(RealArray& prm, int dir, int nSegSpan) const;
532
537 virtual bool tesselate(ElementBlock& grid, const int* npe) const;
538
545 virtual bool evalSolution(Matrix& sField, const Vector& locSol,
546 const int* npe, int n_f, bool piola) const;
547
560 virtual bool evalSolution(Matrix& sField, const Vector& locSol,
561 const RealArray* gpar, bool regular = true,
562 int deriv = 0, int = 0) const;
563
569 virtual bool evalProjSolution(Matrix& sField, const Vector& locSol,
570 const int* npe, int n_f) const;
571
577 virtual bool evaluate(const ASMbase* basis, const Vector& locVec,
578 RealArray& vec, int basisNum) const;
579
584 virtual bool evaluate(const Field* field, RealArray& vec, int basisNum) const;
585
591 virtual bool evaluate(const FunctionBase* func, RealArray& vec,
592 int basisNum, double time) const;
593
608 virtual bool evalSolution(Matrix& sField, const IntegrandBase& integrand,
609 const int* npe = nullptr, char project = 0) const;
610
611private:
614 Go::SplineVolume* projectSolution(const IntegrandBase& integrand) const;
615
617 Go::SplineVolume* projectSolutionLocal(const IntegrandBase&) const;
618
621 Go::SplineVolume* projectSolutionLocalApprox(const IntegrandBase&) const;
622
624 Go::SplineVolume* projectSolutionLeastSquare(const IntegrandBase&) const;
625
626public:
629 virtual Go::GeomObject* evalSolution(const IntegrandBase& integrand) const;
630
644 virtual bool evalSolution(Matrix& sField, const IntegrandBase& integrand,
645 const RealArray* gpar, bool regular = true) const;
646
647protected:
648
649 // Internal utility methods
650 // ========================
651
655 virtual void findBoundaryElms(IntVec& elms, int lIndex, int = 0) const;
656
662 virtual bool assembleL2matrices(SystemMatrix& A, SystemVector& B,
663 const L2Integrand& integrand,
664 bool continuous) const;
665
676 bool connectBasis(int face, ASMs3D& neighbor, int nface, int norient,
677 int basis = 1, int slave = 0, int master = 0,
678 bool coordCheck = true, int thick = 1);
679
685 void getGaussPointParameters(RealArray& uGP, int dir,
686 int nGauss, const double* xi) const;
687
692 bool getGrevilleParameters(RealArray& prm, int dir, int basisNum = 1) const;
693
697 bool getQuasiInterplParameters(RealArray& prm, int dir) const;
698
704 bool getElementCoordinatesPrm(Matrix& X, double u, double v, double w) const;
705
708 double getParametricVolume(int iel) const;
712 double getParametricArea(int iel, int dir) const;
713
717 virtual void getElementBorders(int iel, double* u) const;
718
726 void getElementBorders(int i1, int i2, int i3,
727 double* u, double* v, double* w) const;
728
736 double getElementCorners(int i1, int i2, int i3, std::vector<Vec3>& XC,
737 RealArray* uC = nullptr) const;
743 void getCornerPoints(int i1, int i2, int i3,
744 std::vector<utl::Point>& XC) const;
745
752 void generateThreadGroups(size_t strip1, size_t strip2, size_t strip3,
753 bool silence, bool ignoreGlobalLM);
754
761 void generateThreadGroups(size_t strip1, size_t strip2, size_t strip3,
762 char lIndex, bool silence, bool);
763
765 virtual void changeNumThreads();
766
768 virtual int getFirstItgElmNode() const { return 0; }
770 virtual int getLastItgElmNode() const;
771
772public:
777 virtual void generateThreadGroups(const Integrand& integrand, bool silence,
778 bool ignoreGlobalLM);
779
783 virtual void generateThreadGroups(char lIndex, bool silence, bool);
784
786 virtual void generateThreadGroupsFromElms(const IntVec& elms);
787
789 virtual void generateProjThreadGroupsFromElms(const IntVec& elms);
790
792 static void scatterInd(int n1, int n2, int n3, int p1, int p2, int p3,
793 const int* start, IntVec& index);
794
799 virtual bool getOrder(int& p1, int& p2, int& p3) const;
800
806 virtual bool getSize(int& n1, int& n2, int& n3, int basis = 0) const;
807
812 virtual bool getNoStructElms(int& n1, int& n2, int& n3) const;
813
817 virtual void getElmConnectivities(IntMat& neigh,
818 int basis = ASM::INTEGRATION_BASIS) const;
819
821 virtual IntMat getElmNodes(int basis) const;
822
824 virtual size_t getNoBoundaryElms(char lIndex, char ldim) const;
825
827 virtual size_t getNoNodes(int basis = 0) const;
829 virtual size_t getNoProjectionNodes() const;
830
834 virtual bool getParameterDomain(Real2DMat& u, IntVec* corners) const;
835
841 virtual void evaluateBasis(double u, double v, double w, Vector& N) const;
842
850 void extractBasis(double u, double v, double w, Vector& N, Matrix& dNdu,
851 bool fromRight = true) const;
860 void extractBasis(double u, double v, double w, Vector& N,
861 Matrix& dNdu, Matrix3D& d2Ndu2,
862 bool fromRight = true) const;
871 void extractBasis(double u, double v, double w, int dir, int p, Vector& dN,
872 bool fromRight = true) const;
873
876 virtual Field* getProjectedField(const Vector& coefs) const;
877
880 virtual Fields* getProjectedFields(const Vector& coefs, size_t = 0) const;
881
882private:
885 int coeffInd(size_t inod) const;
886
893 int findStartNode(int& n1, int& n2, int& n3, char basis) const;
894
900 bool getFaceSize(int& n1, int& n2, int basis, int face) const;
901
903 static void createMNPC(const Go::SplineVolume* svol, IntMat& MNPC);
904
905protected:
906 std::shared_ptr<Go::SplineVolume> svol;
907 bool swapW;
908
911
912 std::map<size_t,size_t> xnMap;
913 std::map<size_t,size_t> nxMap;
914
916 std::vector<DirichletFace> dirich;
917
921 std::map<char,ThreadGroups> threadGroupsFace;
922
924 std::vector<std::unique_ptr<BasisFunctionCache>> myCache;
925};
926
927#endif
Abstract interface for 3D patches.
std::vector< int > IntVec
General integer vector.
Definition ASMbase.h:25
std::vector< IntVec > IntMat
General 2D integer matrix.
Definition ASMbase.h:26
Base class for structured spline-based FE assembly drivers.
Basis function cache.
static SystemMatrix * K
Pointer to coefficient matrix A.
Definition EigSolver.C:91
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:32
std::vector< Real2DMat > Real3DMat
A real-valued three-dimensional array without algebraic operations.
Definition ImmersedBoundaries.h:36
Representation of domain interfaces.
Threading group partitioning.
static const double T1[2]
1-point rule coordinates.
Definition TriangleQuadrature.C:19
Abstract interface for 3D spline patches.
Definition ASM3D.h:33
Base class to check for internal boundary integrand contributions.
Definition Interface.h:40
Base class for spline-based finite element (FE) assembly drivers.
Definition ASMbase.h:72
const IntMat & MNPC
Matrix of Nodal Point Correspondance.
Definition ASMbase.h:1064
int nGauss
Numerical integration scheme for this patch.
Definition ASMbase.h:1090
Implementation of basis function cache.
Definition ASMs3D.h:72
std::array< size_t, 3 > elmIndex(size_t el) const
Returns structured element indices for an element.
Definition ASMs3D.C:4090
bool setupQuadrature()
Configures the quadratures.
Definition ASMs3D.C:4007
virtual void setupParameters()
Sets up integration point parameters.
Definition ASMs3D.C:4039
BasisFunctionVals calculatePt(size_t el, size_t gp, bool reduced) const override
Calculates basis function info in a single integration point.
Definition ASMs3D.C:4050
size_t index(size_t el, size_t gp, bool reduced) const override
Returns global integration point index.
Definition ASMs3D.C:4079
bool internalInit() override
Implementation specific initialization.
Definition ASMs3D.C:3994
std::array< size_t, 3 > nel
Number of elements in each direction.
Definition ASMs3D.h:114
const ASMs3D & patch
Reference to patch cache is for.
Definition ASMs3D.h:112
const std::array< size_t, 3 > & noElms() const
Returns number of elements in each direction.
Definition ASMs3D.h:84
void calculateAll() override
Calculates basis function info in all integration points.
Definition ASMs3D.C:4096
Base class that checks if an element has interface contributions.
Definition ASMs3D.h:164
InterfaceChecker(const ASMs3D &pch)
The constructor initialises the reference to current patch.
Definition ASMs3D.h:169
const ASMs3D & myPatch
Reference to the patch being integrated.
Definition ASMs3D.h:166
virtual short int hasContribution(int, int I, int J, int K) const
Returns non-zero if the specified element have contributions.
Definition ASMs3D.C:3723
Driver for assembly of structured 3D spline FE models.
Definition ASMs3D.h:39
double getParametricVolume(int iel) const
Returns the volume in the parameter space for an element.
Definition ASMs3D.C:1531
virtual bool checkRightHandSystem()
Checks that the patch is modelled in a right-hand-side system.
Definition ASMs3D.C:313
virtual Vec3 getCoord(size_t inod) const
Returns the global coordinates for the given node.
Definition ASMs3D.C:1618
virtual bool getElementCoordinates(Matrix &X, int iel, bool forceItg=false) const
Returns a matrix with nodal coordinates for an element.
Definition ASMs3D.C:1640
virtual void generateThreadGroupsFromElms(const IntVec &elms)
Generates element groups from a partition.
Definition ASMs3D.C:3941
virtual bool generateFEMTopology()
Generates the finite element topology data for the patch.
Definition ASMs3D.C:433
void getGaussPointParameters(RealArray &uGP, int dir, int nGauss, const double *xi) const
Extracts parameter values of the Gauss points in one direction.
Definition ASMs3D.C:1981
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.
Definition ASMs3D.C:723
bool swapW
Has the w-parameter direction been swapped?
Definition ASMs3D.h:907
virtual bool integrate(Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates an integral over the interior patch domain.
Definition ASMs3D.C:2071
virtual size_t getNoProjectionNodes() const
Returns the number of projection nodes for this patch.
Definition ASMs3D.C:3823
virtual bool evalProjSolution(Matrix &sField, const Vector &locSol, const int *npe, int n_f) const
Evaluates the projected solution field at all visualization points.
Definition ASMs3D.C:3278
virtual bool getParameterDomain(Real2DMat &u, IntVec *corners) const
Returns parameter values and node numbers of the domain corners.
Definition ASMs3D.C:1956
virtual double findPoint(Vec3 &X, double *param) const
Searches for the specified Cartesian point in the patch.
Definition ASMs3D.C:3035
double getElementCorners(int i1, int i2, int i3, std::vector< Vec3 > &XC, RealArray *uC=nullptr) const
Computes the element corner coordinates.
Definition ASMs3D.C:2019
virtual bool createProjectionBasis(bool init)
Creates a separate projection basis for this patch.
Definition ASMs3D.C:420
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.
Definition ASMs3D.C:3143
virtual bool getNoStructElms(int &n1, int &n2, int &n3) const
Returns the number of elements in each parameter direction.
Definition ASMs3D.C:3673
virtual bool uniformRefine(int dir, int nInsert)
Refines the parametrization by inserting extra knots uniformly.
Definition ASMs3D.C:361
virtual bool selfInterconnect(const std::vector< Ipair > &nodes, double xtol)
Connects a list of node pairs to each other.
Definition ASMs3D.C:1516
virtual bool write(std::ostream &, int) const
Writes the geometry of the SplineVolume object to given stream.
Definition ASMs3D.C:163
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.
Definition ASMs3D.C:1325
virtual void clear(bool retainGeometry=false)
Clears the contents of the patch, making it empty.
Definition ASMs3D.C:176
virtual bool updateCoords(const Vector &displ)
Updates the nodal coordinates for this patch.
Definition ASMs3D.C:1741
void getCornerPoints(int i1, int i2, int i3, std::vector< utl::Point > &XC) const
Computes the element corner coordinates and parameters.
Definition ASMs3D.C:2058
virtual void generateProjThreadGroupsFromElms(const IntVec &elms)
Generate element groups from a partition.
Definition ASMs3D.C:3959
virtual Field * getProjectedField(const Vector &coefs) const
Returns a field using the projection basis.
Definition ASMs3D.C:3795
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.
Definition ASMs3D.C:702
bool getFaceSize(int &n1, int &n2, int basis, int face) const
Find local sizes for a given face.
Definition ASMs3D.C:3778
virtual void setNodeNumbers(const IntVec &nodes)
Sets the global node numbers for this patch.
Definition ASMs3D.C:1434
virtual bool collapseFace(int face, int edge=0, int basis=1)
Collapses a degenerated face into a single node or edge.
Definition ASMs3D.C:850
Go::SplineVolume * projectSolutionLocal(const IntegrandBase &) const
Projects the secondary solution using Quasi-Interpolation.
Definition ASMs3Drecovery.C:411
virtual bool integrateEdge(Integrand &integrand, int lEdge, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates a boundary integral over a patch edge.
Definition ASMs3D.C:2815
virtual bool separateProjectionBasis() const
Checks if a separate projection basis is used for this patch.
Definition ASMs3D.C:402
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.
Definition ASMs3D.C:1120
bool getElementCoordinatesPrm(Matrix &X, double u, double v, double w) const
Returns a matrix with nodal coordinates for element spanning given parameters.
Definition ASMs3D.C:1681
virtual size_t getNodeIndex(int globalNum, bool noAddedNodes=false) const
Returns local 1-based index of the node with given global number.
Definition ASMs3D.C:275
Go::SplineVolume * projectSolutionLeastSquare(const IntegrandBase &) const
Projects the secondary solution using Least-Square Approximation.
Definition ASMs3Drecovery.C:360
virtual void copyParameterDomain(const ASMbase *other)
Copies the parameter domain from the other patch.
Definition ASMs3D.C:107
virtual int getCorner(int I, int J, int K, int basis) const
Returns the node index for a given corner.
Definition ASMs3D.C:3761
virtual bool read(std::istream &)
Creates an instance by reading the given input stream.
Definition ASMs3D.C:117
virtual int getLastItgElmNode() const
Returns 0-based index of last node on integration basis.
Definition ASMs3D.C:3667
bool getQuasiInterplParameters(RealArray &prm, int dir) const
Calculates parameter values for the Quasi-Interpolation points.
Definition ASMs3Drecovery.C:43
static void createMNPC(const Go::SplineVolume *svol, IntMat &MNPC)
Creates matrix of nodal point correspondance for a spline surface.
Definition ASMs3D.C:3881
virtual void getNodalCoordinates(Matrix &X, bool geo=false) const
Returns a matrix with all nodal coordinates within the patch.
Definition ASMs3D.C:1720
int findStartNode(int &n1, int &n2, int &n3, char basis) const
Find the start node and size for a basis.
Definition ASMs3D.C:1005
void extractBasis(double u, double v, double w, Vector &N, Matrix &dNdu, bool fromRight=true) const
Establishes matrices with basis functions and 1st derivatives.
Definition ASMs3D.C:3691
virtual size_t getNoBoundaryElms(char lIndex, char ldim) const
Returns the number of elements on a boundary.
Definition ASMs3D.C:1926
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.
Definition ASMs3D.C:3965
virtual int evalPoint(const double *xi, double *param, Vec3 &X) const
Evaluates the geometry at a specified point.
Definition ASMs3D.C:3003
virtual bool evaluate(const ASMbase *basis, const Vector &locVec, RealArray &vec, int basisNum) const
Evaluates and interpolates a field over a given geometry.
Definition ASMs3Drecovery.C:64
virtual void changeNumThreads()
Hook for changing number of threads.
Definition ASMs3D.C:3584
virtual bool refine(int dir, const RealArray &xi)
Refines the parametrization by inserting extra knots.
Definition ASMs3D.C:334
virtual bool tesselate(ElementBlock &grid, const int *npe) const
Creates a hexahedron element model of this patch for visualization.
Definition ASMs3D.C:3085
virtual void findBoundaryElms(IntVec &elms, int lIndex, int=0) const
Finds the patch-local element numbers on a patch boundary.
Definition ASMs3D.C:3909
std::vector< DirichletFace > dirich
Inhomogeneous Dirichlet boundary condition data.
Definition ASMs3D.h:916
virtual void constrainNode(double xi, double eta, double zeta, int dof, int code=0)
Constrains a node identified by three relative parameter values.
Definition ASMs3D.C:1411
virtual bool raiseOrder(int ru, int rv, int rw, bool setOrder=false)
Raises the order of the SplineVolume object for this patch.
Definition ASMs3D.C:386
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.
Definition ASMs3D.C:1400
virtual void evaluateBasis(double u, double v, double w, Vector &N) const
Evaluates the basis functions at the specified point.
Definition ASMs3D.C:3683
void generateThreadGroups(size_t strip1, size_t strip2, size_t strip3, bool silence, bool ignoreGlobalLM)
Generates element groups for multi-threading of interior integrals.
Definition ASMs3D.C:3505
double getParametricArea(int iel, int dir) const
Returns boundary face area in the parameter space for an element.
Definition ASMs3D.C:1561
virtual bool addXElms(short int dim, short int item, size_t nXn, IntVec &nodes)
Adds extraordinary elements associated with a patch boundary.
Definition ASMs3D.C:201
std::map< size_t, size_t > xnMap
Node index map used by getCoord()
Definition ASMs3D.h:912
virtual void constrainEdge(int lEdge, bool open, int dof, int code=0, char basis=1)
Constrains all DOFs on a given boundary edge.
Definition ASMs3D.C:1315
virtual int findElementContaining(const double *param) const
Returns the element that contains a specified spatial point.
Definition ASMs3D.C:3019
std::shared_ptr< Go::SplineVolume > svol
The actual spline volume object.
Definition ASMs3D.h:906
virtual void getElementBorders(int iel, double *u) const
Computes the element border parameters.
Definition ASMs3D.C:1989
virtual bool assembleL2matrices(SystemMatrix &A, SystemVector &B, const L2Integrand &integrand, bool continuous) const
Assembles L2-projection matrices for the secondary solution.
Definition ASMs3Drecovery.C:157
virtual bool getGridParameters(RealArray &prm, int dir, int nSegSpan) const
Calculates parameter values for visualization nodal points.
Definition ASMs3D.C:3049
virtual int getFirstItgElmNode() const
Returns 0-based index of first node on integration basis.
Definition ASMs3D.h:768
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.
Definition ASMs3D.C:1830
virtual Go::SplineSurface * getBoundary(int dir, int=1)
Returns the spline surface representing a boundary of this patch.
Definition ASMs3D.C:73
virtual Fields * getProjectedFields(const Vector &coefs, size_t=0) const
Returns a field using the projection basis.
Definition ASMs3D.C:3807
bool getGrevilleParameters(RealArray &prm, int dir, int basisNum=1) const
Calculates parameter values for the Greville points.
Definition ASMs3Drecovery.C:29
bool assignNodeNumbers(BlockNodes &nodes, int basis=0)
Assigns new global node numbers for all nodes of the patch.
Definition ASMs3D.C:563
const IndexVec & nodeInd
IJK-triplets for the control points (nodes)
Definition ASMs3D.h:909
ThreadGroups threadGroupsVol
Element groups for multi-threaded volume assembly.
Definition ASMs3D.h:919
virtual bool updateDirichlet(const std::map< int, RealFunc * > &func, const std::map< int, VecFunc * > &vfunc, double time, const std::map< int, int > *g2l, bool tangent)
Updates the time-dependent in-homogeneous Dirichlet coefficients.
Definition ASMs3D.C:1455
virtual Go::SplineVolume * getBasis(int basis=1)
Returns the spline volume representing a basis of this patch.
Definition ASMs3D.C:101
int coeffInd(size_t inod) const
Returns an index into the internal coefficient array for a node.
Definition ASMs3D.C:1600
virtual int getNodeID(size_t inod, bool noAddedNodes=false) const
Returns the global node number for the given node.
Definition ASMs3D.C:288
std::vector< IJK > IndexVec
Node index container.
Definition ASMs3D.h:48
virtual void closeBoundaries(int dir, int basis, int master)
Makes two opposite boundary faces periodic.
Definition ASMs3D.C:815
virtual void constrainFace(int dir, bool open, int dof, int code=0, char basis=1)
Constrains all DOFs on a given boundary face.
Definition ASMs3D.C:1025
Go::SplineVolume * projectSolution(const IntegrandBase &integrand) const
Projects the secondary solution field onto the primary basis.
Definition ASMs3Drecovery.C:111
std::map< size_t, size_t > nxMap
Node index map used by getNodeID()
Definition ASMs3D.h:913
virtual IntMat getElmNodes(int basis) const
Returns the matrix of nodal point correspondance for given basis.
Definition ASMs3D.C:3873
std::vector< std::unique_ptr< BasisFunctionCache > > myCache
Basis function cache.
Definition ASMs3D.h:924
Go::SplineVolume * projectSolutionLocalApprox(const IntegrandBase &) const
Projects the secondary solution using Variation Diminishing Spline Approximation.
Definition ASMs3Drecovery.C:443
virtual size_t getNoNodes(int basis=0) const
Returns the total number of nodes in this patch.
Definition ASMs3D.C:303
virtual Vec3 getElementCenter(int iel) const
Returns the coordinate of the element center.
Definition ASMs3D.C:1762
virtual bool getOrder(int &p1, int &p2, int &p3) const
Returns the polynomial order in each parameter direction.
Definition ASMs3D.C:1898
IndexVec myNodeInd
The actual IJK-triplet container.
Definition ASMs3D.h:910
std::map< char, ThreadGroups > threadGroupsFace
Element groups for multi-threaded face assembly.
Definition ASMs3D.h:921
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.
Definition ASMs3D.C:3155
virtual bool getSize(int &n1, int &n2, int &n3, int basis=0) const
Returns the number of nodal points in each parameter direction.
Definition ASMs3D.C:1912
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.
Definition ASMs3D.C:1770
virtual void getElmConnectivities(IntMat &neigh, int basis=ASM::INTEGRATION_BASIS) const
Calculates the matrix of element neighbour connectivities.
Definition ASMs3D.C:3833
Base class for structured spline-based FE assembly drivers.
Definition ASMstruct.h:32
Base class for basis function caches.
Definition BasisFunctionCache.h:31
BasisFunctionCache()
Default constructor.
Definition BasisFunctionCache.C:22
Class for storage of a standard FE grid block.
Definition ElementBlock.h:27
Interface class for scalar fields.
Definition Field.h:30
Base class for vector fields.
Definition Fields.h:35
Base class for unary spatial functions of arbitrary result type.
Definition Function.h:147
Abstract base class representing a system level integrated quantity.
Definition GlobalIntegral.h:29
Base class representing a system level integrated quantity.
Definition IntegrandBase.h:42
Abstract base class representing a system level integrated quantity.
Definition Integrand.h:44
Abstract class for evaluating integrand or function.
Definition GlbL2projector.h:40
Base class for representing a system matrix on different formats.
Definition SystemMatrix.h:220
Base class for representing a system vector on different formats.
Definition SystemMatrix.h:32
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
@ INTEGRATION_BASIS
Integration basis.
Definition ASMenums.h:58
General utility classes and functions.
Definition SIMoptions.h:22
Struct with data for definition of global node numbers of a patch.
Definition ASMs3D.h:125
int nnodJ
Number of nodes in parameter direction J.
Definition ASMs3D.h:132
int inc[3]
Increment in global node numbering in each direction.
Definition ASMs3D.h:130
Edge edges[12]
Edge nodes
Definition ASMs3D.h:127
int next()
Returns iinod which then is incremented.
Definition ASMs3D.C:543
int iinod
Global node number of the first interior node.
Definition ASMs3D.h:129
int indxI
Running node index in the local I-direction.
Definition ASMs3D.h:133
int nnodI
Number of nodes in parameter direction I.
Definition ASMs3D.h:131
int ibnod[8]
Vertex nodes.
Definition ASMs3D.h:126
Face faces[6]
Face nodes
Definition ASMs3D.h:128
BlockNodes()
Default constructor.
Definition ASMs3D.h:137
int indxJ
Running node index in the local J-direction.
Definition ASMs3D.h:134
Struct representing an inhomogeneous Dirichlet boundary condition.
Definition ASMs3D.h:150
DirichletFace(Go::SplineSurface *ss=nullptr, int d=0, int c=0)
Default constructor.
Definition ASMs3D.h:157
std::vector< Ipair > nodes
Nodes subjected to projection on the boundary.
Definition ASMs3D.h:154
Go::SplineSurface * surf
Pointer to spline surface for the boundary.
Definition ASMs3D.h:151
int code
Inhomogeneous Dirichlet condition code.
Definition ASMs3D.h:153
int dof
Local DOF to constrain along the boundary.
Definition ASMs3D.h:152
Struct for edge node definitions.
Definition ASMs3D.h:52
int incr
Increment in the global numbering along the edge.
Definition ASMs3D.h:54
int icnod
Global node number of first interior point along edge.
Definition ASMs3D.h:53
int next()
Returns icnod which then is incremented.
Definition ASMs3D.C:519
Struct for face node definitions.
Definition ASMs3D.h:60
int incrJ
Increment in global numbering in the J-direction on face.
Definition ASMs3D.h:63
int indxI
Running node index in the local I-direction.
Definition ASMs3D.h:65
int nnodI
Number of nodes in the local I-direction on face.
Definition ASMs3D.h:64
int next()
Returns isnod which then is incremented.
Definition ASMs3D.C:528
int incrI
Increment in global numbering in the I-direction on face.
Definition ASMs3D.h:62
int isnod
Global node number of the first interior point on face.
Definition ASMs3D.h:61
Struct for nodal point data.
Definition ASMs3D.h:42
int I
Index in first parameter direction.
Definition ASMs3D.h:43
int J
Index in second parameter direction.
Definition ASMs3D.h:44
int K
Index in third parameter direction.
Definition ASMs3D.h:45
Struct holding basis function values and derivatives.
Definition BasisFunctionVals.h:25
Struct representing the time domain.
Definition TimeDomain.h:23