Panzer Version of the Day
Loading...
Searching...
No Matches
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
20namespace panzer {
21
22// **************************************************************
23// Hessian Specialization
24// **************************************************************
25
26template <typename TRAITS,typename LO,typename GO,typename NodeT>
28 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
29 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
31
32public:
33 ScatterResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
34 : globalIndexer_(indexer) {}
35
36 ScatterResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer,
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
46 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
47 { return Teuchos::rcp(new ScatterResidual_BlockedTpetra<panzer::Traits::Hessian,TRAITS,LO,GO,NodeT>(globalIndexer_,pl)); }
48
49private:
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
62 Teuchos::RCP<PHX::FieldTag> scatterHolder_;
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
69 Teuchos::RCP<const BlockedDOFManager> globalIndexer_;
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"
77 Teuchos::RCP<const std::map<std::string,std::string> > fieldMap_;
78
79 std::string globalDataKey_; // what global data does this fill?
80 Teuchos::RCP<const BlockedTpetraLinearObjContainer<RealType,LO,GO,NodeT> > blockedContainer_;
81
83};
84
85}
86
87// **************************************************************
88#endif
89
90#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Pushes residual values into the residual vector for a Newton-based solve.
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)