GEOS
SinglePhaseStatisticsTask.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 SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_
21 #define SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_
22 
25 
26 namespace geos
27 {
28 
29 class SinglePhaseBase;
30 
31 namespace singlePhaseStatistics
32 {
33 
37 class StatsTask : public FieldStatisticsBase< SinglePhaseBase >
38 {
39 public:
40 
46  StatsTask( const string & name, dataRepository::Group * const parent );
47 
49  static string catalogName() { return "SinglePhaseStatistics"; }
50 
58  virtual bool execute( real64 const time_n,
59  real64 const dt,
60  integer const cycleNumber,
61  integer const eventCounter,
62  real64 const eventProgress,
63  DomainPartition & domain ) override;
64 
67  StatsAggregator & getStatisticsAggregator()
68  { return *m_aggregator; }
69 
70  StatsAggregator const & getStatisticsAggregator() const
71  { return *m_aggregator; }
72 
73 private:
74 
76 
77  void postInputInitialization() override;
78 
79  void registerDataOnMesh( Group & meshBodies ) override;
80 
81  void prepareLogTableLayouts( string_view tableName );
82 
83  void prepareCsvTableLayouts( string_view tableName );
84 
85  string getCsvFileName( string_view meshName ) const;
86 
87  void outputLogStats( real64 statsTime,
88  MeshLevel & mesh,
89  RegionStatistics & meshRegionsStatistics );
90 
91  void outputCsvStats( real64 statsTime,
92  MeshLevel & mesh,
93  RegionStatistics & meshRegionsStatistics );
94 
97 
100 
101  // mesh statistics aggregator
102  std::unique_ptr< StatsAggregator > m_aggregator;
103 
104 };
105 
106 } /* namespace singlePhaseStatistics */
107 
108 } /* namespace geos */
109 
110 #endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ */
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:42
Reponsible of computing physical statistics over the grid, registering the result in the data reposit...
static string catalogName()
Accessor for the catalog name.
StatsTask(const string &name, dataRepository::Group *const parent)
Constructor for the statistics class.
virtual bool execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
Main extension point of executable targets.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
internal::StdMapWrapper< std::map< Key, T, Compare, Allocator >, USE_STD_CONTAINER_BOUNDS_CHECKING > stdMap
int integer
Signed integer type.
Definition: DataTypes.hpp:81
std::string_view string_view
String type.
Definition: DataTypes.hpp:93