Panzer
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
disc-fe
src
evaluators
Panzer_GatherSolution_Input.cpp
Go to the documentation of this file.
1
#include "
Panzer_GatherSolution_Input.hpp
"
2
3
namespace
panzer
{
4
5
GatherSolution_Input::
6
GatherSolution_Input
()
7
{
8
setParameterList
(Teuchos::rcp(
new
Teuchos::ParameterList(*
getValidParameters
())));
9
}
10
11
void
12
GatherSolution_Input::
13
setParameterList
(
const
Teuchos::ParameterList & p)
14
{
15
setParameterList
(Teuchos::rcp(
new
Teuchos::ParameterList(p)));
16
}
17
18
void
19
GatherSolution_Input::
20
setParameterList
(
const
Teuchos::RCP<Teuchos::ParameterList> & p)
21
{
22
using
Teuchos::RCP;
23
24
// correction for non const basis
25
if
(p->isType<RCP<PureBasis> >(
"Basis"
)) {
26
RCP<const PureBasis> basis = p->get<RCP<PureBasis> >(
"Basis"
);
27
p->remove(
"Basis"
);
28
p->set(
"Basis"
,basis);
29
}
30
31
// set complete state
32
p->validateParametersAndSetDefaults(*
getValidParameters
());
33
34
// for posterity save the modified list
35
setMyParamList(p);
36
37
dofNames_
= *p->get<RCP< std::vector<std::string> > >(
"DOF Names"
);
38
indexerNames_
= *p->get<RCP< std::vector<std::string> > >(
"Indexer Names"
);
39
useTimeDerivSolnVec_
= p->get<
bool
>(
"Use Time Derivative Solution Vector"
);
40
globalDataKey_
= p->get<std::string>(
"Global Data Key"
);
41
basis_
= p->get<RCP<const panzer::PureBasis> >(
"Basis"
);
42
43
// required by Tangent types
44
tangentNames_
= *p->get<RCP<std::vector<std::vector<std::string> > > >(
"Tangent Names"
);
45
46
// required by Jacobian types
47
sensName_
= p->get<std::string>(
"Sensitivities Name"
);
48
gatherSeedIndex_
= p->get<
int
>(
"Gather Seed Index"
);
49
firstSensAvail_
= p->get<
bool
>(
"First Sensitivities Available"
);
50
51
// required by Hessian types
52
secondSensAvail_
= p->get<
bool
>(
"Second Sensitivities Available"
);
53
secondSensDataKeyPrefix_
= p->get<std::string>(
"Second Sensitivities Data Key Prefix"
);
54
}
55
56
Teuchos::RCP<const Teuchos::ParameterList>
57
GatherSolution_Input::
58
getValidParameters
()
const
59
{
60
using
Teuchos::RCP;
61
62
RCP<Teuchos::ParameterList> p = Teuchos::rcp(
new
Teuchos::ParameterList);
63
64
RCP<std::vector<std::string> > emptyList = Teuchos::rcp(
new
std::vector<std::string>);
65
RCP<std::vector<std::vector<std::string> > > emptyDblList = Teuchos::rcp(
new
std::vector<std::vector<std::string> >);
66
67
// required by Residual types (and all others)
68
p->set<RCP< std::vector<std::string> > >(
"DOF Names"
,emptyList);
69
p->set<RCP< std::vector<std::string> > >(
"Indexer Names"
,emptyList);
70
p->set<RCP<const panzer::PureBasis> >(
"Basis"
,Teuchos::null);
71
p->set<
bool
>(
"Use Time Derivative Solution Vector"
,
false
);
72
p->get<std::string>(
"Global Data Key"
,
"Solution Gather Container"
);
73
74
// required by Tangent types
75
p->set<RCP< std::vector<std::vector<std::string> > > >(
"Tangent Names"
,emptyDblList);
// only Tangent
76
77
// required by Jacobian types
78
p->set<std::string>(
"Sensitivities Name"
,
""
);
// Hessian and Jacobian
79
p->set<
bool
>(
"First Sensitivities Available"
,
true
);
// Hessian and Jacobian
80
p->set<
int
>(
"Gather Seed Index"
,-1);
// Hessian and Jacobian
81
82
// required by Hessian types
83
p->set<
bool
>(
"Second Sensitivities Available"
,
true
);
// Hessian only
84
p->set<std::string>(
"Second Sensitivities Data Key Prefix"
,
"DELTA_"
);
// Hessian only
85
86
return
p;
87
}
88
89
}
Panzer_GatherSolution_Input.hpp
panzer::GatherSolution_Input::tangentNames_
std::vector< std::vector< std::string > > tangentNames_
Definition
Panzer_GatherSolution_Input.hpp:133
panzer::GatherSolution_Input::useTimeDerivSolnVec_
bool useTimeDerivSolnVec_
Definition
Panzer_GatherSolution_Input.hpp:129
panzer::GatherSolution_Input::setParameterList
void setParameterList(const Teuchos::ParameterList &pl)
Definition
Panzer_GatherSolution_Input.cpp:13
panzer::GatherSolution_Input::indexerNames_
std::vector< std::string > indexerNames_
Definition
Panzer_GatherSolution_Input.hpp:127
panzer::GatherSolution_Input::secondSensDataKeyPrefix_
std::string secondSensDataKeyPrefix_
Definition
Panzer_GatherSolution_Input.hpp:142
panzer::GatherSolution_Input::sensName_
std::string sensName_
Definition
Panzer_GatherSolution_Input.hpp:136
panzer::GatherSolution_Input::dofNames_
std::vector< std::string > dofNames_
Definition
Panzer_GatherSolution_Input.hpp:126
panzer::GatherSolution_Input::getValidParameters
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Get valid parameters.
Definition
Panzer_GatherSolution_Input.cpp:58
panzer::GatherSolution_Input::globalDataKey_
std::string globalDataKey_
Definition
Panzer_GatherSolution_Input.hpp:130
panzer::GatherSolution_Input::firstSensAvail_
bool firstSensAvail_
Definition
Panzer_GatherSolution_Input.hpp:138
panzer::GatherSolution_Input::secondSensAvail_
bool secondSensAvail_
Definition
Panzer_GatherSolution_Input.hpp:141
panzer::GatherSolution_Input::basis_
Teuchos::RCP< const PureBasis > basis_
Definition
Panzer_GatherSolution_Input.hpp:128
panzer::GatherSolution_Input::GatherSolution_Input
GatherSolution_Input()
Definition
Panzer_GatherSolution_Input.cpp:6
panzer::GatherSolution_Input::gatherSeedIndex_
int gatherSeedIndex_
Definition
Panzer_GatherSolution_Input.hpp:137
panzer
Computes .
Definition
Panzer_BasisValues_Evaluator_decl.hpp:54
Generated by
1.17.0