Wildmeshing Toolkit
Function.cpp
Go to the documentation of this file.
1
#include "
Function.hpp
"
2
3
#include <
wmtk/Mesh.hpp
>
4
5
namespace
wmtk::function
{
6
7
Function::Function
(
Mesh
& mesh,
const
attribute::MeshAttributeHandle
& handle)
8
: m_mesh(mesh)
9
, m_handle(handle)
10
{
11
assert(handle.
holds
<
double
>() || handle.
holds
<
Rational
>());
12
assert(handle.
is_same_mesh
(
m_mesh
));
13
}
14
15
int64_t
Function::embedded_dimension
()
const
16
{
17
assert(
m_handle
.
is_valid
());
18
19
auto
res =
m_handle
.
dimension
();
20
assert(res > 0);
21
return
res;
22
}
23
24
25
}
// namespace wmtk::function
Function.hpp
Mesh.hpp
wmtk::Mesh
Definition:
Mesh.hpp:106
wmtk::Rational
Definition:
Rational.hpp:13
wmtk::attribute::MeshAttributeHandle
Definition:
MeshAttributeHandle.hpp:26
wmtk::attribute::MeshAttributeHandle::holds
bool holds() const
Definition:
MeshAttributeHandle.hpp:168
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::attribute::MeshAttributeHandle::is_valid
bool is_valid() const
Definition:
MeshAttributeHandle.cpp:38
wmtk::function::Function::embedded_dimension
int64_t embedded_dimension() const
Definition:
Function.cpp:15
wmtk::function::Function::Function
Function(Mesh &mesh, const attribute::MeshAttributeHandle &handle)
Definition:
Function.cpp:7
wmtk::function::Function::m_handle
attribute::MeshAttributeHandle m_handle
Definition:
Function.hpp:58
wmtk::function::Function::m_mesh
Mesh & m_mesh
Definition:
Function.hpp:57
wmtk::function
Definition:
Function.cpp:5
src
wmtk
function
Function.cpp
Generated by
1.9.1