11 #ifndef _NONLINEARVISCOUSTENSOR_H_ 12 #define _NONLINEARVISCOUSTENSOR_H_ 16 #include "AMRMultiGrid.H" 18 #include "ViscousTensorOp.H" 25 #include "NamespaceHeader.H" 45 virtual void setState(
const Vector<LevelData<FArrayBox>*>& a_state)=0;
48 virtual void applyBC(Vector<LevelData<FArrayBox>*>& a_phi)=0;
54 virtual const Vector<LevelData<FArrayBox>*>&
getState() = 0;
61 virtual Vector<RefCountedPtr< LevelData<FArrayBox> > >&
alpha() =0;
69 virtual Vector<RefCountedPtr< LevelData<FluxBox> > >&
mu() =0;
77 virtual Vector<RefCountedPtr< LevelData<FluxBox> > >&
lambda() =0;
80 virtual RefCountedPtr< AMRLevelOpFactory<LevelData<FArrayBox> > >
opFactoryPtr()=0;
108 Vector<LevelData<FArrayBox>*> m_u;
109 Vector<LevelData<FArrayBox>*> m_C;
110 Vector<LevelData<FArrayBox>*> m_C0;
111 RefCountedPtr<AMRLevelOpFactory<LevelData<FArrayBox> > > m_opFactoryPtr;
114 Vector<DisjointBoxLayout> m_grids;
115 Vector<int> m_refRatio;
116 Vector<ProblemDomain> m_domains;
117 Vector<RealVect> m_dxs;
119 Vector<RefCountedPtr<LevelSigmaCS > > m_coordSys;
129 Vector<LevelData<FArrayBox>*> m_A;
130 Vector<LevelData<FluxBox>*> m_faceA;
133 Vector<LevelData<FluxBox>*> m_muCoef;
141 int m_vtopRelaxMinIter;
146 Real m_muMin, m_muMax;
156 Real m_artificialDragCoef, m_artificialDragPower;
160 RefCountedPtr<BCFunction> m_velSolveBC;
163 Vector<RefCountedPtr<LevelData<FluxBox> > > m_mu;
164 Vector<RefCountedPtr<LevelData<FluxBox> > > m_lambda;
165 Vector<RefCountedPtr<LevelData<FArrayBox> > > m_alpha;
199 (
const Vector<DisjointBoxLayout>& a_grids,
200 const Vector<int>& a_refRatio,
201 const Vector<ProblemDomain>& a_domains,
202 const Vector<RealVect>& a_dxs,
203 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
204 const Vector<LevelData<FArrayBox>*>& a_u,
205 const Vector<LevelData<FArrayBox>*>& a_C,
206 const Vector<LevelData<FArrayBox>*>& a_C0,
207 const int a_finestLevel,
211 const Vector<LevelData<FArrayBox>*>& a_A,
212 const Vector<LevelData<FluxBox>*>& a_faceFlowLawCoefficient,
215 int a_vtopRelaxMinIter,
218 Real a_muMax = 1.234567e+300,
220 Real a_artificialDragCoef = 0.0, Real a_artificialDragPower=8.0);
223 virtual void setState(
const Vector<LevelData<FArrayBox>*>& a_u);
225 virtual void applyBC(Vector<LevelData<FArrayBox>*>& a_phi)
227 for (
int lev =0; lev < a_phi.size(); lev++)
229 for (DataIterator dit(m_grids[lev]); dit.ok(); ++dit)
231 (*m_velSolveBC)((*a_phi[lev])[dit], m_grids[lev][dit], m_domains[lev],
232 m_dxs[lev][0], dit(),
false);
243 virtual Vector<RefCountedPtr<LevelData<FluxBox> > >&
mu()
247 virtual Vector<RefCountedPtr<LevelData<FluxBox> > >&
lambda()
251 virtual Vector<RefCountedPtr<LevelData<FArrayBox> > >&
alpha()
256 virtual RefCountedPtr< AMRLevelOpFactory<LevelData<FArrayBox> > >
258 return m_opFactoryPtr;
264 virtual Vector<LevelData<FArrayBox>*>&
getC()
272 virtual void setState(
const Vector<LevelData<FArrayBox>*>& a_u,
273 const Vector<LevelData<FArrayBox>*>& a_basalFrictionCoefficent)
275 m_C = a_basalFrictionCoefficent;
285 int nlev = min(a_muCoef.size(),m_muCoef.size());
287 for (
int lev=0; lev < nlev; lev++)
289 m_muCoef[lev] = a_muCoef[lev];
298 for (
int lev=0; lev < m_muCoef.size(); lev++)
300 m_muCoef[lev] = NULL;
308 virtual void computeViscousTensorFace(
const Vector<LevelData<FluxBox>*>& a_viscousTensor);
312 #include "NamespaceFooter.H" virtual Vector< LevelData< FArrayBox > * > & getState()
retrieve the state
Definition: NonlinearViscousTensor.H:238
Implement NonlinearViscousTensor for typical (velocity-depenendent) ice rheology. ...
Definition: NonlinearViscousTensor.H:105
virtual Vector< RefCountedPtr< LevelData< FluxBox > > > & mu()
Retrieve the viscosity coefficient, mu.
Definition: NonlinearViscousTensor.H:243
virtual Vector< RefCountedPtr< LevelData< FArrayBox > > > & alpha()
Retrieve the drag coefficient, alpha.
Definition: NonlinearViscousTensor.H:251
virtual Vector< LevelData< FArrayBox > * > & getC()
Definition: NonlinearViscousTensor.H:264
virtual Vector< RefCountedPtr< LevelData< FluxBox > > > & mu()=0
Retrieve the viscosity coefficient, mu.
virtual NonlinearViscousTensor * newNonlinearViscousTensor()=0
factory method
virtual RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > opFactoryPtr()=0
provide a pointer to an AMRLevelOpFactory<LevelData<FArrayBox> > defined at the current state ...
virtual void unsetFaceViscCoef()
Definition: NonlinearViscousTensor.H:296
Abstract class around the englacial constitutive relations for ice.
Definition: ConstitutiveRelation.H:34
Physical/domain initial and boundary conditions for ice-sheet problems.
Definition: IceThicknessIBC.H:84
virtual ~NonlinearViscousTensor()
Definition: NonlinearViscousTensor.H:36
virtual void setState(const Vector< LevelData< FArrayBox > *> &a_state)=0
set the state (velocity)
virtual const Vector< LevelData< FArrayBox > * > & getState()=0
retrieve the state
virtual Vector< RefCountedPtr< LevelData< FArrayBox > > > & alpha()=0
Retrieve the drag coefficient, alpha.
Virtual base class for basal friction relations.
Definition: BasalFrictionRelation.H:27
virtual void applyBC(Vector< LevelData< FArrayBox > *> &a_phi)=0
fill ghost cells of a_state as per the boundary conditions
Definition: NonlinearViscousTensor.H:33
virtual RefCountedPtr< AMRLevelOpFactory< LevelData< FArrayBox > > > opFactoryPtr()
provide a pointer to an AMRLevelOpFactory<LevelData<FArrayBox> > defined at the current state ...
Definition: NonlinearViscousTensor.H:257
virtual void applyBC(Vector< LevelData< FArrayBox > *> &a_phi)
fill ghost cells of a_state as per the boundary conditions
Definition: NonlinearViscousTensor.H:225
virtual Vector< RefCountedPtr< LevelData< FluxBox > > > & lambda()
Retrieve the compressibility coefficient, lambda.
Definition: NonlinearViscousTensor.H:247
virtual void setState(const Vector< LevelData< FArrayBox > *> &a_u, const Vector< LevelData< FArrayBox > *> &a_basalFrictionCoefficent)
Definition: NonlinearViscousTensor.H:272
virtual Vector< RefCountedPtr< LevelData< FluxBox > > > & lambda()=0
Retrieve the compressibility coefficient, lambda.
virtual void setFaceViscCoef(const Vector< LevelData< FluxBox > *> &a_muCoef)
Definition: NonlinearViscousTensor.H:283