GEOSX
RestartOutput.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_OUTPUTS_RESTARTOUTPUT_HPP_
20 #define GEOSX_MANAGERS_OUTPUTS_RESTARTOUTPUT_HPP_
21 
22 #include "OutputBase.hpp"
23 
24 
25 namespace geosx
26 {
27 
34 class RestartOutput : public OutputBase
35 {
36 public:
38  RestartOutput( std::string const & name,
39  Group * const parent );
40 
42  virtual ~RestartOutput() override;
43 
48  static string CatalogName() { return "Restart"; }
49 
54  virtual void Execute( real64 const time_n,
55  real64 const dt,
56  integer const cycleNumber,
57  integer const eventCounter,
58  real64 const eventProgress,
59  dataRepository::Group * domain ) override;
60 
65  virtual void Cleanup( real64 const time_n,
66  integer const cycleNumber,
67  integer const eventCounter,
68  real64 const eventProgress,
69  dataRepository::Group * domain ) override
70  {
71  Execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain );
72  }
73 
75  struct viewKeyStruct
76  {
77  dataRepository::ViewKey writeFEMFaces = { "writeFEMFaces" };
78  } viewKeys;
80 };
81 
82 
83 } /* namespace geosx */
84 
85 #endif /* GEOSX_MANAGERS_OUTPUTS_RESTARTOUTPUT_HPP_ */
virtual void Execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, dataRepository::Group *domain) override
Writes out a restart file.
static string CatalogName()
Catalog name interface.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
RestartOutput(std::string const &name, Group *const parent)
Constructor.
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1545
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
std::string string
String type.
Definition: DataTypes.hpp:131
virtual ~RestartOutput() override
Destructor.
virtual void Cleanup(real64 const time_n, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, dataRepository::Group *domain) override
Write one final restart file as the code exits.