49 const Teuchos::RCP<Epetra_MultiVector> &u_epetra_vec )
50 :y_epetra_vec_(y_epetra_vec), u_epetra_vec_(u_epetra_vec)
60 y_epetra_vec_->Dot( *ex.y_epetra_vec_, ydot );
61 if (u_epetra_vec_.get() == 0)
64 u_epetra_vec_->Dot( *ex.u_epetra_vec_, udot );
65 return (ydot[0] + udot[0]);
71 y_epetra_vec_->Update( alpha, *ex.y_epetra_vec_, beta );
72 if (u_epetra_vec_.get() != 0)
73 u_epetra_vec_->Update( alpha, *ex.u_epetra_vec_, beta );
78 y_epetra_vec_->Scale( alpha );
79 if (u_epetra_vec_.get() != 0)
80 u_epetra_vec_->Scale( alpha );
85 y_epetra_vec_->PutScalar( alpha );
86 if (u_epetra_vec_.get() != 0)
87 u_epetra_vec_->PutScalar( alpha );
93 y_epetra_vec_->Scale( alpha, *ex.y_epetra_vec_ );
94 if (u_epetra_vec_.get() != 0)
95 u_epetra_vec_->Scale( alpha, *ex.u_epetra_vec_ );
100 Teuchos::RCP<Epetra_MultiVector> yptr =
102 Teuchos::RCP<Epetra_MultiVector> uptr = Teuchos::null;
103 if (u_epetra_vec_.get() != 0)
111 return y_epetra_vec_;
116 return u_epetra_vec_;
Teuchos::RCP< const Epetra_MultiVector > getYVector() const
Returns a reference counted pointer to the private y_epetra_vec data container ("state variables")...
Teuchos::RCP< Vector > createVector() const
Clone to make a new (uninitialized) vector.
double innerProd(const Vector &x) const
Returns inner(*this,x).
Provides the interface to generic abstract vector libraries.
void linComb(const double &alpha, const Vector &x, const double &beta)
y = alpha*x + beta*y where y == *this.
void Scale(const double &alpha)
y = alpha*y where y == *this.
void Set(const double &alpha)
y = alpha where y == *this.
YUEpetraVector(const Teuchos::RCP< Epetra_MultiVector > &y_epetra_vec, const Teuchos::RCP< Epetra_MultiVector > &u_epetra_vec)
The GenSQP::Vector / (y,u) Epetra_MultiVector adapter class.
Teuchos::RCP< const Epetra_MultiVector > getUVector() const
Returns a reference counted pointer to the private u_epetra_vec data container ("control variables")...