Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_GatherSolution_Epetra_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_Epetra_Hessian_hpp__
12#define __Panzer_GatherSolution_Epetra_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// Epetra gather solution file
19
20namespace panzer
21{
32 template<typename TRAITS, typename LO, typename GO>
34 :
35 public panzer::EvaluatorWithBaseImpl<TRAITS>,
36 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
38 {
39 public:
40
50 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer)
51 :
52 globalIndexer_(indexer)
53 {
54 } // end of Constructor
55
68 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
69 const Teuchos::ParameterList& p);
70
79 void
80 postRegistrationSetup(
81 typename TRAITS::SetupData d,
83
100 void
101 preEvaluate(
102 typename TRAITS::PreEvalData d);
103
113 void
114 evaluateFields(
115 typename TRAITS::EvalData d);
116
129 virtual Teuchos::RCP<CloneableEvaluator>
131 const Teuchos::ParameterList& pl) const
132 {
133 using panzer::Traits;
134 using Teuchos::rcp;
136 (globalIndexer_, pl));
137 } // end of clone()
138
139 private:
140
145
150
155 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_;
156
160 std::vector<std::string> indexerNames_;
161
165 std::vector<int> fieldIds_;
166
170 std::vector< PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
171
175 std::vector< PHX::MDField<ScalarT, Cell, NODE>> sensFields_;
176
182
186 std::string globalDataKey_;
187
192
199
205
211
216
222
228
232 Teuchos::RCP<Epetra_Vector> x_;
233
238 Teuchos::RCP<panzer::EpetraVector_ReadOnly_GlobalEvaluationData>
240
245 Teuchos::RCP<panzer::EpetraVector_ReadOnly_GlobalEvaluationData>
247
252
253 }; // end of class GatherSolution_Epetra (Hessian Specialization)
254
255} // end of namespace panzer
256
257#endif // Panzer_BUILD_HESSIAN_SUPPORT
258
259#endif // __Panzer_GatherSolution_Epetra_Hessian_hpp__
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
bool secondSensitivitiesAvailable_
A flag indicating whether or not we're to be working with the second derivative sensitivities.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
bool secondApplySensitivities_
Used by evaluateFields() to turn on/off the second derivative sensitivities.
bool firstApplySensitivities_
Used by evaluateFields() to turn on/off the first derivative sensitivities.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > sensFields_
The sensitivity fields.
bool firstSensitivitiesAvailable_
A flag indicating whether or not we're to be working with the first derivative sensitivities.
bool useTimeDerivativeSolutionVector_
A flag indicating whether we're to be working with or .
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
Maps the local (field, element, basis) triplet to a global ID for scattering.
std::string sensitivities2ndPrefix_
The prefix for the field containing the second sensitivities.
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted solution vectors.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > dxEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted derivative vectors.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.