Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ScatterDirichletResidual_Tpetra_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_Tpetra_Hessian_hpp__
12 #define __Panzer_ScatterDirichletResidual_Tpetra_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 // Tpetra scatter dirichlet residual file
19 
20 namespace panzer {
21 
22 // **************************************************************
23 // Hessian Specialization
24 // **************************************************************
25 template<typename TRAITS,typename LO,typename GO,typename NodeT>
26 class ScatterDirichletResidual_Tpetra<panzer::Traits::Hessian,TRAITS,LO,GO,NodeT>
27  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28  public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30 
31 public:
33  : globalIndexer_(indexer) {}
34 
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 
47 
48 private:
51 
52  // dummy field so that the evaluator will have something to do
54 
55  // fields that need to be scattered will be put in this vector
56  std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
57 
58  // maps the local (field,element,basis) triplet to a global ID
59  // for scattering
61  std::vector<int> fieldIds_; // field IDs needing mapping
62 
63  // This maps the scattered field names to the DOF manager field
64  // For instance a Navier-Stokes map might look like
65  // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
66  // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
68 
69  std::size_t num_nodes;
70 
71  std::size_t side_subcell_dim_;
72  std::size_t local_side_id_;
73 
75 
77 
78  std::string globalDataKey_; // what global data does this fill?
80 
83 
84  // If set to true, scattering an initial condition
85  bool scatterIC_;
86 
87  // Allows runtime disabling of dirichlet BCs on node-by-node basis
88  std::vector< PHX::MDField<const bool,Cell,NODE> > applyBC_;
89 };
90 
91 }
92 
93 // **************************************************************
94 #endif // end hessian support
95 
96 #endif
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
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.
Non-templated empty base class for template managers.