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 Total, S.A
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 public:
40 
46  BlueprintOutput( string const & name,
47  Group * const parent );
48 
52  virtual ~BlueprintOutput() override
53  {}
54 
59  static string catalogName() { return "Blueprint"; }
60 
65  virtual bool execute( real64 const time_n,
66  real64 const dt,
67  integer const cycleNumber,
68  integer const eventCounter,
69  real64 const eventProgress,
70  DomainPartition & domain ) override;
71 
76  virtual void cleanup( real64 const time_n,
77  integer const cycleNumber,
78  integer const eventCounter,
79  real64 const eventProgress,
80  DomainPartition & domain ) override
81  { execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain ); }
82 
83 private:
84 
92  void addNodalData( NodeManager const & nodeManager,
93  conduit::Node & coordset,
94  conduit::Node & topologies,
95  conduit::Node & fields );
96 
104  void addElementData( ElementRegionManager const & elemRegionManager,
105  conduit::Node & coordset,
106  conduit::Node & topologies,
107  conduit::Node & fields,
108  dataRepository::Group & averagedElementData );
109 
117  void writeOutWrappersAsFields( Group const & group,
118  conduit::Node & fields,
119  string const & topology,
120  string const & prefix="" );
121 
122  void writeOutConstitutiveData( dataRepository::Group const & constitutiveModel,
123  conduit::Node & fields,
124  string const & topology,
125  dataRepository::Group & averagedElementData );
126 
127  // Used to determine which fields to write out.
129 
130  // If true will write out the full quadrature data, otherwise it is averaged over.
131  int m_outputFullQuadratureData = 0;
132 };
133 
134 
135 } // namespace geos
136 
137 #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.
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