Debian Codegraph @

src/atlas/mesh/Halo.cc

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #include "atlas/mesh/Halo.h"
12 #include "atlas/mesh/Mesh.h"
13 #include "atlas/runtime/Exception.h"
14 #include "atlas/util/Metadata.h"
15
16 namespace atlas {
17 namespace mesh {
18
19 Halo::Halo(const Mesh& mesh) {
20 size_ = 0;
21 mesh.metadata().get("halo", size_);
22 }
23
24 Halo::Halo(const detail::MeshImpl& mesh) {
25 size_ = 0;
26 mesh.metadata().get("halo", size_);
27 }
28
29 int Halo::size() const {
30 ATLAS_ASSERT(size_ >= 0);
31 return size_;
32 }
33
34 } // namespace mesh
35 } // namespace atlas