Geometry stores the geometry imposed on a mesh.
More...
#include <Geometry.h>
|
using | value_type = T |
| Value type.
|
|
|
template<typename U , typename V , typename W >
requires std::is_convertible_v<std::remove_cvref_t<U>, std::vector<std::vector<std::int32_t>>> and std::is_convertible_v<std::remove_cvref_t<V>, std::vector<T>> and std::is_convertible_v<std::remove_cvref_t<W>, std::vector<std::int64_t>> |
| Geometry (std::shared_ptr< const common::IndexMap > index_map, U &&dofmaps, const std::vector< fem::CoordinateElement< typename std::remove_reference_t< typename V::value_type > > > &elements, V &&x, int dim, W &&input_global_indices) |
| Constructor of object that holds mesh geometry data.
|
|
| Geometry (const Geometry &)=default |
| Copy constructor.
|
|
| Geometry (Geometry &&)=default |
| Move constructor.
|
|
| ~Geometry ()=default |
| Destructor.
|
|
Geometry & | operator= (const Geometry &)=delete |
| Copy assignment.
|
|
Geometry & | operator= (Geometry &&)=default |
| Move assignment.
|
|
int | dim () const |
| Return dimension of the Euclidean coordinate system.
|
|
MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const std::int32_t, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 > > | dofmap () const |
| DofMap for the geometry.
|
|
MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const std::int32_t, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 > > | dofmap (std::size_t i) const |
| Degree-of-freedom map associated with the i th coordinate map element in the geometry.
|
|
std::shared_ptr< const common::IndexMap > | index_map () const |
| Index map for the geometry 'degrees-of-freedom'.
|
|
std::span< const value_type > | x () const |
| Access geometry degrees-of-freedom data (const version).
|
|
std::span< value_type > | x () |
| Access geometry degrees-of-freedom data (non-const version).
|
|
const std::vector< fem::CoordinateElement< value_type > > & | cmaps () const |
| The elements that describes the geometry map.
|
|
const fem::CoordinateElement< value_type > & | cmap () const |
| The element that describes the geometry map.
|
|
const std::vector< std::int64_t > & | input_global_indices () const |
| Global user indices.
|
|
template<std::floating_point T>
class dolfinx::mesh::Geometry< T >
Geometry stores the geometry imposed on a mesh.
◆ Geometry()
template<std::floating_point T>
template<typename U , typename V , typename W >
requires std::is_convertible_v<std::remove_cvref_t<U>, std::vector<std::vector<std::int32_t>>> and std::is_convertible_v<std::remove_cvref_t<V>, std::vector<T>> and std::is_convertible_v<std::remove_cvref_t<W>, std::vector<std::int64_t>>
Geometry |
( |
std::shared_ptr< const common::IndexMap > | index_map, |
|
|
U && | dofmaps, |
|
|
const std::vector< fem::CoordinateElement< typename std::remove_reference_t< typename V::value_type > > > & | elements, |
|
|
V && | x, |
|
|
int | dim, |
|
|
W && | input_global_indices ) |
|
inline |
Constructor of object that holds mesh geometry data.
The geometry 'degree-of-freedom map' is a logically rectangular array (row-major) where each row corresponds to a cell, and the columns are the indices in the coordinate array of the cell coordinate degree-of-freedom. For each cell type there is a geometry degree-of-freedom map.
- Parameters
-
[in] | index_map | Index map associated with the geometry degrees-of-freedom. |
[in] | dofmaps | The geometry (point) dofmaps for each cell type in the mesh. For a cell of a given type, the dofmap gives the position in the point array of each local geometry node of the cell. Each cell type has its own dofmap. Each dofmap uses row-major storage. |
[in] | elements | Elements that describe cell geometry maps. element[i] is the coordinate element associated with dofmaps[i] . |
[in] | x | Point coordinates. The shape is (num_points, 3) and the storage is row-major. |
[in] | dim | The geometric dimension (0 < dim <= 3 ). |
[in] | input_global_indices | 'Global' input index of each point, commonly from a mesh input file. |
◆ cmap()
template<std::floating_point T>
The element that describes the geometry map.
- Returns
- The coordinate/geometry element
◆ cmaps()
template<std::floating_point T>
The elements that describes the geometry map.
The coordinate element cmaps()[i]
corresponds to the degree-of-freedom map dofmap(i)
.
- Returns
- The coordinate/geometry elements.
◆ dofmap() [1/2]
template<std::floating_point T>
MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const std::int32_t, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 > > dofmap |
( |
| ) |
const |
|
inline |
DofMap for the geometry.
- Returns
- A 2D array with shape
(num_cells, dofs_per_cell)
.
◆ dofmap() [2/2]
template<std::floating_point T>
MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const std::int32_t, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 > > dofmap |
( |
std::size_t | i | ) |
const |
|
inline |
Degree-of-freedom map associated with the i
th coordinate map element in the geometry.
- Parameters
-
[in] | i | Index of the requested degree-of-freedom map. The degree-of-freedom map corresponds to the geometry element cmaps()[i] . |
- Returns
- A dofmap array, with shape
(num_cells, dofs_per_cell)
.
◆ index_map()
template<std::floating_point T>
Index map for the geometry 'degrees-of-freedom'.
- Returns
- Index map for the geometry dofs.
◆ x() [1/2]
template<std::floating_point T>
Access geometry degrees-of-freedom data (non-const version).
- Returns
- The flattened row-major geometry data, where the shape is
(num_points, 3)
.
◆ x() [2/2]
template<std::floating_point T>
Access geometry degrees-of-freedom data (const version).
- Returns
- The flattened row-major geometry data, where the shape is
(num_points, 3)
.
The documentation for this class was generated from the following files: