GEOSX
OutputBase.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 Total, S.A
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 
18 #ifndef GEOSX_MANAGERS_OUTPUTS_OUTPUTBASE_HPP_
19 #define GEOSX_MANAGERS_OUTPUTS_OUTPUTBASE_HPP_
20 
21 #include "dataRepository/Group.hpp"
23 
24 
25 namespace geosx
26 {
27 
34 {
35 public:
37  explicit OutputBase( std::string const & name, Group * const parent );
38 
40  virtual ~OutputBase() override;
41 
46  static string CatalogName() { return "OutputBase"; }
47 
49  virtual void SetupDirectoryStructure();
50 
51  // Catalog interface
55 
56  // Catalog view keys
57  struct viewKeysStruct
58  {
59  static constexpr auto childDirectoryString = "childDirectory";
60  static constexpr auto parallelThreadsString = "parallelThreads";
61  } outputBaseViewKeys;
63 
68  string childDirectory() const { return m_childDirectory; }
69 
74  integer parallelThreads() const { return m_parallelThreads; }
75 
76 protected:
82  virtual void InitializePreSubGroups( Group * const group ) override;
83 
84 private:
85  string m_childDirectory;
86  integer m_parallelThreads;
87 
88 };
89 
90 
91 } /* namespace geosx */
92 
93 #endif /* GEOSX_MANAGERS_OUTPUTS_OUTPUTBASE_HPP_ */
virtual void SetupDirectoryStructure()
Method for setting up output directories.
integer parallelThreads() const
Get the number of parallel threads to use to write plotfiles.
Definition: OutputBase.hpp:74
string childDirectory() const
Get the path of the child directory where output will be written.
Definition: OutputBase.hpp:68
static CatalogInterface::CatalogType & GetCatalog()
Get the singleton catalog for this class.
static string CatalogName()
Catalog name interface.
Definition: OutputBase.hpp:46
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
This class provides the base class/interface for the catalog value objects.
OutputBase(std::string const &name, Group *const parent)
Constructor.
virtual void InitializePreSubGroups(Group *const group) override
Do initialization prior to calling initialization operations on the subgroups.
std::string string
String type.
Definition: DataTypes.hpp:131
struct containing the view access keys to be bound with class data member
virtual ~OutputBase() override
Destructor.
std::unordered_map< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...