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