GEOSX
SiloOutput.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 TotalEnergies
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 GEOS_FILEIO_OUTPUTS_SILOOUTPUT_HPP_
20 #define GEOS_FILEIO_OUTPUTS_SILOOUTPUT_HPP_
21 
22 #include "OutputBase.hpp"
23 
24 
25 namespace geos
26 {
27 
33 class SiloOutput : public OutputBase
34 {
35 public:
37  SiloOutput( string const & name,
38  Group * const parent );
39 
41  virtual ~SiloOutput() override;
42 
47  static string catalogName() { return "Silo"; }
48 
53  virtual bool execute( real64 const time_n,
54  real64 const dt,
55  integer const cycleNumber,
56  integer const eventCounter,
57  real64 const eventProgress,
58  DomainPartition & domain ) override;
59 
64  virtual void cleanup( real64 const time_n,
65  integer const cycleNumber,
66  integer const eventCounter,
67  real64 const eventProgress,
68  DomainPartition & domain ) override
69  {
70  execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain );
71  }
72 
74  struct viewKeysStruct : OutputBase::viewKeysStruct
75  {
76  static constexpr auto plotFileRoot = "plotFileRoot";
77  static constexpr auto writeEdgeMesh = "writeEdgeMesh";
78  static constexpr auto writeFaceMesh = "writeFEMFaces";
79  static constexpr auto writeCellElementMesh = "writeCellElementMesh";
80  static constexpr auto writeFaceElementMesh = "writeFaceElementMesh";
81  static constexpr auto plotLevel = "plotLevel";
82  static constexpr auto onlyPlotSpecifiedFieldNames = "onlyPlotSpecifiedFieldNames";
83  static constexpr auto fieldNames = "fieldNames";
84  } siloOutputViewKeys;
86 
87 private:
88 
89  void postProcessInput() override;
90 
91  string m_plotFileRoot;
92  integer m_writeEdgeMesh;
93  integer m_writeFaceMesh;
94  integer m_writeCellElementMesh;
95  integer m_writeFaceElementMesh;
96  integer m_plotLevel;
97 
99  integer m_onlyPlotSpecifiedFieldNames;
100 
102  array1d< string > m_fieldNames;
103 
104 };
105 
106 
107 } /* namespace geos */
108 
109 #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:47
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:64
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
struct containing the view access keys to be bound with class data member