GEOS
TaskBase.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 Total, S.A
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_EVENTS_TASKS_TASKBASE_HPP_
21 #define GEOS_EVENTS_TASKS_TASKBASE_HPP_
22 
23 
24 #include <limits>
25 
27 #include "common/DataTypes.hpp"
28 namespace geos
29 {
30 
35 class TaskBase : public ExecutableGroup
36 {
37 public:
39  explicit TaskBase( string const & name,
40  Group * const parent );
41  virtual ~TaskBase( ) override;
42 
50 
52  virtual bool execute( real64 const time_n,
53  real64 const dt,
54  integer const cycleNumber,
55  integer const eventCounter,
56  real64 const eventProgress,
57  DomainPartition & domain ) override
58  {
59  GEOS_UNUSED_VAR( time_n );
60  GEOS_UNUSED_VAR( dt );
61  GEOS_UNUSED_VAR( cycleNumber );
62  GEOS_UNUSED_VAR( eventCounter );
63  GEOS_UNUSED_VAR( eventProgress );
64  GEOS_UNUSED_VAR( domain );
65  GEOS_ERROR( "NOT IMPLEMENTED" );
66  return false;
67  }
68 
70  void postInputInitialization() override;
71 };
72 
73 } /* namespace */
74 
75 #endif /* GEOS_EVENTS_TASKS_TASKBASE_HPP_ */
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
Definition: GeosxMacros.hpp:84
#define GEOS_ERROR(msg)
Raise a hard error and terminate the program.
Definition: Logger.hpp:157
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
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.
Definition: TaskBase.hpp:52
static CatalogInterface::CatalogType & getCatalog()
Get the catalog interface for the TaskBase.
TaskBase(string const &name, Group *const parent)
Constructor.
void postInputInitialization() override
This class provides the base class/interface for the catalog value objects.
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...
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82