URI:
       tShallowStressBalance.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
  HTML git clone git://src.adamsgaard.dk/pism
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
       tShallowStressBalance.hh (3754B)
       ---
            1 // Copyright (C) 2010--2019 Constantine Khroulev and Ed Bueler
            2 //
            3 // This file is part of PISM.
            4 //
            5 // PISM is free software; you can redistribute it and/or modify it under the
            6 // terms of the GNU General Public License as published by the Free Software
            7 // Foundation; either version 3 of the License, or (at your option) any later
            8 // version.
            9 //
           10 // PISM is distributed in the hope that it will be useful, but WITHOUT ANY
           11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
           12 // FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
           13 // details.
           14 //
           15 // You should have received a copy of the GNU General Public License
           16 // along with PISM; if not, write to the Free Software
           17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
           18 
           19 #ifndef _SHALLOWSTRESSBALANCE_H_
           20 #define _SHALLOWSTRESSBALANCE_H_
           21 
           22 #include "pism/util/Component.hh"
           23 #include "pism/util/iceModelVec.hh"
           24 #include "pism/util/EnthalpyConverter.hh"
           25 
           26 namespace pism {
           27 namespace rheology {
           28 class FlowLaw;
           29 }
           30 
           31 class IceGrid;
           32 class IceBasalResistancePlasticLaw;
           33 class IceModelVec2CellType;
           34 
           35 namespace stressbalance {
           36 
           37 /*!
           38  * Vertically-averaged ocean pressure difference at the calving front, used in the implementation of
           39  * the stress boundary condition at the calving front in SSA stress balance solvers.
           40  */
           41 double margin_pressure_difference(bool shelf, bool dry_mode, double H, double bed, double sea_level,
           42                                   double rho_ice, double rho_ocean, double g);
           43 
           44 class Inputs;
           45 
           46 //! Shallow stress balance (such as the SSA).
           47 class ShallowStressBalance : public Component {
           48 public:
           49   ShallowStressBalance(IceGrid::ConstPtr g);
           50   virtual ~ShallowStressBalance();
           51 
           52   //  initialization and I/O:
           53 
           54   void init();
           55 
           56   virtual void update(const Inputs &inputs, bool full_update) = 0;
           57 
           58   //! \brief Get the thickness-advective 2D velocity.
           59   const IceModelVec2V& velocity() const;
           60 
           61   //! \brief Get the basal frictional heating (for the adaptive energy time-stepping).
           62   const IceModelVec2S& basal_frictional_heating();
           63 
           64   void compute_basal_frictional_heating(const IceModelVec2V &velocity,
           65                                         const IceModelVec2S &tauc,
           66                                         const IceModelVec2CellType &mask,
           67                                         IceModelVec2S &result) const;
           68   // helpers:
           69 
           70   //! \brief Produce a report string for the standard output.
           71   virtual std::string stdout_report() const;
           72 
           73   std::shared_ptr<const rheology::FlowLaw> flow_law() const;
           74 
           75   EnthalpyConverter::Ptr enthalpy_converter() const;
           76 
           77   const IceBasalResistancePlasticLaw* sliding_law() const;
           78 protected:
           79   virtual void init_impl();
           80   
           81   virtual DiagnosticList diagnostics_impl() const;
           82 
           83   IceBasalResistancePlasticLaw *m_basal_sliding_law;
           84   std::shared_ptr<rheology::FlowLaw> m_flow_law;
           85   EnthalpyConverter::Ptr m_EC;
           86 
           87   IceModelVec2V m_velocity;
           88   IceModelVec2S m_basal_frictional_heating;
           89 };
           90 
           91 //! Returns zero velocity field, zero friction heating, and zero for D^2.
           92 /*!
           93   This derived class is used in the non-sliding SIA approximation. This
           94   implementation ignores any basal resistance fields (e.g. yield stress from
           95   the IceModel or other user of this class).
           96 */
           97 class ZeroSliding : public ShallowStressBalance {
           98 public:
           99   ZeroSliding(IceGrid::ConstPtr g);
          100   virtual ~ZeroSliding();
          101   
          102   virtual void update(const Inputs &inputs, bool full_update);
          103 
          104 protected:
          105 };
          106 
          107 class PrescribedSliding : public ZeroSliding {
          108 public:
          109   PrescribedSliding(IceGrid::ConstPtr g);
          110   virtual ~PrescribedSliding();
          111   virtual void update(const Inputs &inputs, bool full_update);
          112 protected:
          113   virtual void init_impl();
          114 };
          115 
          116 } // end of namespace stressbalance
          117 } // end of namespace pism
          118 
          119 #endif /* _SHALLOWSTRESSBALANCE_H_ */