DOLFIN-X
DOLFIN-X C++ interface
|
10 #include <dolfinx/common/MPI.h>
11 #include <dolfinx/fem/CoordinateElement.h>
12 #include <dolfinx/graph/AdjacencyList.h>
26 class CoordinateElement;
42 template <
typename AdjacencyList32,
typename Vector64>
45 const Eigen::Ref<
const Eigen::Array<
46 double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>&
x,
48 : _dim(
x.cols()), _dofmap(std::forward<AdjacencyList32>(
dofmap)),
52 if (
x.rows() != (
int)_input_global_indices.size())
53 throw std::runtime_error(
"Size mis-match");
60 _x.resize(
x.rows(), 3);
62 _x.block(0, 0,
x.rows(),
x.cols()) =
x;
88 std::shared_ptr<const common::IndexMap>
index_map()
const;
91 Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor>&
x();
94 const Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor>&
x()
const;
101 Eigen::Vector3d
node(
int n)
const;
109 std::size_t
hash()
const;
119 std::shared_ptr<const common::IndexMap> _index_map;
125 Eigen::Array<double, Eigen::Dynamic, 3, Eigen::RowMajor> _x;
128 std::vector<std::int64_t> _input_global_indices;
134 MPI_Comm comm,
const Topology& topology,
137 const Eigen::Ref<
const Eigen::Array<
double, Eigen::Dynamic, Eigen::Dynamic,
138 Eigen::RowMajor>>& x);
Eigen::Vector3d node(int n) const
Return coordinate array for node n (index is local to the process)
Definition: Geometry.cpp:45
const graph::AdjacencyList< std::int32_t > & dofmap() const
DOF map.
Definition: Geometry.cpp:22
const fem::CoordinateElement & cmap() const
The element that describes the geometry map.
Definition: Geometry.cpp:43
mesh::Geometry create_geometry(MPI_Comm comm, const Topology &topology, const fem::CoordinateElement &coordinate_element, const graph::AdjacencyList< std::int64_t > &cells, const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &x)
Build Geometry FIXME: document.
Definition: Geometry.cpp:67
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:27
Geometry & operator=(const Geometry &)=delete
Copy Assignment.
int dim() const
Return Euclidean dimension of coordinate system.
Definition: Geometry.cpp:20
Geometry(const std::shared_ptr< const common::IndexMap > &index_map, AdjacencyList32 &&dofmap, const fem::CoordinateElement &element, const Eigen::Ref< const Eigen::Array< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &x, Vector64 &&input_global_indices)
Constructor.
Definition: Geometry.h:43
std::shared_ptr< const common::IndexMap > index_map() const
Index map.
Definition: Geometry.cpp:27
~Geometry()=default
Destructor.
std::size_t hash() const
Hash of coordinate values.
Definition: Geometry.cpp:55
Eigen::Array< double, Eigen::Dynamic, 3, Eigen::RowMajor > & x()
Geometry degrees-of-freedom.
Definition: Geometry.cpp:32
const std::vector< std::int64_t > & input_global_indices() const
Global user indices.
Definition: Geometry.cpp:50
Geometry stores the geometry imposed on a mesh.
Definition: Geometry.h:38
This class manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:23