11 #ifndef _LEVELSIGMACS_H_ 12 #define _LEVELSIGMACS_H_ 14 #include "DisjointBoxLayout.H" 15 #include "LevelData.H" 16 #include "FArrayBox.H" 17 #include "NodeFArrayBox.H" 24 #include "NamespaceHeader.H" 26 #define BISICLES_LAYERED 0 27 #define BISICLES_FULLZ 1 32 #elif CH_SPACEDIM == 3 36 #elif CH_SPACEDIM == 1 57 const IntVect& a_ghostVect = IntVect::Unit);
69 void define(
const DisjointBoxLayout& a_grids,
71 const IntVect& a_ghostVect = IntVect::Unit);
82 RealVect
realCoord(
const RealVect& a_Xi,
const DataIndex& a_index)
const;
88 RealVect
mappedCoord(
const RealVect& a_x,
const DataIndex& a_index)
const;
100 LevelData<FArrayBox>&
getH();
103 const LevelData<FArrayBox>&
getH()
const;
109 const LevelData<FluxBox>&
getFaceH()
const;
119 void setTopography(
const LevelData<FArrayBox>& a_topography);
194 const int a_refRatio) ;
201 const int a_refRatio) ;
277 const int a_refinementRatio,
278 const bool a_interpolateTopography =
true,
279 const bool a_interpolateThickness =
true,
280 const bool a_preserveMask =
true,
281 const bool a_interpolateTopographyGhost =
true,
282 const bool a_interpolateThicknessGhost =
true,
283 const bool a_preserveMaskGhost =
true,
375 const int a_refRatio);
381 #if BISICLES_Z == BISICLES_LAYERED 405 for (
unsigned int i = 0; i <
m_sigma.size(); ++i)
408 m_sigma[i] = 0.5 * (a_faceSigma[i] + a_faceSigma[i+1]);
410 m_dSigma[i] = (a_faceSigma[i+1] - a_faceSigma[i]);
429 const DisjointBoxLayout& a_grids,
430 const LevelData<FArrayBox>& a_data,
432 const Box& a_domainBox);
435 const DisjointBoxLayout& a_grids,
436 const LevelData<FArrayBox>& a_data,
438 const Vector<string>& a_vectNames,
439 const Box& a_domainBox);
443 const Vector<DisjointBoxLayout>& a_vectGrids,
444 const Vector<LevelData<FArrayBox>* > & a_vectData,
445 const Vector<string>& a_vectNames,
446 const Vector<const LevelSigmaCS* >& a_vectCoordSys,
447 const Box& a_baseDomain,
450 const Vector<int>& a_vectRatio,
451 const int& a_numLevels);
453 #include "NamespaceFooter.H" Real iceDensity() const
ice density – this is probably an interim approach
Definition: LevelSigmaCS.H:219
void recomputeGeometryFace(const LevelSigmaCS *a_crseCoords, const int a_refRatio)
recomputes quantities which are dependent on face-centered H.
Definition: LevelSigmaCS.cpp:663
RealVect realCoord(const RealVect &a_Xi, const DataIndex &a_index) const
Definition: LevelSigmaCS.cpp:248
ThicknessInterpolationMethod
choice of thickness interpolation method in interpFromCoarse
Definition: LevelSigmaCS.H:259
virtual ~LevelSigmaCS()
Definition: LevelSigmaCS.cpp:50
LevelData< FArrayBox > m_deltaFactors
Definition: LevelSigmaCS.H:346
const LevelData< FArrayBox > & getSurfaceHeight() const
returns the cell-centred surface elevation
Definition: LevelSigmaCS.cpp:496
Real m_gravity
acceleration due to gravity – probably an interim approach
Definition: LevelSigmaCS.H:365
const LayoutData< bool > & anyFloating() const
Definition: LevelSigmaCS.H:244
LevelData< FArrayBox > m_H
cell-centered ice thickness
Definition: LevelSigmaCS.H:323
const LevelData< FluxBox > & getGradSurfaceFace() const
returns the face-centred surface gradient
Definition: LevelSigmaCS.cpp:510
LevelData< FluxBox > m_gradSurfaceFace
face-centered gradient of surface elevation
Definition: LevelSigmaCS.H:335
void WriteSigmaMappedUGHDF5(const string &a_fileRoot, const DisjointBoxLayout &a_grids, const LevelData< FArrayBox > &a_data, const LevelSigmaCS &a_CoordSys, const Box &a_domainBox)
Definition: LevelSigmaCS.cpp:984
Real m_waterDensity
seawater density – probably an interim approach
Definition: LevelSigmaCS.H:362
LevelSigmaCS()
default constructor
Definition: LevelSigmaCS.cpp:31
void setSeaLevel(const Real &a_seaLevel)
set sea level
Definition: LevelSigmaCS.H:216
void setSurfaceHeight(const LevelData< FArrayBox > &a_surface)
sets the cell-centered surface height
Definition: LevelSigmaCS.cpp:414
void computeSurface(const LevelSigmaCS *a_crseCoords, const int a_refRatio)
(re)compute surface elevation and gradients
Definition: LevelSigmaCS.cpp:795
void setIceDensity(const Real &a_iceDensity)
interim or not, we also need to set these
Definition: LevelSigmaCS.H:226
const LevelData< FArrayBox > & getTopography() const
returns a const-reference to the cell-centered topography
Definition: LevelSigmaCS.cpp:372
Real seaLevel() const
returns sea level
Definition: LevelSigmaCS.H:213
const LevelData< FArrayBox > & getGradSurface() const
returns the cell-centred surface gradient
Definition: LevelSigmaCS.cpp:503
Definition: LevelSigmaCS.H:260
void recomputeGeometry(const LevelSigmaCS *a_crseCoords, const int a_refRatio)
recomputes quantities which are dependent on cell-centered H.
Definition: LevelSigmaCS.cpp:557
void computeFloatingMask(const LevelData< FArrayBox > &a_surface)
sets floating mask based on surface height
Definition: LevelSigmaCS.cpp:913
RealVect m_unitShift
Definition: LevelSigmaCS.H:315
void computeDeltaFactors()
(re)compute delta factors
Definition: LevelSigmaCS.cpp:736
Real gravity() const
acceleration due to gravity – probably an interim approach
Definition: LevelSigmaCS.H:223
DisjointBoxLayout m_grids
Definition: LevelSigmaCS.H:301
const LevelData< FArrayBox > & deltaFactors() const
return cell-centered and ,
Definition: LevelSigmaCS.cpp:971
LevelData< FluxBox > & getFaceH()
returns modifiable face-centered H
Definition: LevelSigmaCS.cpp:356
void exchangeTopography()
Definition: LevelSigmaCS.cpp:1506
LevelData< FArrayBox > & getH()
returns modifiable cell-centered H (ice sheet thickness) for this
Definition: LevelSigmaCS.cpp:341
void interpFromCoarse(const LevelSigmaCS &a_crseCoords, const int a_refinementRatio, const bool a_interpolateTopography=true, const bool a_interpolateThickness=true, const bool a_preserveMask=true, const bool a_interpolateTopographyGhost=true, const bool a_interpolateThicknessGhost=true, const bool a_preserveMaskGhost=true, int a_thicknessInterpolationMethod=STD_THICKNESS_INTERPOLATION_METHOD)
fill the data in this by interpolation from a coarser level
Definition: LevelSigmaCS.cpp:1202
const Vector< Real > & getDSigma() const
Definition: LevelSigmaCS.H:393
RealVect m_backgroundSlope
Definition: LevelSigmaCS.H:317
DisjointBoxLayout m_Hgrids
"flattened" grids (in 3d) for quantities like H
Definition: LevelSigmaCS.H:304
void unitShiftExchange(LevelData< FArrayBox > &a_level)
Definition: LevelSigmaCS.cpp:1512
void getNodeRealCoordinates(LevelData< NodeFArrayBox > &a_nodeCoords) const
return Cartesian XYZ locations of nodes
Definition: LevelSigmaCS.cpp:310
Real waterDensity() const
seawater density – probably an interim approach
Definition: LevelSigmaCS.H:221
LevelData< FArrayBox > m_surface
cell-centered surface elevation
Definition: LevelSigmaCS.H:329
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
void setGradSurface(const LevelData< FArrayBox > &a_gradSurface)
sets the cell-centered surface gradient
Definition: LevelSigmaCS.cpp:440
const LevelData< FArrayBox > & getThicknessOverFlotation() const
Definition: LevelSigmaCS.cpp:516
LayoutData< bool > m_anyFloating
is anything floating?
Definition: LevelSigmaCS.H:344
const DisjointBoxLayout & grids() const
access function
Definition: LevelSigmaCS.H:242
LevelData< FluxBox > m_faceH
face-centered ice thickness
Definition: LevelSigmaCS.H:326
bool m_isDefined
has this object been defined?
Definition: LevelSigmaCS.H:352
void setGravity(const Real &a_gravity)
Definition: LevelSigmaCS.H:230
const RealVect & getBackgroundSlope() const
Definition: LevelSigmaCS.H:150
LevelSigmaCS * makeCoarser(int a_coarsenFactor) const
Definition: LevelSigmaCS.cpp:1191
Vector< Real > m_dSigma
Definition: LevelSigmaCS.H:418
LevelData< BaseFab< int > > m_floatingMask
floating mask
Definition: LevelSigmaCS.H:341
void WriteSigmaMappedAMRHierarchyHDF5(const string &a_fileRoot, const Vector< DisjointBoxLayout > &a_vectGrids, const Vector< LevelData< FArrayBox > * > &a_vectData, const Vector< string > &a_vectNames, const Vector< const LevelSigmaCS * > &a_vectCoordSys, const Box &a_baseDomain, const Real &a_dt, const Real &a_time, const Vector< int > &a_vectRatio, const int &a_numLevels)
Definition: LevelSigmaCS.cpp:1042
IntVect m_ghostVect
ghost vector
Definition: LevelSigmaCS.H:310
void setWaterDensity(const Real &a_waterDensity)
Definition: LevelSigmaCS.H:228
LevelData< FArrayBox > m_thicknessOverFlotation
cell-centered thickness over flotation
Definition: LevelSigmaCS.H:338
void setFaceSigma(const Vector< Real > &a_faceSigma)
Definition: LevelSigmaCS.H:400
const LevelData< BaseFab< int > > & getFloatingMask() const
returns floating mask specifying whether ice is grounded or floating
Definition: LevelSigmaCS.H:187
const LevelData< FluxBox > & faceDeltaFactors() const
return face-centered and
Definition: LevelSigmaCS.cpp:979
Vector< Real > m_faceSigma
Definition: LevelSigmaCS.H:416
Real m_iceDensity
ice density
Definition: LevelSigmaCS.H:359
void setBackgroundSlope(const RealVect &a_backgroundSlope)
set the unit topography difference
Definition: LevelSigmaCS.H:145
Vector< Real > m_sigma
Definition: LevelSigmaCS.H:417
Real m_seaLevel
Definition: LevelSigmaCS.H:356
RealVect mappedCoord(const RealVect &a_x, const DataIndex &a_index) const
given coordinate in real space, return location in mapped space
Definition: LevelSigmaCS.cpp:279
const Vector< Real > & getFaceSigma() const
Definition: LevelSigmaCS.H:389
void setDefaultValues()
Definition: LevelSigmaCS.cpp:709
void setTopography(const LevelData< FArrayBox > &a_topography)
sets the base height.
Definition: LevelSigmaCS.cpp:390
IntVect ghostVect() const
accessor for ghost vector
Definition: LevelSigmaCS.H:296
RealVect dx() const
Definition: LevelSigmaCS.H:97
LevelData< FluxBox > m_faceDeltaFactors
Definition: LevelSigmaCS.H:349
void setGradSurfaceFace(const LevelData< FluxBox > &a_gradSurface)
sets the face-centred surface gradient
Definition: LevelSigmaCS.cpp:466
Definition: LevelSigmaCS.H:261
RealVect m_dx
Definition: LevelSigmaCS.H:307
LevelData< FArrayBox > m_gradSurface
cell-centered gradient of surface elevation
Definition: LevelSigmaCS.H:332
Definition: LevelSigmaCS.H:262
bool isDefined() const
returns true if this object has been defined.
Definition: LevelSigmaCS.H:235
const Vector< Real > & getSigma() const
Definition: LevelSigmaCS.H:397
LevelData< FArrayBox > m_topography
cell-centered topography
Definition: LevelSigmaCS.H:320
void define(const DisjointBoxLayout &a_grids, const RealVect &a_dx, const IntVect &a_ghostVect=IntVect::Unit)
Definition: LevelSigmaCS.cpp:55