Proto  3.2
Proto_LevelBC.H
Go to the documentation of this file.
1 #pragma once
2 #ifndef __PROTO_LEVEL_BC__
3 #define __PROTO_LEVEL_BC__
4 
5 #include "Proto_LevelBoxData.H"
6 namespace Proto {
7 
8  /// Storage for the LevelBCOps on each face
9  template<typename T, unsigned int C, MemType MEM=MEMTYPE_DEFAULT, Centering CTR=PR_CELL>
10  class LevelBC {
11  public:
12 
13  // Constructor
14  inline LevelBC(){};
15  inline LevelBC(DisjointBoxLayout& a_layout);
16  inline void define(DisjointBoxLayout& a_layout);
17 
18  // Basic interface
19  inline virtual void init() {}
20  inline virtual void apply(LevelBoxData<T,C,MEM,CTR>& a_data) const {}
21 
22 
23  // NOT IMPLEMENTED YET
24  inline void fillGhost(LevelBoxData<T,C,MEM,CTR>& a_data,
25  T a_value, int a_comp, int a_coordinate, Side::LoHiSide a_size);
26  // NOT IMPLEMENTED YET
27  inline void setFlux(LevelBoxData<T,C,MEM,CTR>& a_data,
28  T a_fluxValue, int a_comp, int a_coordinate, Side::LoHiSide a_side);
29  // NOT IMPLEMENTED
30  inline void setValue(LevelBoxData<T,C,MEM,CTR>& a_data,
31  T a_value, int a_comp, int a_coordinate, Side::LoHiSide a_side);
32 
33  inline T time() const { return m_time; }
34  inline int rkStage() { return m_rkStage; }
35  inline const DisjointBoxLayout& layout() { return m_layout; }
36 
37  // RK interface
38  inline void setTime(T a_time) const;
39  inline void setRKStage(int a_stage) const { m_rkStage = a_stage; }
40  inline void setNumRKStages(int a_numStages) const;
41  inline void setRKStageData(int a_stage, const LevelBoxData<T,C,MEM,CTR>& a_data) const;
42  inline const LevelBoxData<T,C,MEM,CTR>& getRKStageData(int a_index) const;
43 
44  private:
45 
47  mutable T m_time;
48  mutable int m_rkStage;
49  mutable std::vector<const LevelBoxData<T,C,MEM,CTR>*> m_rkStageData;
50  };
51 
52  #include "implem/Proto_LevelBCImplem.H"
53 } // end namespace Proto
54 #include "Proto_LevelBCLib.H" // intentionally outside the namespace
55 #endif //end include guard
DisjointBoxLayout m_layout
Definition: Proto_LevelBC.H:46
LoHiSide
Side Enum.
Definition: Proto_Face.H:23
Disjoint Box Layout.
Definition: Proto_DisjointBoxLayout.H:30
void setRKStage(int a_stage) const
Definition: Proto_LevelBC.H:39
const LevelBoxData< T, C, MEM, CTR > & getRKStageData(int a_index) const
Definition: Proto_LevelBC.H:40
void setNumRKStages(int a_numStages) const
Definition: Proto_LevelBC.H:23
T m_time
Definition: Proto_LevelBC.H:47
void define(DisjointBoxLayout &a_layout)
Definition: Proto_LevelBC.H:10
Level Box Data.
Definition: Proto_HDF5.H:17
void setValue(LevelBoxData< T, C, MEM, CTR > &a_data, T a_value, int a_comp, int a_coordinate, Side::LoHiSide a_side)
int rkStage()
Definition: Proto_LevelBC.H:34
void setTime(T a_time) const
Definition: Proto_LevelBC.H:17
virtual void apply(LevelBoxData< T, C, MEM, CTR > &a_data) const
Definition: Proto_LevelBC.H:20
virtual void init()
Definition: Proto_LevelBC.H:19
const DisjointBoxLayout & layout()
Definition: Proto_LevelBC.H:35
Storage for the LevelBCOps on each face.
Definition: Proto_LevelBC.H:10
LevelBC()
Definition: Proto_LevelBC.H:14
void setFlux(LevelBoxData< T, C, MEM, CTR > &a_data, T a_fluxValue, int a_comp, int a_coordinate, Side::LoHiSide a_side)
T time() const
Definition: Proto_LevelBC.H:33
Definition: Proto_Array.H:17
std::vector< const LevelBoxData< T, C, MEM, CTR > * > m_rkStageData
Definition: Proto_LevelBC.H:49
int m_rkStage
Definition: Proto_LevelBC.H:48
void setRKStageData(int a_stage, const LevelBoxData< T, C, MEM, CTR > &a_data) const
Definition: Proto_LevelBC.H:30
void fillGhost(LevelBoxData< T, C, MEM, CTR > &a_data, T a_value, int a_comp, int a_coordinate, Side::LoHiSide a_size)