| helics 3.6.1

helicsTime.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2025,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
8 #ifndef HELICS_TIME_HEADER_
9 # define HELICS_TIME_HEADER_
10 # include "../utilities/timeRepresentation.hpp"
11 # include "CoreTypes.hpp"
12 # include "helics/helics-config.h"
13
14 # include <cstdint>
18 namespace helics {
24 # ifdef HELICS_USE_PICOSECOND_TIME
25 using Time = TimeRepresentation<count_time<12>>;
26 # else
27 using Time = TimeRepresentation<count_time<9>>;
28 # endif
29
31 constexpr Time timeZero = Time::zeroVal();
33 constexpr Time timeEpsilon = Time::epsilon();
35 constexpr Time negEpsilon = -Time::epsilon();
37 constexpr Time cBigTime = Time{static_cast<int64_t>(HELICS_BIG_NUMBER * 1000000)};
38
40 constexpr Time initializationTime = negEpsilon;
41
43 struct iteration_time {
44 Time grantedTime;
45 IterationResult state;
46 };
47
48 } // namespace helics
49
50 #endif // HELICS_TIME_HEADER_
CoreTypes.hpp
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::cBigTime
constexpr Time cBigTime
Definition: helicsTime.hpp:37
helics::IterationResult
IterationResult
Definition: CoreTypes.hpp:94
helics::timeEpsilon
constexpr Time timeEpsilon
Definition: helicsTime.hpp:33
helics::timeZero
constexpr Time timeZero
Definition: helicsTime.hpp:31
helics::Time
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
helics::initializationTime
constexpr Time initializationTime
Definition: helicsTime.hpp:40
helics::negEpsilon
constexpr Time negEpsilon
Definition: helicsTime.hpp:35
helics::iteration_time
Definition: helicsTime.hpp:43
helics::iteration_time::state
IterationResult state
the convergence state
Definition: helicsTime.hpp:45
helics::iteration_time::grantedTime
Time grantedTime
the time of the granted step
Definition: helicsTime.hpp:44