BISICLES AMR ice sheet model  0.9
Functions
LevelMappedDerivatives.cpp File Reference

Functions

void computeCCDerivatives (LevelData< FArrayBox > &a_ccDeriv, const LevelData< FArrayBox > &a_ccData, const LevelSigmaCS &a_coordSys, const Interval &a_comps, const Interval &a_derivDirections, const IntVect &a_derivGhost, const bool a_maskOneSide)
 compute cell-centered derivatives More...
 
void computeFCDerivatives (LevelData< FluxBox > &a_fcDeriv, const LevelData< FArrayBox > &a_ccData, const LevelSigmaCS &a_coordSys, const Interval &a_comps, const Interval &a_derivDirections, const IntVect &a_derivGhost)
 compute face-centered derivatives of cell-centered data on all faces More...
 
void computeFCDerivatives (LevelData< FluxBox > &a_fcDeriv, const LevelData< FArrayBox > &a_ccData, const LevelData< FArrayBox > &a_ccDeriv, const LevelSigmaCS &a_coordSys, const Interval &a_comps, const Interval &a_derivDirections, const IntVect &a_ghostVect)
 compute face-centered derivatives of cell-centered data More...
 

Function Documentation

◆ computeCCDerivatives()

void computeCCDerivatives ( LevelData< FArrayBox > &  a_ccDeriv,
const LevelData< FArrayBox > &  a_ccData,
const LevelSigmaCS a_coordSys,
const Interval &  a_comps,
const Interval &  a_derivDirections,
const IntVect &  a_derivGhost,
const bool  a_maskOneSide 
)

compute cell-centered derivatives

A set of utility functions for computing derivatives in the mapped sigma coordinate system used by ice-sheet models. if we represent (x,y,z) as (sigma, xtilde, ytilde) in 3d, where xtilde = x, ytilde = y, and sigma = (z_surface - z)/H, where H = ice-sheet thickness, then we have the following geometric relations:

d/(dx) = d/(d xtilde) + (1/H)Delta_x*(d/d sigma) d/(dy) = d/(d ytilde) + (1/H)Delta_y*(d/d sigma) d/(d sigma) = -(1/H)d/(d sigma)

where Delta_x and Delta_y are geometric factors computed in the SigmaCS.

These utility functions implement this differencing so that it's convenient to use.it's assumed that any ghost-cell boundary conditions have already been set . optionally (a_mask = true), switch to one-sided differences next to fluid free cells

References LevelSigmaCS::deltaFactors(), derivComponent(), LevelSigmaCS::dx(), and LevelSigmaCS::getH().

Referenced by ConstitutiveRelation::computeStrainRateInvariant().

◆ computeFCDerivatives() [1/2]

void computeFCDerivatives ( LevelData< FluxBox > &  a_fcDeriv,
const LevelData< FArrayBox > &  a_ccData,
const LevelSigmaCS a_coordSys,
const Interval &  a_comps,
const Interval &  a_derivDirections,
const IntVect &  a_derivGhost 
)

compute face-centered derivatives of cell-centered data on all faces

References derivComponent(), LevelSigmaCS::dx(), and LevelSigmaCS::faceDeltaFactors().

Referenced by ConstitutiveRelation::computeStrainRateInvariantFace().

◆ computeFCDerivatives() [2/2]

void computeFCDerivatives ( LevelData< FluxBox > &  a_fcDeriv,
const LevelData< FArrayBox > &  a_ccData,
const LevelData< FArrayBox > &  a_ccDeriv,
const LevelSigmaCS a_coordSys,
const Interval &  a_comps,
const Interval &  a_derivDirections,
const IntVect &  a_ghostVect 
)

compute face-centered derivatives of cell-centered data

This version takes cell-centered derivatives in the mapped coordinates and averages them to faces and applies the correction required due to the mapping. This is essentially designed to support the horizontal ice-velocity elliptic operator.

fcDeriv should be a face-centered FArrayBox

ccData is the cell-centered data (needed on ghost cells normal to the face in faceDir)

ccDeriv contains the cell-centered derivatives used to compute tangential derivatives. These should be indexed in the same way as the cell-centered derivatives returned by the computeCCDerivatives function, and need to be defined on one ghost cell in the faceDir direction.

faceDerivBox should be a face-centered box corresponding to the region in fcDeriv where derivatives are needed.

References derivComponent(), LevelSigmaCS::dx(), and LevelSigmaCS::faceDeltaFactors().