11#ifndef PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDEPETRA_DECL_HPP
12#define PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDEPETRA_DECL_HPP
14#include "Phalanx_config.hpp"
15#include "Phalanx_Evaluator_Macros.hpp"
16#include "Phalanx_MDField.hpp"
18#include "Teuchos_ParameterList.hpp"
20#include "PanzerDiscFE_config.hpp"
29 template <
typename>
class ProductVectorBase;
30 template <
typename>
class BlockedLinearOpBase;
43 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
50 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
56 { std::cout <<
"unspecialized version of \"ScatterResidual_BlockedEpetra::evaluateFields\" on "+PHX::print<EvalT>()+
" \" should not be used!" << std::endl;
57 TEUCHOS_ASSERT(
false); }
70template<
typename TRAITS,
typename LO,
typename GO>
73 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
79 const std::vector<Teuchos::RCP<const GlobalIndexer> > & ,
81 : rowIndexers_(rIndexers) {}
84 const std::vector<Teuchos::RCP<const GlobalIndexer> > & cIndexers,
85 const Teuchos::ParameterList& p,
86 bool useDiscreteAdjoint=
false);
91 void preEvaluate(
typename TRAITS::PreEvalData d);
95 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
117 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
121 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
129template<
typename TRAITS,
typename LO,
typename GO>
132 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
138 const std::vector<Teuchos::RCP<const GlobalIndexer> > & ,
140 : rowIndexers_(rIndexers) {}
143 const std::vector<Teuchos::RCP<const GlobalIndexer> > & cIndexers,
144 const Teuchos::ParameterList& p,
145 bool useDiscreteAdjoint=
false);
150 void preEvaluate(
typename TRAITS::PreEvalData d);
154 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
176 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
180 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
189template<
typename TRAITS,
typename LO,
typename GO>
192 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
218 const std::vector<Teuchos::RCP<const GlobalIndexer> > & cIndexers,
219 bool useDiscreteAdjoint=
false)
220 : rowIndexers_(rIndexers), colIndexers_(cIndexers), useDiscreteAdjoint_(useDiscreteAdjoint) {}
223 const std::vector<Teuchos::RCP<const GlobalIndexer> > & cIndexers,
224 const Teuchos::ParameterList& p,
225 bool useDiscreteAdjoint=
false);
230 void preEvaluate(
typename TRAITS::PreEvalData d);
234 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
257 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
262 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
263 Teuchos::RCP<Thyra::BlockedLinearOpBase<double> >
Jac_;
271#ifdef Panzer_BUILD_HESSIAN_SUPPORT
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< Teuchos::RCP< const GlobalIndexer > > colIndexers_
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::string globalDataKey_
ScatterResidual_BlockedEpetra()
std::vector< int > indexerIds_
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer > > &rIndexers, const std::vector< Teuchos::RCP< const GlobalIndexer > > &cIndexers, bool useDiscreteAdjoint=false)
Teuchos::RCP< Thyra::BlockedLinearOpBase< double > > Jac_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< Teuchos::RCP< const GlobalIndexer > > rowIndexers_
panzer::Traits::Jacobian::ScalarT ScalarT
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< int > subFieldIds_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::vector< int > indexerIds_
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
std::vector< Teuchos::RCP< const GlobalIndexer > > colIndexers_
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer > > &rIndexers, const std::vector< Teuchos::RCP< const GlobalIndexer > > &, bool)
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< Teuchos::RCP< const GlobalIndexer > > rowIndexers_
std::vector< int > subFieldIds_
panzer::Traits::Residual::ScalarT ScalarT
std::string globalDataKey_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
ScatterResidual_BlockedEpetra()
Teuchos::RCP< PHX::FieldTag > scatterHolder_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::vector< Teuchos::RCP< const GlobalIndexer > > rowIndexers_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
ScatterResidual_BlockedEpetra()
std::vector< Teuchos::RCP< const GlobalIndexer > > colIndexers_
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const GlobalIndexer > > &rIndexers, const std::vector< Teuchos::RCP< const GlobalIndexer > > &, bool)
std::vector< int > subFieldIds_
std::string globalDataKey_
std::vector< int > indexerIds_
panzer::Traits::Tangent::ScalarT ScalarT
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Pushes residual values into the residual vector for a Newton-based solve.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
ScatterResidual_BlockedEpetra(const Teuchos::ParameterList &p)
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
void evaluateFields(typename TRAITS::EvalData d)
Evaluation type for computing the residual and its Jacobian, using FadType as the scalar type.
Evaluation type for computing the residual only, using RealType as the scalar type.
Evaluation type for computing directional derivatives (e.g. parameter sensitivities),...