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 : #include <map> 8 : #include <tuple> 9 : 10 : #include "NumericalAlgorithms/Convergence/HasConverged.hpp" 11 : #include "Parallel/InboxInserters.hpp" 12 : #include "Utilities/TMPL.hpp" 13 : 14 : namespace LinearSolver::cg::detail::Tags { 15 : 16 : template <typename OptionsGroup> 17 : struct InitialHasConverged 18 : : Parallel::InboxInserters::Value<InitialHasConverged<OptionsGroup>> { 19 : using temporal_id = size_t; 20 : using type = std::map<temporal_id, Convergence::HasConverged>; 21 : }; 22 : 23 : template <typename OptionsGroup> 24 : struct Alpha : Parallel::InboxInserters::Value<Alpha<OptionsGroup>> { 25 : using temporal_id = size_t; 26 : using type = std::map<temporal_id, double>; 27 : }; 28 : 29 : template <typename OptionsGroup> 30 : struct ResidualRatioAndHasConverged 31 : : Parallel::InboxInserters::Value< 32 : ResidualRatioAndHasConverged<OptionsGroup>> { 33 : using temporal_id = size_t; 34 : using type = 35 : std::map<temporal_id, std::tuple<double, Convergence::HasConverged>>; 36 : }; 37 : 38 : } // namespace LinearSolver::cg::detail::Tags