25#ifndef __BITPIT_ADAPTION_HPP__
26#define __BITPIT_ADAPTION_HPP__
29#include <unordered_map>
30#include <unordered_set>
65 : type(TYPE_UNKNOWN), entity(ENTITY_UNKNOWN), rank(-1)
69 Info(Type user_type, Entity user_entity,
int user_rank = -1)
70 : type(user_type), entity(user_entity), rank(user_rank)
77 std::vector<long> previous;
78 std::vector<long> current;
88 std::size_t
create(Type type, Entity entity,
int rank = -1);
91 const Info &
at(std::size_t
id)
const;
93 const std::vector<Info> &
data()
const noexcept;
94 std::vector<Info> &
data()
noexcept;
99 std::vector<Info>
dump();
102 typedef std::tuple<int, int, int> infoData_t;
104 std::unordered_map<infoData_t, std::size_t, utils::hashing::hash<infoData_t>> m_cache;
105 std::unordered_set<int> m_cachedTypes;
106 std::vector<Info> m_collection;
121 virtual void update(
const std::vector<adaption::Info> &adaptionData) = 0;
128 std::vector<long> m_numbering;
129 std::vector<long> m_mapping;
141 void update(
const std::vector<adaption::Info> &adaptionData)
override;
The CellFlatMapping class allows to generate a cell mapping between an id-base numeration to a contin...
void update(const std::vector< adaption::Info > &adaptionData) override
The FlatMapping class allows to generate a mapping between an id-base numeration to a continuous-inde...
const std::vector< long > & getMapping() const
const std::vector< long > & getNumbering() const
The PatchKernel class provides an interface for defining patches.
The InfoCollection class is a container that holds one or more adaption info items.
const std::vector< Info > & data() const noexcept
Info & operator[](std::size_t id)
std::vector< Info > dump()
Info & at(std::size_t id)
The Info struct defines the information associated to an adaption.