URI: 
       tSteadyState.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
       ---
       tSteadyState.hh (2514B)
       ---
            1 /* Copyright (C) 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 
           20 #ifndef STEADY_STATE_H
           21 #define STEADY_STATE_H
           22 
           23 #include "NullTransport.hh"
           24 
           25 namespace pism {
           26 namespace hydrology {
           27 
           28 class EmptyingProblem;
           29 
           30 /*!
           31  * A version of the "null-transport" hydrology model that adds the steady state water
           32  * flux.
           33  */
           34 class SteadyState : public NullTransport {
           35 public:
           36   SteadyState(IceGrid::ConstPtr g);
           37   virtual ~SteadyState();
           38 
           39 protected:
           40   void initialization_message() const;
           41 
           42   void init_time(const std::string &input_file);
           43 
           44   void init_impl(const IceModelVec2S &W_till, const IceModelVec2S &W, const IceModelVec2S &P);
           45 
           46   void bootstrap_impl(const File &input_file,
           47                       const IceModelVec2S &ice_thickness);
           48   void restart_impl(const File &input_file, int record);
           49 
           50   void update_impl(double t, double dt, const Inputs& inputs);
           51 
           52   std::map<std::string, Diagnostic::Ptr> diagnostics_impl() const;
           53 
           54   MaxTimestep max_timestep_impl(double t) const;
           55   void define_model_state_impl(const File &output) const;
           56   void write_model_state_impl(const File &output) const;
           57 
           58   std::shared_ptr<EmptyingProblem> m_emptying_problem;
           59 
           60   //! time of the last water flux update
           61   double m_t_last;
           62   //! Update interval in seconds
           63   double m_update_interval;
           64   //! Temporal resolution to use when checking whether it's time to update
           65   double m_t_eps;
           66   //! Name of the variable used to store the last update time.
           67   std::string m_time_name;
           68 
           69   //! Times corresponding to records in the input file
           70   std::vector<double> m_time;
           71   //! Time bounds corresponding to records in the input file
           72   std::vector<double> m_time_bounds;
           73 
           74   //! Set to true in bootstrap_impl() if update_impl() has to bootstrap m_Q.
           75   bool m_bootstrap;
           76 };
           77 
           78 } // end of namespace hydrology
           79 } // end of namespace pism
           80 
           81 #endif /* STEADY_STATE_H */