Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 :
8 : #include "DataStructures/DataBox/Protocols/Mutator.hpp"
9 : #include "Evolution/Systems/CurvedScalarWave/Worldtube/Tags.hpp"
10 : #include "Utilities/ProtocolHelpers.hpp"
11 :
12 : namespace CurvedScalarWave::Worldtube::Initialization {
13 :
14 : /*!
15 : * \brief Sets the initial value of `CurrentIteration` to 0.
16 : */
17 1 : struct InitializeCurrentIteration : tt::ConformsTo<db::protocols::Mutator> {
18 0 : using return_tags =
19 : tmpl::list<CurvedScalarWave::Worldtube::Tags::CurrentIteration>;
20 0 : using argument_tags = tmpl::list<>;
21 0 : using simple_tags = return_tags;
22 0 : using compute_tags = tmpl::list<>;
23 0 : using simple_tags_from_options = tmpl::list<>;
24 0 : using const_global_cache_tags = tmpl::list<>;
25 0 : using mutable_global_cache_tags = tmpl::list<>;
26 0 : static void apply(const gsl::not_null<size_t*> current_iteration) {
27 : *current_iteration = 0;
28 : }
29 : };
30 : } // namespace CurvedScalarWave::Worldtube::Initialization
|