Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherSolution_BlockedTpetra_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 #ifndef __Panzer_GatherSolution_BlockedTpetra_Hessian_hpp__
12 #define __Panzer_GatherSolution_BlockedTpetra_Hessian_hpp__
13 
14 // only do this if required by the user
15 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
16 
17 // the includes for this file come in as a result of the includes in the main
18 // blocked Tpetra gather solution file
19 
20 namespace panzer {
21 
22 // **************************************************************
23 // Hessian Specialization
24 // **************************************************************
25 template <typename TRAITS,typename S,typename LO,typename GO,typename NodeT>
26 class GatherSolution_BlockedTpetra<panzer::Traits::Hessian,TRAITS,S,LO,GO,NodeT>
27  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28  public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30 
31 
32 public:
33 
35  : gidIndexer_(indexer) {}
36 
38  const Teuchos::ParameterList& /* p */) {}
39 
40  void postRegistrationSetup(typename TRAITS::SetupData /* d */,
41  PHX::FieldManager<TRAITS>& /* vm */) {}
42 
43  void preEvaluate(typename TRAITS::PreEvalData /* d */) {}
44 
45  void evaluateFields(typename TRAITS::EvalData /* d */) {}
46 
49 
50 
51 private:
53 
55  typedef Tpetra::Vector<S,LO,GO,NodeT> VectorType;
56  typedef Tpetra::CrsMatrix<S,LO,GO,NodeT> CrsMatrixType;
57  typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
58  typedef Tpetra::Map<LO,GO,NodeT> MapType;
59  typedef Tpetra::Import<LO,GO,NodeT> ImportType;
60  typedef Tpetra::Export<LO,GO,NodeT> ExportType;
61 
62  // maps the local (field,element,basis) triplet to a global ID
63  // for scattering
65 
66  std::vector<int> fieldIds_; // field IDs needing mapping
67 
68  std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
69 
72  std::string globalDataKey_; // what global data does this fill?
73 
75 
76  // Fields for storing tangent components dx/dp of solution vector x
77  // These are not actually used by the residual specialization of this evaluator,
78  // even if they are supplied, but it is useful to declare them as dependencies anyway
79  // when saving the tangent components to the output file
81  std::vector< std::vector< PHX::MDField<ScalarT,Cell,NODE> > > tangentFields_;
82 
84 };
85 
86 }
87 
88 // **************************************************************
89 #endif
90 
91 #endif
GatherSolution_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
GatherSolution_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &, const Teuchos::ParameterList &)
Non-templated empty base class for template managers.