BISICLES AMR ice sheet model  0.9
VieliPayneIBC.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 // PayneVieliIBC.H
13 // ============
14 //
15 // PhysIBC-derived class for grounding-line testing
16 //
17 
18 #ifndef _VIELIPAYNEIBC_H_
19 #define _VIELIPAYNEIBC_H_
20 
21 #include "IceThicknessIBC.H"
22 
23 #include "NamespaceHeader.H"
24 
25 
27 
31 {
32 public:
34 
35  VieliPayneBCFunction(Vector<RefCountedPtr<LevelSigmaCS > >& a_vectCS,
36  Vector<ProblemDomain>& a_vectDomain);
37 
38 
40 
41  virtual void define(Vector<RefCountedPtr<LevelSigmaCS > >& a_vectCS,
42  Vector<ProblemDomain>& a_vectDomain);
43 
44 
46 
49  virtual void operator()(FArrayBox& a_state,
50  const Box& a_valid,
51  const ProblemDomain& a_domain,
52  Real a_dx,
53  bool a_homogeneous);
54 
56  virtual void operator()(FArrayBox& a_state,
57  const Box& a_valid,
58  const ProblemDomain& a_domain,
59  Real a_dx,
60  const DataIndex& a_index,
61  bool a_homogeneous);
62 
63 
64 protected:
65 
66  Vector<RefCountedPtr<LevelSigmaCS > > m_vectCS;
67  Vector<ProblemDomain> m_vectDomain;
68 };
69 
70 
72 
75 {
76 public:
78 
80  VieliPayneIBC();
81 
83 
85  virtual ~VieliPayneIBC();
86 
88 
92  virtual void define(const ProblemDomain& a_domain,
93  const Real& a_dx);
94 
96  void setParameters(const Real& a_thickness,
97  const RealVect& a_slope,
98  const Real& a_originElevation,
99  const Real& a_seaLevel);
100 
102 
107  virtual IceThicknessIBC* new_thicknessIBC();
108 
109 #if 0
110  void setBoundaryThickness(Real a_boundaryThickness)
112  { m_boundaryThickness = a_boundaryThickness; }
113 #endif
114 
116 
118  virtual void initialize(LevelData<FArrayBox>& a_U);
119 
121 
123  virtual void initializeIceGeometry(LevelSigmaCS& a_coords,
124  const RealVect& a_dx,
125  const RealVect& a_domainSize,
126  const Real& a_time,
127  const LevelSigmaCS* a_crseCoords,
128  const int a_refRatio);
129 
130 
132 
134  virtual void primBC(FArrayBox& a_WGdnv,
135  const FArrayBox& a_Wextrap,
136  const FArrayBox& a_W,
137  const int& a_dir,
138  const Side::LoHiSide& a_side,
139  const Real& a_time);
140 
142 
147  virtual
148  void setBdrySlopes(FArrayBox& a_dW,
149  const FArrayBox& a_W,
150  const int& a_dir,
151  const Real& a_time);
152 
154 
156  virtual
157  void artViscBC(FArrayBox& a_F,
158  const FArrayBox& a_U,
159  const FArrayBox& a_divVel,
160  const int& a_dir,
161  const Real& a_time);
162 
164 
166  virtual RefCountedPtr<CompGridVTOBC> velocitySolveBC();
167 
169  virtual void velocityGhostBC(LevelData<FArrayBox>& a_velocity,
170  LevelSigmaCS& a_coords,
171  const ProblemDomain& a_domain,
172  Real a_time);
173 
175 
181  virtual void modifyVelocityRHS(LevelData<FArrayBox>& a_rhs,
182  LevelSigmaCS& a_coords,
183  const ProblemDomain& a_domain,
184  Real a_time, Real a_dt);
185 
186 
188 
190  virtual void setSurfaceHeightBCs(LevelData<FArrayBox>& a_zSurface,
191  LevelSigmaCS& a_coords,
192  const ProblemDomain& a_domain,
193  const RealVect& a_dx,
194  Real a_time, Real a_dt);
195 
197  virtual void setGridHierarchy(Vector<RefCountedPtr<LevelSigmaCS > >& a_vectCS,
198  Vector<ProblemDomain>& a_vectDomain);
199 
200 
202 
206  static RealVect s_edgeThickness;
207 
208 protected:
209 
210  RealVect m_slope;
211 
214 
217 
218  RealVect m_domainSize;
219 
221 
222  // have bc's been set up?
224 
225  // have parameters been set
227 
229  void setupBCs();
230 
231  RefCountedPtr<CompGridVTOBC> m_velBCs;
232  RefCountedPtr<VieliPayneBCFunction> m_BCfunction;
233 
234 
235 private:
236  // Disallowed for all the usual reasons
237  void operator=(const VieliPayneIBC& a_input)
238  {
239  MayDay::Error("invalid operator");
240  }
241 
242  // Disallowed for all the usual reasons
243  VieliPayneIBC(const VieliPayneIBC& a_input)
244  {
245  MayDay::Error("invalid operator");
246  }
247 };
248 
249 
250 
251 
252 #include "NamespaceFooter.H"
253 #endif
RealVect m_domainSize
Definition: VieliPayneIBC.H:218
virtual void define(Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCS, Vector< ProblemDomain > &a_vectDomain)
Definition: VieliPayneIBC.cpp:660
bool m_paramsSet
Definition: VieliPayneIBC.H:226
BCFunction-derived class to handle velocity-solve BC&#39;s.
Definition: VieliPayneIBC.H:30
BCFunction-derived class to handle velocity-solve BC&#39;s.
Definition: IceThicknessIBC.H:294
Physical/domain initial and boundary conditions for ice-sheet problems.
Definition: IceThicknessIBC.H:84
~VieliPayneBCFunction()
Definition: VieliPayneIBC.cpp:655
Physical/domain initial and boundary conditions.
Definition: VieliPayneIBC.H:74
static RealVect s_edgeThickness
ice thickness at edge of domain for use in computing velocity Bc&#39;s
Definition: VieliPayneIBC.H:206
RefCountedPtr< VieliPayneBCFunction > m_BCfunction
Definition: VieliPayneIBC.H:232
RealVect m_slope
Definition: VieliPayneIBC.H:210
virtual void operator()(FArrayBox &a_state, const Box &a_valid, const ProblemDomain &a_domain, Real a_dx, bool a_homogeneous)
this function throws an error since we need the DataIndex
Definition: VieliPayneIBC.cpp:669
Real m_thickness
ice sheet thickness (initially constant)
Definition: VieliPayneIBC.H:216
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
Real m_seaLevel
Definition: VieliPayneIBC.H:220
bool m_isBCsetUp
Definition: VieliPayneIBC.H:223
VieliPayneBCFunction()
Definition: VieliPayneIBC.H:33
Vector< ProblemDomain > m_vectDomain
Definition: VieliPayneIBC.H:67
RefCountedPtr< CompGridVTOBC > m_velBCs
Definition: VieliPayneIBC.H:231
Real m_originElevation
Definition: VieliPayneIBC.H:213
Vector< RefCountedPtr< LevelSigmaCS > > m_vectCS
Definition: VieliPayneIBC.H:66