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// **************************************************************
25template <typename TRAITS,typename LO,typename GO,typename NodeT>
27 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30
31public:
32 ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
33 : globalIndexer_(indexer) { }
34
35 ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer,
36 const Teuchos::ParameterList& p);
37
38 void postRegistrationSetup(typename TRAITS::SetupData d,
40
41 void preEvaluate(typename TRAITS::PreEvalData d);
42
43 void evaluateFields(typename TRAITS::EvalData workset);
44
45 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
47
48private:
50 typedef typename TRAITS::RealType RealType;
51
53 typedef Tpetra::Vector<RealType,LO,GO,NodeT> VectorType;
54 typedef Tpetra::CrsMatrix<RealType,LO,GO,NodeT> CrsMatrixType;
55 typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
56 typedef Tpetra::Map<LO,GO,NodeT> MapType;
57 typedef Tpetra::Import<LO,GO,NodeT> ImportType;
58 typedef Tpetra::Export<LO,GO,NodeT> ExportType;
59
60 // dummy field so that the evaluator will have something to do
61 Teuchos::RCP<PHX::FieldTag> scatterHolder_;
62
63 // fields that need to be scattered will be put in this vector
64 std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
65
66 // maps the local (field,element,basis) triplet to a global ID
67 // for scattering
68 Teuchos::RCP<const panzer::BlockedDOFManager> globalIndexer_;
69
70 std::vector<int> fieldIds_; // field IDs needing mapping
71
72 // This maps the scattered field names to the DOF manager field
73 // For instance a Navier-Stokes map might look like
74 // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
75 // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
76 Teuchos::RCP<const std::map<std::string,std::string> > fieldMap_;
77
78 std::size_t num_nodes;
79
80 std::size_t side_subcell_dim_;
81 std::size_t local_side_id_;
82
83 Teuchos::RCP<Thyra::ProductVectorBase<double> > dirichletCounter_;
84 std::string globalDataKey_; // what global data does this fill?
85 Teuchos::RCP<const BlockedTpetraLinearObjContainer<RealType,LO,GO,NodeT> > blockedContainer_;
86
89
90 // If set to true, scattering an initial condition
92
93 // Allows runtime disabling of dirichlet BCs on node-by-node basis
94 std::vector< PHX::MDField<const bool,Cell,NODE> > applyBC_;
95
97};
98
99}
100
101// **************************************************************
102#endif
103
104#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Pushes residual values into the residual vector for a Newton-based solve.
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)