45 #include "Thyra_VectorBase.hpp"
46 #include "Thyra_VectorStdOps.hpp"
47 #include "Thyra_ProductVectorSpaceBase.hpp"
48 #include "Thyra_get_Epetra_Operator.hpp"
50 #include "Epetra_CrsMatrix.h"
62 bool x_matches=
false, f_matches=
false, dxdt_matches=
false;
69 x_matches = range->isCompatible(*
get_x()->space());
74 dxdt_matches = range->isCompatible(*
get_dxdt()->space());
79 f_matches = range->isCompatible(*
get_f()->space());
85 x_matches =
get_x()->space()->isCompatible(*
get_dxdt()->space());
86 dxdt_matches = x_matches;
89 f_matches = x_matches = dxdt_matches =
true;
92 return x_matches && dxdt_matches && f_matches;
99 using Thyra::PhysicallyBlockedLinearOpBase;
100 using Thyra::ProductVectorSpaceBase;
102 using Teuchos::rcp_dynamic_cast;
104 if(
get_x()!=Teuchos::null) Thyra::assign<double>(
x.
ptr(),0.0);
106 if(
get_f()!=Teuchos::null) Thyra::assign<double>(
get_f().
ptr(),0.0);
107 if(
get_A()!=Teuchos::null) {
109 = rcp_dynamic_cast<PhysicallyBlockedLinearOpBase<double> >(
get_A(),
true);
114 for(
int i=0;i<range->numBlocks();i++) {
115 for(
int j=0;j<domain->numBlocks();j++) {
117 if(block!=Teuchos::null) {
130 using Thyra::PhysicallyBlockedLinearOpBase;
131 using Thyra::ProductVectorSpaceBase;
133 using Teuchos::rcp_dynamic_cast;
135 if(
get_A()!=Teuchos::null) {
137 = rcp_dynamic_cast<PhysicallyBlockedLinearOpBase<double> >(
get_A(),
true);
142 for(
int i=0;i<range->numBlocks();i++) {
143 for(
int j=0;j<domain->numBlocks();j++) {
145 if(block!=Teuchos::null) {
157 set_x(Teuchos::null);
159 set_f(Teuchos::null);
160 set_A(Teuchos::null);
Teuchos::RCP< VectorType > get_x() const
void set_f(const Teuchos::RCP< VectorType > &in)
void initializeMatrix(double value)
Put a particular scalar in the matrix.
Teuchos::RCP< VectorType > x
void set_A(const Teuchos::RCP< CrsMatrixType > &in)
Teuchos::RCP< VectorType > get_f() const
bool checkCompatibility() const
Make sure row and column spaces match up.
Teuchos::RCP< CrsMatrixType > get_A() const
Teuchos::RCP< VectorType > get_dxdt() const
void set_dxdt(const Teuchos::RCP< VectorType > &in)
void set_x(const Teuchos::RCP< VectorType > &in)
virtual void initialize()