Wildmeshing Toolkit
make_cast_attribute_transfer_strategy.cpp
Go to the documentation of this file.
1
#include "
CastAttributeTransferStrategy.hpp
"
2
#include "
wmtk/operations/attribute_update/AttributeTransferStrategy.hpp
"
3
4
namespace
wmtk::operations::attribute_update
{
5
6
7
std::shared_ptr<AttributeTransferStrategyBase>
make_cast_attribute_transfer_strategy
(
8
const
wmtk::attribute::MeshAttributeHandle
& source,
9
const
wmtk::attribute::MeshAttributeHandle
& target)
10
{
11
return
std::visit(
12
[&](
const
auto
& s,
13
const
auto
& t) noexcept -> std::shared_ptr<AttributeTransferStrategyBase> {
14
using
SType =
typename
std::decay_t<decltype(s)>::Type;
15
using
TType =
typename
std::decay_t<decltype(t)>::Type;
16
17
return
std::make_shared<CastAttributeTransferStrategy<TType, SType>>(target, source);
18
},
19
source.
handle
(),
20
target.
handle
());
21
}
22
23
}
// namespace wmtk::operations::attribute_update
AttributeTransferStrategy.hpp
CastAttributeTransferStrategy.hpp
wmtk::attribute::MeshAttributeHandle
Definition:
MeshAttributeHandle.hpp:26
wmtk::attribute::MeshAttributeHandle::handle
HandleVariant & handle()
Definition:
MeshAttributeHandle.hpp:131
wmtk::operations::attribute_update
Definition:
CastAttributeTransferStrategy.hpp:13
wmtk::operations::attribute_update::make_cast_attribute_transfer_strategy
std::shared_ptr< AttributeTransferStrategyBase > make_cast_attribute_transfer_strategy(const wmtk::attribute::MeshAttributeHandle &source, const wmtk::attribute::MeshAttributeHandle &target)
Definition:
make_cast_attribute_transfer_strategy.cpp:7
src
wmtk
operations
attribute_update
make_cast_attribute_transfer_strategy.cpp
Generated by
1.9.1