Loading...
Searching...
No Matches
MeshTags< T > Class Template Reference

MeshTags associate values with mesh topology entities. More...

`#include <MeshTags.h>`

## Public Member Functions

template<typename U, typename V> requires std::is_convertible_v<std::remove_cvref_t<U>, std::vector<std::int32_t>> and std::is_convertible_v<std::remove_cvref_t<V>, std::vector<T>>
| MeshTags (std::shared_ptr< const Topology > topology, int dim, U &&indices, V &&values)
| Create a MeshTag from entities of given dimension on a mesh.
| MeshTags (const MeshTags &tags)=default
| Copy constructor.
| MeshTags (MeshTags &&tags)=default
| Move constructor.
| ~MeshTags ()=default
| Destructor.
MeshTags & | operator= (const MeshTags &tags)=default
| Move assignment.
MeshTags & | operator= (MeshTags &&tags)=default
| Move assignment.
std::vector< std::int32_t > | find (const T value) const
| Find all entities with a given tag value.
std::span< const std::int32_t > | indices () const
std::span< const T > | values () const
| Values attached to topology entities.
int | dim () const
| Return topological dimension of tagged entities.
std::shared_ptr< const Topology > | topology () const
| Return topology.

## Public Attributes

std::string | name = "mesh_tags"
| Name.

## Detailed Description

template<typename T>
class dolfinx::mesh::MeshTags< T >

MeshTags associate values with mesh topology entities.

The entity index (local to process) identifies the entity. MeshTags is a sparse data storage class; it allows tags to be associated with an arbitrary subset of mesh entities. An entity can have only one associated tag.

Template Parameters

  Type |

## Constructor & Destructor Documentation

## MeshTags()

template<typename T>
template<typename U, typename V>
requires std::is_convertible_v<std::remove_cvref_t<U>, std::vector<std::int32_t>> and std::is_convertible_v<std::remove_cvref_t<V>, std::vector<T>>

MeshTags | ( | std::shared_ptr< const Topology > | topology,
|  | int | dim,
|  | U && | indices,
|  | V && | values )

inline

Create a MeshTag from entities of given dimension on a mesh.

Parameters

  [in] | topology | Mesh topology on which the tags are associated.
  [in] | dim | Topological dimension of mesh entities to tag.
  [in] | indices | List of entity indices (indices local to the process).
  [in] | values | List of values for each index in indices. The size must be equal to the size of indices.

Precondition
  indices must be sorted and unique.

## Member Function Documentation

## find()

template<typename T>

std::vector< std::int32_t > find | ( | const T | value | ) | const

inline

Find all entities with a given tag value.

Parameters

  [in] | value | The value

Returns
  Indices of tagged entities. The indices are sorted.

## indices()

template<typename T>

std::span< const std::int32_t > indices | ( |  | ) | const

inline

Indices of tagged topology entities (local-to-process). The indices are sorted.

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

- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/io/XDMFFile.h
- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/mesh/MeshTags.h