chombo-discharge
CD_NewIntersectionIF.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_NewIntersectionIF_H
13 #define CD_NewIntersectionIF_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 
18 // Our includes
19 #include <CD_NamespaceHeader.H>
20 
24 class NewIntersectionIF : public BaseIF
25 {
26 public:
31 
36  NewIntersectionIF(const Vector<BaseIF*>& a_impFuncs);
37 
41  virtual ~NewIntersectionIF();
42 
47  virtual Real
48  value(const RealVect& a_point) const override;
49 
53  virtual BaseIF*
54  newImplicitFunction() const override;
55 
56 protected:
60  int m_numFuncs; // number of implicit functions
61 
65  Vector<BaseIF*> m_impFuncs;
66 };
67 
68 #include <CD_NamespaceFooter.H>
69 
70 #endif
New intersection IF which does not mess up the return value function when there are no implicit funct...
Definition: CD_NewIntersectionIF.H:25
Vector< BaseIF * > m_impFuncs
Implicit functions.
Definition: CD_NewIntersectionIF.H:65
int m_numFuncs
Number of implicit functions.
Definition: CD_NewIntersectionIF.H:60
virtual Real value(const RealVect &a_point) const override
Get distance to objects.
Definition: CD_NewIntersectionIF.cpp:55
virtual BaseIF * newImplicitFunction() const override
Factory method.
Definition: CD_NewIntersectionIF.cpp:79
NewIntersectionIF()
Weak constructor. Does nothing.
Definition: CD_NewIntersectionIF.cpp:19
virtual ~NewIntersectionIF()
Destructor.
Definition: CD_NewIntersectionIF.cpp:43