GEOS
BlueprintOutput.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_BLUEPRINTOUTPUT_HPP_
21 #define GEOS_FILEIO_OUTPUTS_BLUEPRINTOUTPUT_HPP_
22 
24 
25 namespace geos
26 {
27 
28 // Forward declarations
29 class MeshLevel;
30 class NodeManager;
31 class ElementRegionManager;
32 
38 {
39 protected:
43  logInfo::OutputTimerBase const & getTimerCategory() const override;
44 
45 public:
46 
52  BlueprintOutput( string const & name,
53  Group * const parent );
54 
58  virtual ~BlueprintOutput() override
59  {}
60 
65  static string catalogName() { return "Blueprint"; }
66 
71  virtual bool execute( real64 const time_n,
72  real64 const dt,
73  integer const cycleNumber,
74  integer const eventCounter,
75  real64 const eventProgress,
76  DomainPartition & domain ) override;
77 
82  virtual void cleanup( real64 const time_n,
83  integer const cycleNumber,
84  integer const eventCounter,
85  real64 const eventProgress,
86  DomainPartition & domain ) override
87  { execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain ); }
88 
89 private:
90 
98  void addNodalData( NodeManager const & nodeManager,
99  conduit::Node & coordset,
100  conduit::Node & topologies,
101  conduit::Node & fields );
102 
110  void addElementData( ElementRegionManager const & elemRegionManager,
111  conduit::Node & coordset,
112  conduit::Node & topologies,
113  conduit::Node & fields,
114  dataRepository::Group & averagedElementData );
115 
123  void writeOutWrappersAsFields( Group const & group,
124  conduit::Node & fields,
125  string const & topology,
126  string const & prefix="" );
127 
128  void writeOutConstitutiveData( dataRepository::Group const & constitutiveModel,
129  conduit::Node & fields,
130  string const & topology,
131  dataRepository::Group & averagedElementData );
132 
133  // Used to determine which fields to write out.
135 
136  // If true will write out the full quadrature data, otherwise it is averaged over.
137  int m_outputFullQuadratureData = 0;
138 };
139 
140 
141 } // namespace geos
142 
143 #endif // GEOS_FILEIO_OUTPUTS_BLUEPRINTOUTPUT_HPP_
A class for creating Conduit blueprint-based outputs.
static string catalogName()
Get the name used to register this object in an XML file.
virtual ~BlueprintOutput() override
Destructor.
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 Blueprint plot file.
virtual void cleanup(real64 const time_n, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
Writes out a Blueprint plot file at the end of the simulation.
BlueprintOutput(string const &name, Group *const parent)
Construct a new BlueprintOutput object.
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
Definition: NodeManager.hpp:46
@ LEVEL_1
Write to plot when plotLevel>=1 is specified in input.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
Base interface for specific output type timers.
Definition: OutputBase.hpp:59