Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherSolution_Tpetra_Hessian.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 //
12 #ifndef __Panzer_GatherSolution_Tpetra_Hessian_hpp__
13 #define __Panzer_GatherSolution_Tpetra_Hessian_hpp__
14 
15 // only do this if required by the user
16 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
17 
18 // the includes for this file come in as a result of the includes in the main
19 // Tpetra gather solution file
20 
21 namespace panzer {
22 
23 // **************************************************************
24 // Hessian Specialization
25 // **************************************************************
26 template<typename TRAITS,typename LO,typename GO,typename NodeT>
27 class GatherSolution_Tpetra<panzer::Traits::Hessian,TRAITS,LO,GO,NodeT>
28  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
29  public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
31 
32 
33 public:
34 
36  globalIndexer_(indexer) {}
37 
39  const Teuchos::ParameterList& /* p */) {}
40 
41  void postRegistrationSetup(typename TRAITS::SetupData /* d */,
42  PHX::FieldManager<TRAITS>& /* vm */) {}
43 
44  void preEvaluate(typename TRAITS::PreEvalData /* d */) {}
45 
46  void evaluateFields(typename TRAITS::EvalData /* d */) {}
47 
50 
51  // for testing purposes
52  const PHX::FieldTag & getFieldTag(int i) const
53  { TEUCHOS_ASSERT(i < Teuchos::as<int>(gatherFields_.size())); return gatherFields_[i].fieldTag(); }
54 
55 private:
56 
58 
59  // maps the local (field,element,basis) triplet to a global ID
60  // for scattering
62  std::vector<int> fieldIds_; // field IDs needing mapping
63 
64  std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
65 
68  std::string globalDataKey_; // what global data does this fill?
69 
71 
72  // Fields for storing tangent components dx/dp of solution vector x
73  // These are not actually used by the residual specialization of this evaluator,
74  // even if they are supplied, but it is useful to declare them as dependencies anyway
75  // when saving the tangent components to the output file
77  std::vector< std::vector< PHX::MDField<const ScalarT,Cell,NODE> > > tangentFields_;
78 
80 };
81 
82 }
83 
84 #endif // end hessian support
85 
86 #endif
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
#define TEUCHOS_ASSERT(assertion_test)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< const TpetraLinearObjContainer< double, LO, GO, NodeT > > tpetraContainer_
GatherSolution_Tpetra(const Teuchos::RCP< const panzer::GlobalIndexer > &, const Teuchos::ParameterList &)
Non-templated empty base class for template managers.