BISICLES AMR ice sheet model  0.9
LevelDataIBC.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 //
12 // LevelDataIBC.H
13 // ============
14 //
15 // PhysIBC-derived class which stores initial topography and thickness data
16 // and imposes either periodic or reflection boundary conditions
17 
18 #ifndef _LEVELDATAIBC_H_
19 #define _LEVELDATAIBC_H_
20 
21 #include "IceThicknessIBC.H"
22 
23 #include "NamespaceHeader.H"
24 
26 
37 {
38 public:
40 
42  LevelDataIBC(RefCountedPtr<LevelData<FArrayBox> > a_thck,
43  RefCountedPtr<LevelData<FArrayBox> > a_topg,
44  const RealVect& a_dx,
45  Real a_defaultThickness = 0.0,
46  Real a_defaultTopography = -10000,
47  bool a_setDefaultValues = false);
48 
49  LevelDataIBC();
50 
52 
54  virtual ~LevelDataIBC();
55 
57 
61  virtual void define(const ProblemDomain& a_domain,
62  const Real& a_dx);
63 
65 
71 
72 
74 
76  virtual void initialize(LevelData<FArrayBox>& a_U);
77 
79  bool regridIceGeometry(LevelSigmaCS& a_coords,
80  const RealVect& a_dx,
81  const RealVect& a_domainSize,
82  const Real& a_time,
83  const LevelSigmaCS* a_crseCoords,
84  const int a_refRatio);
85 
87 
93  virtual void initializeIceGeometry(LevelSigmaCS& a_coords,
94  const RealVect& a_dx,
95  const RealVect& a_domainSize,
96  const Real& a_time,
97  const LevelSigmaCS* a_crseCoords,
98  const int a_refRatio);
99 
100 
102 
104  virtual void primBC(FArrayBox& a_WGdnv,
105  const FArrayBox& a_Wextrap,
106  const FArrayBox& a_W,
107  const int& a_dir,
108  const Side::LoHiSide& a_side,
109  const Real& a_time);
110 
112 
117  virtual
118  void setBdrySlopes(FArrayBox& a_dW,
119  const FArrayBox& a_W,
120  const int& a_dir,
121  const Real& a_time);
122 
124 
126  virtual
127  void artViscBC(FArrayBox& a_F,
128  const FArrayBox& a_U,
129  const FArrayBox& a_divVel,
130  const int& a_dir,
131  const Real& a_time);
132 
134 
136  virtual RefCountedPtr<CompGridVTOBC> velocitySolveBC();
137 
139  virtual void modifyVelocityRHS(LevelData<FArrayBox>& a_rhs,
140  LevelSigmaCS& a_coords,
141  const ProblemDomain& a_domain,
142  Real a_time, Real a_dt)
143  {;}
144 
145 
147  virtual void setSurfaceHeightBCs(LevelData<FArrayBox>& a_zSurface,
148  LevelSigmaCS& a_coords,
149  const ProblemDomain& a_domain,
150  const RealVect& a_dx,
151  Real a_time, Real a_dt);
153  virtual void setGeometryBCs(LevelSigmaCS& a_coords,
154  const ProblemDomain& a_domain,
155  const RealVect& a_dx,
156  Real a_time, Real a_dt);
157 
158 private:
159 
160  RefCountedPtr<LevelData<FArrayBox> > m_thck;
161  RefCountedPtr<LevelData<FArrayBox> > m_topg;
162  RealVect m_dx;
163  RefCountedPtr<CompGridVTOBC> m_velBCs;
164  bool m_isBCsetUp;
165  bool m_verbose;
167  Real m_default_thickness;
168  // default value for topogaphy
169  Real m_default_topography;
171 
173  bool m_set_default_values;
174  void setupBCs();
175 
176 private:
177  // Disallowed for all the usual reasons
178  void operator=(const LevelDataIBC& a_input)
179  {
180  MayDay::Error("invalid operator");
181  }
182 
183  // Disallowed for all the usual reasons
184  LevelDataIBC(const LevelDataIBC& a_input)
185  :m_thck(a_input.m_thck),m_topg(a_input.m_topg),m_dx(a_input.m_dx)
186  {
187  MayDay::Error("invalid operator");
188  }
189 
190  void groundCoarse(LevelSigmaCS& a_coords, int a_refRatio);
191 
192 };
193 
194 #include "NamespaceFooter.H"
195 #endif
virtual RefCountedPtr< CompGridVTOBC > velocitySolveBC()
return boundary condition for Ice velocity solve
Definition: LevelDataIBC.cpp:138
virtual void initialize(LevelData< FArrayBox > &a_U)
Set up initial conditions.
Definition: LevelDataIBC.cpp:72
virtual void define(const ProblemDomain &a_domain, const Real &a_dx)
Define the object.
Definition: LevelDataIBC.cpp:65
Physical/domain initial and boundary conditions for ice-sheet problems.
Definition: IceThicknessIBC.H:84
virtual IceThicknessIBC * new_thicknessIBC()
Factory method - this object is its own factory.
Definition: LevelDataIBC.cpp:407
LevelDataIBC()
Definition: LevelDataIBC.cpp:53
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: LevelDataIBC.H:139
class LevelDataIBC stores initial topography and thickness data on a single levels and imposes either...
Definition: LevelDataIBC.H:36
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: LevelDataIBC.cpp:231
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
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: LevelDataIBC.cpp:264
virtual ~LevelDataIBC()
Destructor.
Definition: LevelDataIBC.cpp:60
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 fluxes.
Definition: LevelDataIBC.cpp:79
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: LevelDataIBC.cpp:125
virtual void setBdrySlopes(FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
Set boundary slopes.
Definition: LevelDataIBC.cpp:116
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: LevelDataIBC.cpp:248
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: LevelDataIBC.cpp:349