PISM, A Parallel Ice Sheet Model  stable v2.0.5 committed by Constantine Khrulev on 2022-10-14 09:56:26 -0800
IceModelVec2V.hh
Go to the documentation of this file.
1 /* Copyright (C) 2020, 2021 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 PISM_ICEMODELVEC2V_H
20 #define PISM_ICEMODELVEC2V_H
21 
22 #include "pism/util/IceModelVec2.hh"
23 
24 namespace pism {
25 
26 /** Class for storing and accessing 2D vector fields
27 */
28 class IceModelVec2V : public IceModelVec2<Vector2> {
29 public:
30  IceModelVec2V(IceGrid::ConstPtr grid, const std::string &short_name,
31  IceModelVecKind ghostedp, unsigned int stencil_width = 1);
32  virtual ~IceModelVec2V() = default;
33 
34  typedef std::shared_ptr<IceModelVec2V> Ptr;
35  typedef std::shared_ptr<const IceModelVec2V> ConstPtr;
36 };
37 
38 std::shared_ptr<IceModelVec2V> duplicate(const IceModelVec2V &source);
39 
40 } // end of namespace pism
41 
42 #endif /* PISM_ICEMODELVEC2V_H */
std::shared_ptr< const IceGrid > ConstPtr
Definition: IceGrid.hh:233
std::shared_ptr< IceModelVec2V > Ptr
IceModelVec2V(IceGrid::ConstPtr grid, const std::string &short_name, IceModelVecKind ghostedp, unsigned int stencil_width=1)
virtual ~IceModelVec2V()=default
std::shared_ptr< const IceModelVec2V > ConstPtr
A storage vector combining related fields in a struct.
Definition: IceModelVec2.hh:29
unsigned int stencil_width() const
Get the stencil width of the current IceModelVec. Returns 0 if ghosts are not available.
Definition: iceModelVec.cc:334
IceGrid::ConstPtr grid() const
Definition: iceModelVec.cc:128
std::shared_ptr< IceModelVec2S > duplicate(const IceModelVec2S &source)
Definition: iceModelVec2.cc:55
IceModelVecKind
What "kind" of a vector to create: with or without ghosts.
Definition: iceModelVec.hh:49