43#include "EpetraExt_BlockUtility.h"
44#include "EpetraExt_BlockMultiVector.h"
48 const Teuchos::RCP<const Epetra_BlockMap>& block_map,
49 const Teuchos::RCP<const Epetra_Map>& domain_base_map_,
50 const Teuchos::RCP<const Epetra_Map>& range_base_map_,
51 const Teuchos::RCP<const EpetraExt::MultiComm>& product_comm_) :
63 const Teuchos::RCP<const Epetra_BlockMap>& block_map,
64 const Teuchos::RCP<const Epetra_Map>& domain_base_map_,
65 const Teuchos::RCP<const Epetra_Map>& range_base_map_,
66 const Teuchos::RCP<const Epetra_Map>& product_range_map_,
67 const Teuchos::RCP<const EpetraExt::MultiComm>& product_comm_) :
103Teuchos::RCP<const EpetraExt::MultiComm>
114 for (
int i=0; i<
coeff_.size(); i++)
128 for (
int i=0; i<
coeff_.size(); i++) {
129 coeff_[i]->Apply(*(sg_input.GetBlock(i)), tmp);
130 Result.
Update(1.0, tmp, 1.0);
135 for (
int i=0; i<
coeff_.size(); i++)
147 throw "ProductEpetraOperator::ApplyInverse not defined!";
163 return "Stokhos::ProductEpetraOperator";
206 const Teuchos::RCP<const Epetra_BlockMap>& block_map,
207 const Teuchos::RCP<const EpetraExt::MultiComm>& product_comm_) :
216setup(
const Teuchos::RCP<const Epetra_Map>& domain_base_map_,
217 const Teuchos::RCP<const Epetra_Map>& range_base_map_)
222 Teuchos::rcp(EpetraExt::BlockUtility::GenerateBlockMap(*
range_base_map,
const Epetra_BlockMap & Map() const
int Update(double ScalarA, const Epetra_MultiVector &A, double ScalarThis)
int PutScalar(double ScalarConstant)
Teuchos::Array< Teuchos::RCP< Epetra_Operator > > coeff_
ProductContainer & operator=(const ProductContainer &)
Assignment.
Teuchos::RCP< const Epetra_BlockMap > map_
A container class for products of Epetra_Vector's.
virtual int Apply(const Epetra_MultiVector &Input, Epetra_MultiVector &Result) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector Input in Result as described ...
bool useTranspose
Whether to use transpose in Apply().
virtual const Epetra_Comm & Comm() const
Returns a reference to the Epetra_Comm communicator associated with this operator.
Teuchos::RCP< const EpetraExt::MultiComm > product_comm
Product multi-level communicator.
void setup(const Teuchos::RCP< const Epetra_Map > &domain_base_map, const Teuchos::RCP< const Epetra_Map > &range_base_map)
Second stage of setup.
ProductEpetraOperator(const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_Map > &domain_base_map, const Teuchos::RCP< const Epetra_Map > &range_base_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm)
Create a container with container map block_map where each coefficient is generated from the supplied...
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
ProductEpetraOperator & operator=(const ProductEpetraOperator &v)
Assignment.
virtual int SetUseTranspose(bool UseTranspose)
Set to true if the transpose of the operator is requested.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Teuchos::RCP< const Epetra_Map > domain_base_map
Domain map of each coefficient.
virtual const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator.
Teuchos::RCP< const Epetra_Map > product_range_map
Product range map.
virtual const char * Label() const
Returns a character string describing the operator.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of the inverse of the operator applied to a Epetra_MultiVector Input in Result as ...
Teuchos::RCP< const EpetraExt::MultiComm > productComm() const
Get product comm.
Teuchos::RCP< const Epetra_Map > range_base_map
Range map of each coefficient.
virtual double NormInf() const
Returns an approximate infinity norm of the operator matrix.
virtual ~ProductEpetraOperator()
Destructor.
virtual const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.