/home/runner/work/amr-wind/amr-wind/amr-wind/core/ExtSolver.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/core/ExtSolver.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ExtSolver.H
Go to the documentation of this file.
1#ifndef EXTSOLVER_H
2#define EXTSOLVER_H
3
6
7namespace amr_wind {
8
9class CFDSim;
10
11class ExtSolver : public Factory<ExtSolver, CFDSim&>
12{
13public:
14 static std::string base_identifier() { return "ExtSolver"; }
15
16 ~ExtSolver() override = default;
17};
18
19class ExtSolverMgr : public CollMgr<ExtSolverMgr, ExtSolver>
20{
21public:
22 template <typename T>
23 T& get()
24 {
25 AMREX_ASSERT(contains(T::identifier()));
26 return dynamic_cast<T&>(operator()(T::identifier()));
27 }
28
29 template <typename T>
30 const T& get() const
31 {
32 AMREX_ASSERT(contains(T::identifier()));
33 return dynamic_cast<const T&>(operator()(T::identifier()));
34 }
35};
36
37} // namespace amr_wind
38
39#endif /* EXTSOLVER_H */
Definition CollMgr.H:22
ExtSolver & operator()(const std::string &key)
Definition CollMgr.H:62
bool contains(const std::string &key) const
Definition CollMgr.H:55
Definition ExtSolver.H:12
~ExtSolver() override=default
static std::string base_identifier()
Definition ExtSolver.H:14
Definition ExtSolver.H:20
T & get()
Definition ExtSolver.H:23
const T & get() const
Definition ExtSolver.H:30
Definition BCInterface.cpp:7
Definition Factory.H:65