Factory.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <type_traits>
8 
9 #include "ParallelAlgorithms/Events/ObserveErrorNorms.hpp"
10 #include "ParallelAlgorithms/Events/ObserveFields.hpp"
11 #include "ParallelAlgorithms/Events/ObserveTimeStep.hpp"
12 #include "Time/Actions/ChangeSlabSize.hpp"
13 #include "Utilities/TMPL.hpp"
14 
15 namespace dg::Events {
16 template <size_t VolumeDim, typename TimeTag, typename Fields,
17  typename SolutionFields>
18 using field_observations = tmpl::flatten<tmpl::list<
19  ObserveFields<VolumeDim, TimeTag, Fields, SolutionFields>,
20  tmpl::conditional_t<std::is_same_v<SolutionFields, tmpl::list<>>,
21  tmpl::list<>,
22  ObserveErrorNorms<TimeTag, SolutionFields>>>>;
23 } // namespace dg::Events
24 
25 namespace Events {
26 template <typename System>
27 using time_events =
28  tmpl::list<Events::ObserveTimeStep<System>, Events::ChangeSlabSize>;
29 } // namespace Events
cstddef
type_traits
Events::ChangeSlabSize
Definition: ChangeSlabSize.hpp:228
TMPL.hpp