Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include "Utilities/TMPL.hpp" 7 : 8 : /// \cond 9 : class ImexTimeStepper; 10 : template <typename TagsList> 11 : class Variables; 12 : namespace Tags { 13 : template <typename StepperInterface> 14 : struct TimeStepper; 15 : } // namespace Tags 16 : namespace TimeSteppers { 17 : template <typename Vars> 18 : class History; 19 : } // namespace TimeSteppers 20 : namespace gsl { 21 : template <class T> 22 : class not_null; 23 : } // namespace gsl 24 : namespace imex::Tags { 25 : template <typename ImplicitSector> 26 : struct ImplicitHistory; 27 : } // namespace imex::Tags 28 : /// \endcond 29 : 30 : namespace imex { 31 : /// Mutator to clean history objects for each sector after an IMEX substep. 32 : template <typename System, 33 : typename ImplicitSectors = typename System::implicit_sectors> 34 1 : struct CleanHistory; 35 : 36 : /// \copydoc CleanHistory 37 : template <typename System, typename... ImplicitSectors> 38 1 : struct CleanHistory<System, tmpl::list<ImplicitSectors...>> { 39 0 : using return_tags = 40 : tmpl::list<imex::Tags::ImplicitHistory<ImplicitSectors>...>; 41 0 : using argument_tags = tmpl::list<::Tags::TimeStepper<ImexTimeStepper>>; 42 : 43 0 : static void apply( 44 : const gsl::not_null<TimeSteppers::History< 45 : Variables<typename ImplicitSectors::tensors>>*>... histories, 46 : const ImexTimeStepper& time_stepper); 47 : }; 48 : } // namespace imex