Debian Codegraph @

src/atlas/mesh/elementtypes/Quadrilateral.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 Quadrilateral : public Face
25 {
26 public:
27 enum { EDGES=4 };
28 enum { VERTICES=4 };
29 enum { FACETS=EDGES };
30 enum { RIDGES=VERTICES };
31 virtual ~Quadrilateral() {}
32 virtual bool parametric() const { return true; }
33 virtual bool simplex() const { return false; }
34 virtual size_t nb_vertices() const { return VERTICES; }
35 virtual size_t nb_edges() const { return EDGES; }
36 virtual size_t nb_nodes() const { return VERTICES; }
37 virtual size_t nb_facets() const { return FACETS; }
38 virtual size_t nb_ridges() const { return RIDGES; }
39 virtual const std::string& name() const { static std::string s("Quadrilateral"); return s; }
40 };
41
42 //------------------------------------------------------------------------------------------------------
43
44 } // namespace elementtypes
45
46 namespace temporary {
47 class Quadrilateral : public elementtypes::Quadrilateral {
48 public:
49 [[deprecated("Use 'atlas::mesh::ElementType::create(\"Quadrilateral\")' instead")]] Quadrilateral() {}
50 };
51 }
52
53 } // namespace mesh
54 } // namespace atlas
55