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 "Time/StepChoosers/Cfl.hpp" 9 : #include "Time/StepChoosers/Constant.hpp" 10 : #include "Time/StepChoosers/ElementSizeCfl.hpp" 11 : #include "Time/StepChoosers/ErrorControl.hpp" 12 : #include "Time/StepChoosers/Increase.hpp" 13 : #include "Time/StepChoosers/PreventRapidIncrease.hpp" 14 : #include "Time/StepChoosers/StepToTimes.hpp" 15 : #include "Utilities/TMPL.hpp" 16 : 17 : /// \cond 18 : namespace Frame { 19 : struct Inertial; 20 : } // namespace Frame 21 : /// \endcond 22 : 23 : namespace StepChoosers { 24 : namespace Factory_detail { 25 : template <typename Use, typename System, bool HasCharSpeedFunctions> 26 : using common_step_choosers = tmpl::push_back< 27 : tmpl::conditional_t< 28 : HasCharSpeedFunctions, 29 : tmpl::list< 30 : StepChoosers::Cfl<Use, Frame::Inertial, System>, 31 : StepChoosers::ElementSizeCfl<Use, System::volume_dim, System>>, 32 : tmpl::list<>>, 33 : StepChoosers::Constant<Use>, StepChoosers::Increase<Use>>; 34 : template <typename Use, typename System> 35 : using step_choosers_for_step_only = 36 : tmpl::list<StepChoosers::PreventRapidIncrease<Use>, 37 : StepChoosers::ErrorControl<Use, typename System::variables_tag>>; 38 : using step_choosers_for_slab_only = tmpl::list<StepChoosers::StepToTimes>; 39 : 40 : template <typename System, bool HasCharSpeedFunctions> 41 : using lts_slab_choosers = tmpl::append< 42 : common_step_choosers<StepChooserUse::Slab, System, HasCharSpeedFunctions>, 43 : step_choosers_for_slab_only>; 44 : } // namespace Factory_detail 45 : 46 : template <typename System, bool HasCharSpeedFunctions = true> 47 0 : using standard_step_choosers = 48 : tmpl::append<Factory_detail::common_step_choosers< 49 : StepChooserUse::LtsStep, System, HasCharSpeedFunctions>, 50 : Factory_detail::step_choosers_for_step_only< 51 : StepChooserUse::LtsStep, System>>; 52 : 53 : template <typename System, bool LocalTimeStepping, 54 : bool HasCharSpeedFunctions = true> 55 0 : using standard_slab_choosers = tmpl::conditional_t< 56 : LocalTimeStepping, 57 : Factory_detail::lts_slab_choosers<System, HasCharSpeedFunctions>, 58 : tmpl::append< 59 : Factory_detail::lts_slab_choosers<System, HasCharSpeedFunctions>, 60 : Factory_detail::step_choosers_for_step_only<StepChooserUse::Slab, 61 : System>>>; 62 : } // namespace StepChoosers