IFEM  90A354
ASMs2DIB.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _ASM_S2D_IB_H
15 #define _ASM_S2D_IB_H
16 
17 #include "ASMs2D.h"
18 
19 namespace Immersed { class Geometry; }
20 
21 
26 class ASMs2DIB : public ASMs2D
27 {
35  {
36  bool myAll;
37  bool alsoSW;
38  public:
40  explicit Intersected(const ASMs2DIB& pch, bool all = false, bool sw = false)
41  : InterfaceChecker(pch), myAll(all), alsoSW(sw) {}
43  virtual ~Intersected() {}
47  virtual short int hasContribution(int, int I, int J, int = -1) const;
48  };
49 
50 public:
52  ASMs2DIB(unsigned char n_s = 2, unsigned char n_f = 1, int max_depth = 5);
54  ASMs2DIB(const ASMs2DIB& patch, unsigned char n_f = 0);
56  virtual ~ASMs2DIB();
57 
62  virtual void addHole(double R, double Xc, double Yc);
69  virtual void addHole(double R, double X1, double Y1, double X2, double Y2);
70 
75  virtual bool setGeometry(RealFunc* f, double power, double threshold);
76 
78  virtual ElementBlock* immersedGeometry(char* name) const;
79 
81  virtual void getNoIntPoints(size_t& nPt, size_t& nIPt);
82 
87  virtual bool generateFEMTopology();
88 
92  bool isIntersected(int iel, bool checkIfInDomainOnly = false) const;
93 
94  using ASMs2D::integrate;
99  virtual bool integrate(Integrand& integrand,
100  GlobalIntegral& glbInt, const TimeDomain& time);
101 
105  virtual void filterResults(Matrix& field, const ElementBlock* grid) const;
106 
107 private:
110 
112  int maxDepth;
113 };
114 
115 #endif
Driver for assembly of structured 2D spline FE models.
std::vector< Real2DMat > Real3DMat
A real-valued three-dimensional array without algebraic operations.
Definition: ImmersedBoundaries.h:36
Class that checks if an element has interface contributions.
Definition: ASMs2DIB.h:35
bool alsoSW
If true, consider south/west neighbors too.
Definition: ASMs2DIB.h:37
virtual short int hasContribution(int, int I, int J, int=-1) const
Returns non-zero if the specified element have contributions.
Definition: ASMs2DIB.C:238
Intersected(const ASMs2DIB &pch, bool all=false, bool sw=false)
The constructor initialises the reference to current patch.
Definition: ASMs2DIB.h:40
bool myAll
If true, consider all element interfaces.
Definition: ASMs2DIB.h:36
virtual ~Intersected()
Empty destructor.
Definition: ASMs2DIB.h:43
Assembly of structured 2D spline FE models with immersed boundaries.
Definition: ASMs2DIB.h:27
ASMs2DIB(unsigned char n_s=2, unsigned char n_f=1, int max_depth=5)
Default constructor.
Definition: ASMs2DIB.C:22
virtual bool generateFEMTopology()
Generates the finite element topology data for the patch.
Definition: ASMs2DIB.C:155
virtual void filterResults(Matrix &field, const ElementBlock *grid) const
Filters out result point values that are outside physical domain.
Definition: ASMs2DIB.C:292
virtual bool setGeometry(RealFunc *f, double power, double threshold)
Defines the immersed geometry from a scalar function.
Definition: ASMs2DIB.C:92
virtual void getNoIntPoints(size_t &nPt, size_t &nIPt)
Computes the total number of integration points in this patch.
Definition: ASMs2DIB.C:123
virtual bool integrate(Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates an integral over the interior patch domain.
Definition: ASMs2D.C:1696
ElementBlock * myLines
Sub-cell grid lines (for plotting)
Definition: ASMs2DIB.h:109
bool isIntersected(int iel, bool checkIfInDomainOnly=false) const
Returns true if the specified element has been sub-divided.
Definition: ASMs2DIB.C:142
Real3DMat quadPoints
The Gauss quadrature points for this patch.
Definition: ASMs2DIB.h:111
virtual ElementBlock * immersedGeometry(char *name) const
Returns an additional geometry to visualize (immersed boundaries).
Definition: ASMs2DIB.C:102
virtual void addHole(double R, double Xc, double Yc)
Adds a circular hole in the physical geometry.
Definition: ASMs2DIB.C:47
Immersed::Geometry * myGeometry
The physical geometry description.
Definition: ASMs2DIB.h:108
int maxDepth
Maximum depth up to which to refine each element.
Definition: ASMs2DIB.h:112
virtual ~ASMs2DIB()
The destructor deletes the dynamically allocated geometry object.
Definition: ASMs2DIB.C:40
Base class that checks if an element has interface contributions.
Definition: ASMs2D.h:157
Driver for assembly of structured 2D spline FE models.
Definition: ASMs2D.h:39
virtual bool integrate(Integrand &integrand, GlobalIntegral &glbInt, const TimeDomain &time)
Evaluates an integral over the interior patch domain.
Definition: ASMs2D.C:1696
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
Interface class representing a geometric object.
Definition: ImmersedBoundaries.h:45
Abstract base class representing a system level integrated quantity.
Definition: Integrand.h:44
Scalar-valued unary function of a spatial point.
Definition: Function.h:193
Utilities for immersed boundary calculations.
Definition: ASMs2DIB.h:19
Struct representing the time domain.
Definition: TimeDomain.h:23