Wildmeshing Toolkit
Loading...
Searching...
No Matches
PerSimplexFunction.cpp
Go to the documentation of this file.
2
3#include <wmtk/Mesh.hpp>
4
5namespace wmtk::function {
7 const Mesh& mesh,
8 const PrimitiveType primitive_type,
9 const attribute::MeshAttributeHandle& variable_attribute_handle)
10 : m_handle(variable_attribute_handle)
11 , m_mesh(mesh)
12 , m_primitive_type(primitive_type)
13{
14 assert(variable_attribute_handle.is_same_mesh(m_mesh));
15 assert(m_handle.holds<double>() || m_handle.holds<Rational>());
16}
17
18
20{
21 auto res = attribute_handle().dimension();
22 assert(res > 0);
23 return res;
24}
25} // namespace wmtk::function
const attribute::MeshAttributeHandle & attribute_handle() const
PerSimplexFunction(const Mesh &mesh, const PrimitiveType primitive_type, const attribute::MeshAttributeHandle &variable_attribute_handle)
attribute::MeshAttributeHandle m_handle