OGS
ExtrapolatorData.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14
17
18namespace ProcessLib
19{
28{
29public:
30 ExtrapolatorData() = default;
31
42 std::unique_ptr<NumLib::Extrapolator>&& extrapolator,
43 NumLib::LocalToGlobalIndexMap const* const dof_table_single_component,
44 bool const manage_storage)
45 : _extrapolator(std::move(extrapolator)),
46 _dof_table_single_component(dof_table_single_component),
47 _manage_storage(manage_storage)
48 {
49 }
50
52 : _extrapolator(std::move(other._extrapolator)),
55 {
56 other._manage_storage = false;
57 other._dof_table_single_component = nullptr;
58 }
59
61 {
62 cleanup();
63 _manage_storage = other._manage_storage;
64 _dof_table_single_component = other._dof_table_single_component;
65 _extrapolator = std::move(other._extrapolator);
66 other._dof_table_single_component = nullptr;
67 other._manage_storage = false;
68 return *this;
69 }
70
76
78
79private:
81 void cleanup()
82 {
84 {
87 }
88 }
89
91 std::unique_ptr<NumLib::Extrapolator> _extrapolator;
92
95
98 bool _manage_storage = false;
99};
100
101} // namespace ProcessLib
ExtrapolatorData & operator=(ExtrapolatorData &&other)
std::unique_ptr< NumLib::Extrapolator > _extrapolator
Extrapolator managed by the ExtrapolatorData instance.
NumLib::LocalToGlobalIndexMap const & getDOFTable() const
NumLib::Extrapolator & getExtrapolator() const
ExtrapolatorData(std::unique_ptr< NumLib::Extrapolator > &&extrapolator, NumLib::LocalToGlobalIndexMap const *const dof_table_single_component, bool const manage_storage)
NumLib::LocalToGlobalIndexMap const * _dof_table_single_component
D.o.f. table used by the extrapolator.
void cleanup()
Deletes the d.o.f table if it is allowed to do so.
ExtrapolatorData(ExtrapolatorData &&other)