URI:
       tFrontRetreat.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
       ---
       tFrontRetreat.hh (2427B)
       ---
            1 /* Copyright (C) 2016, 2017, 2018, 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 FRONTRETREAT_H
           21 #define FRONTRETREAT_H
           22 
           23 #include "pism/util/Component.hh"
           24 #include "pism/util/iceModelVec.hh"
           25 #include "pism/util/IceModelVec2CellType.hh"
           26 #include "pism/util/MaxTimestep.hh"
           27 
           28 namespace pism {
           29 
           30 class Geometry;
           31 
           32 //! An abstract class implementing calving front retreat resulting from application of a
           33 //! spatially-variable horizontal retreat rate.
           34 /*! The retreat rate may correspond to frontal melting or calving. Requires the
           35     "part_grid" mechanism and a grid with dx == dy.
           36  */
           37 class FrontRetreat : public Component {
           38 public:
           39   FrontRetreat(IceGrid::ConstPtr g);
           40   ~FrontRetreat();
           41 
           42   void update_geometry(double dt,
           43                        const Geometry &geometry,
           44                        const IceModelVec2Int &bc_mask,
           45                        const IceModelVec2S &retreat_rate,
           46                        IceModelVec2S &Href,
           47                        IceModelVec2S &ice_thickness);
           48 
           49   MaxTimestep max_timestep(const IceModelVec2CellType &cell_type,
           50                            const IceModelVec2Int &bc_mask,
           51                            const IceModelVec2S &retreat_rate) const;
           52 private:
           53 
           54   void compute_modified_mask(const IceModelVec2CellType &input,
           55                              IceModelVec2CellType &output) const;
           56 
           57   // Ghosted cell type mask
           58   //
           59   // We make a copy here because frontal retreat code uses a modified mask if
           60   // geometry.front_retreat.wrap_around is false.
           61   IceModelVec2CellType m_cell_type;
           62   // Temporary storage for distributing ice loss to "full" (as opposed to "partially
           63   // filled") cells near the front
           64   IceModelVec2S m_tmp;
           65 };
           66 
           67 } // end of namespace pism
           68 
           69 
           70 #endif /* FRONTRETREAT_H */