10 const std::shared_ptr<function::PerSimplexFunction>& func,
12 :
Invariant(func->mesh(), coordinate.has_value(), true, true)
15 , m_coordinate_handle(coordinate)
25 const auto coord = accessor.const_vector_attribute(simplex.
tuple());
27 for (int64_t i = 0; i < accessor.dimension(); ++i) {
28 if (!coord[i].is_rounded()) {
38 const std::vector<Tuple>& top_dimension_tuples_before,
39 const std::vector<Tuple>& top_dimension_tuples_after)
const
43 auto max = [&](
const std::vector<Tuple>& tuples) {
44 double value = std::numeric_limits<double>::lowest();
45 for (
const auto& t : tuples) {
55 const double after = max(top_dimension_tuples_after);
decltype(auto) parent_scope(Functor &&f, Args &&... args) const
Evaluate the passed in function inside the parent scope.
Handle that represents attributes for some mesh.
const Mesh & mesh() const
bool after(const std::vector< Tuple > &top_dimension_tuples_before, const std::vector< Tuple > &top_dimension_tuples_after) const override
std::shared_ptr< function::PerSimplexFunction > m_func
const std::optional< TypedAttributeHandle< Rational > > m_coordinate_handle
const PrimitiveType m_type
bool before(const simplex::Simplex &simplex) const override
MaxFunctionInvariant(const PrimitiveType type, const std::shared_ptr< function::PerSimplexFunction > &func, const std::optional< TypedAttributeHandle< Rational >> &coordinate={})
const Tuple & tuple() const