URI:
       tStressCalving.cc - 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
       ---
       tStressCalving.cc (2097B)
       ---
            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 #include "StressCalving.hh"
           21 
           22 namespace pism {
           23 namespace calving {
           24 
           25 StressCalving::StressCalving(IceGrid::ConstPtr grid,
           26                              unsigned int stencil_width)
           27   : Component(grid),
           28     m_stencil_width(stencil_width),
           29     m_strain_rates(m_grid, "strain_rates", WITH_GHOSTS,
           30                    m_stencil_width,
           31                    2 /* 2 components */) {
           32 
           33   m_strain_rates.metadata(0).set_name("eigen1");
           34   m_strain_rates.set_attrs("internal",
           35                            "major principal component of horizontal strain-rate",
           36                            "second-1", "second-1", "", 0);
           37 
           38   m_strain_rates.metadata(1).set_name("eigen2");
           39   m_strain_rates.set_attrs("internal",
           40                            "minor principal component of horizontal strain-rate",
           41                            "second-1", "second-1", "", 1);
           42 
           43   m_calving_rate.create(m_grid, "calving_rate", WITHOUT_GHOSTS);
           44   m_calving_rate.set_attrs("internal", "horizontal calving rate", "m s-1", "m year-1", "", 0);
           45 
           46   m_cell_type.create(m_grid, "cell_type", WITH_GHOSTS);
           47   m_cell_type.set_attrs("internal", "cell type mask", "", "", "", 0);
           48 }
           49 
           50 const IceModelVec2S &StressCalving::calving_rate() const {
           51   return m_calving_rate;
           52 }
           53 
           54 
           55 StressCalving::~StressCalving() {
           56   // empty
           57 }
           58 
           59 } // end of namespace calving
           60 } // end of namespace pism