Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherSolution_BlockedEpetra_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_BlockedEpetra_decl_hpp__
12 #define __Panzer_GatherSolution_BlockedEpetra_decl_hpp__
13 
15 //
16 // Include Files
17 //
19 
20 // Panzer
23 #include "Panzer_Dimension.hpp"
24 #include "PanzerDiscFE_config.hpp"
26 #include "Panzer_Traits.hpp"
27 
28 // Phalanx
29 #include "Phalanx_config.hpp"
30 #include "Phalanx_Evaluator_Macros.hpp"
31 #include "Phalanx_MDField.hpp"
32 
33 // Teuchos
35 
37 //
38 // Forward Declarations
39 //
41 
42 namespace panzer
43 {
44  class GlobalIndexer;
45 }
46 namespace Thyra
47 {
48  template<typename> class ProductVectorBase;
49 }
50 
51 namespace panzer
52 {
61  template<typename EvalT, typename TRAITS, typename LO, typename GO>
63  :
64  public panzer::EvaluatorWithBaseImpl<TRAITS>,
65  public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
67  {
68  public:
69 
73  typedef typename EvalT::ScalarT ScalarT;
74 
84  const Teuchos::ParameterList& p)
85  {
86  } // end of Constructor
87 
102  const Teuchos::ParameterList& pl) const
103  {
104  return Teuchos::rcp(new
106  } // end of clone()
107 
116  void
118  typename TRAITS::SetupData d,
120  {
121  } // end of postRegistrationSetup()
122 
131  void
133  typename TRAITS::EvalData d)
134  {
135  using PHX::print;
136  using std::cout;
137  using std::endl;
138  cout << "Unspecialized version of \"GatherSolution_BlockedEpetra::" \
139  "evaluateFields\" on " + print<EvalT>() + "\" should not " \
140  "be used!" << endl;
141  TEUCHOS_ASSERT(false);
142  } // end of evaluateFields()
143 
144  }; // end of class GatherSolution_BlockedEpetra
145 
156  template<typename TRAITS, typename LO, typename GO>
157  class GatherSolution_BlockedEpetra<panzer::Traits::Residual, TRAITS, LO, GO>
158  :
159  public panzer::EvaluatorWithBaseImpl<TRAITS>,
160  public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
162  {
163  public:
164 
174  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
175  indexers)
176  :
177  indexers_(indexers)
178  {
179  } // end of Constructor
180 
194  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
195  indexers,
196  const Teuchos::ParameterList& p);
197 
207  void
209  typename TRAITS::SetupData d,
211 
222  void
223  preEvaluate(
224  typename TRAITS::PreEvalData d);
225 
234  void
236  typename TRAITS::EvalData d);
237 
252  const Teuchos::ParameterList& pl) const
253  {
254  using panzer::Traits;
255  using Teuchos::rcp;
256  return rcp(new
258  (indexers_, pl));
259  } // end of clone()
260 
261  private:
262 
266  typedef typename panzer::Traits::Residual EvalT;
267 
272 
277  std::vector<Teuchos::RCP<const GlobalIndexer>> indexers_;
278 
282  std::vector<int> indexerIds_;
283 
287  std::vector<int> subFieldIds_;
288 
292  std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
293 
297  std::vector<std::string> indexerNames_;
298 
304 
308  std::string globalDataKey_;
309 
314 
321 
326 
337  std::vector<std::vector<PHX::MDField<const ScalarT, Cell, NODE>>>
339 
344 
345  }; // end of class GatherSolution_BlockedEpetra (Residual Specialization)
346 
357  template<typename TRAITS, typename LO, typename GO>
358  class GatherSolution_BlockedEpetra<panzer::Traits::Tangent, TRAITS, LO, GO>
359  :
360  public panzer::EvaluatorWithBaseImpl<TRAITS>,
361  public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
363  {
364  public:
365 
375  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
376  indexers)
377  :
378  indexers_(indexers)
379  {
380  } // end of Constructor
381 
395  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
396  indexers,
397  const Teuchos::ParameterList& p);
398 
408  void
410  typename TRAITS::SetupData d,
412 
423  void
424  preEvaluate(
425  typename TRAITS::PreEvalData d);
426 
436  void
438  typename TRAITS::EvalData d);
439 
454  const Teuchos::ParameterList& pl) const
455  {
456  using panzer::Traits;
457  using Teuchos::rcp;
458  return rcp(new
460  (indexers_, pl));
461  } // end of clone()
462 
463  private:
464 
468  typedef typename panzer::Traits::Tangent EvalT;
469 
474 
479  std::vector<Teuchos::RCP<const GlobalIndexer>> indexers_;
480 
484  std::vector<int> indexerIds_;
485 
489  std::vector<int> subFieldIds_;
490 
494  std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
495 
499  std::vector<std::string> indexerNames_;
500 
506 
510  std::string globalDataKey_;
511 
516 
523 
528 
539  std::vector<std::vector<PHX::MDField<const ScalarT, Cell, NODE>>>
541 
546 
547  }; // end of class GatherSolution_BlockedEpetra (Tangent Specialization)
548 
559  template<typename TRAITS, typename LO, typename GO>
560  class GatherSolution_BlockedEpetra<panzer::Traits::Jacobian, TRAITS, LO, GO>
561  :
562  public panzer::EvaluatorWithBaseImpl<TRAITS>,
563  public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
565  {
566  public:
567 
577  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
578  indexers)
579  :
580  indexers_(indexers)
581  {
582  } // end of Constructor
583 
597  const std::vector<Teuchos::RCP<const GlobalIndexer>>&
598  indexers,
599  const Teuchos::ParameterList& p);
600 
610  void
612  typename TRAITS::SetupData d,
614 
626  void
627  preEvaluate(
628  typename TRAITS::PreEvalData d);
629 
639  void
641  typename TRAITS::EvalData d);
642 
657  const Teuchos::ParameterList& pl) const
658  {
659  using panzer::Traits;
660  using Teuchos::rcp;
661  return rcp(new
663  (indexers_, pl));
664  } // end of clone()
665 
666  private:
667 
671  typedef typename panzer::Traits::Jacobian EvalT;
672 
677 
682  std::vector<Teuchos::RCP<const GlobalIndexer>> indexers_;
683 
687  std::vector<int> indexerIds_;
688 
692  std::vector<int> subFieldIds_;
693 
697  std::vector<PHX::MDField<ScalarT, Cell, NODE>> gatherFields_;
698 
702  std::vector<std::string> indexerNames_;
703 
709 
714 
718  std::string sensitivitiesName_;
719 
725 
729  std::string globalDataKey_;
730 
737 
742 
749 
754 
755  }; // end of class GatherSolution_BlockedEpetra (Jacobian Specialization)
756 
757 } // end of namespace panzer
758 
759 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
761 #endif // Panzer_BUILD_HESSIAN_SUPPORT
762 
763 #endif // __Panzer_GatherSolution_BlockedEpetra_decl_hpp__
std::vector< Teuchos::RCP< const GlobalIndexer > > indexers_
These map 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_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer >> &indexers)
Constructor.
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
Fields for storing the tangent components of the solution vector .
std::vector< Teuchos::RCP< const GlobalIndexer > > indexers_
These map 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.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
Teuchos::RCP< panzer::BlockedVector_ReadOnly_GlobalEvaluationData > xBvRoGed_
The GlobalEvaluationData containing both the owned and ghosted solution vectors.
GatherSolution_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer >> &indexers)
Constructor.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
bool applySensitivities_
Used by evaluateFields() to turn on/off a certain set of sensitivities.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &fm)
Post-Registration Setup.
GatherSolution_BlockedEpetra(const Teuchos::ParameterList &p)
Constructor.
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
Fields for storing the tangent components of the solution vector .
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Create a copy.
virtual void preEvaluate(typename Traits::PreEvalData d)=0
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
std::vector< std::string > indexerNames_
A list of the names of the fields to be gathered.
GatherSolution_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer >> &indexers)
Constructor.
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.
void evaluateFields(typename TRAITS::EvalData d)
Evaluate Fields.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
The fields to be gathered.
std::vector< Teuchos::RCP< const GlobalIndexer > > indexers_
These map the local (field, element, basis) triplet to a global ID for scattering.
#define TEUCHOS_ASSERT(assertion_test)
Teuchos::RCP< panzer::BlockedVector_ReadOnly_GlobalEvaluationData > xBvRoGed_
The GlobalEvaluationData containing both the owned and ghosted solution vectors.
Non-templated empty base class for template managers.
Teuchos::RCP< panzer::BlockedVector_ReadOnly_GlobalEvaluationData > xBvRoGed_
The GlobalEvaluationData containing both the owned and ghosted solution vectors.