IFEM 90A354
ASMu2DLag.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _ASM_U2D_LAG_H
15#define _ASM_U2D_LAG_H
16
17#include "ASMs2DLag.h"
18
19
27class ASMu2DLag : public ASMs2DLag
28{
31 {
32 public:
37
39 virtual ~BasisFunctionCache() = default;
40
42 double getParam(int, size_t, size_t, bool) const override { return 0.0; }
43
44 protected:
46 void setupParameters() override {}
47 };
48
49public:
51 ASMu2DLag(unsigned char n = 2, unsigned char n_f = 2, char fType = 'm');
53 ASMu2DLag(const ASMu2DLag& pch, unsigned char n_f);
55 ASMu2DLag(const ASMu2DLag& pch);
57 virtual ~ASMu2DLag() {}
58
59 // Methods for model generation
60 // ============================
61
63 virtual bool read(std::istream& is);
65 virtual bool generateFEMTopology();
67 virtual bool empty() const { return nel == 0; }
68
70 virtual int parseNodeBox(const std::string& setName, const char* bbox);
77 int addToNodeSet(const std::string& setName, int inod, bool extId = false);
79 bool getNodeSet(int iset, std::string& name) const;
80
82 virtual int getElementSetIdx(const std::string& setName) const;
84 virtual const IntVec& getElementSet(int iset) const;
86 virtual bool getElementSet(int iset, std::string& name) const;
88 virtual bool isInElementSet(int iset, int iel) const;
90 virtual int parseElemSet(const std::string& setName, const char* cset);
92 virtual int parseElemBox(const std::string& setName,
93 const std::string& unionSet, const char* bbox);
100 int addToElemSet(const std::string& setName, int iel, bool extId = false);
101
106 virtual void getBoundaryNodes(int lIndex, IntVec& nodes,
107 int, int, int, bool local) const;
108
114 virtual bool integrate(Integrand& integrand,
115 GlobalIntegral& glbInt, const TimeDomain& time);
116
119 virtual void generateThreadGroups(const Integrand&, bool silence,
120 bool separateGroup1noded);
121
122 // Post-processing methods
123 // =======================
124
128 virtual bool tesselate(ElementBlock& grid, const int*) const;
129
131 bool writeXML(const char* fname) const;
132
133protected:
142 virtual bool evalSolPt(int iel, double xi, double eta,
143 size_t nCmp, const Vector& pchSol,
144 RealArray& ptSol, RealArray& N) const;
145
147 void generateThreadGroupsMultiColored(bool silence, bool separateGroup1Noded);
148
150
151 std::vector<ASM::NodeSet> elemSets;
152
153private:
154 char fileType;
155};
156
157#endif
std::vector< int > IntVec
General integer vector.
Definition ASMbase.h:25
Driver for assembly of structured 2D Lagrange FE models.
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition ImmersedBoundaries.h:32
size_t nel
Number of regular elements in this patch.
Definition ASMbase.h:1059
Implementation of basis function cache.
Definition ASMs2DLag.h:31
Driver for assembly of structured 2D Lagrange FE models.
Definition ASMs2DLag.h:27
virtual void generateThreadGroups(const Integrand &, bool, bool)
Generates element groups for multi-threading of interior integrals.
Definition ASMs2DLag.C:932
virtual bool integrate(Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates an integral over the interior patch domain.
Definition ASMs2DLag.C:468
Implementation of basis function cache.
Definition ASMu2DLag.h:31
double getParam(int, size_t, size_t, bool) const override
No integration point parameters for unstructured patches.
Definition ASMu2DLag.h:42
virtual ~BasisFunctionCache()=default
Empty destructor.
BasisFunctionCache(const ASMu2DLag &pch)
The constructor forwards to the parent class constructor.
Definition ASMu2DLag.h:35
void setupParameters() override
No integration point parameters for unstructured patches.
Definition ASMu2DLag.h:46
Driver for assembly of unstructured 2D Lagrange FE models.
Definition ASMu2DLag.h:28
bool writeXML(const char *fname) const
Dumps the mesh to the specified XML-file.
Definition ASMu2DLag.C:571
virtual bool evalSolPt(int iel, double xi, double eta, size_t nCmp, const Vector &pchSol, RealArray &ptSol, RealArray &N) const
Evaluates a nodal solution field at specified point in an element.
Definition ASMu2DLag.C:551
virtual int parseNodeBox(const std::string &setName, const char *bbox)
Defines a node set by parsing a 3D bounding box.
Definition ASMu2DLag.C:124
int addToNodeSet(const std::string &setName, int inod, bool extId=false)
Adds a node to a named node set.
Definition ASMu2DLag.C:168
bool getNodeSet(int iset, std::string &name) const
Returns the name of an indexed predefined node set.
Definition ASMu2DLag.C:112
virtual bool integrate(Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates an integral over the interior patch domain.
Definition ASMu2DLag.C:505
virtual const IntVec & getElementSet(int iset) const
Returns an indexed predefined element set.
Definition ASMu2DLag.C:207
virtual int parseElemBox(const std::string &setName, const std::string &unionSet, const char *bbox)
Defines an element set by parsing a 3D bounding box.
Definition ASMu2DLag.C:283
virtual int parseElemSet(const std::string &setName, const char *cset)
Defines an element set by parsing a list of element numbers.
Definition ASMu2DLag.C:245
int addToElemSet(const std::string &setName, int iel, bool extId=false)
Adds an element to a named element set.
Definition ASMu2DLag.C:335
virtual bool empty() const
Checks if this patch is empty.
Definition ASMu2DLag.h:67
virtual int getElementSetIdx(const std::string &setName) const
Returns (1-based) index of a predefined element set in the patch.
Definition ASMu2DLag.C:194
void generateThreadGroupsMultiColored(bool silence, bool separateGroup1Noded)
Generate thread groups using multi-coloring.
Definition ASMu2DLag.C:383
virtual bool generateFEMTopology()
Generates the finite element topology data for the patch.
Definition ASMu2DLag.C:71
virtual void getBoundaryNodes(int lIndex, IntVec &nodes, int, int, int, bool local) const
Finds the global (or patch-local) node numbers on a patch boundary.
Definition ASMu2DLag.C:361
virtual bool isInElementSet(int iset, int iel) const
Checks if element iel is within predefined element set iset.
Definition ASMu2DLag.C:233
virtual bool read(std::istream &is)
Creates an instance by reading the given input stream.
Definition ASMu2DLag.C:54
std::vector< ASM::NodeSet > elemSets
Element sets for properties.
Definition ASMu2DLag.h:151
virtual void generateThreadGroups(const Integrand &, bool silence, bool separateGroup1noded)
Generates element groups for multi-threading of interior integrals.
Definition ASMu2DLag.C:371
char fileType
Mesh file format.
Definition ASMu2DLag.h:154
virtual ~ASMu2DLag()
Empty destructor.
Definition ASMu2DLag.h:57
virtual bool tesselate(ElementBlock &grid, const int *) const
Creates a quad element model of this patch for visualization.
Definition ASMu2DLag.C:474
bool swapNode34
If true, element nodes 3 and 4 should be swapped.
Definition ASMu2DLag.h:149
Class for storage of a standard FE grid block.
Definition ElementBlock.h:27
Abstract base class representing a system level integrated quantity.
Definition GlobalIntegral.h:29
Abstract base class representing a system level integrated quantity.
Definition Integrand.h:44
A vector class with some added algebraic operations.
Definition matrix.h:64
Struct representing the time domain.
Definition TimeDomain.h:23