10#include <dolfinx/common/MPI.h>
11#include <dolfinx/fem/CoordinateElement.h>
12#include <dolfinx/graph/AdjacencyList.h>
43 template <std::convertible_to<graph::AdjacencyList<std::
int32_t>> U,
44 std::convertible_to<std::vector<
double>> V,
45 std::convertible_to<std::vector<std::
int64_t>> W>
50 _cmap(element), _x(std::forward<V>(
x)),
53 assert(_x.size() % 3 == 0);
54 if (_x.size() / 3 != _input_global_indices.size())
55 throw std::runtime_error(
"Geometry size mis-match");
80 std::shared_ptr<const common::IndexMap>
index_map()
const;
86 std::span<const double>
x()
const;
93 std::span<double>
x();
111 std::shared_ptr<const common::IndexMap> _index_map;
118 std::vector<double> _x;
121 std::vector<std::int64_t> _input_global_indices;
148 std::span<const double> x,
int dim,
149 const std::function<std::vector<int>(
A CoordinateElement manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:32
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:27
Geometry stores the geometry imposed on a mesh.
Definition: Geometry.h:29
~Geometry()=default
Destructor.
const graph::AdjacencyList< std::int32_t > & dofmap() const
DOF map.
Definition: Geometry.cpp:21
std::shared_ptr< const common::IndexMap > index_map() const
Index map.
Definition: Geometry.cpp:26
std::span< const double > x() const
Access geometry degrees-of-freedom data (const version).
Definition: Geometry.cpp:33
Geometry(Geometry &&)=default
Move constructor.
Geometry(const Geometry &)=default
Copy constructor.
Geometry(std::shared_ptr< const common::IndexMap > index_map, U &&dofmap, const fem::CoordinateElement &element, V &&x, int dim, W &&input_global_indices)
Constructor of object that holds mesh geometry data.
Definition: Geometry.h:46
int dim() const
Return Euclidean dimension of coordinate system.
Definition: Geometry.cpp:19
Geometry & operator=(Geometry &&)=default
Move Assignment.
const fem::CoordinateElement & cmap() const
The element that describes the geometry map.
Definition: Geometry.cpp:35
const std::vector< std::int64_t > & input_global_indices() const
Global user indices.
Definition: Geometry.cpp:37
Geometry & operator=(const Geometry &)=delete
Copy Assignment.
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:43
Miscellaneous classes, functions and types.
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:31
mesh::Geometry create_geometry(MPI_Comm comm, const Topology &topology, const fem::CoordinateElement &element, const graph::AdjacencyList< std::int64_t > &cells, std::span< const double > x, int dim, const std::function< std::vector< int >(const graph::AdjacencyList< std::int32_t > &)> &reorder_fn=nullptr)
Build Geometry from input data.
Definition: Geometry.cpp:44