Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ScatterDirichletResidual_Epetra_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_Epetra_Hessian_hpp__
12#define __Panzer_ScatterDirichletResidual_Epetra_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// Epetra scatter dirichlet residual file
19
20namespace panzer {
21
22// **************************************************************
23// Hessian Specialization
24// **************************************************************
25template<typename TRAITS,typename LO,typename GO>
27 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
28 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
30
31public:
32 ScatterDirichletResidual_Epetra(const Teuchos::RCP<const GlobalIndexer> & indexer,
33 const Teuchos::RCP<const panzer::GlobalIndexer> & cIndexer=Teuchos::null)
34 : globalIndexer_(indexer), colGlobalIndexer_(cIndexer) {}
35
36 ScatterDirichletResidual_Epetra(const Teuchos::RCP<const GlobalIndexer> & indexer,
37 const Teuchos::RCP<const panzer::GlobalIndexer> & cIndexer,
38 const Teuchos::ParameterList& p);
39
40 void postRegistrationSetup(typename TRAITS::SetupData d,
42
43 void preEvaluate(typename TRAITS::PreEvalData d);
44
45 void evaluateFields(typename TRAITS::EvalData workset);
46
47 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
48 { return Teuchos::rcp(new ScatterDirichletResidual_Epetra<panzer::Traits::Hessian,TRAITS,LO,GO>(globalIndexer_,colGlobalIndexer_,pl)); }
49
50private:
52
53 // dummy field so that the evaluator will have something to do
54 Teuchos::RCP<PHX::FieldTag> scatterHolder_;
55
56 // fields that need to be scattered will be put in this vector
57 std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
58
59 // maps the local (field,element,basis) triplet to a global ID
60 // for scattering
61 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_, colGlobalIndexer_;
62 std::vector<int> fieldIds_; // field IDs needing mapping
63
64 // This maps the scattered field names to the DOF manager field
65 // For instance a Navier-Stokes map might look like
66 // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
67 // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
68 Teuchos::RCP<const std::map<std::string,std::string> > fieldMap_;
69
70 std::size_t num_nodes;
71 std::size_t num_eq;
72
73 std::size_t side_subcell_dim_;
74 std::size_t local_side_id_;
75
76 Teuchos::RCP<Epetra_Vector> dirichletCounter_;
77
78 std::string globalDataKey_; // what global data does this fill?
79 Teuchos::RCP<const EpetraLinearObjContainer> epetraContainer_;
80
82
85
86 // Allows runtime disabling of dirichlet BCs on node-by-node basis
87 std::vector< PHX::MDField<const bool,Cell,NODE> > applyBC_;
88
90};
91
92}
93
94// **************************************************************
95#endif
96
97#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
ScatterDirichletResidual_Epetra(const Teuchos::RCP< const GlobalIndexer > &indexer, const Teuchos::RCP< const panzer::GlobalIndexer > &cIndexer=Teuchos::null)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Pushes residual values into the residual vector for a Newton-based solve.