11#ifndef PANZER_EVALUATOR_SCATTER_DIRICHLET_RESIDUAL_BLOCKEDTPETRA_HPP
12#define PANZER_EVALUATOR_SCATTER_DIRICHLET_RESIDUAL_BLOCKEDTPETRA_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"
30 template <
typename ScalarT>
class ProductVectorBase;
35class BlockedDOFManager;
46template <
typename EvalT,
typename TRAITS,
typename LO,
typename GO,
typename NodeT=panzer::TpetraNodeType>
49 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
57 const Teuchos::ParameterList& p);
59 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
65 { std::cout <<
"unspecialized version of \"ScatterDirichletResidual_BlockedTpetra::evaluateFields\" on \""+PHX::print<EvalT>()+
"\" should not be used!" << std::endl;
66 TEUCHOS_ASSERT(
false); }
79template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
82 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
87 : globalIndexer_(indexer) {}
90 const Teuchos::ParameterList& p);
95 void preEvaluate(
typename TRAITS::PreEvalData d);
99 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
140 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
167 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
175template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
178 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
183 : globalIndexer_(indexer) {}
186 const Teuchos::ParameterList& p);
188 void preEvaluate(
typename TRAITS::PreEvalData d);
195 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
229 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
256 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
259 static constexpr int maxDerivativeArraySize_ = 256;
267template <
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
270 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
275 : globalIndexer_(indexer) {}
278 const Teuchos::ParameterList& p);
283 void preEvaluate(
typename TRAITS::PreEvalData d);
287 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
328 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
355 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
358 PHX::ViewOfViews<2,Kokkos::View<RealType**,Kokkos::LayoutLeft,PHX::Device>>
dfdpFieldsVoV_;
365#ifdef Panzer_BUILD_HESSIAN_SUPPORT
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< int > productVectorBlockIndex_
panzer::Traits::Jacobian::ScalarT ScalarT
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
std::string globalDataKey_
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
std::size_t side_subcell_dim_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
PHX::View< LO * > blockOffsets_
The offset values of the blocked DOFs per element. Size of number of blocks in the product vector + 1...
TRAITS::RealType RealType
std::vector< PHX::View< int * > > basisIndexForMDFieldOffsets_
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
Tpetra::Operator< RealType, LO, GO, NodeT > OperatorType
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field. Size of number of fields to scatter.
Teuchos::RCP< Thyra::ProductVectorBase< double > > dirichletCounter_
std::size_t local_side_id_
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
Teuchos::RCP< const panzer::BlockedDOFManager > globalIndexer_
Thyra::TpetraLinearOp< RealType, LO, GO, NodeT > ThyraLinearOp
std::vector< int > fieldIds_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
Tpetra::Map< LO, GO, NodeT > MapType
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
ScatterDirichletResidual_BlockedTpetra()
Tpetra::Export< LO, GO, NodeT > ExportType
std::size_t side_subcell_dim_
std::vector< Teuchos::RCP< const panzer::GlobalIndexer > > fieldGlobalIndexers_
Tpetra::Vector< RealType, LO, GO, NodeT > VectorType
std::vector< int > productVectorBlockIndex_
Teuchos::RCP< Thyra::ProductVectorBase< double > > dirichletCounter_
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field.
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Tpetra::Map< LO, GO, NodeT > MapType
panzer::Traits::Residual::ScalarT ScalarT
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
TRAITS::RealType RealType
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Tpetra::CrsGraph< LO, GO, NodeT > CrsGraphType
std::size_t local_side_id_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Tpetra::Import< LO, GO, NodeT > ImportType
std::vector< int > fieldIds_
Field IDs in the local product vector block (not global field id)
std::vector< PHX::View< int * > > basisIndexForMDFieldOffsets_
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
ScatterDirichletResidual_BlockedTpetra()
std::string globalDataKey_
Teuchos::RCP< const panzer::BlockedDOFManager > globalIndexer_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Tpetra::Map< LO, GO, NodeT > MapType
std::size_t local_side_id_
ScatterDirichletResidual_BlockedTpetra()
std::size_t side_subcell_dim_
Tpetra::CrsGraph< LO, GO, NodeT > CrsGraphType
Teuchos::RCP< const BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > > blockedContainer_
Tpetra::CrsMatrix< RealType, LO, GO, NodeT > CrsMatrixType
Teuchos::RCP< PHX::FieldTag > scatterHolder_
BlockedTpetraLinearObjContainer< RealType, LO, GO, NodeT > ContainerType
std::vector< Teuchos::RCP< const panzer::GlobalIndexer > > fieldGlobalIndexers_
Tpetra::Export< LO, GO, NodeT > ExportType
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
panzer::Traits::Tangent::ScalarT ScalarT
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Teuchos::RCP< Thyra::ProductVectorBase< double > > dirichletCounter_
TRAITS::RealType RealType
std::vector< int > fieldIds_
Field IDs in the local product vector block (not global field id)
ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
Teuchos::RCP< const panzer::BlockedDOFManager > globalIndexer_
Tpetra::Vector< RealType, LO, GO, NodeT > VectorType
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field.
Tpetra::Import< LO, GO, NodeT > ImportType
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
std::string globalDataKey_
std::vector< PHX::View< int * > > basisIndexForMDFieldOffsets_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
PHX::ViewOfViews< 2, Kokkos::View< RealType **, Kokkos::LayoutLeft, PHX::Device > > dfdpFieldsVoV_
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< int > productVectorBlockIndex_
Pushes residual values into the residual vector for a Newton-based solve.
void evaluateFields(typename TRAITS::EvalData)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
ScatterDirichletResidual_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &)
void postRegistrationSetup(typename TRAITS::SetupData, PHX::FieldManager< TRAITS > &)
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),...