43 #ifndef PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDEPETRA_DECL_HPP 44 #define PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDEPETRA_DECL_HPP 46 #include "Phalanx_config.hpp" 47 #include "Phalanx_Evaluator_Macros.hpp" 48 #include "Phalanx_MDField.hpp" 50 #include "Teuchos_ParameterList.hpp" 52 #include "PanzerDiscFE_config.hpp" 61 class Epetra_CrsMatrix;
64 template <
typename>
class ProductVectorBase;
65 template <
typename>
class BlockedLinearOpBase;
70 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
71 class UniqueGlobalIndexer;
79 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
86 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const 92 { std::cout <<
"unspecialized version of \"ScatterResidual_BlockedEpetra::evaluateFields\" on "+PHX::typeAsString<EvalT>()+
" \" should not be used!" << std::endl;
93 TEUCHOS_ASSERT(
false); }
106 template<
typename TRAITS,
typename LO,
typename GO>
109 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
116 bool useDiscreteAdjoint=
false)
117 : rowIndexers_(rIndexers) {}
121 const Teuchos::ParameterList& p,
122 bool useDiscreteAdjoint=
false);
127 void preEvaluate(
typename TRAITS::PreEvalData d);
131 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const 143 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
rowIndexers_;
144 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
colIndexers_;
153 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
157 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
165 template<
typename TRAITS,
typename LO,
typename GO>
168 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
175 bool useDiscreteAdjoint=
false)
176 : rowIndexers_(rIndexers) {}
180 const Teuchos::ParameterList& p,
181 bool useDiscreteAdjoint=
false);
186 void preEvaluate(
typename TRAITS::PreEvalData d);
190 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const 202 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
rowIndexers_;
203 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
colIndexers_;
212 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
216 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
225 template<
typename TRAITS,
typename LO,
typename GO>
228 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
255 bool useDiscreteAdjoint=
false)
256 : rowIndexers_(rIndexers), colIndexers_(cIndexers), useDiscreteAdjoint_(useDiscreteAdjoint) {}
260 const Teuchos::ParameterList& p,
261 bool useDiscreteAdjoint=
false);
266 void preEvaluate(
typename TRAITS::PreEvalData d);
270 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const 283 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
rowIndexers_;
284 std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LO,int> > >
colIndexers_;
293 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
298 Teuchos::RCP<Thyra::ProductVectorBase<double> >
r_;
299 Teuchos::RCP<Thyra::BlockedLinearOpBase<double> >
Jac_;
307 #ifdef Panzer_BUILD_HESSIAN_SUPPORT ScatterResidual_BlockedEpetra(const Teuchos::ParameterList &p)
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< int > indexerIds_
std::vector< int > subFieldIds_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< int > indexerIds_
PHX::MDField< ScalarT > vector
void evaluateFields(typename TRAITS::EvalData d)
Teuchos::RCP< Thyra::BlockedLinearOpBase< double > > Jac_
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > colIndexers_
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > rowIndexers_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::string globalDataKey_
panzer::Traits::Residual::ScalarT ScalarT
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > colIndexers_
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &rIndexers, const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &cIndexers, bool useDiscreteAdjoint=false)
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &rIndexers, const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &cIndexers, bool useDiscreteAdjoint=false)
std::string globalDataKey_
panzer::Traits::Tangent::ScalarT ScalarT
Teuchos::RCP< Thyra::ProductVectorBase< double > > r_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Pushes residual values into the residual vector for a Newton-based solve.
panzer::Traits::Jacobian::ScalarT ScalarT
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< int > subFieldIds_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< int > subFieldIds_
ScatterResidual_BlockedEpetra(const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &rIndexers, const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > &cIndexers, bool useDiscreteAdjoint=false)
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > rowIndexers_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::vector< int > indexerIds_
Non-templated empty base class for template managers.
std::string globalDataKey_
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > colIndexers_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LO, int > > > rowIndexers_