11#ifndef PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDTPETRA_DECL_HPP
12#define PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDTPETRA_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"
32class BlockedDOFManager;
39template <
typename EvalT,
typename TRAITS,
typename LO,
typename GO,
typename NodeT=panzer::TpetraNodeType>
42 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
50 const Teuchos::ParameterList& p);
52 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
58 { std::cout <<
"unspecialized version of \"ScatterResidual_BlockedTpetra::evaluateFields\" on \""+PHX::print<EvalT>()+
"\" should not be used!" << std::endl;
59 TEUCHOS_ASSERT(
false); }
72template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
75 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
80 : globalIndexer_(indexer) {}
83 const Teuchos::ParameterList& p);
88 void preEvaluate(
typename TRAITS::PreEvalData d);
92 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
130 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
148template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
151 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
177 : globalIndexer_(indexer) {}
180 const Teuchos::ParameterList& p);
185 void preEvaluate(
typename TRAITS::PreEvalData d);
189 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
223 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
232 Kokkos::View<typename Sacado::ScalarType<ScalarT>::type**, Kokkos::LayoutRight, PHX::Device>
workset_vals_;
246template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
249 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
254 : globalIndexer_(indexer) {}
257 const Teuchos::ParameterList& p);
262 void preEvaluate(
typename TRAITS::PreEvalData d);
266 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
304 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
310 PHX::ViewOfViews<2,Kokkos::View<RealType**,Kokkos::LayoutLeft,PHX::Device>>
dfdpFieldsVoV_;
323#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< int > fieldIds_
Tpetra::Operator< RealType, LO, GO, NodeT > OperatorType
ScatterResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
ScatterResidual_BlockedTpetra()
Kokkos::View< typename Sacado::ScalarType< ScalarT >::type **, Kokkos::LayoutRight, PHX::Device > workset_vals_
Scratch space for local values.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::string globalDataKey_
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field. Size of number of fields to scatter.
panzer::Traits::Jacobian::ScalarT ScalarT
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
PHX::View< LO * > blockOffsets_
The offset values of the blocked DOFs per element. Size of number of blocks in the product vector + 1...
std::vector< int > productVectorBlockIndex_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
Thyra::TpetraLinearOp< RealType, LO, GO, NodeT > ThyraLinearOp
Kokkos::View< LO **, Kokkos::LayoutRight, PHX::Device > worksetLIDs_
Local indices for unknowns.
TRAITS::RealType RealType
Teuchos::RCP< const BlockedDOFManager > globalIndexer_
Tpetra::Map< LO, GO, NodeT > MapType
Teuchos::RCP< const BlockedDOFManager > globalIndexer_
Maps the local (field,element,basis) triplet to a global ID for scattering.
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field.
std::vector< int > fieldIds_
Field IDs in the local product vector block (not global field id)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< PHX::FieldTag > scatterHolder_
Dummy evalauted field so that the evaluator will have something to do.
std::vector< Teuchos::RCP< const panzer::GlobalIndexer > > fieldGlobalIndexers_
Vector of global indexers, one for each scattered field respectively.
Tpetra::Export< LO, GO, NodeT > ExportType
ScatterResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
Tpetra::Import< LO, GO, NodeT > ImportType
ScatterResidual_BlockedTpetra()
std::string globalDataKey_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Fields that need to be scattered will be put in this vector.
TRAITS::RealType RealType
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
panzer::Traits::Residual::ScalarT ScalarT
std::vector< int > productVectorBlockIndex_
Tpetra::Map< LO, GO, NodeT > MapType
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
Tpetra::CrsGraph< LO, GO, NodeT > CrsGraphType
Tpetra::Vector< RealType, LO, GO, NodeT > VectorType
ScatterResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
std::vector< int > productVectorBlockIndex_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< const BlockedDOFManager > globalIndexer_
Maps the local (field,element,basis) triplet to a global ID for scattering.
Tpetra::Export< LO, GO, NodeT > ExportType
Tpetra::Import< LO, GO, NodeT > ImportType
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field.
ScatterResidual_BlockedTpetra()
Tpetra::Map< LO, GO, NodeT > MapType
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
PHX::ViewOfViews< 2, Kokkos::View< RealType **, Kokkos::LayoutLeft, PHX::Device > > dfdpFieldsVoV_
Storage for the tangent data.
Teuchos::RCP< PHX::FieldTag > scatterHolder_
Dummy evalauted field so that the evaluator will have something to do.
std::vector< int > fieldIds_
Field IDs in the local product vector block (not global field id)
panzer::Traits::Tangent::ScalarT ScalarT
std::vector< Teuchos::RCP< const panzer::GlobalIndexer > > fieldGlobalIndexers_
Vector of global indexers, one for each scattered field respectively.
Tpetra::CrsGraph< LO, GO, NodeT > CrsGraphType
TRAITS::RealType RealType
Tpetra::Vector< RealType, LO, GO, NodeT > VectorType
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Fields that need to be scattered will be put in this vector.
std::string globalDataKey_
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
Pushes residual values into the residual vector for a Newton-based solve.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
void evaluateFields(typename TRAITS::EvalData)
ScatterResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &)
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),...