Skip to content

Commit

Permalink
Use dynamic storage for local LTS history
Browse files Browse the repository at this point in the history
The monotonic Adams-Moulton method requires a similar amount of
history on the local side as the LTS methods generally require on the
remote side.
  • Loading branch information
wthrowe committed May 29, 2024
1 parent bb208c8 commit 61fc812
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Time/BoundaryHistory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "DataStructures/CircularDeque.hpp"
#include "DataStructures/MathWrapper.hpp"
#include "DataStructures/StaticDeque.hpp"
#include "Time/History.hpp"
#include "Time/TimeStepId.hpp"
#include "Utilities/Algorithm.hpp"
Expand Down Expand Up @@ -342,20 +341,16 @@ class BoundaryHistory {
void clear_substeps_local(size_t n);
void clear_substeps_remote(size_t n);

StaticDeque<StepData<LocalData>, history_max_past_steps + 2> local_data_{};
CircularDeque<StepData<LocalData>> local_data_{};
CircularDeque<StepData<RemoteData>> remote_data_{};

template <typename Data>
using CouplingSubsteps =
boost::container::static_vector<Data, history_max_substeps + 1>;

// Putting the CircularDeque outermost means that we are inserting
// and removing containers that do not allocate, so we don't have to
// worry about that.
// NOLINTNEXTLINE(spectre-mutable)
mutable CircularDeque<CouplingSubsteps<
StaticDeque<CouplingSubsteps<std::optional<CouplingResult>>,
decltype(local_data_)::max_size()>>>
CircularDeque<CouplingSubsteps<std::optional<CouplingResult>>>>>
couplings_;
};

Expand Down

0 comments on commit 61fc812

Please sign in to comment.