VertexCFD  0.0-dev
VertexCFD_EquationSet_RADFactory.hpp
1 #ifndef VERTEXCFD_EQUATIONSET_RADFACTORY_HPP
2 #define VERTEXCFD_EQUATIONSET_RADFACTORY_HPP
3 
4 #include "VertexCFD_EquationSet_RAD.hpp"
5 
6 #include <Panzer_CellData.hpp>
7 #include <Panzer_EquationSet_Factory.hpp>
8 #include <Panzer_EquationSet_Factory_Defines.hpp>
9 
10 namespace VertexCFD
11 {
12 namespace EquationSet
13 {
14 //---------------------------------------------------------------------------//
15 
16 PANZER_DECLARE_EQSET_TEMPLATE_BUILDER(RAD, RAD)
17 
18 //---------------------------------------------------------------------------//
19 class RADFactory : public panzer::EquationSetFactory
20 {
21  public:
22  Teuchos::RCP<panzer::EquationSet_TemplateManager<panzer::Traits>>
23  buildEquationSet(const Teuchos::RCP<Teuchos::ParameterList>& params,
24  const int& default_integration_order,
25  const panzer::CellData& cell_data,
26  const Teuchos::RCP<panzer::GlobalData>& global_data,
27  const bool build_transient_support) const override
28  {
29  // This variable needs to have this exact name to work with the macro
30  // called below.
31  auto eq_set = Teuchos::rcp(
32  new panzer::EquationSet_TemplateManager<panzer::Traits>);
33 
34  // The "found" variable is used in-place in the macro called below.
35  bool found = false;
36 
37  // Call the macro for each equation set and check that we found it.
38  PANZER_BUILD_EQSET_OBJECTS("RAD", RAD);
39 
40  // Return the equation set
41  return found ? eq_set : Teuchos::null;
42  }
43 };
44 
45 //---------------------------------------------------------------------------//
46 
47 } // end namespace EquationSet
48 } // end namespace VertexCFD
49 
50 #endif // end VERTEXCFD_EQUATIONSET_RADFACTORY_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::EquationSet::RADFactory
Definition: VertexCFD_EquationSet_RADFactory.hpp:20
VertexCFD::EquationSet::RAD
Definition: VertexCFD_EquationSet_RAD.hpp:27