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// **************************************************************
25
37template <typename TRAITS,typename S,typename LO,typename GO,typename NodeT>
39 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
40 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
42
43
44public:
45
47 GatherSolution_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
48 : gidIndexer_(indexer) {}
49
51 GatherSolution_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & /* indexer */,
52 const Teuchos::ParameterList& /* p */) {}
53
55 void postRegistrationSetup(typename TRAITS::SetupData /* d */,
56 PHX::FieldManager<TRAITS>& /* vm */) {}
57
59 void preEvaluate(typename TRAITS::PreEvalData /* d */) {}
60
62 void evaluateFields(typename TRAITS::EvalData /* d */) {}
63
65 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
67
68
69private:
71
73 typedef Tpetra::Vector<S,LO,GO,NodeT> VectorType;
74 typedef Tpetra::CrsMatrix<S,LO,GO,NodeT> CrsMatrixType;
75 typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
76 typedef Tpetra::Map<LO,GO,NodeT> MapType;
77 typedef Tpetra::Import<LO,GO,NodeT> ImportType;
78 typedef Tpetra::Export<LO,GO,NodeT> ExportType;
79
80 // maps the local (field,element,basis) triplet to a global ID
81 // for scattering
82 Teuchos::RCP<const BlockedDOFManager> gidIndexer_;
83
84 std::vector<int> fieldIds_; // field IDs needing mapping
85
86 std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
87
88 Teuchos::RCP<std::vector<std::string> > indexerNames_;
90 std::string globalDataKey_; // what global data does this fill?
91
92 Teuchos::RCP<const BlockedTpetraLinearObjContainer<S,LO,GO,NodeT> > blockedContainer_;
93
94 // Fields for storing tangent components dx/dp of solution vector x
95 // These are not actually used by the residual specialization of this evaluator,
96 // even if they are supplied, but it is useful to declare them as dependencies anyway
97 // when saving the tangent components to the output file
99 std::vector< std::vector< PHX::MDField<ScalarT,Cell,NODE> > > tangentFields_;
100
102};
103
104}
105
106// **************************************************************
107#endif
108
109#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
void preEvaluate(typename TRAITS::PreEvalData)
No-op (unimplemented for this specialization).
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
No-op (unimplemented for this specialization).
GatherSolution_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &, const Teuchos::ParameterList &)
No-op constructor (unimplemented for this specialization).
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Creates a copy of this evaluator configured from a new ParameterList, sharing the same blocked DOF ma...
GatherSolution_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Construct with a blocked DOF manager only; no-op beyond storing the indexer.
Evaluation type for computing second derivatives, using HessianType as the scalar type....