42 #ifndef EPETRAEXT_PRODUCT_OPERATOR_H
43 #define EPETRAEXT_PRODUCT_OPERATOR_H
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
51 #include "Epetra_Operator.h"
52 #include "Teuchos_RCP.hpp"
53 #include "Teuchos_BLAS_types.hpp"
159 ,
const Teuchos::RCP<const Epetra_Operator>
Op[]
229 ,
const Teuchos::RCP<const Epetra_Operator>
Op[]
242 ,Teuchos::RCP<const Epetra_Operator>
Op[]
290 Teuchos::RCP<const Epetra_Operator>
Op(
int k)
const;
298 Teuchos::ETransp
Op_trans(
int k)
const;
322 const char *
Label()
const;
341 typedef std::vector<Teuchos::RCP<const Epetra_Operator> > Op_t;
342 typedef std::vector<Teuchos::ETransp> Op_trans_t;
343 typedef std::vector<EApplyMode> Op_inverse_t;
344 typedef std::vector<Teuchos::RCP<Epetra_Vector> > EV_t;
351 Op_trans_t Op_trans_;
352 Op_inverse_t Op_inverse_;
354 mutable EV_t range_vecs_;
355 mutable EV_t domain_vecs_;
360 void assertInitialized()
const;
361 void validateIndex(
int k)
const;
362 void initializeTempVecs(
bool applyInverse)
const;
378 Teuchos::RCP<const Epetra_Operator>
398 return Op_inverse_[k];
405 void ProductOperator::assertInitialized()
const
407 TEUCHOS_TEST_FOR_EXCEPTION(
408 Op_.size()==0, std::logic_error
409 ,
"Epetra::ProductOperator: Error, Client has not called initialize(...) yet!"
414 void ProductOperator::validateIndex(
int k)
const
416 TEUCHOS_TEST_FOR_EXCEPTION(
417 k < 0 || static_cast<int>(Op_.size())-1 < k, std::logic_error
418 ,
"Epetra::ProductOperator: Error, k = "<<k<<
" is not in the range [0,"<<Op_.size()-1<<
"]!"
424 #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.