Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ScatterDirichletResidual_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_ScatterDirichletResidual_BlockedTpetra_Hessian_hpp__
12#define __Panzer_ScatterDirichletResidual_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
36template <typename TRAITS,typename LO,typename GO,typename NodeT>
38 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
39 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
41
42public:
44 ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
45 : globalIndexer_(indexer) { }
46
48 ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer,
49 const Teuchos::ParameterList& p);
50
52 void postRegistrationSetup(typename TRAITS::SetupData d,
54
56 void preEvaluate(typename TRAITS::PreEvalData d);
57
59 void evaluateFields(typename TRAITS::EvalData workset);
60
62 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
64
65private:
67 typedef typename TRAITS::RealType RealType;
68
70 typedef Tpetra::Vector<RealType,LO,GO,NodeT> VectorType;
71 typedef Tpetra::CrsMatrix<RealType,LO,GO,NodeT> CrsMatrixType;
72 typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
73 typedef Tpetra::Map<LO,GO,NodeT> MapType;
74 typedef Tpetra::Import<LO,GO,NodeT> ImportType;
75 typedef Tpetra::Export<LO,GO,NodeT> ExportType;
76
77 // dummy field so that the evaluator will have something to do
78 Teuchos::RCP<PHX::FieldTag> scatterHolder_;
79
80 // fields that need to be scattered will be put in this vector
81 std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
82
83 // maps the local (field,element,basis) triplet to a global ID
84 // for scattering
85 Teuchos::RCP<const panzer::BlockedDOFManager> globalIndexer_;
86
87 std::vector<int> fieldIds_; // field IDs needing mapping
88
89 // This maps the scattered field names to the DOF manager field
90 // For instance a Navier-Stokes map might look like
91 // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
92 // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
93 Teuchos::RCP<const std::map<std::string,std::string> > fieldMap_;
94
95 std::size_t num_nodes;
96
97 std::size_t side_subcell_dim_;
98 std::size_t local_side_id_;
99
100 Teuchos::RCP<Thyra::ProductVectorBase<double> > dirichletCounter_;
101 std::string globalDataKey_; // what global data does this fill?
102 Teuchos::RCP<const BlockedTpetraLinearObjContainer<RealType,LO,GO,NodeT> > blockedContainer_;
103
106
107 // If set to true, scattering an initial condition
109
110 // Allows runtime disabling of dirichlet BCs on node-by-node basis
111 std::vector< PHX::MDField<const bool,Cell,NODE> > applyBC_;
112
114};
115
116}
117
118// **************************************************************
119#endif
120
121#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Construct with a blocked DOF manager only; scattered field names must be set later (e....
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Creates a copy of this evaluator configured from a new ParameterList, sharing the same blocked DOF ma...
Pushes residual values into the residual vector for a Newton-based solve.
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
Evaluation type for computing second derivatives, using HessianType as the scalar type....