Panzer Version of the Day
Loading...
Searching...
No Matches
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
20namespace panzer {
21
22// **************************************************************
23// Hessian Specialization
24// **************************************************************
25template <typename TRAITS,typename S,typename LO,typename GO,typename NodeT>
27 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30
31
32public:
33
34 GatherSolution_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
35 : gidIndexer_(indexer) {}
36
37 GatherSolution_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & /* indexer */,
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
47 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
48 { return Teuchos::rcp(new GatherSolution_BlockedTpetra<panzer::Traits::Hessian,TRAITS,S,LO,GO>(gidIndexer_,pl)); }
49
50
51private:
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
64 Teuchos::RCP<const BlockedDOFManager> gidIndexer_;
65
66 std::vector<int> fieldIds_; // field IDs needing mapping
67
68 std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
69
70 Teuchos::RCP<std::vector<std::string> > indexerNames_;
72 std::string globalDataKey_; // what global data does this fill?
73
74 Teuchos::RCP<const BlockedTpetraLinearObjContainer<S,LO,GO,NodeT> > blockedContainer_;
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
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
GatherSolution_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &, const Teuchos::ParameterList &)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.