GEOS
SoloEvent.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_EVENTS_SOLOEVENT_HPP_
21 #define GEOS_EVENTS_SOLOEVENT_HPP_
22 
23 #include "events/EventBase.hpp"
24 
25 namespace geos
26 {
27 
33 class SoloEvent : public EventBase
34 {
35 public:
36 
38  SoloEvent( const string & name,
39  Group * const parent );
40 
42  virtual ~SoloEvent() override;
43 
48  static string catalogName() { return "SoloEvent"; }
49 
53  virtual void estimateEventTiming( real64 const time,
54  real64 const dt,
55  integer const cycle,
56  DomainPartition & domain ) override;
57 
61  virtual real64 getEventTypeDtRequest( real64 const time ) override;
62 
64  struct viewKeyStruct
65  {
66  static constexpr char const * targetTimeString() { return "targetTime"; }
67  static constexpr char const * targetCycleString() { return "targetCycle"; }
68  static constexpr char const * targetExactTimestepString() { return "targetExactTimestep"; }
69 
70  dataRepository::ViewKey targetTime = { targetTimeString() };
71  dataRepository::ViewKey targetCycle = { targetCycleString() };
72  dataRepository::ViewKey targetExactTimestep = { targetExactTimestepString() };
73  } SoloEventViewKeys;
75 
82 
83 };
84 
85 } /* namespace geos */
86 
87 #endif /* GEOS_EVENTS_SOLOEVENT_HPP_ */
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
integer m_targetExactTimestep
Whether to target the exact time step.
Definition: SoloEvent.hpp:81
SoloEvent(const string &name, Group *const parent)
Constructor.
static string catalogName()
Catalog name interface.
Definition: SoloEvent.hpp:48
virtual ~SoloEvent() override
Destructor.
virtual real64 getEventTypeDtRequest(real64 const time) override
Get event-specifit dt requests.
real64 m_targetTime
The target time.
Definition: SoloEvent.hpp:77
virtual void estimateEventTiming(real64 const time, real64 const dt, integer const cycle, DomainPartition &domain) override
Perform the calculations to estimate the timing of the event.
integer m_targetCycle
The target cycle.
Definition: SoloEvent.hpp:79
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1662
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
Structure to hold scoped key names.
Definition: Group.hpp:1442