13 #include "Thyra_VectorBase.hpp"
14 #include "Thyra_VectorStdOps.hpp"
15 #include "Thyra_ProductVectorSpaceBase.hpp"
16 #include "Thyra_get_Epetra_Operator.hpp"
18 #include "Epetra_CrsMatrix.h"
30 bool x_matches=
false, f_matches=
false, dxdt_matches=
false;
37 x_matches = range->isCompatible(*
get_x()->space());
42 dxdt_matches = range->isCompatible(*
get_dxdt()->space());
47 f_matches = range->isCompatible(*
get_f()->space());
53 x_matches =
get_x()->space()->isCompatible(*
get_dxdt()->space());
54 dxdt_matches = x_matches;
57 f_matches = x_matches = dxdt_matches =
true;
60 return x_matches && dxdt_matches && f_matches;
67 using Thyra::PhysicallyBlockedLinearOpBase;
68 using Thyra::ProductVectorSpaceBase;
70 using Teuchos::rcp_dynamic_cast;
72 if(
get_x()!=Teuchos::null) Thyra::assign<double>(
x.
ptr(),0.0);
74 if(
get_f()!=Teuchos::null) Thyra::assign<double>(
get_f().
ptr(),0.0);
75 if(
get_A()!=Teuchos::null) {
77 = rcp_dynamic_cast<PhysicallyBlockedLinearOpBase<double> >(
get_A(),
true);
82 for(
int i=0;i<range->numBlocks();i++) {
83 for(
int j=0;j<domain->numBlocks();j++) {
85 if(block!=Teuchos::null) {
98 using Thyra::PhysicallyBlockedLinearOpBase;
99 using Thyra::ProductVectorSpaceBase;
101 using Teuchos::rcp_dynamic_cast;
103 if(
get_A()!=Teuchos::null) {
105 = rcp_dynamic_cast<PhysicallyBlockedLinearOpBase<double> >(
get_A(),
true);
110 for(
int i=0;i<range->numBlocks();i++) {
111 for(
int j=0;j<domain->numBlocks();j++) {
113 if(block!=Teuchos::null) {
125 set_x(Teuchos::null);
127 set_f(Teuchos::null);
128 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()