GEOS
SiloOutput.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 TotalEnergies
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_FILEIO_OUTPUTS_SILOOUTPUT_HPP_
21 #define GEOS_FILEIO_OUTPUTS_SILOOUTPUT_HPP_
22 
23 #include "OutputBase.hpp"
24 
25 
26 namespace geos
27 {
28 
34 class SiloOutput : public OutputBase
35 {
36 public:
38  SiloOutput( string const & name,
39  Group * const parent );
40 
42  virtual ~SiloOutput() override;
43 
48  static string catalogName() { return "Silo"; }
49 
54  virtual bool execute( real64 const time_n,
55  real64 const dt,
56  integer const cycleNumber,
57  integer const eventCounter,
58  real64 const eventProgress,
59  DomainPartition & domain ) override;
60 
65  virtual void cleanup( real64 const time_n,
66  integer const cycleNumber,
67  integer const eventCounter,
68  real64 const eventProgress,
69  DomainPartition & domain ) override
70  {
71  execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain );
72  }
73 
75  struct viewKeysStruct : OutputBase::viewKeysStruct
76  {
77  static constexpr auto plotFileRoot = "plotFileRoot";
78  static constexpr auto writeEdgeMesh = "writeEdgeMesh";
79  static constexpr auto writeFaceMesh = "writeFEMFaces";
80  static constexpr auto writeCellElementMesh = "writeCellElementMesh";
81  static constexpr auto writeFaceElementMesh = "writeFaceElementMesh";
82  static constexpr auto plotLevel = "plotLevel";
83  static constexpr auto onlyPlotSpecifiedFieldNames = "onlyPlotSpecifiedFieldNames";
84  static constexpr auto fieldNames = "fieldNames";
85  } siloOutputViewKeys;
87 
88 protected:
92  logInfo::OutputTimerBase const & getTimerCategory() const override;
93 
94 private:
95 
96  void postInputInitialization() override;
97 
98  string m_plotFileRoot;
99  integer m_writeEdgeMesh;
100  integer m_writeFaceMesh;
101  integer m_writeCellElementMesh;
102  integer m_writeFaceElementMesh;
103  integer m_plotLevel;
104 
106  integer m_onlyPlotSpecifiedFieldNames;
107 
109  array1d< string > m_fieldNames;
110 
111 };
112 
113 
114 } /* namespace geos */
115 
116 #endif /* GEOS_FILEIO_OUTPUTS_SILOOUTPUT_HPP_ */
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
SiloOutput(string const &name, Group *const parent)
Constructor.
static string catalogName()
Catalog name interface.
Definition: SiloOutput.hpp:48
logInfo::OutputTimerBase const & getTimerCategory() const override
Get the timer category for this output type.
virtual bool execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
Writes out a Silo plot file.
virtual ~SiloOutput() override
Destructor.
virtual void cleanup(real64 const time_n, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
Writes out a Silo plot file at the end of the simulation.
Definition: SiloOutput.hpp:65
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:176
Base interface for specific output type timers.
Definition: OutputBase.hpp:59
struct containing the view access keys to be bound with class data member