DOLFIN
DOLFIN C++ interface
Public Member Functions | List of all members
dolfin::MeshGeometry Class Reference

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

#include <MeshGeometry.h>

Public Member Functions

 MeshGeometry ()
 Create empty set of coordinates.
 
 MeshGeometry (const MeshGeometry &geometry)
 Copy constructor.
 
 ~MeshGeometry ()
 Destructor.
 
const MeshGeometryoperator= (const MeshGeometry &geometry)
 Assignment.
 
std::size_t dim () const
 Return Euclidean dimension of coordinate system.
 
std::size_t degree () const
 Return polynomial degree of coordinate field.
 
std::size_t num_vertices () const
 Return the number of vertex coordinates.
 
std::size_t num_points () const
 
const double * vertex_coordinates (std::size_t point_index)
 Get vertex coordinates.
 
const double * point_coordinates (std::size_t point_index)
 Get vertex coordinates.
 
double x (std::size_t n, std::size_t i) const
 Return value of coordinate with local index n in direction i.
 
const double * x (std::size_t n) const
 Return array of values for coordinate with local index n.
 
std::vector< double > & x ()
 Return array of values for all coordinates.
 
const std::vector< double > & x () const
 Return array of values for all coordinates.
 
Point point (std::size_t n) const
 Return coordinate with local index n as a 3D point value.
 
void init (std::size_t dim, std::size_t degree)
 Initialize coordinate list to given dimension and degree.
 
void init_entities (const std::vector< std::size_t > &num_entities)
 Initialise entities. To be called after init.
 
std::size_t num_entity_coordinates (std::size_t entity_dim) const
 Get the number of coordinate points per entity for this degree.
 
std::size_t get_entity_index (std::size_t entity_dim, std::size_t order, std::size_t index) const
 Get the index for an entity point in coordinates.
 
void set (std::size_t local_index, const double *x)
 Set value of coordinate.
 
std::size_t hash () const
 
std::string str (bool verbose) const
 Return informal string representation (pretty-print)
 

Detailed Description

MeshGeometry stores the geometry imposed on a mesh.

Currently, the geometry is represented by the set of coordinates for the vertices of a mesh, but other representations are possible.

Member Function Documentation

◆ hash()

std::size_t MeshGeometry::hash ( ) const

Hash of coordinate values

Returns std::size_t A tree-hashed value of the coordinates over all MPI processes

◆ num_points()

std::size_t dolfin::MeshGeometry::num_points ( ) const
inline

Return the total number of points in the geometry, located on any entity


The documentation for this class was generated from the following files: