URI:
       tSSB_Modifier.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
       ---
       tSSB_Modifier.hh (2606B)
       ---
            1 // Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 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 _SSB_MODIFIER_H_
           20 #define _SSB_MODIFIER_H_
           21 
           22 #include "pism/util/iceModelVec.hh"
           23 #include "pism/util/Component.hh"
           24 #include "pism/util/EnthalpyConverter.hh"
           25 
           26 namespace pism {
           27 
           28 class Vars;
           29 
           30 namespace rheology {
           31 class FlowLaw;
           32 }
           33 
           34 namespace stressbalance {
           35 
           36 class Inputs;
           37 
           38 //! Shallow stress balance modifier (such as the non-sliding SIA).
           39 class SSB_Modifier : public Component {
           40 public:
           41   SSB_Modifier(IceGrid::ConstPtr g);
           42   virtual ~SSB_Modifier();
           43 
           44   virtual void init();
           45 
           46   virtual void update(const IceModelVec2V &sliding_velocity,
           47                       const Inputs &inputs,
           48                       bool full_update) = 0;
           49 
           50   //! \brief Get the diffusive (SIA) vertically-averaged flux on the staggered grid.
           51   virtual const IceModelVec2Stag& diffusive_flux();
           52 
           53   //! \brief Get the max diffusivity (for the adaptive time-stepping).
           54   virtual double max_diffusivity() const;
           55 
           56   const IceModelVec3& velocity_u() const;
           57 
           58   const IceModelVec3& velocity_v() const;
           59 
           60   const IceModelVec3& volumetric_strain_heating() const;
           61 
           62   virtual std::string stdout_report() const;
           63 
           64   std::shared_ptr<const rheology::FlowLaw> flow_law() const;
           65 
           66 protected:
           67   std::shared_ptr<rheology::FlowLaw> m_flow_law;
           68   EnthalpyConverter::Ptr m_EC;
           69   double m_D_max;
           70   IceModelVec2Stag m_diffusive_flux;
           71   IceModelVec3 m_u, m_v, m_strain_heating;
           72 };
           73 
           74 
           75 //! The trivial Shallow Stress Balance modifier.
           76 class ConstantInColumn : public SSB_Modifier {
           77 public:
           78   ConstantInColumn(IceGrid::ConstPtr g);
           79   virtual ~ConstantInColumn();
           80 
           81   virtual void init();
           82 
           83   virtual void update(const IceModelVec2V &sliding_velocity,
           84                       const Inputs &inputs,
           85                       bool full_update);
           86 };
           87 
           88 } // end of namespace stressbalance
           89 } // end of namespace pism
           90 
           91 #endif /* _SSB_MODIFIER_H_ */