Chombo + EB + MF  3.2
SingleBlockCSAdaptor.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 // SingleBlockCSAdapter.H
12 // Jeff J., 6 Jun 2011
13 
14 #ifndef _SINGLEBLOCKCSADAPTOR_H_
15 #define _SINGLEBLOCKCSADAPTOR_H_
16 
17 #include "MultiBlockCoordSys.H"
18 #include "NamespaceHeader.H"
19 
20 //! \class SingleBlockCSAdapter
21 //! This class converts a NewCoordSys to a MultiBlockCoordSys so that
22 //! we can pay less attention to the differences in the two interfaces,
23 //! and write single- and multi-block algorithms in one framework.
25 {
26 public:
27 
28  //! Creates a MultiBlockCoordSys with exactly one block, having the
29  //! given coordinate system. This class assumes control of \a a_coordSys.
30  SingleBlockCSAdaptor(const NewCoordSys* const a_coordSys,
31  const ProblemDomain& a_problemDomain);
32 
33  //! Destructor.
34  virtual ~SingleBlockCSAdaptor();
35 
36  // Overridden methods.
37 
38  void blockRemapping(RealVect& a_xi_valid,
39  int& a_n_valid,
40  const RealVect& a_xiSrc,
41  int a_nSrc) const;
42 };
43 
44 
45 //! \class SingleBlockCSAdaptorFactory
46 //! Factory associated with SingleBlockCSAdaptor.
48 {
49  public:
50 
51  //! Assumes control of a_coordSysFactory.
52  explicit SingleBlockCSAdaptorFactory(const NewCoordSysFactory* const a_coordSys);
53 
55  MultiBlockCoordSys* getCoordSys(const ProblemDomain& a_levelDomain,
56  const RealVect& a_dx) const;
57 
58  private:
59 
61 };
62 
63 #include "NamespaceFooter.H"
64 
65 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
SingleBlockCSAdaptor(const NewCoordSys *const a_coordSys, const ProblemDomain &a_problemDomain)
void blockRemapping(RealVect &a_xi_valid, int &a_n_valid, const RealVect &a_xiSrc, int a_nSrc) const
block mapping conversion function
Definition: SingleBlockCSAdaptor.H:47
pure-virtual base class defining factory interface for CoordSys
Definition: NewCoordSys.H:236
virtual const NewCoordSys * getCoordSys(int a_n) const
Return the mapping which corresponds to the block with the given index.
Definition: MultiBlockCoordSys.H:250
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual ~SingleBlockCSAdaptor()
Destructor.
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409
Definition: SingleBlockCSAdaptor.H:24
const NewCoordSysFactory *const m_coordSysFactory
Definition: SingleBlockCSAdaptor.H:60
Virtual base class encapsulating mapped-grid coordinate systems.
Definition: NewCoordSys.H:30