18 , m_coordinate_handle(coordinate)
23 const std::vector<Tuple>&,
24 const std::vector<Tuple>& top_dimension_tuples_after)
const
29 assert(accessor.dimension() == 3);
31 for (
const auto& t : top_dimension_tuples_after) {
33 assert(tet_vertices.size() == 4);
34 const Eigen::Vector3<T> p0 = accessor.const_vector_attribute(tet_vertices[0]);
35 const Eigen::Vector3<T> p1 = accessor.const_vector_attribute(tet_vertices[1]);
36 const Eigen::Vector3<T> p2 = accessor.const_vector_attribute(tet_vertices[2]);
37 const Eigen::Vector3<T> p3 = accessor.const_vector_attribute(tet_vertices[3]);
41 "fail inversion check, volume = {}",
67 assert(accessor.dimension() == 2);
69 for (
const Tuple& tuple : top_dimension_tuples_after) {
70 Tuple ccw_tuple = tuple;
71 if (!mymesh.
is_ccw(tuple)) {
74 const Eigen::Vector2<T> p0 = accessor.const_vector_attribute(ccw_tuple);
75 const Eigen::Vector2<T> p1 = accessor.const_vector_attribute(
77 const Eigen::Vector2<T> p2 = accessor.const_vector_attribute(
78 mymesh.
switch_tuples(ccw_tuple, {PrimitiveType::Edge, PrimitiveType::Vertex}));
87 assert(accessor.dimension() == 1);
89 for (
const Tuple& tuple : top_dimension_tuples_after) {
90 T p0 = accessor.const_scalar_attribute(tuple);
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const override
switch the orientation of the Tuple of the given dimension
const attribute::Accessor< T, Derived, Dim > create_const_accessor(const attribute::TypedAttributeHandle< T > &handle) const
constructs a const accessor that is aware of the derived mesh's type
Tuple switch_tuples(const Tuple &tuple, const ContainerType &op_sequence) const
Performs a sequence of switch_tuple operations in the order specified in op_sequence.
SimplexInversionInvariant(const Mesh &m, const TypedAttributeHandle< T > &coordinate)
bool after(const std::vector< Tuple > &, const std::vector< Tuple > &top_dimension_tuples_after) const override
we assume with local vid order (v0,v1,v2,v3) has positive volume (orient3d(v0,v1,v2,...
std::vector< Tuple > orient_vertices(const Tuple &t) const override
Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const final override
switch the orientation of the Tuple of the given dimension
bool is_ccw(const Tuple &tuple) const final override
TODO this needs dimension?
Handle that represents attributes for some mesh.
int wmtk_orient3d(const Eigen::Ref< const Eigen::Vector3< Rational >> &p0, const Eigen::Ref< const Eigen::Vector3< Rational >> &p1, const Eigen::Ref< const Eigen::Vector3< Rational >> &p2, const Eigen::Ref< const Eigen::Vector3< Rational >> &p3)
int wmtk_orient1d(const Rational &p0, const Rational &p1)
int wmtk_orient2d(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y)
spdlog::logger & logger()
Retrieves the current logger.