BISICLES AMR ice sheet model  0.9
MultiLevelDataIBC.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 // MultiLevelDataIBC.H
12 // ============
13 //
14 // PhysIBC-derived class which stores initial topography and thickness data
15 // and imposes either periodic or reflection boundary conditions
16 #ifndef _MULTILEVELDATAIBC_H_
17 #define _MULTILEVELDATAIBC_H_
18 
19 #include "IceThicknessIBC.H"
20 #include "NamespaceHeader.H"
21 
23 
37 {
38 public:
39  MultiLevelDataIBC(const Vector<RefCountedPtr<LevelData<FArrayBox> > >& a_thck,
40  const Vector<RefCountedPtr<LevelData<FArrayBox> > >& a_topg,
41  const RealVect& a_dxCrse, const Vector<int> & a_refRatio);
42 
43  virtual ~MultiLevelDataIBC();
44 
45 
46  virtual void define(const ProblemDomain& a_domain,
47  const Real& a_dx);
48 
50 
51  virtual void initialize(LevelData<FArrayBox>& a_U);
52 
54 
60  virtual void initializeIceGeometry(LevelSigmaCS& a_coords,
61  const RealVect& a_dx,
62  const RealVect& a_domainSize,
63  const Real& a_time,
64  const LevelSigmaCS* a_crseCoords,
65  const int a_refRatio);
66 
68  bool regridIceGeometry(LevelSigmaCS& a_coords,
69  const RealVect& a_dx,
70  const RealVect& a_domainSize,
71  const Real& a_time,
72  const LevelSigmaCS* a_crseCoords,
73  const int a_refRatio);
74 
76  virtual void primBC(FArrayBox& a_WGdnv,
77  const FArrayBox& a_Wextrap,
78  const FArrayBox& a_W,
79  const int& a_dir,
80  const Side::LoHiSide& a_side,
81  const Real& a_time);
82 
84 
89  virtual
90  void setBdrySlopes(FArrayBox& a_dW,
91  const FArrayBox& a_W,
92  const int& a_dir,
93  const Real& a_time)
94  {;}
95 
97 
99  virtual
100  void artViscBC(FArrayBox& a_F,
101  const FArrayBox& a_U,
102  const FArrayBox& a_divVel,
103  const int& a_dir,
104  const Real& a_time)
105  {;}
106 
108 
110  virtual RefCountedPtr<CompGridVTOBC> velocitySolveBC();
111 
113  virtual void modifyVelocityRHS(LevelData<FArrayBox>& a_rhs,
114  LevelSigmaCS& a_coords,
115  const ProblemDomain& a_domain,
116  Real a_time, Real a_dt)
117  {;}
118 
119 
121  virtual void setSurfaceHeightBCs(LevelData<FArrayBox>& a_zSurface,
122  LevelSigmaCS& a_coords,
123  const ProblemDomain& a_domain,
124  const RealVect& a_dx,
125  Real a_time, Real a_dt);
126 
128  virtual void setGeometryBCs(LevelSigmaCS& a_coords,
129  const ProblemDomain& a_domain,
130  const RealVect& a_dx,
131  Real a_time, Real a_dt);
132 private:
133 
134  // Disallowed for all the usual reasons
135  void operator=(const MultiLevelDataIBC& a_input)
136  {
137  MayDay::Error("invalid operator");
138  }
139 
140  // Disallowed for all the usual reasons
141  MultiLevelDataIBC(const MultiLevelDataIBC& a_input)
142  {
143  MayDay::Error("invalid operator");
144  }
145 
146 private:
147  RefCountedPtr<CompGridVTOBC> m_velBCs;
148  bool m_isBCsetUp, m_verbose;
149  //levels of thickness data
150  Vector<RefCountedPtr<LevelData<FArrayBox> > > m_thck;
151  //levels of topography data
152  Vector<RefCountedPtr<LevelData<FArrayBox> > > m_topg;
153  // count of levels, should be == m_thck.size() == m_topg.size()
154  int m_nLevel;
155  //spacing of the coarsest mesh
156  const RealVect m_dxCrse;
157  //refinement ratios of the usual kind
158  const Vector<int> m_refRatio;
159 
160 };
161 #include "NamespaceFooter.H"
162 #endif
virtual void setGeometryBCs(LevelSigmaCS &a_coords, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
set non-periodic geometry (thickness, topography) ghost cells
Definition: MultiLevelDataIBC.cpp:297
MultiLevelDataIBC(const Vector< RefCountedPtr< LevelData< FArrayBox > > > &a_thck, const Vector< RefCountedPtr< LevelData< FArrayBox > > > &a_topg, const RealVect &a_dxCrse, const Vector< int > &a_refRatio)
Definition: MultiLevelDataIBC.cpp:25
virtual void primBC(FArrayBox &a_WGdnv, const FArrayBox &a_Wextrap, const FArrayBox &a_W, const int &a_dir, const Side::LoHiSide &a_side, const Real &a_time)
Set boundary thickness fluxes.
Definition: MultiLevelDataIBC.cpp:320
class MultiLevelDataIBC stores initial topography and thickness data on multiple levels and imposes e...
Definition: MultiLevelDataIBC.H:36
Physical/domain initial and boundary conditions for ice-sheet problems.
Definition: IceThicknessIBC.H:84
virtual void initializeIceGeometry(LevelSigmaCS &a_coords, const RealVect &a_dx, const RealVect &a_domainSize, const Real &a_time, const LevelSigmaCS *a_crseCoords, const int a_refRatio)
set up the initial ice sheet geometry
Definition: MultiLevelDataIBC.cpp:94
virtual void initialize(LevelData< FArrayBox > &a_U)
Set up initial conditions.
Definition: MultiLevelDataIBC.cpp:313
virtual IceThicknessIBC * new_thicknessIBC()
same as new_physIBC, except pointer cast to an IceThicknessIBC
Definition: MultiLevelDataIBC.cpp:271
virtual void artViscBC(FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const int &a_dir, const Real &a_time)
Adjust boundary fluxes to account for artificial viscosity.
Definition: MultiLevelDataIBC.H:100
virtual void setBdrySlopes(FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
Set boundary slopes.
Definition: MultiLevelDataIBC.H:90
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
virtual void setSurfaceHeightBCs(LevelData< FArrayBox > &a_zSurface, LevelSigmaCS &a_coords, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt)
set non-periodic ghost cells for surface height z_s.
Definition: MultiLevelDataIBC.cpp:280
bool regridIceGeometry(LevelSigmaCS &a_coords, const RealVect &a_dx, const RealVect &a_domainSize, const Real &a_time, const LevelSigmaCS *a_crseCoords, const int a_refRatio)
modify the ice sheet geometry after regrid
Definition: MultiLevelDataIBC.cpp:181
virtual void modifyVelocityRHS(LevelData< FArrayBox > &a_rhs, LevelSigmaCS &a_coords, const ProblemDomain &a_domain, Real a_time, Real a_dt)
if appropriate, modify velocity solve RHS in a problem-dependent way.
Definition: MultiLevelDataIBC.H:113
virtual void define(const ProblemDomain &a_domain, const Real &a_dx)
Define the object.
Definition: MultiLevelDataIBC.cpp:41
virtual ~MultiLevelDataIBC()
Definition: MultiLevelDataIBC.cpp:36
virtual RefCountedPtr< CompGridVTOBC > velocitySolveBC()
return boundary condition for Ice velocity solve
Definition: MultiLevelDataIBC.cpp:84