Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherSolution_Input.cpp
Go to the documentation of this file.
2 
3 namespace panzer {
4 
7 {
9 }
10 
11 void
14 {
16 }
17 
18 void
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
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 
59 {
60  using Teuchos::RCP;
61 
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 }
Teuchos::RCP< const PureBasis > basis_
void setParameterList(const Teuchos::ParameterList &pl)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Get valid parameters.
T & get(const std::string &name, T def_value)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
std::vector< std::vector< std::string > > tangentNames_
bool remove(std::string const &name, bool throwIfNotExists=true)
std::vector< std::string > indexerNames_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void setMyParamList(const RCP< ParameterList > &paramList)
void validateParametersAndSetDefaults(ParameterList const &validParamList, int const depth=1000)
bool isType(const std::string &name) const