Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ScatterResidual_BlockedTpetra_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_BlockedTpetra_Hessian_hpp__
12 #define __Panzer_ScatterResidual_BlockedTpetra_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 // blocked Tpetra scatter dirichlet file
19 
20 namespace panzer {
21 
22 // **************************************************************
23 // Hessian Specialization
24 // **************************************************************
25 
26 template <typename TRAITS,typename LO,typename GO,typename NodeT>
27 class ScatterResidual_BlockedTpetra<panzer::Traits::Hessian,TRAITS,LO,GO,NodeT>
28  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
29  public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
31 
32 public:
34  : globalIndexer_(indexer) {}
35 
37  const Teuchos::ParameterList& p);
38 
39  void postRegistrationSetup(typename TRAITS::SetupData d,
41 
42  void preEvaluate(typename TRAITS::PreEvalData d);
43 
44  void evaluateFields(typename TRAITS::EvalData workset);
45 
48 
49 private:
51  typedef typename TRAITS::RealType RealType;
52 
54  typedef Tpetra::Vector<RealType,LO,GO,NodeT> VectorType;
55  typedef Tpetra::CrsMatrix<RealType,LO,GO,NodeT> CrsMatrixType;
56  typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
57  typedef Tpetra::Map<LO,GO,NodeT> MapType;
58  typedef Tpetra::Import<LO,GO,NodeT> ImportType;
59  typedef Tpetra::Export<LO,GO,NodeT> ExportType;
60 
61  // dummy field so that the evaluator will have something to do
63 
64  // fields that need to be scattered will be put in this vector
65  std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
66 
67  // maps the local (field,element,basis) triplet to a global ID
68  // for scattering
70 
71  std::vector<int> fieldIds_; // field IDs needing mapping
72 
73  // This maps the scattered field names to the DOF manager field
74  // For instance a Navier-Stokes map might look like
75  // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
76  // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
78 
79  std::string globalDataKey_; // what global data does this fill?
81 
83 };
84 
85 }
86 
87 // **************************************************************
88 #endif
89 
90 #endif
Pushes residual values into the residual vector for a Newton-based solve.
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
ScatterResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
virtual void preEvaluate(typename Traits::PreEvalData d)=0
Non-templated empty base class for template managers.