42 #ifndef EPETRAEXT_PRODUCT_OPERATOR_H
43 #define EPETRAEXT_PRODUCT_OPERATOR_H
45 #include "Epetra_Operator.h"
46 #include "Teuchos_RCP.hpp"
47 #include "Teuchos_BLAS_types.hpp"
153 ,
const Teuchos::RCP<const Epetra_Operator>
Op[]
223 ,
const Teuchos::RCP<const Epetra_Operator>
Op[]
236 ,Teuchos::RCP<const Epetra_Operator>
Op[]
284 Teuchos::RCP<const Epetra_Operator>
Op(
int k)
const;
292 Teuchos::ETransp
Op_trans(
int k)
const;
316 const char *
Label()
const;
335 typedef std::vector<Teuchos::RCP<const Epetra_Operator> > Op_t;
336 typedef std::vector<Teuchos::ETransp> Op_trans_t;
337 typedef std::vector<EApplyMode> Op_inverse_t;
338 typedef std::vector<Teuchos::RCP<Epetra_Vector> > EV_t;
345 Op_trans_t Op_trans_;
346 Op_inverse_t Op_inverse_;
348 mutable EV_t range_vecs_;
349 mutable EV_t domain_vecs_;
354 void assertInitialized()
const;
355 void validateIndex(
int k)
const;
356 void initializeTempVecs(
bool applyInverse)
const;
372 Teuchos::RCP<const Epetra_Operator>
392 return Op_inverse_[k];
399 void ProductOperator::assertInitialized()
const
401 TEUCHOS_TEST_FOR_EXCEPTION(
402 Op_.size()==0, std::logic_error
403 ,
"Epetra::ProductOperator: Error, Client has not called initialize(...) yet!"
408 void ProductOperator::validateIndex(
int k)
const
410 TEUCHOS_TEST_FOR_EXCEPTION(
411 k < 0 || static_cast<int>(Op_.size())-1 < k, std::logic_error
412 ,
"Epetra::ProductOperator: Error, k = "<<k<<
" is not in the range [0,"<<Op_.size()-1<<
"]!"
418 #endif // EPETRAEXT_PRODUCT_OPERATOR_H
const Epetra_Map & OperatorDomainMap() const
bool UseTranspose() const
int SetUseTranspose(bool UseTranspose)
void initialize(const int num_Op, const Teuchos::RCP< const Epetra_Operator > Op[], const Teuchos::ETransp Op_trans[], const EApplyMode Op_inverse[])
Setup with constituent operators.
Implements Epetra_Operator as a product of one or more Epetra_Operator objects.
const char * Label() const
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
ProductOperator()
Construct to uninitialized.
const Epetra_Comm & Comm() const
int num_Op() const
Return the number of aggregate opeators.
const Epetra_Map & OperatorRangeMap() const
Teuchos::RCP< const Epetra_Operator > Op(int k) const
Access the kth operator (zero-based).
Teuchos::ETransp Op_trans(int k) const
Access the transpose mode of the kth operator (zero-based).
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
EApplyMode Op_inverse(int k) const
Access the inverse mode of the kth operator (zero-based).
void uninitialize(int *num_Op, Teuchos::RCP< const Epetra_Operator > Op[], Teuchos::ETransp Op_trans[], EApplyMode p_inverse[])
Set to an uninitialized state and wipe out memory.
void applyConstituent(const int k, Teuchos::ETransp Op_trans, EApplyMode Op_inverse, const Epetra_MultiVector &X_k, Epetra_MultiVector *Y_k) const
Apply the kth aggregate operator M[k] correctly.