43 #ifndef __Panzer_BlockedTpetraLinearObjContainer_hpp__ 44 #define __Panzer_BlockedTpetraLinearObjContainer_hpp__ 46 #include "PanzerDiscFE_config.hpp" 49 #include "Tpetra_Vector.hpp" 50 #include "Tpetra_CrsMatrix.hpp" 52 #include "Teuchos_RCP.hpp" 58 #include "Thyra_PhysicallyBlockedLinearOpBase.hpp" 59 #include "Thyra_ProductVectorBase.hpp" 60 #include "Thyra_TpetraThyraWrappers.hpp" 62 #include <unordered_map> 69 template <
typename ScalarT,
typename LocalOrdinalT,
typename GlobalOrdinalT,
typename NodeT=panzer::TpetraNodeType>
70 class BlockedTpetraLinearObjContainer :
public LinearObjContainer
71 ,
public ThyraObjContainer<ScalarT> {
76 typedef Tpetra::Map<LocalOrdinalT,GlobalOrdinalT,NodeT>
MapType;
92 inline void set_x(
const Teuchos::RCP<VectorType> & in) {
set_x_th(in); }
98 inline void set_f(
const Teuchos::RCP<VectorType> & in) {
set_f_th(in); }
109 void set_x_th(
const Teuchos::RCP<VectorType> & in) {
x = in; }
115 void set_f_th(
const Teuchos::RCP<VectorType> & in) {
f = in; }
118 void set_A_th(
const Teuchos::RCP<CrsMatrixType> & in) {
A = in; }
119 Teuchos::RCP<CrsMatrixType>
get_A_th()
const {
return A; }
126 Teuchos::RCP<CrsMatrixType>
A;
bool checkCompatibility() const
Make sure row and column spaces match up.
void set_x_th(const Teuchos::RCP< VectorType > &in)
Teuchos::RCP< VectorType > get_x_th() const
std::vector< Teuchos::RCP< const MapType > > blockMaps_
Teuchos::RCP< const MapType > getMapForBlock(std::size_t i) const
void set_f_th(const Teuchos::RCP< VectorType > &in)
Teuchos::RCP< CrsMatrixType > get_A_th() const
void set_dxdt(const Teuchos::RCP< VectorType > &in)
Teuchos::RCP< VectorType > get_f() const
Teuchos::RCP< VectorType > get_dxdt() const
void initializeMatrix(ScalarT value)
Put a particular scalar in the matrix.
Teuchos::RCP< CrsMatrixType > get_A() const
Tpetra::Map< LocalOrdinalT, GlobalOrdinalT, NodeT > MapType
void set_dxdt_th(const Teuchos::RCP< VectorType > &in)
Thyra::VectorBase< ScalarT > VectorType
virtual void initialize()
Teuchos::RCP< VectorType > dxdt
Teuchos::RCP< VectorType > get_x() const
Teuchos::RCP< CrsMatrixType > A
void set_A_th(const Teuchos::RCP< CrsMatrixType > &in)
Thyra::LinearOpBase< ScalarT > CrsMatrixType
void set_x(const Teuchos::RCP< VectorType > &in)
Teuchos::RCP< VectorType > f
Teuchos::RCP< VectorType > get_f_th() const
Teuchos::RCP< VectorType > x
Teuchos::RCP< VectorType > get_dxdt_th() const
void set_f(const Teuchos::RCP< VectorType > &in)
void setMapsForBlocks(const std::vector< Teuchos::RCP< const MapType > > &blockMaps)
void set_A(const Teuchos::RCP< CrsMatrixType > &in)