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.
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 
12 
13 namespace panzer {
14 
17 {
19 }
20 
21 void
24 {
26 }
27 
28 void
31 {
32  using Teuchos::RCP;
33 
34  // correction for non const basis
35  if(p->isType<RCP<PureBasis> >("Basis")) {
36  RCP<const PureBasis> basis = p->get<RCP<PureBasis> >("Basis");
37  p->remove("Basis");
38  p->set("Basis",basis);
39  }
40 
41  // set complete state
43 
44  // for posterity save the modified list
45  setMyParamList(p);
46 
47  dofNames_ = *p->get<RCP< std::vector<std::string> > >("DOF Names");
48  indexerNames_ = *p->get<RCP< std::vector<std::string> > >("Indexer Names");
49  useTimeDerivSolnVec_ = p->get<bool>("Use Time Derivative Solution Vector");
50  globalDataKey_ = p->get<std::string>("Global Data Key");
51  basis_ = p->get<RCP<const panzer::PureBasis> >("Basis");
52 
53  // required by Tangent types
54  tangentNames_ = *p->get<RCP<std::vector<std::vector<std::string> > > >("Tangent Names");
55 
56  // required by Jacobian types
57  sensName_ = p->get<std::string>("Sensitivities Name");
58  gatherSeedIndex_ = p->get<int>("Gather Seed Index");
59  firstSensAvail_ = p->get<bool>("First Sensitivities Available");
60 
61  // required by Hessian types
62  secondSensAvail_ = p->get<bool>("Second Sensitivities Available");
63  secondSensDataKeyPrefix_ = p->get<std::string>("Second Sensitivities Data Key Prefix");
64 }
65 
69 {
70  using Teuchos::RCP;
71 
73 
74  RCP<std::vector<std::string> > emptyList = Teuchos::rcp(new std::vector<std::string>);
75  RCP<std::vector<std::vector<std::string> > > emptyDblList = Teuchos::rcp(new std::vector<std::vector<std::string> >);
76 
77  // required by Residual types (and all others)
78  p->set<RCP< std::vector<std::string> > >("DOF Names",emptyList);
79  p->set<RCP< std::vector<std::string> > >("Indexer Names",emptyList);
80  p->set<RCP<const panzer::PureBasis> >("Basis",Teuchos::null);
81  p->set<bool>("Use Time Derivative Solution Vector",false);
82  p->get<std::string>("Global Data Key","Solution Gather Container");
83 
84  // required by Tangent types
85  p->set<RCP< std::vector<std::vector<std::string> > > >("Tangent Names",emptyDblList); // only Tangent
86 
87  // required by Jacobian types
88  p->set<std::string>("Sensitivities Name",""); // Hessian and Jacobian
89  p->set<bool>("First Sensitivities Available",true); // Hessian and Jacobian
90  p->set<int>("Gather Seed Index",-1); // Hessian and Jacobian
91 
92  // required by Hessian types
93  p->set<bool>("Second Sensitivities Available",true); // Hessian only
94  p->set<std::string>("Second Sensitivities Data Key Prefix","DELTA_"); // Hessian only
95 
96  return p;
97 }
98 
99 }
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 &&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