URI: 
       tDistributed.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
       ---
       tDistributed.hh (3801B)
       ---
            1 // Copyright (C) 2012-2019 PISM Authors
            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 _DISTRIBUTED_H_
           20 #define _DISTRIBUTED_H_
           21 
           22 #include "Routing.hh"
           23 
           24 namespace pism {
           25 
           26 namespace hydrology {
           27 
           28 //! \brief The PISM subglacial hydrology model for a distributed linked-cavity system.
           29 /*!
           30   This class implements the model documented in [\ref BuelervanPeltDRAFT].
           31 
           32   Unlike hydrology::Routing, the water pressure \f$P\f$ is a state variable, and there
           33   are modeled mechanisms for cavity geometry evolution, including creep closure
           34   and opening through sliding ("cavitation").  Because of cavitation, this model
           35   needs access to a StressBalance object.   Background references for this kind of
           36   model includes especially [\ref Kamb1987, \ref Schoofetal2012], but see also
           37   [\ref Hewitt2011, \ref Hewittetal2012, \ref Hewitt2013].
           38 
           39   In addition to the actions within the null strip taken by hydrology::Routing,
           40   this model also sets the staggered grid values of the gradient of the hydraulic
           41   potential to zero if either regular grid neighbor is in the null strip.
           42 */
           43 class Distributed : public Routing {
           44 public:
           45   Distributed(IceGrid::ConstPtr g);
           46   virtual ~Distributed();
           47 
           48   const IceModelVec2S& subglacial_water_pressure() const;
           49 
           50 protected:
           51   virtual void restart_impl(const File &input_file, int record);
           52 
           53   virtual void bootstrap_impl(const File &input_file,
           54                               const IceModelVec2S &ice_thickness);
           55 
           56   virtual void init_impl(const IceModelVec2S &W_till,
           57                                const IceModelVec2S &W,
           58                                const IceModelVec2S &P);
           59 
           60   virtual double max_timestep_P_diff(double phi0, double dt_diff_w) const;
           61 
           62   void update_impl(double t, double dt, const Inputs& inputs);
           63 
           64   std::map<std::string, TSDiagnostic::Ptr> ts_diagnostics_impl() const;
           65 
           66   void define_model_state_impl(const File &output) const;
           67   void write_model_state_impl(const File &output) const;
           68 
           69   void check_P_bounds(IceModelVec2S &P,
           70                       const IceModelVec2S &P_o,
           71                       bool enforce_upper);
           72 
           73   void P_from_W_steady(const IceModelVec2S &W,
           74                        const IceModelVec2S &P_overburden,
           75                        const IceModelVec2S &sliding_speed,
           76                        IceModelVec2S &result);
           77 
           78   void update_P(double dt,
           79                 const IceModelVec2CellType &cell_type,
           80                 const IceModelVec2S &sliding_speed,
           81                 const IceModelVec2S &surface_input_rate,
           82                 const IceModelVec2S &basal_melt_rate,
           83                 const IceModelVec2S &P_overburden,
           84                 const IceModelVec2S &Wtill,
           85                 const IceModelVec2S &Wtill_new,
           86                 const IceModelVec2S &P,
           87                 const IceModelVec2S &W,
           88                 const IceModelVec2Stag &Ws,
           89                 const IceModelVec2Stag &K,
           90                 const IceModelVec2Stag &Q,
           91                 IceModelVec2S &P_new) const;
           92 protected:
           93   IceModelVec2S m_P;
           94   IceModelVec2S m_Pnew;
           95 private:
           96   void initialization_message() const;
           97 };
           98 
           99 } // end of namespace hydrology
          100 } // end of namespace pism
          101 
          102 #endif /* _DISTRIBUTED_H_ */