helics  2.8.1
helics-time.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2021,
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 "core-types.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();
36 
39 
41 constexpr Time operator"" _t(long double val)
42 {
43  return {static_cast<double>(val)};
44 } // NOLINT
45 
50 };
51 
52 } // namespace helics
53 
54 // #TOBEDEPRECTATED The use of the the core-types header for the functions contained in
55 // ../application_api/timeOperations.hpp is deprectaced and will be removed in HELICS 3.0
56 // please use ../application_api/timeOperations.hpp directory for those functions.
57 // This next section should be removed in HELICS 3.0 but is needed to prevent breaking changes
58 # if defined HELICS_SHARED_LIBRARY || !defined HELICS_STATIC_CORE_LIBRARY
59 # include "../application_api/timeOperations.hpp"
60 # endif
61 #endif //_HELICS_TIME_HEADER_
helics::timeZero
constexpr Time timeZero
Definition: helics-time.hpp:31
core-types.hpp
helics::initializationTime
constexpr Time initializationTime
Definition: helics-time.hpp:38
helics::BrokerFactory::getConnectedBroker
std::shared_ptr< Broker > getConnectedBroker()
Definition: BrokerFactory.cpp:206
helics::iteration_result
iteration_result
Definition: core-types.hpp:81
helics::apps::WebServer::enableWebSocketServer
void enableWebSocketServer(bool enabled)
Definition: helicsWebServer.hpp:38
helics::Time
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
helics::apps::WebServer::startServer
virtual void startServer(const Json::Value *val) override
Definition: helicsWebServer.cpp:920
helics::BrokerApp
Definition: application_api/BrokerApp.hpp:26
helics::iteration_time::state
iteration_result state
the convergence state
Definition: helics-time.hpp:49
helics::helicsCLI11App
Definition: helicsCLI11.hpp:41
helics::negEpsilon
constexpr Time negEpsilon
Definition: helics-time.hpp:35
helics::BrokerFactory::findBroker
std::shared_ptr< Broker > findBroker(const std::string &brokerName)
Definition: BrokerFactory.cpp:185
helics::iteration_time::grantedTime
Time grantedTime
the time of the granted step
Definition: helics-time.hpp:48
helics::cleanupHelicsLibrary
void cleanupHelicsLibrary()
Definition: Federate.cpp:36
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
helics::iteration_time
Definition: helics-time.hpp:47
helics::vectorizeQueryResult
std::vector< std::string > vectorizeQueryResult(std::string &&queryres)
Definition: queryFunctions.cpp:17
helics::apps::BrokerServer
Definition: BrokerServer.hpp:32
helics::timeEpsilon
constexpr Time timeEpsilon
Definition: helics-time.hpp:33
helics::BrokerFactory::getAllBrokers
std::vector< std::shared_ptr< Broker > > getAllBrokers()
Definition: BrokerFactory.cpp:223
helics::BrokerKeeper
Definition: application_api/BrokerApp.hpp:157
helics::apps::WebServer::enableHttpServer
void enableHttpServer(bool enabled)
Definition: helicsWebServer.hpp:36
helics::HelicsException
Definition: core-exceptions.hpp:18
helics::apps::WebServer::stopServer
virtual void stopServer() override
Definition: helicsWebServer.cpp:941