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

#include <MeshData.h>

Inheritance diagram for dolfin::MeshData:
Inheritance graph
[legend]
Collaboration diagram for dolfin::MeshData:
Collaboration graph
[legend]

Public Member Functions

 MeshData ()
 Constructor.
 
 ~MeshData ()
 Destructor.
 
const MeshDataoperator= (const MeshData &data)
 
void clear ()
 Clear all data.
 
bool exists (std::string name, std::size_t dim) const
 
std::vector< std::size_t > & create_array (std::string name, std::size_t dim)
 
std::vector< std::size_t > & array (std::string name, std::size_t dim)
 
const std::vector< std::size_t > & array (std::string name, std::size_t dim) const
 
void erase_array (const std::string name, std::size_t dim)
 
std::string str (bool verbose) const
 
- Public Member Functions inherited from dolfin::Variable
 Variable ()
 Create unnamed variable.
 
 Variable (const std::string name, const std::string label)
 Create variable with given name and label.
 
 Variable (const Variable &variable)
 Copy constructor.
 
virtual ~Variable ()
 Destructor.
 
const Variableoperator= (const Variable &variable)
 Assignment operator.
 
void rename (const std::string name, const std::string label)
 Rename variable.
 
std::string name () const
 Return name.
 
std::string label () const
 Return label (description)
 
std::size_t id () const
 

Friends

class XMLMesh
 Friends.
 

Additional Inherited Members

- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

The class MeshData is a container for auxiliary mesh data, represented either as arrays or maps. Each dataset is identified by a unique user-specified string. Only std::size_t-valued data are currently supported.

Auxiliary mesh data may be attached to a mesh by users as a convenient way to store data associated with a mesh. It is also used internally by DOLFIN to communicate data associated with meshes. The following named mesh data are recognized by DOLFIN:

Facet orientation (used for assembly over interior facets)

Sub meshes (used by the class SubMesh)

Note to developers: use underscore in names in place of spaces.

Member Function Documentation

std::vector< std::size_t > & MeshData::array ( std::string  name,
std::size_t  dim 
)

Return array with given name (returning zero if data is not available)

Parameters
name(std::string) The name of the array.
dim(std::size_t) Dimension.
Returns
std::vector<std::size_t> The array.
const std::vector< std::size_t > & MeshData::array ( std::string  name,
std::size_t  dim 
) const

Return array with given name (returning zero if data is not available)

Parameters
name(std::string) The name of the array.
dim(std::size_t) Dimension.
Returns
std::vector<std::size_t> The array.
std::vector< std::size_t > & MeshData::create_array ( std::string  name,
std::size_t  dim 
)

Create array (vector) with given name and size

Parameters
name(std::string) The name of the array.
dim(std::size_t) Dimension.
Returns
std::vector<std::size_t> The array.
void MeshData::erase_array ( const std::string  name,
std::size_t  dim 
)

Erase array with given name

Parameters
name(std::string) The name of the array.
dim(std::size_t) Dimension.
bool MeshData::exists ( std::string  name,
std::size_t  dim 
) const

Check is array exists

Parameters
name(std::string) The name of the array.
dim(std::size_t)
Returns
bool True is array exists, false otherwise.
const MeshData & MeshData::operator= ( const MeshData data)

Assignment operator

Parameters
data(MeshData) Another MeshData object.
std::string MeshData::str ( bool  verbose) const
virtual

Return informal string representation (pretty-print)

Parameters
verbose(bool) Flag to turn on additional output.
Returns
std::string An informal representation.

Reimplemented from dolfin::Variable.


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