GEOSX
SoloEvent.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_MANAGERS_EVENTS_SOLOEVENT_HPP_
20 #define GEOSX_MANAGERS_EVENTS_SOLOEVENT_HPP_
21 
23 
24 namespace geosx
25 {
26 
32 class SoloEvent : public EventBase
33 {
34 public:
35 
37  SoloEvent( const std::string & name,
38  Group * const parent );
39 
41  virtual ~SoloEvent() override;
42 
47  static string CatalogName() { return "SoloEvent"; }
48 
52  virtual void EstimateEventTiming( real64 const time,
53  real64 const dt,
54  integer const cycle,
55  dataRepository::Group * domain ) override;
56 
60  virtual real64 GetEventTypeDtRequest( real64 const time ) override;
61 
63  struct viewKeyStruct
64  {
65  static constexpr auto targetTimeString = "targetTime";
66  static constexpr auto targetCycleString = "targetCycle";
67  static constexpr auto targetExactTimestepString = "targetExactTimestep";
68 
69  dataRepository::ViewKey targetTime = { "targetTime" };
70  dataRepository::ViewKey targetCycle = { "targetCycle" };
71  dataRepository::ViewKey targetExactTimestep = { "targetExactTimestep" };
72  } SoloEventViewKeys;
74 
81 
82 };
83 
84 } /* namespace geosx */
85 
86 #endif /* GEOSX_MANAGERS_EVENTS_SOLOEVENT_HPP_ */
virtual ~SoloEvent() override
Destructor.
virtual void EstimateEventTiming(real64 const time, real64 const dt, integer const cycle, dataRepository::Group *domain) override
Perform the calculations to estimate the timing of the event.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1545
integer m_targetCycle
The target cycle.
Definition: SoloEvent.hpp:78
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
virtual real64 GetEventTypeDtRequest(real64 const time) override
Get event-specifit dt requests.
static string CatalogName()
Catalog name interface.
Definition: SoloEvent.hpp:47
std::string string
String type.
Definition: DataTypes.hpp:131
SoloEvent(const std::string &name, Group *const parent)
Constructor.
integer m_targetExactTimestep
Whether to target the exact time step.
Definition: SoloEvent.hpp:80
real64 m_targetTime
The target time.
Definition: SoloEvent.hpp:76