Debian Codegraph @

src/atlas/mesh/elementtypes/Line.h

raw
1 /*
2 * (C) Copyright 1996-2016 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 nor
8 * does it submit to any jurisdiction.
9 */
10
11 /// @author Willem Deconinck
12 /// @date October 2015
13
14 #pragma once
15
16 #include "atlas/mesh/elementtypes/Classification.h"
17
18 namespace atlas {
19 namespace mesh {
20 namespace elementtypes {
21
22 //------------------------------------------------------------------------------------------------------
23
24 class Line : public Edge
25 {
26 public:
27 enum { VERTICES = 2 };
28 enum { FACETS = VERTICES };
29 enum { RIDGES = 0 };
30 virtual ~Line() {}
31 virtual bool parametric() const { return true; }
32 virtual bool simplex() const { return false; }
33 virtual size_t nb_vertices() const { return VERTICES; }
34 virtual size_t nb_edges() const { return EDGES; }
35 virtual size_t nb_nodes() const { return VERTICES; }
36 virtual size_t nb_facets() const { return FACETS; }
37 virtual const std::string& name() const { static std::string s("Line"); return s; }
38 };
39
40 //------------------------------------------------------------------------------------------------------
41
42 } // namespace elementtypes
43
44 namespace temporary {
45 class Line : public elementtypes::Line {
46 public:
47 [[deprecated("Use 'atlas::mesh::ElementType::create(\"Line\")' instead")]] Line() {}
48 };
49 }
50
51 } // namespace mesh
52 } // namespace atlas