Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_GatherSolution_Epetra_decl.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_decl_hpp__
12#define __Panzer_GatherSolution_Epetra_decl_hpp__
13
15//
16// Include Files
17//
19
20// Panzer
24#include "Panzer_Traits.hpp"
25
26// Phalanx
27#include "Phalanx_Evaluator_Macros.hpp"
28#include "Phalanx_MDField.hpp"
29
31//
32// Forward Declarations
33//
35
36namespace panzer
37{
38 class GlobalIndexer;
39}
40
41namespace panzer
42{
51 template<typename EvalT, typename TRAITS, typename LO, typename GO>
53
64 template<typename TRAITS, typename LO, typename GO>
66 :
67 public panzer::EvaluatorWithBaseImpl<TRAITS>,
68 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
70 {
71 public:
72
82 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer)
83 :
84 globalIndexer_(indexer)
85 {
86 } // end of Constructor
87
101 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
102 const Teuchos::ParameterList& p);
103
112 void
113 postRegistrationSetup(
114 typename TRAITS::SetupData d,
116
129 void
130 preEvaluate(
131 typename TRAITS::PreEvalData d);
132
141 void
142 evaluateFields(
143 typename TRAITS::EvalData d);
144
157 virtual Teuchos::RCP<CloneableEvaluator>
159 const Teuchos::ParameterList& pl) const
160 {
161 using panzer::Traits;
162 using Teuchos::rcp;
164 (globalIndexer_, pl));
165 } // end of clone()
166
167 private:
168
173
178
183 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_;
184
188 std::vector<int> fieldIds_;
189
193 std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
194
198 std::vector<std::string> indexerNames_;
199
205
209 std::string globalDataKey_;
210
214 Teuchos::RCP<Epetra_Vector> x_;
215
220 Teuchos::RCP<panzer::EpetraVector_ReadOnly_GlobalEvaluationData>
222
227
238 std::vector<std::vector<PHX::MDField<const ScalarT, Cell, NODE>>>
240
245
246 }; // end of class GatherSolution_Epetra (Residual specialization)
247
258 template<typename TRAITS, typename LO, typename GO>
260 :
261 public panzer::EvaluatorWithBaseImpl<TRAITS>,
262 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
264 {
265 public:
266
276 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer)
277 :
278 globalIndexer_(indexer)
279 {
280 } // end of Constructor
281
295 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
296 const Teuchos::ParameterList& p);
297
306 void
307 postRegistrationSetup(
308 typename TRAITS::SetupData d,
310
323 void
324 preEvaluate(
325 typename TRAITS::PreEvalData d);
326
336 void
337 evaluateFields(
338 typename TRAITS::EvalData d);
339
352 virtual Teuchos::RCP<CloneableEvaluator>
354 const Teuchos::ParameterList& pl) const
355 {
356 using panzer::Traits;
357 using Teuchos::rcp;
359 (globalIndexer_, pl));
360 } // end of clone()
361
362 private:
363
368
373
378 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_;
379
383 std::vector<int> fieldIds_;
384
388 std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
389
393 std::vector<std::string> indexerNames_;
394
400
404 std::string globalDataKey_;
405
409 Teuchos::RCP<Epetra_Vector> x_;
410
415 Teuchos::RCP<panzer::EpetraVector_ReadOnly_GlobalEvaluationData>
417
422
428 std::vector<std::vector<PHX::MDField<const ScalarT, Cell, NODE>>>
430
435
436 }; // end of class GatherSolution_Epetra (Tangent specialization)
437
448 template<typename TRAITS, typename LO, typename GO>
450 :
451 public panzer::EvaluatorWithBaseImpl<TRAITS>,
452 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
454 {
455 public:
456
466 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer)
467 :
468 globalIndexer_(indexer)
469 {
470 } // end of Constructor
471
484 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
485 const Teuchos::ParameterList& p);
486
495 void
496 postRegistrationSetup(
497 typename TRAITS::SetupData d,
499
513 void
514 preEvaluate(
515 typename TRAITS::PreEvalData d);
516
526 void
527 evaluateFields(
528 typename TRAITS::EvalData d);
529
542 virtual Teuchos::RCP<CloneableEvaluator>
544 const Teuchos::ParameterList& pl) const
545 {
546 using panzer::Traits;
547 using Teuchos::rcp;
549 (globalIndexer_, pl));
550 } // end of clone()
551
552 private:
553
558
563
568 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_;
569
573 std::vector<int> fieldIds_;
574
578 std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
579
583 std::vector<std::string> indexerNames_;
584
590
595
600
606
610 std::string globalDataKey_;
611
618
622 Teuchos::RCP<Epetra_Vector> x_;
623
628 Teuchos::RCP<panzer::EpetraVector_ReadOnly_GlobalEvaluationData>
630
635
636 }; // end of class GatherSolution_Epetra (Jacobian specialization)
637
638} // end of namespace panzer
639
640#ifdef Panzer_BUILD_HESSIAN_SUPPORT
642#endif // Panzer_BUILD_HESSIAN_SUPPORT
643
644#endif // __Panzer_GatherSolution_Epetra_decl_hpp__
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
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::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted vectors.
bool applySensitivities_
Used by evaluateFields() to turn on/off a certain set of 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.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
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 vectors.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
bool hasTangentFields_
A flag indicating whether or not we have tangent fields.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
Maps the local (field, element, basis) triplet to a global ID for scattering.
bool useTimeDerivativeSolutionVector_
A flag indicating whether we're to be working with or .
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
Fields for storing the tangent components of the solution vector .
bool useTimeDerivativeSolutionVector_
A flag indicating whether we should be working with or .
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
Fields for storing the tangent components of the solution vector .
bool hasTangentFields_
A flag indicating whether or not we have tangent fields.
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
Maps the local (field, element, basis) triplet to a global ID for scattering.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted vectors.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.
Evaluation type for computing the residual and its Jacobian, using FadType as the scalar type.
Evaluation type for computing the residual only, using RealType as the scalar type.
Evaluation type for computing directional derivatives (e.g. parameter sensitivities),...
Panzer's specialization of the Phalanx traits class.