|
DOLFIN
DOLFIN C++ interface
|
#include <MeshValueCollection.h>


Public Member Functions | |
| MeshValueCollection () | |
| MeshValueCollection (std::shared_ptr< const Mesh > mesh) | |
| MeshValueCollection (const MeshFunction< T > &mesh_function) | |
| MeshValueCollection (std::shared_ptr< const Mesh > mesh, std::size_t dim) | |
| MeshValueCollection (std::shared_ptr< const Mesh > mesh, const std::string filename) | |
| ~MeshValueCollection () | |
| Destructor. | |
| MeshValueCollection< T > & | operator= (const MeshFunction< T > &mesh_function) |
| MeshValueCollection< T > & | operator= (const MeshValueCollection< T > &mesh_value_collection) |
| void | init (std::shared_ptr< const Mesh > mesh, std::size_t dim) |
| void | init (std::size_t dim) |
| std::size_t | dim () const |
| std::shared_ptr< const Mesh > | mesh () const |
| bool | empty () const |
| std::size_t | size () const |
| bool | set_value (std::size_t cell_index, std::size_t local_entity, const T &value) |
| bool | set_value (std::size_t entity_index, const T &value) |
| T | get_value (std::size_t cell_index, std::size_t local_entity) |
| std::map< std::pair< std::size_t, std::size_t >, T > & | values () |
| const std::map< std::pair< std::size_t, std::size_t >, T > & | values () const |
| void | clear () |
| Clear all values. | |
| 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 |
Additional Inherited Members | |
| Public Attributes inherited from dolfin::Variable | |
| Parameters | parameters |
| Parameters. | |
The MeshValueCollection class can be used to store data associated with a subset of the entities of a mesh of a given topological dimension. It differs from the MeshFunction class in two ways. First, data does not need to be associated with all entities (only a subset). Second, data is associated with entities through the corresponding cell index and local entity number (relative to the cell), not by global entity index, which means that data may be stored robustly to file.
| dolfin::MeshValueCollection< T >::MeshValueCollection | ( | ) |
Create empty mesh value collection
|
explicit |
|
explicit |
Create a mesh value collection from a MeshFunction
| mesh_function | (MeshFunction<T>) The mesh function for creating a MeshValueCollection. |
| dolfin::MeshValueCollection< T >::MeshValueCollection | ( | std::shared_ptr< const Mesh > | mesh, |
| std::size_t | dim ) |
| dolfin::MeshValueCollection< T >::MeshValueCollection | ( | std::shared_ptr< const Mesh > | mesh, |
| const std::string | filename ) |
| std::size_t dolfin::MeshValueCollection< T >::dim | ( | ) | const |
Return topological dimension
| bool dolfin::MeshValueCollection< T >::empty | ( | ) | const |
Return true if the subset is empty
| T dolfin::MeshValueCollection< T >::get_value | ( | std::size_t | cell_index, |
| std::size_t | local_entity ) |
Get marker value for given entity defined by a cell index and a local entity index
| cell_index | (std::size_t) The index of the cell. |
| local_entity | (std::size_t) The local index of the entity relative to the cell. |
| void dolfin::MeshValueCollection< T >::init | ( | std::shared_ptr< const Mesh > | mesh, |
| std::size_t | dim ) |
Initialise MeshValueCollection with mesh and dimension
| void dolfin::MeshValueCollection< T >::init | ( | std::size_t | dim | ) |
| std::shared_ptr< const Mesh > dolfin::MeshValueCollection< T >::mesh | ( | ) | const |
Return associated mesh
| MeshValueCollection< T > & dolfin::MeshValueCollection< T >::operator= | ( | const MeshFunction< T > & | mesh_function | ) |
Assignment operator
| mesh_function | (MeshFunction) A MeshFunction object used to construct a MeshValueCollection. |
| MeshValueCollection< T > & dolfin::MeshValueCollection< T >::operator= | ( | const MeshValueCollection< T > & | mesh_value_collection | ) |
Assignment operator
| mesh_value_collection | (MeshValueCollection) A MeshValueCollection object used to construct a MeshValueCollection. |
| bool dolfin::MeshValueCollection< T >::set_value | ( | std::size_t | cell_index, |
| std::size_t | local_entity, | ||
| const T & | value ) |
Set marker value for given entity defined by a cell index and a local entity index
| cell_index | (std::size_t) The index of the cell. |
| local_entity | (std::size_t) The local index of the entity relative to the cell. |
| value | (T) The value of the marker. |
| bool dolfin::MeshValueCollection< T >::set_value | ( | std::size_t | entity_index, |
| const T & | value ) |
Set value for given entity index
| entity_index | (std::size_t) Index of the entity. |
| value | (T). The value of the marker. |
| std::size_t dolfin::MeshValueCollection< T >::size | ( | ) | const |
Return size (number of entities in subset)
|
virtual |
Return informal string representation (pretty-print)
| verbose | (bool) Flag to turn on additional output. |
Reimplemented from dolfin::Variable.
| std::map< std::pair< std::size_t, std::size_t >, T > & dolfin::MeshValueCollection< T >::values | ( | ) |
Get all values
| const std::map< std::pair< std::size_t, std::size_t >, T > & dolfin::MeshValueCollection< T >::values | ( | ) | const |
Get all values (const version)