Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ScatterDirichletResidual_BlockedEpetra_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_BlockedEpetra_Hessian_hpp__
12#define __Panzer_ScatterDirichletResidual_BlockedEpetra_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 Epetra scatter dirichlet residual file
19
20
21namespace panzer {
22
23// **************************************************************
24// Hessian Specialization
25// **************************************************************
26template<typename TRAITS,typename LO,typename GO>
28 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
29 public PHX::EvaluatorDerived<panzer::Traits::Hessian, TRAITS>,
31
32public:
33 ScatterDirichletResidual_BlockedEpetra(const std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > & rIndexers,
34 const std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > & cIndexers)
35 : rowIndexers_(rIndexers), colIndexers_(cIndexers) {}
36
37 ScatterDirichletResidual_BlockedEpetra(const std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > & rIndexers,
38 const std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > & cIndexers,
39 const Teuchos::ParameterList& p,
40 bool useDiscreteAdjoint=false);
41
42 void postRegistrationSetup(typename TRAITS::SetupData d,
44
45 void preEvaluate(typename TRAITS::PreEvalData d);
46
47 void evaluateFields(typename TRAITS::EvalData workset);
48
49 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
50 { return Teuchos::rcp(new ScatterDirichletResidual_BlockedEpetra<panzer::Traits::Hessian,TRAITS,LO,GO>(rowIndexers_,colIndexers_,pl)); }
51
52private:
54
55 // dummy field so that the evaluator will have something to do
56 Teuchos::RCP<PHX::FieldTag> scatterHolder_;
57
58 // fields that need to be scattered will be put in this vector
59 std::vector< PHX::MDField<const ScalarT,Cell,NODE> > scatterFields_;
60
61 std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > rowIndexers_;
62 std::vector<Teuchos::RCP<const GlobalIndexer<LO,int> > > colIndexers_;
63
64 std::vector<int> indexerIds_; // block index
65 std::vector<int> subFieldIds_; // sub field numbers
66
67 // This maps the scattered field names to the DOF manager field
68 // For instance a Navier-Stokes map might look like
69 // fieldMap_["RESIDUAL_Velocity"] --> "Velocity"
70 // fieldMap_["RESIDUAL_Pressure"] --> "Pressure"
71 Teuchos::RCP<const std::map<std::string,std::string> > fieldMap_;
72
73 std::size_t num_nodes;
74 std::size_t num_eq;
75
76 std::size_t side_subcell_dim_;
77 std::size_t local_side_id_;
78
79 Teuchos::RCP<Thyra::ProductVectorBase<double> > dirichletCounter_;
80 std::string globalDataKey_; // what global data does this fill?
81
82 Teuchos::RCP<Thyra::BlockedLinearOpBase<double> > Jac_;
83
86
87 // Allows runtime disabling of dirichlet BCs on node-by-node basis
88 std::vector< PHX::MDField<const bool,Cell,NODE> > applyBC_;
89
91};
92
93}
94
95// **************************************************************
96#endif
97
98#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
ScatterDirichletResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer< LO, int > > > &rIndexers, const std::vector< Teuchos::RCP< const GlobalIndexer< LO, int > > > &cIndexers)
Pushes residual values into the residual vector for a Newton-based solve.
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)