11#ifndef PANZER_EVALUATOR_GATHER_SOLUTION_TPETRA_DECL_HPP
12#define PANZER_EVALUATOR_GATHER_SOLUTION_TPETRA_DECL_HPP
14#include "Phalanx_config.hpp"
15#include "Phalanx_Evaluator_Macros.hpp"
16#include "Phalanx_MDField.hpp"
17#include "Phalanx_KokkosViewOfViews.hpp"
19#include "Teuchos_ParameterList.hpp"
21#include "PanzerDiscFE_config.hpp"
44template<
typename EvalT,
typename Traits,
typename LO,
typename GO,
typename NodeT=panzer::TpetraNodeType>
64template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
67 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
75 globalIndexer_(indexer) {}
79 const Teuchos::ParameterList& p);
82 void postRegistrationSetup(
typename TRAITS::SetupData d,
86 void preEvaluate(
typename TRAITS::PreEvalData d);
89 void evaluateFields(
typename TRAITS::EvalData d);
92 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
98 { TEUCHOS_ASSERT(i < Teuchos::as<int>(gatherFields_.size()));
return gatherFields_[i].fieldTag(); }
121 Teuchos::RCP<const typename TpetraLinearObjContainer<double,LO,GO,NodeT>::MultiVectorType>
x_vector;
128 std::vector< std::vector< PHX::MDField<const ScalarT,Cell,NODE> > >
tangentFields_;
147template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
150 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
158 globalIndexer_(indexer) {}
162 const Teuchos::ParameterList& p);
165 void postRegistrationSetup(
typename TRAITS::SetupData d,
169 void preEvaluate(
typename TRAITS::PreEvalData d);
172 void evaluateFields(
typename TRAITS::EvalData d);
175 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
201 Teuchos::RCP<const typename TpetraLinearObjContainer<double,LO,GO,NodeT>::MultiVectorType>
x_vector;
205 std::vector< std::vector< PHX::MDField<const RealT,Cell,NODE> > >
tangentFields_;
223template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
226 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
232 globalIndexer_(indexer) {}
236 const Teuchos::ParameterList& p);
239 void postRegistrationSetup(
typename TRAITS::SetupData d,
243 void preEvaluate(
typename TRAITS::PreEvalData d);
246 void evaluateFields(
typename TRAITS::EvalData d);
249 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
264 KOKKOS_INLINE_FUNCTION
265 void operator()(
const int cell)
const;
294 Teuchos::RCP<typename TpetraLinearObjContainer<double,LO,GO,NodeT>::MultiVectorType>
x_vector;
306 Kokkos::View<const double**, Kokkos::LayoutLeft,PHX::Device>
x_data;
311 PHX::MDField<ScalarT,Cell,NODE>
field;
317#ifdef Panzer_BUILD_HESSIAN_SUPPORT
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
bool useTimeDerivativeSolutionVector_
GatherSolution_Tpetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Construct with a global indexer only; solution/parameter names must be set later (e....
Teuchos::RCP< const TpetraLinearObjContainer< double, LO, GO, NodeT > > tpetraContainer_
std::string sensitivitiesName_
std::vector< int > fieldIds_
std::string globalDataKey_
panzer::Traits::Jacobian::ScalarT ScalarT
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Creates a copy of this evaluator configured from a new ParameterList, sharing the same global indexer...
PHX::View< int ** > scratch_lids_
std::vector< std::string > indexerNames_
PHX::View< const int * > offsets
panzer::Traits::Jacobian EvalT
PHX::View< const LO ** > lids
std::vector< PHX::View< int * > > scratch_offsets_
Teuchos::RCP< typename TpetraLinearObjContainer< double, LO, GO, NodeT >::MultiVectorType > x_vector
Kokkos::View< const double **, Kokkos::LayoutLeft, PHX::Device > x_data
PHX::MDField< ScalarT, Cell, NODE > field
bool disableSensitivities_
Teuchos::RCP< const typename TpetraLinearObjContainer< double, LO, GO, NodeT >::MultiVectorType > x_vector
bool useTimeDerivativeSolutionVector_
std::vector< PHX::View< int * > > scratch_offsets_
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
std::vector< int > fieldIds_
panzer::Traits::Residual EvalT
PHX::View< int ** > scratch_lids_
panzer::Traits::Residual::ScalarT ScalarT
GatherSolution_Tpetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Construct with a global indexer only; solution/parameter names must be set later (e....
std::vector< std::string > indexerNames_
std::vector< std::vector< PHX::MDField< const ScalarT, Cell, NODE > > > tangentFields_
const PHX::FieldTag & getFieldTag(int i) const
Returns the FieldTag of the i-th gathered field. For testing purposes.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Creates a copy of this evaluator configured from a new ParameterList, sharing the same global indexer...
std::string globalDataKey_
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
Teuchos::RCP< const TpetraLinearObjContainer< double, LO, GO, NodeT > > tpetraContainer_
PHX::ViewOfViews< 2, PHX::View< const RealT ** > > tangentFieldsVoV_
std::vector< std::string > indexerNames_
PHX::ViewOfViews< 1, PHX::View< ScalarT ** > > gatherFieldsVoV_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Creates a copy of this evaluator configured from a new ParameterList, sharing the same global indexer...
std::vector< int > fieldIds_
Teuchos::RCP< const TpetraLinearObjContainer< double, LO, GO, NodeT > > tpetraContainer_
panzer::Traits::RealType RealT
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
bool useTimeDerivativeSolutionVector_
panzer::Traits::Tangent EvalT
Teuchos::RCP< const typename TpetraLinearObjContainer< double, LO, GO, NodeT >::MultiVectorType > x_vector
PHX::View< size_t * > tangentInnerVectorSizes_
std::string globalDataKey_
std::vector< std::vector< PHX::MDField< const RealT, Cell, NODE > > > tangentFields_
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
GatherSolution_Tpetra(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
Construct with a global indexer only; solution/parameter names must be set later (e....
panzer::Traits::Tangent::ScalarT ScalarT
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.
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),...
double RealType
Scalar type used for the Residual evaluation type (plain double).