Chombo + EB  3.0
FixedRefinement.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 _FIXEDREFINEMENT_H_
12 #define _FIXEDREFINEMENT_H_
13 
14 #include "RefinementCriterion.H"
15 
16 #include "NamespaceHeader.H"
17 
18 ///
19 /**
20  This refinement criterion refines a fixed number of levels.
21  */
22 template <int dim> class FixedRefinement: public RefinementCriterion<dim>
23 {
24 public:
25  /// Null constructor
27 
28  /// Constructor which sets number of refinements
29  FixedRefinement(const int & a_maxNumberOfRefinements);
30 
31  /// Destructor
32  virtual ~FixedRefinement();
33 
34  /// Refine a fixed number of times
35  /**
36  Refine if the number of refinements already finished is smaller than the max number of refinements.
37  */
38  virtual bool doRefine(IndexTM<int,dim> & a_refineInDir,
39  const CutCellMoments<dim> & a_ccm,
40  const int & a_numberOfRefinements);
41 
42  /// Set the number of refinements
43  virtual void setMaxNumberOfRefinements(const int & a_maxNumberOfRefinements);
44 
45  /// Get the number of refinements
46  virtual int getMaxNumberOfRefinements();
47 
48 protected:
50 };
51 
52 #include "NamespaceFooter.H"
53 
54 #include "FixedRefinementImplem.H"
55 
56 #endif
FixedRefinement()
Null constructor.
Definition: FixedRefinementImplem.H:18
virtual bool doRefine(IndexTM< int, dim > &a_refineInDir, const CutCellMoments< dim > &a_ccm, const int &a_numberOfRefinements)
Refine a fixed number of times.
Definition: FixedRefinementImplem.H:31
Definition: RefinementCriterion.H:27
int m_maxNumberOfRefinements
Definition: FixedRefinement.H:49
Definition: IndexTM.H:36
virtual int getMaxNumberOfRefinements()
Get the number of refinements.
Definition: FixedRefinementImplem.H:60
Definition: FixedRefinement.H:22
virtual void setMaxNumberOfRefinements(const int &a_maxNumberOfRefinements)
Set the number of refinements.
Definition: FixedRefinementImplem.H:50
Definition: CutCellMoments.H:32
virtual ~FixedRefinement()
Destructor.
Definition: FixedRefinementImplem.H:27