Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/d8/dfb/classdolfinx_1_1mesh_1_1Geometry.html
DOLFINx  0.5.1
DOLFINx C++ interface
Public Member Functions | List of all members
Geometry Class Reference

Geometry stores the geometry imposed on a mesh. More...

#include <Geometry.h>

Public Member Functions

template<typename AdjacencyList32 , typename Array , typename Vector64 >
 Geometry (const std::shared_ptr< const common::IndexMap > &index_map, AdjacencyList32 &&dofmap, const fem::CoordinateElement &element, Array &&x, int dim, Vector64 &&input_global_indices)
 Constructor. More...
 
 Geometry (const Geometry &)=default
 Copy constructor.
 
 Geometry (Geometry &&)=default
 Move constructor.
 
 ~Geometry ()=default
 Destructor.
 
Geometryoperator= (const Geometry &)=delete
 Copy Assignment.
 
Geometryoperator= (Geometry &&)=default
 Move Assignment.
 
int dim () const
 Return Euclidean dimension of coordinate system.
 
const graph::AdjacencyList< std::int32_t > & dofmap () const
 DOF map.
 
std::shared_ptr< const common::IndexMapindex_map () const
 Index map.
 
std::span< const double > x () const
 Access geometry degrees-of-freedom data (const version). More...
 
std::span< double > x ()
 Access geometry degrees-of-freedom data (non-const version). More...
 
const fem::CoordinateElementcmap () const
 The element that describes the geometry map. More...
 
const std::vector< std::int64_t > & input_global_indices () const
 Global user indices.
 

Detailed Description

Geometry stores the geometry imposed on a mesh.

Constructor & Destructor Documentation

◆ Geometry()

Geometry ( const std::shared_ptr< const common::IndexMap > &  index_map,
AdjacencyList32 &&  dofmap,
const fem::CoordinateElement element,
Array &&  x,
int  dim,
Vector64 &&  input_global_indices 
)
inline

Constructor.

Parameters
[in]index_mapIndex map associated with the geometry dofmap
[in]dofmapThe geometry (point) dofmap. For a cell, it gives the position in the point array of each local geometry node
[in]elementThe element that describes the cell geometry map
[in]xThe point coordinates. It is a std::vector<double> and uses row-major storage. The shape is (num_points, 3).
[in]dimThe geometric dimension (0 < dim <= 3)
[in]input_global_indicesThe 'global' input index of each point, commonly from a mesh input file. The type is std:vector<std::int64_t>.

Member Function Documentation

◆ cmap()

const fem::CoordinateElement & cmap ( ) const

The element that describes the geometry map.

Returns
The coordinate/geometry element

◆ x() [1/2]

std::span< double > x ( )

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]

std::span< const double > x ( ) const

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: