helics  3.5.2
helicsTime.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2024,
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 
41 
46 };
47 
48 } // namespace helics
49 
50 #endif // HELICS_TIME_HEADER_
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
constexpr Time cBigTime
Definition: helicsTime.hpp:37
IterationResult
Definition: CoreTypes.hpp:93
constexpr Time timeEpsilon
Definition: helicsTime.hpp:33
constexpr Time timeZero
Definition: helicsTime.hpp:31
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
constexpr Time initializationTime
Definition: helicsTime.hpp:40
constexpr Time negEpsilon
Definition: helicsTime.hpp:35
Definition: helicsTime.hpp:43
IterationResult state
the convergence state
Definition: helicsTime.hpp:45
Time grantedTime
the time of the granted step
Definition: helicsTime.hpp:44