9 #include <dolfinx/common/MPI.h>
10 #include <dolfinx/common/array2d.h>
11 #include <dolfinx/fem/CoordinateElement.h>
12 #include <dolfinx/graph/AdjacencyList.h>
25 class CoordinateElement;
38 template <
typename AdjacencyList32,
typename Array,
typename Vector64>
42 : _dim(
x.shape[1]), _dofmap(std::forward<AdjacencyList32>(
dofmap)),
43 _index_map(
index_map), _cmap(element), _x(std::forward<Array>(
x)),
46 assert(_x.shape[1] > 0 and _x.shape[1] <= 3);
47 if (_x.shape[0] != _input_global_indices.size())
48 throw std::runtime_error(
"Size mis-match");
54 for (std::size_t i = 0; i < _x.shape[0]; ++i)
55 for (std::size_t j = 0; j < _x.shape[1]; ++j)
56 coords(i, j) = _x(i, j);
57 std::swap(coords, _x);
83 std::shared_ptr<const common::IndexMap>
index_map()
const;
106 std::shared_ptr<const common::IndexMap> _index_map;
115 std::vector<std::int64_t> _input_global_indices;
This class provides a dynamic 2-dimensional row-wise array data structure.
Definition: array2d.h:21
This class manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:31
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:68
Geometry stores the geometry imposed on a mesh.
Definition: Geometry.h:35
Geometry(const std::shared_ptr< const common::IndexMap > &index_map, AdjacencyList32 &&dofmap, const fem::CoordinateElement &element, Array &&x, Vector64 &&input_global_indices)
Constructor.
Definition: Geometry.h:39
const graph::AdjacencyList< std::int32_t > & dofmap() const
DOF map.
Definition: Geometry.cpp:21
array2d< double > & x()
Geometry degrees-of-freedom.
Definition: Geometry.cpp:31
~Geometry()=default
Destructor.
Geometry & operator=(Geometry &&)=default
Move Assignment.
const fem::CoordinateElement & cmap() const
The element that describes the geometry map.
Definition: Geometry.cpp:35
std::shared_ptr< const common::IndexMap > index_map() const
Index map.
Definition: Geometry.cpp:26
const std::vector< std::int64_t > & input_global_indices() const
Global user indices.
Definition: Geometry.cpp:37
Geometry & operator=(const Geometry &)=delete
Copy Assignment.
Geometry(Geometry &&)=default
Move constructor.
Geometry(const Geometry &)=default
Copy constructor.
int dim() const
Return Euclidean dimension of coordinate system.
Definition: Geometry.cpp:19
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:57
mesh::Geometry create_geometry(MPI_Comm comm, const Topology &topology, const fem::CoordinateElement &coordinate_element, const graph::AdjacencyList< std::int64_t > &cells, const array2d< double > &x)
Build Geometry FIXME: document.
Definition: Geometry.cpp:45