DOLFINx 0.10.0.0
DOLFINx C++ interface
|
A bidirectional map relating entities in one topology to another. More...
#include <EntityMap.h>
Public Member Functions | |
template<typename U> requires std::is_convertible_v<std::remove_cvref_t<U>, std::vector<std::int32_t>> | |
EntityMap (std::shared_ptr< const Topology > topology, std::shared_ptr< const Topology > sub_topology, int dim, U &&sub_topology_to_topology) | |
Constructor of a bidirectional map relating entities of dimension dim in topology and sub_topology. | |
EntityMap (const EntityMap &map)=default | |
Copy constructor. | |
EntityMap (EntityMap &&map)=default | |
Move constructor. | |
std::size_t | dim () const |
Get the topological dimension of the entities related by this EntityMap. | |
std::shared_ptr< const Topology > | topology () const |
Get the (parent) topology. | |
std::shared_ptr< const Topology > | sub_topology () const |
Get the sub-topology. | |
std::vector< std::int32_t > | sub_topology_to_topology (std::span< const std::int32_t > entities, bool inverse) const |
Map entities between the sub-topology and the parent topology. |
A bidirectional map relating entities in one topology to another.
|
inline |
Constructor of a bidirectional map relating entities of dimension dim in topology and sub_topology.
U |
topology | A mesh topology. |
sub_topology | Topology of another mesh. This must be a "sub-topology" of topology, i.e. every entity in sub_topology must also exist in topology. |
dim | Topological dimension of the entities. |
sub_topology_to_topology | List of entities in topology where sub_topology_to_topology[i] is the index in topology corresponding to entity i in sub_topology. |
std::size_t dim | ( | ) | const |
Get the topological dimension of the entities related by this EntityMap.
std::shared_ptr< const Topology > sub_topology | ( | ) | const |
Get the sub-topology.
std::vector< std::int32_t > sub_topology_to_topology | ( | std::span< const std::int32_t > | entities, |
bool | inverse ) const |
Map entities between the sub-topology and the parent topology.
If inverse is false, this function maps a list of this->dim()-dimensional entities from this->sub_topology() to the corresponding entities in this->topology(). If inverse is true, it performs the inverse mapping: from this->topology() to this->sub_topology(). Entities that do not exist in the sub-topology are marked as -1.
entities | List of entity indices in the source topology. |
inverse | If false, maps from this->sub_topology() to this->topology(). If true, maps from this->topology() to this->sub_topology(). |
std::shared_ptr< const Topology > topology | ( | ) | const |
Get the (parent) topology.