Wildmeshing Toolkit
Loading...
Searching...
No Matches
PerSimplexFunction.cpp
Go to the documentation of this file.
1
#include "
PerSimplexFunction.hpp
"
2
3
#include <
wmtk/Mesh.hpp
>
4
5
namespace
wmtk::function
{
6
PerSimplexFunction::PerSimplexFunction
(
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
19
int64_t
PerSimplexFunction::embedded_dimension
()
const
20
{
21
auto
res =
attribute_handle
().
dimension
();
22
assert(res > 0);
23
return
res;
24
}
25
}
// namespace wmtk::function
Mesh.hpp
PerSimplexFunction.hpp
wmtk::Mesh
Definition
Mesh.hpp:95
wmtk::Rational
Definition
Rational.hpp:13
wmtk::attribute::MeshAttributeHandle
Definition
MeshAttributeHandle.hpp:28
wmtk::attribute::MeshAttributeHandle::holds
bool holds() const
Definition
MeshAttributeHandle.hpp:169
wmtk::attribute::MeshAttributeHandle::dimension
int64_t dimension() const
Definition
MeshAttributeHandle.cpp:44
wmtk::attribute::MeshAttributeHandle::is_same_mesh
bool is_same_mesh(const Mesh &) const
Definition
MeshAttributeHandle.cpp:12
wmtk::function::PerSimplexFunction::embedded_dimension
int64_t embedded_dimension() const
Definition
PerSimplexFunction.cpp:19
wmtk::function::PerSimplexFunction::m_mesh
const Mesh & m_mesh
Definition
PerSimplexFunction.hpp:52
wmtk::function::PerSimplexFunction::attribute_handle
const attribute::MeshAttributeHandle & attribute_handle() const
Definition
PerSimplexFunction.hpp:42
wmtk::function::PerSimplexFunction::PerSimplexFunction
PerSimplexFunction(const Mesh &mesh, const PrimitiveType primitive_type, const attribute::MeshAttributeHandle &variable_attribute_handle)
Definition
PerSimplexFunction.cpp:6
wmtk::function::PerSimplexFunction::m_handle
attribute::MeshAttributeHandle m_handle
Definition
PerSimplexFunction.hpp:51
wmtk::function
Definition
Function.cpp:5
wmtk::PrimitiveType
PrimitiveType
Definition
PrimitiveType.hpp:9
src
wmtk
function
PerSimplexFunction.cpp
Generated by
1.9.8