43#ifndef PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDTPETRA_DECL_HPP
44#define PANZER_EVALUATOR_SCATTER_RESIDUAL_BLOCKEDTPETRA_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"
63class BlockedDOFManager;
70template <
typename EvalT,
typename TRAITS,
typename LO,
typename GO,
typename NodeT=panzer::TpetraNodeType>
73 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
81 const Teuchos::ParameterList& p);
83 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
89 { std::cout <<
"unspecialized version of \"ScatterResidual_BlockedTpetra::evaluateFields\" on \""+PHX::print<EvalT>()+
"\" should not be used!" << std::endl;
90 TEUCHOS_ASSERT(
false); }
103template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
106 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
111 : globalIndexer_(indexer) {}
114 const Teuchos::ParameterList& p);
119 void preEvaluate(
typename TRAITS::PreEvalData d);
123 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
161 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
179template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
182 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
208 : globalIndexer_(indexer) {}
211 const Teuchos::ParameterList& p);
216 void preEvaluate(
typename TRAITS::PreEvalData d);
220 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
254 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
263 Kokkos::View<typename Sacado::ScalarType<ScalarT>::type**, Kokkos::LayoutRight, PHX::Device>
workset_vals_;
276#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
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 > &)