Chombo + EB + MF  3.2
MFAliasFactory.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 _MFALIASFACTORY_H_
12 #define _MFALIASFACTORY_H_
13 
14 #include "EBCellFAB.H"
15 #include "BoxLayoutData.H"
16 #include "MFCellFAB.H"
17 #include "NamespaceHeader.H"
18 
19 class MFAliasFactory : public DataFactory<EBCellFAB>
20 {
21 public:
22  /// factory function. creates a new 'T' object
23  /** creates a new 'T' object and returns a pointer to it.
24  */
25  virtual EBCellFAB* create(const Box& box, int ncomps, const DataIndex& a_datInd) const;
26 
27  virtual bool callDelete() const
28  {
29  return false;
30  }
31 
33  int a_phase);
34 
35 private:
36 
38  int m_phase;
39 };
40 
41 class RegularMFAliasFactory : public DataFactory<FArrayBox>
42 {
43 public:
44  /// factory function. creates a new 'T' object
45  /** creates a new 'T' object and returns a pointer to it.
46  */
47  virtual FArrayBox* create(const Box& box, int ncomps, const DataIndex& a_datInd) const;
48 
49  virtual bool callDelete() const
50  {
51  return false;
52  }
53 
55  int a_phase);
56 
57 private:
58 
60  int m_phase;
61 };
62 
63 void aliasMF(Vector<LevelData<EBCellFAB>* >& a_phases, int a_numPhases,
64  const LevelData<MFCellFAB>& a_input);
65 
66 void aliasMF(LevelData<EBCellFAB>& alias, int phase,
67  const LevelData<MFCellFAB>& a_input);
68 
69 void aliasMF(Vector<LevelData<EBCellFAB>* >& a_output, int whichPhase,
70  const Vector<LevelData<MFCellFAB>* >& a_input);
71 
72 void aliasRegularMF(LevelData<FArrayBox>& alias, int phase,
73  const LevelData<MFCellFAB>& a_input);
74 
75 #include "NamespaceFooter.H"
76 #endif
one dimensional dynamic array
Definition: Vector.H:53
void aliasMF(Vector< LevelData< EBCellFAB > * > &a_phases, int a_numPhases, const LevelData< MFCellFAB > &a_input)
LevelData< MFCellFAB > * m_mf
Definition: MFAliasFactory.H:37
MFAliasFactory(LevelData< MFCellFAB > *a_mf, int a_phase)
virtual bool callDelete() const
Definition: MFAliasFactory.H:49
int m_phase
Definition: MFAliasFactory.H:60
int m_phase
Definition: MFAliasFactory.H:38
Definition: MFAliasFactory.H:41
Definition: EBInterface.H:45
virtual EBCellFAB * create(const Box &box, int ncomps, const DataIndex &a_datInd) const
factory function. creates a new &#39;T&#39; object
Definition: EBCellFAB.H:29
Definition: MFAliasFactory.H:19
void aliasRegularMF(LevelData< FArrayBox > &alias, int phase, const LevelData< MFCellFAB > &a_input)
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
Definition: DataIndex.H:114
Definition: FArrayBox.H:45
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
virtual bool callDelete() const
Definition: MFAliasFactory.H:27
LevelData< MFCellFAB > * m_mf
Definition: MFAliasFactory.H:59