11 , m_ve_handle(register_attribute_typed<int64_t>(
"m_ve",
PrimitiveType::
Vertex, 1, false, -1))
12 , m_ev_handle(register_attribute_typed<int64_t>(
"m_ev",
PrimitiveType::
Edge, 2, false, -1))
13 , m_ee_handle(register_attribute_typed<int64_t>(
"m_ee",
PrimitiveType::
Edge, 2, false, -1))
65 int64_t lvid_new = -1;
71 for (int64_t i = 0; i < 2; ++i) {
77 assert(lvid_new != -1);
86 default: assert(
false);
99 Eigen::Ref<const RowVectors2l> EV,
100 Eigen::Ref<const RowVectors2l> EE,
101 Eigen::Ref<const VectorXl> VE)
105 std::vector<int64_t> cap{
static_cast<int64_t
>(VE.rows()),
static_cast<int64_t
>(EE.rows())};
144 std::iota(S.data(), S.data() + S.size(), int64_t(0));
158 throw std::runtime_error(
"no tet tuple supported for edgemesh");
162 throw std::runtime_error(
"no tet tuple supported for edgemesh");
165 default: assert(
false);
177 for (int64_t i = 0; i < 2; ++i) {
203 for (
int j = 0; j < 2; ++j) {
210 return Tuple(lvid, -1, -1, eid);
224 "tuple.m_local_vid={} >= 0"
225 " tuple.m_global_cid={} >= 0",
252 for (int64_t j = 0; j < 2; ++j) {
277 std::vector<std::vector<TypedAttributeHandle<int64_t>>> handles(2);
289 return {
Tuple(0, -1, -1, cid),
Tuple(1, -1, -1, cid)};
attribute::TypedAttributeHandle< int64_t > m_ee_handle
Tuple tuple_from_global_ids(int64_t eid, int64_t vid) const
bool is_connectivity_valid() const override
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
bool is_boundary_vertex(const Tuple &tuple) const
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
void initialize_free(int64_t count)
Tuple tuple_from_id(const PrimitiveType type, const int64_t gid) const override
internal function that returns the tuple of requested type, and has the global index cid
Tuple edge_tuple_from_id(int64_t id) const
std::vector< Tuple > orient_vertices(const Tuple &tuple) const override
attribute::TypedAttributeHandle< int64_t > m_ev_handle
Tuple vertex_tuple_from_id(int64_t id) const
bool is_ccw(const Tuple &tuple) const override
TODO this needs dimension?
attribute::TypedAttributeHandle< int64_t > m_ve_handle
void initialize(Eigen::Ref< const RowVectors2l > E, bool is_free=false)
bool is_valid(const Tuple &tuple) const final override
check validity of tuple including its hash
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes() const override
Returns a vector of vectors of attribute handles.
A Curiously Recurring Template Pattern shim to enable generic specialization of functions.
int64_t id(const Tuple &tuple, PrimitiveType type) const
return the global id of the Tuple of the given dimension
void set_capacities(std::vector< int64_t > capacities)
int64_t capacity(PrimitiveType type) const
read in the m_capacities return the upper bound for the number of entities of the given dimension
virtual bool is_valid(const Tuple &tuple) const
check validity of tuple including its hash
const attribute::Accessor< char > get_flag_accessor(PrimitiveType type) const
CachingBaseType & index_access()
ConstMapResult< D > const_vector_attribute(const ArgType &t) const
T const_scalar_attribute(const int64_t index) const
MapResult< D > vector_attribute(const int64_t index)
T & scalar_attribute(const int64_t index)
ConstMapResult< D > const_vector_attribute(const int64_t index) const
spdlog::logger & logger()
Retrieves the current logger.
RowVectors< int64_t, 2 > RowVectors2l
std::tuple< RowVectors2l, VectorXl > edgemesh_topology_initialization(Eigen::Ref< const RowVectors2l > E)