Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
36 namespace panzer
37 {
38  class GlobalIndexer;
39 }
40 
41 namespace panzer
42 {
51  template<typename EvalT, typename TRAITS, typename LO, typename GO>
53 
64  template<typename TRAITS, typename LO, typename GO>
65  class GatherSolution_Epetra<panzer::Traits::Residual, TRAITS, LO, GO>
66  :
67  public panzer::EvaluatorWithBaseImpl<TRAITS>,
68  public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
70  {
71  public:
72 
83  :
84  globalIndexer_(indexer)
85  {
86  } // end of Constructor
87 
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 
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 
172  typedef typename panzer::Traits::Residual EvalT;
173 
178 
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 
215 
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>
259  class GatherSolution_Epetra<panzer::Traits::Tangent, TRAITS, LO, GO>
260  :
261  public panzer::EvaluatorWithBaseImpl<TRAITS>,
262  public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
264  {
265  public:
266 
277  :
278  globalIndexer_(indexer)
279  {
280  } // end of Constructor
281 
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 
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 
367  typedef typename panzer::Traits::Tangent EvalT;
368 
373 
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 
410 
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>
449  class GatherSolution_Epetra<panzer::Traits::Jacobian, TRAITS, LO, GO>
450  :
451  public panzer::EvaluatorWithBaseImpl<TRAITS>,
452  public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
454  {
455  public:
456 
467  :
468  globalIndexer_(indexer)
469  {
470  } // end of Constructor
471 
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 
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 
557  typedef typename panzer::Traits::Jacobian EvalT;
558 
563 
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 
599  std::string sensitivitiesName_;
600 
606 
610  std::string globalDataKey_;
611 
618 
623 
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__
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
bool hasTangentFields_
A flag indicating whether or not we have tangent fields.
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
Maps the local (field, element, basis) triplet to a global ID for scattering.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
bool hasTangentFields_
A flag indicating whether or not we have tangent fields.
std::string sensitivitiesName_
Sets which gather operations have sensitivities.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted vectors.
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted vectors.
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&#39;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.
bool applySensitivities_
Used by evaluateFields() to turn on/off a certain set of sensitivities.
bool useTimeDerivativeSolutionVector_
A flag indicating whether we should be working with or .
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Teuchos::RCP< panzer::EpetraVector_ReadOnly_GlobalEvaluationData > xEvRoGed_
The GlobalEvaluationData containing both the owned and ghosted vectors.
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.
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.
bool useTimeDerivativeSolutionVector_
A flag indicating whether we&#39;re to be working with or .
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
GatherSolution_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Constructor.
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
Fields for storing the tangent components of the solution vector .
Non-templated empty base class for template managers.