Interface Documentation
Version: invalid
definition.hh
Go to the documentation of this file.
1 /*
2  @@@@@@@@ @@ @@@@@@ @@@@@@@@ @@
3  /@@///// /@@ @@////@@ @@////// /@@
4  /@@ /@@ @@@@@ @@ // /@@ /@@
5  /@@@@@@@ /@@ @@///@@/@@ /@@@@@@@@@/@@
6  /@@//// /@@/@@@@@@@/@@ ////////@@/@@
7  /@@ /@@/@@//// //@@ @@ /@@/@@
8  /@@ @@@//@@@@@@ //@@@@@@ @@@@@@@@ /@@
9  // /// ////// ////// //////// //
10 
11  Copyright (c) 2016, Los Alamos National Security, LLC
12  All rights reserved.
13  */
14 #pragma once
15 
18 #include "flecsi/util/crs.hh"
20 
21 #include <set>
22 #include <vector>
23 
24 namespace flecsi {
25 namespace topo {
26 namespace unstructured_impl {
27 
34 template<size_t DIMENSION, typename REAL_TYPE = double>
36 {
37 public:
39  using connectivity_t = std::vector<std::vector<size_t>>;
40 
41  definition(const definition &) = delete;
42  definition & operator=(const definition &) = delete;
43 
44  definition() {}
45  virtual ~definition() {}
46 
51  static constexpr size_t dimension() {
52  return DIMENSION;
53  }
54 
61  virtual size_t num_entities(size_t dimension) const = 0;
62 
74  virtual std::vector<size_t>
75  entities(size_t from_dimension, size_t to_dimension, size_t id) const = 0;
76 
86  virtual const connectivity_t & entities(size_t from_dimension,
87  size_t to_dimension) const = 0;
88 
100  virtual std::set<size_t>
101  entities_set(size_t from_dimension, size_t to_dimension, size_t id) const {
102  auto vvec = entities(from_dimension, to_dimension, id);
103  return std::set<size_t>(vvec.begin(), vvec.end());
104  } // entities_set
105 
106 }; // class definition
107 
108 } // namespace unstructured_impl
109 } // namespace topo
110 } // namespace flecsi
virtual std::set< size_t > entities_set(size_t from_dimension, size_t to_dimension, size_t id) const
Definition: definition.hh:101
virtual std::vector< size_t > entities(size_t from_dimension, size_t to_dimension, size_t id) const =0
Definition: dimensioned_array.hh:58
virtual size_t num_entities(size_t dimension) const =0
Definition: control.hh:31
static constexpr size_t dimension()
Definition: definition.hh:51