Loading...
Searching...
No Matches
dolfin::MeshData Class Reference

`#include <MeshData.h>`

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

## Public Member Functions

| MeshData ()
| Constructor.
| ~MeshData ()
| Destructor.
const MeshData & | operator= (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 Variable & | operator= (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)

- "facet_orientation" - std:vector <std::size_t> of dimension D - 1

Sub meshes (used by the class SubMesh)

- "parent_vertex_indices" - std::vector <std::size_t> of dimension 0

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

## Member Function Documentation

## array() [1/2]

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.

## array() [2/2]

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.

## create_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.

## erase_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.

## exists()

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.

## operator=()

const MeshData & MeshData::operator= | ( | const MeshData & | data | ) |

Assignment operator

Parameters

  data | (MeshData) Another MeshData object.

## str()

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:

- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/MeshData.h
- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/MeshData.cpp