11#ifndef PANZER_EVALUATOR_SCATTER_DIRICHLET_RESIDUAL_TPETRA_DECL_HPP
12#define PANZER_EVALUATOR_SCATTER_DIRICHLET_RESIDUAL_TPETRA_DECL_HPP
16#include "Phalanx_config.hpp"
17#include "Phalanx_Evaluator_Macros.hpp"
18#include "Phalanx_MDField.hpp"
19#include "Phalanx_KokkosViewOfViews.hpp"
21#include "Teuchos_ParameterList.hpp"
23#include "PanzerDiscFE_config.hpp"
45template<
typename EvalT,
typename Traits,
typename LO,
typename GO,
typename NodeT=panzer::TpetraNodeType>
58template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
61 public PHX::EvaluatorDerived<panzer::Traits::Residual, TRAITS>,
66 : globalIndexer_(indexer) {}
69 const Teuchos::ParameterList& p);
71 void postRegistrationSetup(
typename TRAITS::SetupData d,
74 void preEvaluate(
typename TRAITS::PreEvalData d);
76 void evaluateFields(
typename TRAITS::EvalData workset);
78 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
100 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
119 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
129template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
132 public PHX::EvaluatorDerived<panzer::Traits::Tangent, TRAITS>,
137 : globalIndexer_(indexer) {}
140 const Teuchos::ParameterList& p);
142 void postRegistrationSetup(
typename TRAITS::SetupData d,
145 void preEvaluate(
typename TRAITS::PreEvalData d);
147 void evaluateFields(
typename TRAITS::EvalData workset);
149 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
172 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
192 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
199 PHX::ViewOfViews<1,Kokkos::View<RealT**,Kokkos::LayoutLeft,PHX::Device>>
dfdpFieldsVoV_;
204 std::vector<Teuchos::RCP<typename LOC::MultiVectorType> >
dfdpVectors_;
210template<
typename TRAITS,
typename LO,
typename GO,
typename NodeT>
213 public PHX::EvaluatorDerived<panzer::Traits::Jacobian, TRAITS>,
218 : globalIndexer_(indexer) {}
221 const Teuchos::ParameterList& p);
223 void preEvaluate(
typename TRAITS::PreEvalData d);
225 void postRegistrationSetup(
typename TRAITS::SetupData d,
228 void evaluateFields(
typename TRAITS::EvalData workset);
230 virtual Teuchos::RCP<CloneableEvaluator>
clone(
const Teuchos::ParameterList & pl)
const
253 Teuchos::RCP<const std::map<std::string,std::string> >
fieldMap_;
272 std::vector< PHX::MDField<const bool,Cell,NODE> >
applyBC_;
278 using LIDsDeviceView = Kokkos::View<const panzer::LocalOrdinal**,Kokkos::LayoutRight,PHX::Device>;
284 static constexpr bool lidsAreHostResident_ =
285 std::is_same<typename LIDsDeviceView::memory_space,Kokkos::HostSpace>::value;
287 decltype(Kokkos::create_mirror_view(Kokkos::HostSpace(),std::declval<LIDsDeviceView>())) lids_h_;
288 std::vector<decltype(Kokkos::create_mirror_view(std::declval<ScatterFieldDeviceView>()))>
scatterFields_h_;
289 typename LOC::CrsMatrixType::nonconst_local_inds_host_view_type
rowIndices_;
290 typename LOC::CrsMatrixType::nonconst_values_host_view_type
rowValues_;
297#ifdef Panzer_BUILD_HESSIAN_SUPPORT
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
typename PHX::MDField< const ScalarT, Cell, NODE >::array_type ScatterFieldDeviceView
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
ScatterDirichletResidual_Tpetra(const Teuchos::RCP< const GlobalIndexer > &indexer)
std::string globalDataKey_
Teuchos::RCP< typename LOC::MultiVectorType > dirichletCounter_
std::vector< double > jacRow_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::size_t side_subcell_dim_
LOC::CrsMatrixType::nonconst_local_inds_host_view_type rowIndices_
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
std::vector< int > fieldIds_
TpetraLinearObjContainer< double, LO, GO, NodeT > LOC
Teuchos::RCP< const TpetraLinearObjContainer< double, LO, GO, NodeT > > tpetraContainer_
Kokkos::View< const panzer::LocalOrdinal **, Kokkos::LayoutRight, PHX::Device > LIDsDeviceView
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
ScatterDirichletResidual_Tpetra()
panzer::Traits::Jacobian::ScalarT ScalarT
std::size_t local_side_id_
LOC::CrsMatrixType::nonconst_values_host_view_type rowValues_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
std::vector< decltype(Kokkos::create_mirror_view(std::declval< ScatterFieldDeviceView >()))> scatterFields_h_
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
std::vector< PHX::View< int * > > scratch_basisIds_
TpetraLinearObjContainer< double, LO, GO, NodeT > LOC
std::size_t side_subcell_dim_
ScatterDirichletResidual_Tpetra()
ScatterDirichletResidual_Tpetra(const Teuchos::RCP< const GlobalIndexer > &indexer)
std::size_t local_side_id_
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
std::vector< int > fieldIds_
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
Teuchos::RCP< typename LOC::MultiVectorType > dirichletCounter_
Teuchos::RCP< PHX::FieldTag > scatterHolder_
panzer::Traits::Residual::ScalarT ScalarT
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< const LOC > tpetraContainer_
std::string globalDataKey_
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
std::vector< PHX::View< int * > > scratch_offsets_
PHX::View< int ** > scratch_lids_
std::vector< PHX::View< int * > > scratch_offsets_
std::vector< Teuchos::RCP< typename LOC::MultiVectorType > > dfdpVectors_
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< const LOC > tpetraContainer_
TpetraLinearObjContainer< double, LO, GO, NodeT > LOC
std::size_t side_subcell_dim_
PHX::View< int ** > scratch_lids_
ScatterDirichletResidual_Tpetra()
Teuchos::RCP< PHX::FieldTag > scatterHolder_
std::vector< int > fieldIds_
std::vector< PHX::View< int * > > scratch_basisIds_
ScatterDirichletResidual_Tpetra(const Teuchos::RCP< const GlobalIndexer > &indexer)
std::size_t local_side_id_
panzer::Traits::Tangent::ScalarT ScalarT
panzer::Traits::RealType RealT
PHX::ViewOfViews< 1, Kokkos::View< RealT **, Kokkos::LayoutLeft, PHX::Device > > dfdpFieldsVoV_
Storage for the tangent data.
Teuchos::RCP< const std::map< std::string, std::string > > fieldMap_
std::string globalDataKey_
std::vector< PHX::MDField< const ScalarT, Cell, NODE > > scatterFields_
Teuchos::RCP< typename LOC::MultiVectorType > dirichletCounter_
std::vector< PHX::MDField< const bool, Cell, NODE > > applyBC_
bool checkApplyBC_
If set to true, allows runtime disabling of dirichlet BCs on node-by-node basis.
std::vector< Teuchos::ArrayRCP< double > > dfdp_vectors_
Pushes residual values into the residual vector for a Newton-based solve.
Tpetra-backed implementation of LinearObjContainer.
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).