Chombo + EB  3.2
DivNormalRefinement.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _DIVNORMALREFINEMENT_H_
12 #define _DIVNORMALREFINEMENT_H_
13 
14 #include "RefinementCriterion.H"
15 
16 #include "NamespaceHeader.H"
17 
18 ///
19 /**
20  This refinement criterion refines if the change in the normal exceeds a threshold.
21  */
22 template <int dim> class DivNormalRefinement: public RefinementCriterion<dim>
23 {
24 public:
25  /// Null constructor
27 
28  /// Constructor which sets a threshold
29  DivNormalRefinement(const Real & a_maxChangeThreshold,
30  const int & a_maxNumberOfRefinements);
31 
32  /// Destructor
33  virtual ~DivNormalRefinement();
34 
35  /**
36  Refine if the change in the normal exceeds a threshold.
37  */
38  virtual bool doRefine(IndexTM<int,dim> & a_refineInDir,
39  const CutCellMoments<dim> & a_ccm,
40  const int & a_numberOfRefinements);
41 
42  /**
43  Estimate the change in the normal.
44  */
45  virtual Real approximateDivNormal(const CutCellMoments<dim> & a_ccm);
46 
47  // Set threshold
48  virtual void setMaxChangeThreshold(const Real & a_maxChangeThreshold);
49 
50  /// Get threshold
51  virtual Real getMaxChangeThreshold();
52 
53 // Set max number of refinements
54  virtual void setMaxNumberOfRefinements(const int & a_maxNumberOfRefinements);
55 
56  /// Get threshold
57  virtual int getMaxNumberOfRefinements();
58 
59 protected:
62 };
63 
64 #include "NamespaceFooter.H"
65 
67 
68 #endif
69 
virtual bool doRefine(IndexTM< int, dim > &a_refineInDir, const CutCellMoments< dim > &a_ccm, const int &a_numberOfRefinements)
Definition: DivNormalRefinementImplem.H:33
virtual ~DivNormalRefinement()
Destructor.
Definition: DivNormalRefinementImplem.H:29
Definition: RefinementCriterion.H:27
Definition: IndexTM.H:36
Definition: DivNormalRefinement.H:22
virtual Real approximateDivNormal(const CutCellMoments< dim > &a_ccm)
Definition: DivNormalRefinementImplem.H:55
double Real
Definition: REAL.H:33
virtual void setMaxNumberOfRefinements(const int &a_maxNumberOfRefinements)
Definition: DivNormalRefinementImplem.H:139
virtual Real getMaxChangeThreshold()
Get threshold.
Definition: DivNormalRefinementImplem.H:134
Real m_maxChangeThreshold
Definition: DivNormalRefinement.H:60
DivNormalRefinement()
Null constructor.
Definition: DivNormalRefinementImplem.H:18
int m_maxNumberOfRefinements
Definition: DivNormalRefinement.H:61
virtual void setMaxChangeThreshold(const Real &a_maxChangeThreshold)
Definition: DivNormalRefinementImplem.H:124
virtual int getMaxNumberOfRefinements()
Get threshold.
Definition: DivNormalRefinementImplem.H:149
Definition: CutCellMoments.H:32