IFEM 90A354
IBGeometries.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _IB_GEOMETRIES_H
15#define _IB_GEOMETRIES_H
16
17#include "ImmersedBoundaries.h"
18
19class RealFunc;
20
21
38{
39public:
41 Hole2D(double r = 1.0, double x = 0.0, double y = 0.0) : R(r), Xc(x), Yc(y) {}
42
48 virtual double Alpha(double X, double Y, double = 0.0) const;
49
51 virtual ElementBlock* tesselate() const;
52
53protected:
54 double R;
55 double Xc;
56 double Yc;
57};
58
59
64class Oval2D : public Hole2D
65{
66public:
68 Oval2D(double r, double x0, double y0, double x1, double y1);
69
71 virtual double Alpha(double X, double Y, double) const;
72
74 virtual ElementBlock* tesselate() const;
75
76private:
77 double X1;
78 double Y1;
79 double D2;
80 double LR;
81};
82
83
89{
90public:
94 explicit PerforatedPlate2D(Hole2D* hole) : holes({hole}) { }
96 virtual ~PerforatedPlate2D();
97
99 void addHole(double r, double x, double y);
101 void addHole(double r, double x0, double y0, double x1, double y1);
102
104 virtual double Alpha(double X, double Y, double) const;
105
107 virtual ElementBlock* tesselate() const;
108
109private:
110 std::vector<Hole2D*> holes;
111};
112
113
119{
120public:
122 explicit GeoFunc2D(RealFunc* f = nullptr, double p = 1.0, double eps = 0.5);
123
125 virtual double Alpha(const Vec3& X) const;
126
127private:
129 double myExponent;
130 double threshold;
131};
132
133#endif
Utilities for immersed boundary calculations.
Class for storage of a standard FE grid block.
Definition ElementBlock.h:27
Class describing the immersed boundary as a scalar function.
Definition IBGeometries.h:119
double threshold
Inside/outside threshold.
Definition IBGeometries.h:130
double myExponent
The exponent to apply on the myAlpha function.
Definition IBGeometries.h:129
RealFunc * myAlpha
Function describing the inside-outside state.
Definition IBGeometries.h:128
virtual double Alpha(const Vec3 &X) const
Performs the inside-outside test for the geometric object.
Definition IBGeometries.C:173
Class representing the perforated plate benchmark.
Definition IBGeometries.h:38
double Yc
Y-coordinate of hole center.
Definition IBGeometries.h:56
double Xc
X-coordinate of hole center.
Definition IBGeometries.h:55
Hole2D(double r=1.0, double x=0.0, double y=0.0)
Default constructor initializing the radius and center of the hole.
Definition IBGeometries.h:41
double R
Hole radius.
Definition IBGeometries.h:54
virtual double Alpha(double X, double Y, double=0.0) const
Performs the inside-outside test for the perforated plate object.
Definition IBGeometries.C:28
virtual ElementBlock * tesselate() const
Creates a finite element model of the geometry for visualization.
Definition IBGeometries.C:75
Interface class representing a geometric object.
Definition ImmersedBoundaries.h:45
Class representing a plate perforated by an oval hole.
Definition IBGeometries.h:65
double LR
Auxilliary parameter used by method Alpha.
Definition IBGeometries.h:80
double Y1
Y-coordinate of second circle center.
Definition IBGeometries.h:78
virtual ElementBlock * tesselate() const
Creates a finite element model of the geometry for visualization.
Definition IBGeometries.C:99
double X1
X-coordinate of second circle center.
Definition IBGeometries.h:77
virtual double Alpha(double X, double Y, double) const
Performs the inside-outside test for the perforated plate object.
Definition IBGeometries.C:45
double D2
Auxilliary parameter used by method Alpha.
Definition IBGeometries.h:79
Class representing a plate perforated by multiple holes.
Definition IBGeometries.h:89
virtual double Alpha(double X, double Y, double) const
Performs the inside-outside test for the perforated plate object.
Definition IBGeometries.C:64
void addHole(double r, double x, double y)
Adds a hole to the perforated plate.
Definition IBGeometries.C:151
virtual ElementBlock * tesselate() const
Creates a finite element model of the geometry for visualization.
Definition IBGeometries.C:127
PerforatedPlate2D(Hole2D *hole)
Constructor creating a single hole.
Definition IBGeometries.h:94
std::vector< Hole2D * > holes
The holes that perforate the plate.
Definition IBGeometries.h:110
virtual ~PerforatedPlate2D()
The destructor deletes the holes.
Definition IBGeometries.C:145
PerforatedPlate2D()
Default constructor.
Definition IBGeometries.h:92
Scalar-valued unary function of a spatial point.
Definition Function.h:193
Simple class for representing a point in 3D space.
Definition Vec3.h:27