IFEM 90A354
ImmersedBoundaries.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _IMMERSED_BOUNDARIES_H
15#define _IMMERSED_BOUNDARIES_H
16
17#ifndef Real
18#define Real double
19#endif
20
21#include <vector>
22
23class Vec3;
24
25namespace utl {
26 class Point;
27}
28
29class ElementBlock;
30
32typedef std::vector<Real> RealArray;
34typedef std::vector<RealArray> Real2DMat;
36typedef std::vector<Real2DMat> Real3DMat;
38typedef std::vector<utl::Point> PointVec;
39
40
41namespace Immersed
42{
45 {
46 protected:
49 public:
51 virtual ~Geometry() {}
52
58 virtual double Alpha(double X, double Y, double Z) const { return 0.0; }
60 virtual double Alpha(const Vec3& X) const;
61
63 virtual ElementBlock* tesselate() const { return nullptr; }
64 };
65
91 bool getQuadraturePoints(const Geometry& geo,
92 const std::vector<PointVec>& elmCorner,
93 int max_depth, int p,
94 Real3DMat& quadPoints, ElementBlock* grid = nullptr);
95
97 bool getQuadraturePoints(const Geometry& geo,
98 const utl::Point& X1, const utl::Point& X2,
99 const utl::Point& X3, const utl::Point& X4,
100 int max_depth, int nGauss,
101 RealArray& GP1, RealArray& GP2,
102 RealArray& GPw, ElementBlock* grid = nullptr);
103
105 bool getQuadraturePoints(const Geometry& geo,
106 const utl::Point& X1, const utl::Point& X2,
107 const utl::Point& X3, const utl::Point& X4,
108 const utl::Point& X5, const utl::Point& X6,
109 const utl::Point& X7, const utl::Point& X8,
110 int max_depth, int nGauss,
111 RealArray& GP1, RealArray& GP2, RealArray& GP3,
112 RealArray& GPw);
113
115 enum Stab
116 {
117 NO_STAB = 0,
118 ALL_INTERFACES = 1,
119 SUBDIV_INTERFACES = 2
120 };
121
122 extern int stabilization;
123
124 extern bool plotCells;
125}
126
127#endif
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< utl::Point > PointVec
An array of point vectors.
Definition ImmersedBoundaries.h:38
std::vector< Real2DMat > Real3DMat
A real-valued three-dimensional array without algebraic operations.
Definition ImmersedBoundaries.h:36
Class for storage of a standard FE grid block.
Definition ElementBlock.h:27
Interface class representing a geometric object.
Definition ImmersedBoundaries.h:45
virtual double Alpha(double X, double Y, double Z) const
Performs the inside-outside test for the geometric object.
Definition ImmersedBoundaries.h:58
virtual ElementBlock * tesselate() const
Creates a finite element model of the geometry for visualization.
Definition ImmersedBoundaries.h:63
virtual ~Geometry()
Empty destructor.
Definition ImmersedBoundaries.h:51
Geometry()
The default constructor is protected to allow sub-classes only.
Definition ImmersedBoundaries.h:48
Simple class for representing a point in 3D space.
Definition Vec3.h:27
Class for representing points in 3D space.
Definition Point.h:29
Utilities for immersed boundary calculations.
Definition ASMs2DIB.h:19
bool getQuadraturePoints(const Geometry &geo, const std::vector< PointVec > &elmCorner, int max_depth, int p, Real3DMat &quadPoints, ElementBlock *grid=nullptr)
Returns the coordinates and weights for the quadrature points.
Definition ImmersedBoundaries.C:264
int stabilization
Stabilization option.
Definition ImmersedBoundaries.C:23
Stab
Enum defining different stabilizations.
Definition ImmersedBoundaries.h:116
bool plotCells
Flags whether subcells should be plotted or not.
Definition ImmersedBoundaries.C:24
General utility classes and functions.
Definition SIMoptions.h:22