Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ScatterResidual_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_ScatterResidual_Epetra_Hessian_hpp__
12 #define __Panzer_ScatterResidual_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 scatter residual file
19 
20 namespace panzer {
21 
22 // **************************************************************
23 // Hessian Specialization
24 // **************************************************************
25 template<typename TRAITS,typename LO,typename GO>
26 class ScatterResidual_Epetra<panzer::Traits::Hessian,TRAITS,LO,GO>
27  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28  public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30 
31 public:
33  const Teuchos::RCP<const panzer::GlobalIndexer> & cIndexer=Teuchos::null,
34  bool useDiscreteAdjoint=false)
35  : globalIndexer_(indexer), colGlobalIndexer_(cIndexer), useDiscreteAdjoint_(useDiscreteAdjoint) {}
36 
39  const Teuchos::ParameterList& p,bool=false);
40 
41  void postRegistrationSetup(typename TRAITS::SetupData d,
43 
44  void preEvaluate(typename TRAITS::PreEvalData d);
45 
46  void evaluateFields(typename TRAITS::EvalData workset);
47 
49  { return Teuchos::rcp(new ScatterResidual_Epetra<panzer::Traits::Hessian,TRAITS,LO,GO>(globalIndexer_,colGlobalIndexer_,pl)); }
50 
51 private:
53 
54  // dummy field so that the evaluator will have something to do
56 
57  // fields that need to be scattered will be put in this vector
58  std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
59 
60  // maps the local (field,element,basis) triplet to a global ID
61  // for scattering
63  std::vector<int> fieldIds_; // field IDs needing mapping
64 
65  // This maps the scattered field names to the DOF manager field
66  // For instance a Navier-Stokes map might look like
67  // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
68  // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
70 
71  std::string globalDataKey_; // what global data does this fill?
72 
74 
76 
78 };
79 
80 }
81 
82 // **************************************************************
83 #endif
84 
85 #endif
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Pushes residual values into the residual vector for a Newton-based solve.
ScatterResidual_Epetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer, const Teuchos::RCP< const panzer::GlobalIndexer > &cIndexer=Teuchos::null, bool useDiscreteAdjoint=false)
Non-templated empty base class for template managers.