Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_GatherSolution_BlockedEpetra_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_BlockedEpetra_Hessian_hpp__
12#define __Panzer_GatherSolution_BlockedEpetra_Hessian_hpp__
13
14// Only do this if required by the user.
15#ifdef Panzer_BUILD_HESSIAN_SUPPORT
16
17namespace panzer
18{
29 template<typename TRAITS, typename LO, typename GO>
31 :
32 public panzer::EvaluatorWithBaseImpl<TRAITS>,
33 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
35 {
36 public:
37
47 const std::vector<Teuchos::RCP<const GlobalIndexer<LO, int>>>&
48 indexers)
49 :
50 indexers_(indexers)
51 {
52 } // end of Constructor
53
67 const std::vector<Teuchos::RCP<const GlobalIndexer<LO, int>>>&
68 indexers,
69 const Teuchos::ParameterList& p);
70
80 void
82 typename TRAITS::SetupData d,
84
95 void
96 preEvaluate(
97 typename TRAITS::PreEvalData d);
98
107 void
109 typename TRAITS::EvalData d);
110
123 virtual Teuchos::RCP<CloneableEvaluator>
125 const Teuchos::ParameterList& pl) const
126 {
128 using panzer::Traits;
129 using Teuchos::rcp;
130 return rcp(new
132 (indexers_, pl));
133 } // end of clone()
134
135 private:
136
141
146
150 std::vector<std::string> indexerNames_;
151
155 std::string globalDataKey_;
156
161 std::vector<Teuchos::RCP<const GlobalIndexer<LO, int>>> indexers_;
162
166 std::vector<int> indexerIds_;
167
171 std::vector<int> subFieldIds_;
172
176 std::vector< PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
177
183
188
195
201
207
212
218
224
228 Teuchos::RCP<Thyra::ProductVectorBase<double>> x_;
229
234 Teuchos::RCP<panzer::BlockedVector_ReadOnly_GlobalEvaluationData>
236
241 Teuchos::RCP<panzer::BlockedVector_ReadOnly_GlobalEvaluationData>
243
248
249 }; // end of class GatherSolution_BlockedEpetra (Hessian Specialization)
250
251} // end of namespace panzer
252
253#endif // Panzer_BUILD_HESSIAN_SUPPORT
254
255#endif // __Panzer_GatherSolution_BlockedEpetra_Hessian_hpp__
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
GatherSolution_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer< LO, int > > > &indexers)
Constructor.
bool secondSensitivitiesAvailable_
A flag indicating whether or not second sensitivities information is available.
bool secondApplySensitivities_
Used by evaluateFields() to turn on/off the second sensitivities.
std::vector< Teuchos::RCP< const GlobalIndexer< LO, int > > > indexers_
These map the local (field, element, basis) triplet to a global ID for scattering.
std::string sensitivities2ndPrefix_
The prefix for the field containing the second sensitivities.
bool firstApplySensitivities_
Used by evaluateFields() to turn on/off the first sensitivities.
bool firstSensitivitiesAvailable_
A flag indicating whether or not first sensitivities information is available.
Teuchos::RCP< panzer::BlockedVector_ReadOnly_GlobalEvaluationData > xBvRoGed_
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.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
Teuchos::RCP< panzer::BlockedVector_ReadOnly_GlobalEvaluationData > dxBvRoGed_
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.
void evaluateFields(typename TRAITS::EvalData d)
Evaluate Fields.
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &fm)
Post-Registration Setup.