GEOSX
BlueprintOutput.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_BLUEPRINTOUTPUT_HPP_
20 #define GEOS_FILEIO_OUTPUTS_BLUEPRINTOUTPUT_HPP_
21 
23 
24 namespace geos
25 {
26 
27 // Forward declarations
28 class MeshLevel;
29 class NodeManager;
30 class ElementRegionManager;
31 
37 {
38 public:
39 
45  BlueprintOutput( string const & name,
46  Group * const parent );
47 
51  virtual ~BlueprintOutput() override
52  {}
53 
58  static string catalogName() { return "Blueprint"; }
59 
64  virtual bool execute( real64 const time_n,
65  real64 const dt,
66  integer const cycleNumber,
67  integer const eventCounter,
68  real64 const eventProgress,
69  DomainPartition & domain ) override;
70 
75  virtual void cleanup( real64 const time_n,
76  integer const cycleNumber,
77  integer const eventCounter,
78  real64 const eventProgress,
79  DomainPartition & domain ) override
80  { execute( time_n, 0, cycleNumber, eventCounter, eventProgress, domain ); }
81 
82 private:
83 
91  void addNodalData( NodeManager const & nodeManager,
92  conduit::Node & coordset,
93  conduit::Node & topologies,
94  conduit::Node & fields );
95 
103  void addElementData( ElementRegionManager const & elemRegionManager,
104  conduit::Node & coordset,
105  conduit::Node & topologies,
106  conduit::Node & fields,
107  dataRepository::Group & averagedElementData );
108 
116  void writeOutWrappersAsFields( Group const & group,
117  conduit::Node & fields,
118  string const & topology,
119  string const & prefix="" );
120 
121  void writeOutConstitutiveData( dataRepository::Group const & constitutiveModel,
122  conduit::Node & fields,
123  string const & topology,
124  dataRepository::Group & averagedElementData );
125 
126  // Used to determine which fields to write out.
128 
129  // If true will write out the full quadrature data, otherwise it is averaged over.
130  int m_outputFullQuadratureData = 0;
131 };
132 
133 
134 } // namespace geos
135 
136 #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:45
@ LEVEL_1
Write to plot when plotLevel>=1 is specified in input.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122