SpECTRE
v2021.04.06
Documentation
Introduction
Releases
Installation
User Tutorials
Dev Guide
Code of Conduct
Contributing Guide
Code Reference
Topics
Namespaces
Files
Bibliography
View on GitHub
src
Evolution
Systems
Cce
Actions
TimeManagement.hpp
1
// Distributed under the MIT License.
2
// See LICENSE.txt for details.
3
4
#pragma once
5
6
#include <
tuple
>
7
8
#include "
DataStructures/DataBox/DataBox.hpp
"
9
#include "Evolution/Systems/Cce/OptionTags.hpp"
10
#include "Evolution/Systems/Cce/Tags.hpp"
11
#include "
Parallel/GlobalCache.hpp
"
12
#include "Parallel/Invoke.hpp"
13
#include "Time/Tags.hpp"
14
#include "
Time/TimeStepId.hpp
"
15
16
namespace
Cce
{
17
namespace
Actions {
18
19
/*!
20
* \ingroup ActionsGroup
21
* \brief Terminates if the current `::Tags::TimeStepId` has time value later or
22
* equal to `Tags::EndTime`.
23
*
24
* \details Uses:
25
* - DataBox:
26
* - `Cce::Tags::EndTime`
27
* - `Tags::TimeStepId`
28
*
29
* \ref DataBoxGroup changes:
30
* - Adds: nothing
31
* - Removes: nothing
32
* - Modifies: nothing
33
*
34
*/
35
struct
ExitIfEndTimeReached
{
36
template
<
typename
DbTags,
typename
... InboxTags,
typename
Metavariables,
37
typename
ArrayIndex,
typename
ActionList,
38
typename
ParallelComponent>
39
static
auto
apply(db::DataBox<DbTags>& box,
40
const
tuples::TaggedTuple<InboxTags...>
&
/*inboxes*/
,
41
const
Parallel::GlobalCache<Metavariables>
&
/*cache*/
,
42
const
ArrayIndex&
/*array_index*/
,
43
const
ActionList
/*meta*/
,
44
const
ParallelComponent*
const
/*meta*/
) noexcept {
45
return
std::tuple<db::DataBox<DbTags>
&&,
bool
>(
46
std::move(box),
47
db::get<::Tags::TimeStepId>(box).substep_time().value() >=
48
db::get<Tags::EndTime>(box));
49
}
50
};
51
52
}
// namespace Actions
53
}
// namespace Cce
Parallel::GlobalCache
Definition:
ElementReceiveInterpPoints.hpp:15
GlobalCache.hpp
tuple
Cce::Actions::ExitIfEndTimeReached
Terminates if the current Tags::TimeStepId has time value later or equal to Tags::EndTime.
Definition:
TimeManagement.hpp:35
DataBox.hpp
tuples::TaggedTuple
An associative container that is indexed by structs.
Definition:
TaggedTuple.hpp:271
TimeStepId.hpp
Cce
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition:
CharacteristicExtractFwd.hpp:6
© Copyright 2017 - 2021
SXS Collaboration
,
Distributed under the
MIT License