Chombo + EB + MF  3.2
MultiBlockMeshRefine.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 _MULTIBLOCKMESHREFINE_H_
12 #define _MULTIBLOCKMESHREFINE_H_
13 
14 #include "BRMeshRefine.H"
15 #include "MultiBlockCoordSys.H"
16 #include "RefCountedPtr.H"
17 #include <map>
18 
19 #include "NamespaceHeader.H"
20 
21 /**
22  A BRMeshRefine algorithm for MultiBlock domains. Only needs to cleverly intercept the virtual
23  makePND operation.
24 
25  bvs: March 2012
26 */
28 {
29 public:
30 
31  /// Destructor
32  virtual ~MultiBlockMeshRefine();
33 
34 
35  /// Full constructor -- leaves object in usable state
37  /// Level 0 domain. used to index into factory object for levels
38  const ProblemDomain& a_baseDomain,
39  /// level 0 grid spacing. needed for mapping information
40  RealVect dxCoarse,
42  /// Refinement ratios -- refRatio[0] is btwn levels 0 and 1
43  const Vector<int>& a_refRatios,
44  /// Measure of how efficiently tagged cells will be covered
45  const Real a_fillRatio,
46  /// Amount by which grids are guaranteed to be coarsenable
47  const int a_blockFactor,
48  /// Proper nesting buffer amount
49  const int a_bufferSize,
50  /// Maximum grid length in any direction -- 0 means no limit.
51  const int a_maxSize);
52 
53 
54 
55 protected:
56 
57 
58  /// This one is to let Mapped Multiblock grids respect the PND across mapped boundaries
59  virtual bool properlyNested(const Box& a_box,
60  const ProblemDomain& a_domain,
61  const IntVectSet& a_pnd,
62  int a_totalBufferSize) const;
63 
64  ///These two are to get the tagging to respect Mapped Boundaries
65  virtual void buildSupport(const ProblemDomain& lvldomain, Vector<Box>& lvlboxes, IntVectSet& modifiedTags);
66  virtual void clipBox(Box& a_box, const ProblemDomain& a_domain) const ;
67 
68  const MultiBlockCoordSys* getCoords(const ProblemDomain& a_lvldomain) const;
69 
70  /// Implementation/helper class
71  /// Default constructor -- leaves object in an unusable state. not callable by outside classes
72  /// strong construction only for now.
75  mutable std::map<ProblemDomain, MultiBlockCoordSys*> m_coords;
77 
78 };
79 
80 #include "NamespaceFooter.H"
81 #endif
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
virtual void buildSupport(const ProblemDomain &lvldomain, Vector< Box > &lvlboxes, IntVectSet &modifiedTags)
These two are to get the tagging to respect Mapped Boundaries.
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Class which manages Berger-Rigoutsos grid generation.
Definition: BRMeshRefine.H:92
Definition: MultiBlockMeshRefine.H:27
RefCountedPtr< MultiBlockCoordSysFactory > m_factory
Definition: MultiBlockMeshRefine.H:74
const MultiBlockCoordSys * getCoords(const ProblemDomain &a_lvldomain) const
double Real
Definition: REAL.H:33
virtual ~MultiBlockMeshRefine()
Destructor.
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
virtual void clipBox(Box &a_box, const ProblemDomain &a_domain) const
std::map< ProblemDomain, MultiBlockCoordSys * > m_coords
Definition: MultiBlockMeshRefine.H:75
virtual bool properlyNested(const Box &a_box, const ProblemDomain &a_domain, const IntVectSet &a_pnd, int a_totalBufferSize) const
This one is to let Mapped Multiblock grids respect the PND across mapped boundaries.
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect m_dxCoarse
Definition: MultiBlockMeshRefine.H:76
MultiBlockMeshRefine()
Definition: MultiBlockMeshRefine.H:73