GEOSX
TimeHistoryOutput.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2019 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2019 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2019 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All right reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_TIME_HISTORY_OUTPUT_HPP_
20 #define GEOSX_TIME_HISTORY_OUTPUT_HPP_
21 
22 #include "OutputBase.hpp"
26 
27 #include "LvArray/src/Array.hpp" // just for collector
28 
29 namespace geosx
30 {
31 
38 {
39 public:
41  TimeHistoryOutput( string const & name,
42  Group * const parent );
43 
45  virtual ~TimeHistoryOutput() override
46  { }
47 
52  static string CatalogName() { return "TimeHistory"; }
53 
62  virtual void InitializePostSubGroups( Group * const group ) override;
63 
68  virtual void Execute( real64 const time_n,
69  real64 const dt,
70  integer const cycleNumber,
71  integer const eventCounter,
72  real64 const eventProgress,
73  dataRepository::Group * domain ) override;
78  virtual void Cleanup( real64 const time_n,
79  integer const cycleNumber,
80  integer const eventCounter,
81  real64 const eventProgress,
82  dataRepository::Group * domain ) override;
83 
85  struct viewKeys
86  {
87  static constexpr auto timeHistoryOutputTarget = "sources";
88  static constexpr auto timeHistoryOutputFilename = "filename";
89  static constexpr auto timeHistoryOutputFormat = "format";
90  static constexpr auto timeHistoryRestart = "restart";
91  } timeHistoryOutputViewKeys;
93 
94 private:
95 
101  void initCollectorParallel( ProblemManager & problemManager, HistoryCollection * collector );
102 
104  string_array m_collectorPaths;
106  string m_format;
108  string m_filename;
110  integer m_recordCount;
112  std::vector< std::unique_ptr< BufferedHistoryIO > > m_io;
113 };
114 }
115 
116 #endif
TimeHistoryOutput(string const &name, Group *const parent)
Constructor.
static string CatalogName()
Catalog name interface.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
Contains the implementation of LvArray::Array.
virtual ~TimeHistoryOutput() override
Destructor.
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
virtual void Cleanup(real64 const time_n, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, dataRepository::Group *domain) override
Writes out a time history file at the end of the simulation.
virtual void InitializePostSubGroups(Group *const group) override
Perform initalization after all subgroups have been initialized. Check for existing files and data sp...
This is the class handling the operation flow of the problem being ran in GEOSX.
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 time history file.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
Definition: Array.hpp:55