GEOSX
TaskBase.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2019 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2019 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2019 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All right reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef TASKBASE_HPP_
20 #define TASKBASE_HPP_
21 
22 #include <string>
23 #include <limits>
24 
26 #include "common/DataTypes.hpp"
27 namespace geosx
28 {
29 
34 class TaskBase : public ExecutableGroup
35 {
36 public:
38  explicit TaskBase( std::string const & name,
39  Group * const parent );
40  virtual ~TaskBase( ) override;
41 
46  static string CatalogName() { return "TaskBase"; }
47 
55 
57  virtual void Execute( real64 const time_n,
58  real64 const dt,
59  integer const cycleNumber,
60  integer const eventCounter,
61  real64 const eventProgress,
62  dataRepository::Group * domain ) override
63  {
64  GEOSX_UNUSED_VAR( time_n );
65  GEOSX_UNUSED_VAR( dt );
66  GEOSX_UNUSED_VAR( cycleNumber );
67  GEOSX_UNUSED_VAR( eventCounter );
68  GEOSX_UNUSED_VAR( eventProgress );
69  GEOSX_UNUSED_VAR( domain );
70  GEOSX_ERROR( "NOT IMPLEMENTED" );
71  }
72 
74  void PostProcessInput() override;
75 };
76 
77 } /* namespace */
78 
79 #endif /* TASKBASE_HPP_ */
void PostProcessInput() override
virtual void Execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, dataRepository::Group *domain) override
Main extension point of executable targets.
Definition: TaskBase.hpp:57
TaskBase(std::string const &name, Group *const parent)
Constructor.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
static string CatalogName()
Catalog name interface.
Definition: TaskBase.hpp:46
static CatalogInterface::CatalogType & GetCatalog()
Get the catalog interface for the TaskBase.
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:122
#define GEOSX_ERROR(msg)
Raise a hard error and terminate the program.
Definition: Logger.hpp:110
This class provides the base class/interface for the catalog value objects.
#define GEOSX_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
Definition: GeosxMacros.hpp:78
std::string string
String type.
Definition: DataTypes.hpp:131
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...