IFEM  90A354
ASMstruct.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _ASM_STRUCT_H
15 #define _ASM_STRUCT_H
16 
17 #include "ASMbase.h"
18 #include "ThreadGroups.h"
19 
20 #include <memory>
21 
22 namespace Go {
23  class GeomObject;
24 }
25 
31 class ASMstruct : public ASMbase
32 {
33 protected:
38  ASMstruct(unsigned char n_p, unsigned char n_s, unsigned char n_f);
42  ASMstruct(const ASMstruct& patch, unsigned char n_f);
43 
44 public:
46  virtual ~ASMstruct();
47 
49  virtual bool empty() const { return geomB == nullptr; }
50 
56  virtual bool getSize(int& n1, int& n2, int& n3, int basis = 0) const = 0;
57 
62  virtual bool getNoStructElms(int& n1, int& n2, int& n3) const = 0;
63 
69  virtual void evaluateBasis(double u, double v, double w, Vector& N) const = 0;
70 
74  virtual Go::GeomObject* evalSolution(const IntegrandBase& integr) const = 0;
75 
81  virtual bool diracPoint(Integrand& integr, GlobalIntegral& glInt,
82  const double* u, const Vec3& pval);
83 
85  virtual bool separateProjectionBasis() const;
86 
88  virtual void swapProjectionBasis();
89 
90 protected:
98  bool addXNodes(unsigned short int dim, size_t nXn, IntVec& nodes);
99 
107  bool checkThreadGroups(const std::vector<std::set<int>>& nodes,
108  int group, bool ignoreGlobalLM);
109 
113  virtual void getElementBorders(int iel, double* u) const = 0;
114 
115 protected:
116  std::shared_ptr<Go::GeomObject> geomB;
117  std::shared_ptr<Go::GeomObject> projB;
118  std::shared_ptr<Go::GeomObject> projB2;
119 
122 };
123 
124 #endif
Base class for spline-based finite element (FE) assembly drivers.
std::vector< int > IntVec
General integer vector.
Definition: ASMbase.h:25
Threading group partitioning.
Base class for spline-based finite element (FE) assembly drivers.
Definition: ASMbase.h:70
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 structured spline-based FE assembly drivers.
Definition: ASMstruct.h:32
std::shared_ptr< Go::GeomObject > projB2
Pointer to spline object of the secondary projection basis.
Definition: ASMstruct.h:118
std::shared_ptr< Go::GeomObject > geomB
Pointer to spline object of the geometry basis.
Definition: ASMstruct.h:116
virtual bool empty() const
Checks if the patch is empty.
Definition: ASMstruct.h:49
virtual void swapProjectionBasis()
Swaps between the first and second projection basis.
Definition: ASMstruct.C:180
virtual void evaluateBasis(double u, double v, double w, Vector &N) const =0
Evaluates the basis functions at the specified point.
virtual ~ASMstruct()
The destructor frees the dynamically allocated spline objects.
Definition: ASMstruct.C:39
ASMstruct(unsigned char n_p, unsigned char n_s, unsigned char n_f)
The constructor sets the number of space dimensions and fields.
Definition: ASMstruct.C:24
virtual bool separateProjectionBasis() const
Checks if a separate projection basis is used for this patch.
Definition: ASMstruct.C:47
bool addXNodes(unsigned short int dim, size_t nXn, IntVec &nodes)
Adds extraordinary nodes associated with a patch boundary.
Definition: ASMstruct.C:53
virtual Go::GeomObject * evalSolution(const IntegrandBase &integr) const =0
Projects the secondary solution field onto the primary basis.
bool checkThreadGroups(const std::vector< std::set< int >> &nodes, int group, bool ignoreGlobalLM)
Performs a sanity check on the thread groups.
Definition: ASMstruct.C:91
std::shared_ptr< Go::GeomObject > projB
Pointer to spline object of the projection basis.
Definition: ASMstruct.h:117
ThreadGroups proj2ThreadGroups
Element groups for multi-threaded assembly - second projection basis.
Definition: ASMstruct.h:121
virtual void getElementBorders(int iel, double *u) const =0
Computes the element border parameters.
ThreadGroups projThreadGroups
Element groups for multi-threaded assembly - projection basis.
Definition: ASMstruct.h:120
virtual bool diracPoint(Integrand &integr, GlobalIntegral &glInt, const double *u, const Vec3 &pval)
Integrates a spatial dirac-delta function over a patch.
Definition: ASMstruct.C:120
virtual bool getNoStructElms(int &n1, int &n2, int &n3) const =0
Returns the number of elements in each parameter direction.
virtual bool getSize(int &n1, int &n2, int &n3, int basis=0) const =0
Returns the number of nodal points in each parameter direction.
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
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