BISICLES AMR ice sheet model
0.9
|
Physical/domain initial and boundary conditions. More...
#include <FortranInterfaceIBC.H>
Public Member Functions | |
FortranInterfaceIBC () | |
Constructor. More... | |
virtual | ~FortranInterfaceIBC () |
Destructor. More... | |
virtual void | define (const ProblemDomain &a_domain, const Real &a_dx) |
Define the object. More... | |
virtual void | setVelFAB (Real *a_uVelPtr, Real *a_vVelPtr, const int *a_dimInfo, const int *boxlo, const int *boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const IntVect &a_nGhost, FArrayBox &a_uFab, FArrayBox &a_vFab, FArrayBox &a_uccFab, FArrayBox &a_vccFab, const bool a_nodal=false, const bool a_fillData=false) |
sets reference fabs for (horizontal) velocity More... | |
virtual void | setThickness (Real *a_data_ptr, const int *a_dimInfo, const int *boxlo, const int *boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const IntVect &a_nGhost=IntVect::Zero, const bool a_nodal=false) |
nGhost is the number of ghost cells in in the input data (which are ignored) More... | |
virtual void | setTopography (Real *a_data_ptr, const int *a_dimInfo, const int *boxlo, const int *boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const IntVect &a_nGhost=IntVect::Zero, const bool a_nodal=false) |
virtual void | setSurface (Real *a_data_ptr, const int *a_dimInfo, const int *boxlo, const int *boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const IntVect &a_nGhost=IntVect::Zero, const bool a_nodal=false) |
sets storage for upper surface. More... | |
virtual void | setThicknessClearRegions (const Vector< Box > &a_clearRegions) |
regions where we artificially set thickness to zero More... | |
virtual IceThicknessIBC * | new_thicknessIBC () |
Factory method - this object is its own factory. More... | |
virtual void | initialize (LevelData< FArrayBox > &a_U) |
Set up initial conditions. More... | |
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 initial ice state More... | |
virtual 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) |
update the topgraphy in LevelSigmaCS but not the thickness More... | |
virtual void | flattenIceGeometry (const Vector< RefCountedPtr< LevelSigmaCS > > &a_amrGeometry) |
flatten thickness and basal topography back to input FArrayBoxes More... | |
virtual void | flattenData (Real *a_data_ptr, const int *a_dimInfo, const int *a_boxlo, const int *a_boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const Vector< LevelData< FArrayBox > * > &a_amrData, const Vector< int > &a_vectRefRatio, const Vector< Real > &a_amrDx, int a_srcComp, int a_destComp, int a_nComp, const IntVect &a_nGhost, const bool a_nodal) |
flatten an arbitrary dataset back to input FArrayBoxes More... | |
void | flattenVelocity (Real *a_uVelPtr, Real *a_vVelPtr, const int *a_dimInfo, const int *a_boxlo, const int *a_boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const Vector< LevelData< FArrayBox > * > &a_amrVel, const Vector< int > &a_vectRefRatio, const Vector< Real > &a_amrDx, const IntVect &a_nGhost, const bool a_nodal) |
flatten velocity field to the 3D velocity data holder More... | |
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. More... | |
virtual void | setBdrySlopes (FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time) |
Set boundary slopes. More... | |
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. More... | |
virtual RefCountedPtr< CompGridVTOBC > | velocitySolveBC () |
return boundary condition for Ice velocity solve More... | |
void | setVerbose (bool a_verbose) |
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. More... | |
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 More... | |
bool | gridsSet () const |
has setGrids been called? More... | |
virtual void | fillTopographyHoles (Real holeVal) |
utility function to fill in holes in topography More... | |
virtual void | checkOK () const |
const RefCountedPtr< LevelData< FArrayBox > > & | inputThicknessPtr () const |
![]() | |
IceThicknessIBC () | |
Constructor. More... | |
virtual | ~IceThicknessIBC () |
Destructor. More... | |
virtual PhysIBC * | new_physIBC () |
Factory method - this object is its own factory. More... | |
virtual void | velocityGhostBC (LevelData< FArrayBox > &a_velocity, const LevelSigmaCS &a_coords, const ProblemDomain &a_domain, Real a_time) |
fill ghost cells on velocity More... | |
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. More... | |
virtual void | modifyFaceVelocity (LevelData< FluxBox > &a_faceVel, const LevelSigmaCS &a_coords, const ProblemDomain &a_domain) const |
if appropriate, modify face velocities in a problem-dependent way. More... | |
virtual void | setIceFractionBCs (LevelData< FArrayBox > &a_iceFrac, const ProblemDomain &a_domain, const RealVect &a_dx, Real a_time, Real a_dt) |
set non-periodic ghost cells for ice fraction More... | |
virtual void | setGridHierarchy (Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCS, Vector< ProblemDomain > &a_vectDomain) |
set AMR grid hierarchy (for the BC's which need this) More... | |
Static Public Member Functions | |
static void | setFAB (Real *a_data_ptr, const int *a_dimInfo, const int *boxlo, const int *boxhi, const Real *a_dew, const Real *a_dns, const IntVect &a_offset, const IntVect &a_nGhost, FArrayBox &a_fab, FArrayBox &a_ccFab, const bool a_nodal, const bool a_verbose=false) |
static function to set reference fabs More... | |
static void | setGrids (DisjointBoxLayout &a_grids, const Box &a_gridBox, const ProblemDomain &a_domain, bool a_verbose) |
set grids using Boxes passed in from CISM More... | |
Protected Member Functions | |
void | setupBCs () |
set up bc's based on parmparse inputs More... | |
Protected Attributes | |
Real | m_boundaryThickness |
RealVect | m_domainSize |
bool | m_verbose |
bool | m_isBCsetUp |
bool | m_extrapBoundary |
RefCountedPtr< CompGridVTOBC > | m_velBCs |
DisjointBoxLayout | m_grids |
bool | m_gridsSet |
FArrayBox | m_inputThickness |
alias to data array passed in from glimmer-CISM More... | |
bool | m_nodalThickness |
true if m_inputThickness is nodal More... | |
FArrayBox | m_ccInputThickness |
cell-centered input thickness More... | |
RealVect | m_inputThicknessDx |
IntVect | m_thicknessGhost |
RefCountedPtr< LevelData< FArrayBox > > | m_inputThicknessLDF |
distributed version of thickness More... | |
Vector< Box > | m_thicknessClearRegions |
regions where we will artificially set ice thickness to zero More... | |
FArrayBox | m_inputTopography |
alias to data array passed in from glimmer-CISM More... | |
bool | m_nodalTopography |
FArrayBox | m_ccInputTopography |
cell-centered input topography More... | |
RealVect | m_inputTopographyDx |
IntVect | m_topographyGhost |
RefCountedPtr< LevelData< FArrayBox > > | m_inputTopographyLDF |
distributed version of topography More... | |
FArrayBox | m_inputSurface |
alias to data array passed in from glimmer-CISM More... | |
bool | m_nodalSurface |
FArrayBox | m_ccInputSurface |
cell-centered input upper ice surface More... | |
RealVect | m_inputSurfaceDx |
IntVect | m_surfaceGhost |
RefCountedPtr< LevelData< FArrayBox > > | m_inputSurfaceLDF |
distributed version of topography More... | |
Physical/domain initial and boundary conditions.
FortranInterfaceIBC::FortranInterfaceIBC | ( | ) |
Constructor.
References m_gridsSet, m_isBCsetUp, m_thicknessClearRegions, m_thicknessGhost, m_topographyGhost, and m_verbose.
Referenced by new_thicknessIBC().
|
virtual |
Destructor.
References m_verbose.
|
virtual |
Adjust boundary fluxes to account for artificial viscosity.
Implements IceThicknessIBC.
|
virtual |
Reimplemented from IceThicknessIBC.
References m_inputTopography, and m_verbose.
Referenced by gridsSet().
|
virtual |
Define the object.
Set the problem domain index space and the grid spacing for this initial and boundary condition object.
Set the problem domain index space and the grid spacing for this initial and boundary condition object. Just calls base-class define
Reimplemented from IceThicknessIBC.
|
virtual |
utility function to fill in holes in topography
looks for isolated values of holeVal and replaces then with average of neighbors
References m_inputTopography, and m_verbose.
Referenced by gridsSet().
|
virtual |
flatten an arbitrary dataset back to input FArrayBoxes
References FillFromReference(), gridsSet(), m_grids, m_gridsSet, m_thicknessGhost, m_verbose, setFAB(), and setGrids().
|
virtual |
flatten thickness and basal topography back to input FArrayBoxes
re-store in m_inputThickness and m_inputTopography – not const because we modify the values in the data holders
References flattenCellData(), m_ccInputSurface, m_ccInputThickness, m_ccInputTopography, m_inputSurface, m_inputSurfaceDx, m_inputSurfaceLDF, m_inputThickness, m_inputThicknessDx, m_inputThicknessLDF, m_inputTopography, m_inputTopographyDx, m_inputTopographyLDF, m_nodalSurface, m_nodalThickness, m_nodalTopography, and m_verbose.
void FortranInterfaceIBC::flattenVelocity | ( | Real * | a_uVelPtr, |
Real * | a_vVelPtr, | ||
const int * | a_dimInfo, | ||
const int * | a_boxlo, | ||
const int * | a_boxhi, | ||
const Real * | a_dew, | ||
const Real * | a_dns, | ||
const IntVect & | a_offset, | ||
const Vector< LevelData< FArrayBox > * > & | a_amrVel, | ||
const Vector< int > & | a_vectRefRatio, | ||
const Vector< Real > & | a_amrDx, | ||
const IntVect & | a_nGhost, | ||
const bool | a_nodal | ||
) |
flatten velocity field to the 3D velocity data holder
References m_grids, m_verbose, and setVelFAB().
|
inline |
has setGrids been called?
References checkOK(), fillTopographyHoles(), and m_gridsSet.
Referenced by flattenData(), setSurface(), setThickness(), setTopography(), and setVelFAB().
|
virtual |
|
virtual |
set up initial ice state
reads info from ParmParse and sets up ice sheet geometry
Implements IceThicknessIBC.
References LevelSigmaCS::exchangeTopography(), ExtrapGhostCells(), FillFromReference(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), LevelSigmaCS::grids(), LevelSigmaCS::interpFromCoarse(), m_extrapBoundary, m_inputThickness, m_inputThicknessDx, m_inputThicknessLDF, m_inputTopography, m_inputTopographyDx, m_inputTopographyLDF, m_verbose, ReflectGhostCells(), and LevelSigmaCS::setBackgroundSlope().
|
inline |
References m_inputThicknessLDF.
|
virtual |
Factory method - this object is its own factory.
Return a pointer to a new IceThicknessIBC object with m_isDefined = false (i.e., its define() must be called before it is used).
Return a pointer to a new PhysIBC object with m_isDefined = false (i.e., its define() must be called before it is used).
Implements IceThicknessIBC.
References FortranInterfaceIBC(), m_ccInputThickness, m_ccInputTopography, m_grids, m_gridsSet, m_inputThickness, m_inputThicknessDx, m_inputThicknessLDF, m_inputTopography, m_inputTopographyDx, m_inputTopographyLDF, m_thicknessGhost, m_topographyGhost, and m_verbose.
|
virtual |
Set boundary fluxes.
Implements IceThicknessIBC.
|
virtual |
update the topgraphy in LevelSigmaCS but not the thickness
Reimplemented from IceThicknessIBC.
References FillFromReference(), LevelSigmaCS::getTopography(), LevelSigmaCS::interpFromCoarse(), m_inputThicknessDx, m_inputTopography, m_inputTopographyDx, m_topographyGhost, and m_verbose.
|
virtual |
Set boundary slopes.
The boundary slopes in a_dW are already set to one sided difference approximations. If this function doesn't change them they will be used for the slopes at the boundaries.
Implements IceThicknessIBC.
|
static |
static function to set reference fabs
if a_nodal is false, then data is cell-centered and both a_fab and a_ccFab are set to be aliases which point to a_data_ptr. If a_nodal is true, then a_fab is set to be an aliase which points to a_data_ptr, while a_ccFab is allocated and filled with cell-averaged data.
Referenced by flattenData(), fortranInterfaceFlux::setFluxVal(), setSurface(), setThickness(), and setTopography().
|
virtual |
set non-periodic geometry (thickness, topography) ghost cells
set non-periodic ghost cells for thickness & topography
Reimplemented from IceThicknessIBC.
References ExtrapGhostCells(), LevelSigmaCS::getH(), LevelSigmaCS::getTopography(), m_extrapBoundary, and ReflectGhostCells().
Referenced by setVerbose().
|
static |
set grids using Boxes passed in from CISM
set grids using Boxes passed in from Glimmer-CISM
creates a DisjointBoxLayout using the grid boxes and processor distribution used by CISM.
Referenced by flattenData(), fortranInterfaceFlux::setFluxVal(), setSurface(), setThickness(), setTopography(), setVelFAB(), and setVerbose().
|
virtual |
sets storage for upper surface.
Currently only needed in order to return BISICLES-computed upper surface to CISM
a_offset | amount to offset indices (due to C-Fortran numbering, for example) |
References gridsSet(), m_ccInputSurface, m_grids, m_gridsSet, m_inputSurface, m_inputSurfaceDx, m_inputSurfaceLDF, m_nodalSurface, m_surfaceGhost, m_verbose, setFAB(), and setGrids().
|
virtual |
set non-periodic ghost cells for surface height z_s.
Reimplemented from IceThicknessIBC.
References ExtrapGhostCells(), m_extrapBoundary, and ReflectGhostCells().
Referenced by setVerbose().
|
virtual |
nGhost is the number of ghost cells in in the input data (which are ignored)
a_offset | amount to offset indices (due to C-Fortran numbering, for example) |
References gridsSet(), m_ccInputThickness, m_grids, m_gridsSet, m_inputThickness, m_inputThicknessDx, m_inputThicknessLDF, m_nodalThickness, m_thicknessClearRegions, m_thicknessGhost, m_verbose, setFAB(), and setGrids().
|
virtual |
regions where we artificially set thickness to zero
this is done in setThickness, for lack of a better place, so this needs to be set before setThickness is called. a_clearRegions defines logically-rectangular regions where the thickness is artificially set to zero. These regions are defined relative to the original input data (i.e. before any shifting due to ghost cells)
References m_thicknessClearRegions.
|
virtual |
a_offset | amount to offset indices (due to C-Fortran numbering, for example) |
References gridsSet(), m_ccInputTopography, m_grids, m_gridsSet, m_inputTopography, m_inputTopographyDx, m_inputTopographyLDF, m_nodalTopography, m_topographyGhost, m_verbose, setFAB(), and setGrids().
|
protected |
set up bc's based on parmparse inputs
References FIBC_Dirichlet, FIBC_iceDivide, FIBC_iceStreamXBC, FIBC_Neumann, iceDirichletBC_FIBC(), iceDivideBC_FIBC(), iceNeumannBC_FIBC(), iceStreamXBC_FIBC(), m_isBCsetUp, and m_velBCs.
Referenced by velocitySolveBC().
|
virtual |
sets reference fabs for (horizontal) velocity
version of setFAB for (horizontal) velocity data
if a_nodal is false, then data is cell-centered and both a_fab and a_ccFab are set to be aliases which point to a_data_ptr. If a_nodal is true, then a_fab is set to be an aliase which points to a_data_ptr, while a_ccFab is allocated and filled with cell-averaged data.
References gridsSet(), m_grids, m_gridsSet, m_verbose, and setGrids().
Referenced by flattenVelocity().
|
inline |
References m_verbose, setGeometryBCs(), setGrids(), and setSurfaceHeightBCs().
|
virtual |
return boundary condition for Ice velocity solve
eventually would like this to be a BCHolder
Implements IceThicknessIBC.
References m_isBCsetUp, m_velBCs, and setupBCs().
|
protected |
|
protected |
cell-centered input upper ice surface
if nodalSurface is false, this is identical to m_inputSurface; if nodalSurface is true, this contains the cell-averaged version of the inputSurface
Referenced by flattenIceGeometry(), and setSurface().
|
protected |
cell-centered input thickness
if nodalThickness is false, this is identical to m_inputThickness. If nodalThickness is true, then this contains the cell-averaged version of the inputThickness
Referenced by flattenIceGeometry(), new_thicknessIBC(), and setThickness().
|
protected |
cell-centered input topography
if nodalTopography is false, this is identical to m_inputTopography. if nodalTopography is true, this contains the cell-averaged version of the inputTopography
Referenced by flattenIceGeometry(), new_thicknessIBC(), and setTopography().
|
protected |
|
protected |
Referenced by initializeIceGeometry(), setGeometryBCs(), and setSurfaceHeightBCs().
|
protected |
Referenced by flattenData(), flattenVelocity(), new_thicknessIBC(), setSurface(), setThickness(), setTopography(), and setVelFAB().
|
protected |
Referenced by flattenData(), FortranInterfaceIBC(), gridsSet(), new_thicknessIBC(), setSurface(), setThickness(), setTopography(), and setVelFAB().
|
protected |
alias to data array passed in from glimmer-CISM
Referenced by flattenIceGeometry(), and setSurface().
|
protected |
Referenced by flattenIceGeometry(), and setSurface().
|
protected |
distributed version of topography
Referenced by flattenIceGeometry(), and setSurface().
|
protected |
alias to data array passed in from glimmer-CISM
Referenced by flattenIceGeometry(), initializeIceGeometry(), new_thicknessIBC(), and setThickness().
|
protected |
Referenced by flattenIceGeometry(), initializeIceGeometry(), new_thicknessIBC(), regridIceGeometry(), and setThickness().
|
protected |
distributed version of thickness
Referenced by flattenIceGeometry(), initializeIceGeometry(), inputThicknessPtr(), new_thicknessIBC(), and setThickness().
|
protected |
alias to data array passed in from glimmer-CISM
Referenced by checkOK(), fillTopographyHoles(), flattenIceGeometry(), initializeIceGeometry(), new_thicknessIBC(), regridIceGeometry(), and setTopography().
|
protected |
Referenced by flattenIceGeometry(), initializeIceGeometry(), new_thicknessIBC(), regridIceGeometry(), and setTopography().
|
protected |
distributed version of topography
Referenced by flattenIceGeometry(), initializeIceGeometry(), new_thicknessIBC(), and setTopography().
|
protected |
Referenced by FortranInterfaceIBC(), setupBCs(), and velocitySolveBC().
|
protected |
Referenced by flattenIceGeometry(), and setSurface().
|
protected |
true if m_inputThickness is nodal
Referenced by flattenIceGeometry(), and setThickness().
|
protected |
Referenced by flattenIceGeometry(), and setTopography().
|
protected |
Referenced by setSurface().
|
protected |
regions where we will artificially set ice thickness to zero
Referenced by FortranInterfaceIBC(), setThickness(), and setThicknessClearRegions().
|
protected |
Referenced by flattenData(), FortranInterfaceIBC(), new_thicknessIBC(), and setThickness().
|
protected |
Referenced by FortranInterfaceIBC(), new_thicknessIBC(), regridIceGeometry(), and setTopography().
|
protected |
Referenced by setupBCs(), and velocitySolveBC().
|
protected |