Panzer
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
disc-fe
src
Panzer_EquationSet_Factory_Defines.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Panzer: A partial differential equation assembly
4
// engine for strongly coupled complex multiphysics systems
5
//
6
// Copyright 2011 NTESS and the Panzer contributors.
7
// SPDX-License-Identifier: BSD-3-Clause
8
// *****************************************************************************
9
// @HEADER
10
11
#include <iostream>
12
#include "Teuchos_Assert.hpp"
13
#include "
Teuchos_ParameterList.hpp
"
14
#include "
Panzer_EquationSet_Factory.hpp
"
15
#include "
Panzer_EquationSet_TemplateManager.hpp
"
16
17
#undef PANZER_DECLARE_EQSET_TEMPLATE_BUILDER
18
#define PANZER_DECLARE_EQSET_TEMPLATE_BUILDER(fClass, fType) \
19
\
20
struct fType ## _TemplateBuilder \
21
{ \
22
const Teuchos::RCP<Teuchos::ParameterList> m_params; \
23
const int m_default_integration_order; \
24
const panzer::CellData& m_cell_data; \
25
const Teuchos::RCP<panzer::GlobalData> m_global_data; \
26
const bool m_build_transient_support; \
27
fType ## _TemplateBuilder( \
28
const Teuchos::RCP<Teuchos::ParameterList>& params, \
29
const int default_integration_order, \
30
const panzer::CellData& cd, \
31
const Teuchos::RCP<panzer::GlobalData>& global_data, \
32
const bool build_transient_support) \
33
: \
34
m_params(params), \
35
m_default_integration_order(default_integration_order), \
36
m_cell_data(cd), \
37
m_global_data(global_data), \
38
m_build_transient_support(build_transient_support) \
39
{ \
40
} \
41
\
42
template<typename EvalT> \
43
Teuchos::RCP<panzer::EquationSetBase> build() const \
44
{ \
45
fClass<EvalT>* ptr = new fClass<EvalT>(m_params, \
46
m_default_integration_order, m_cell_data, m_global_data, \
47
m_build_transient_support); \
48
return Teuchos::rcp(ptr); \
49
} \
50
\
51
};
52
53
#undef PANZER_BUILD_EQSET_OBJECTS
54
#define PANZER_BUILD_EQSET_OBJECTS(key, fType) \
55
if (params->get<std::string>("Type") == key) \
56
{ \
57
fType ## _TemplateBuilder builder(params, default_integration_order, \
58
cell_data, global_data, build_transient_support); \
59
eq_set->buildObjects(builder); \
60
found = true; \
61
}
Teuchos_ParameterList.hpp
Panzer_EquationSet_TemplateManager.hpp
Panzer_EquationSet_Factory.hpp
Generated on Thu Nov 21 2024 09:17:08 for Panzer by
1.8.5