17 vects.push_back(
static_cast<vector_Type *>(NULL) );
22 for( UInt i(1); i < vects.size()-1; ++i)
28 if(inverted_ && !op->OperatorDomainMap().SameAs( op->OperatorRangeMap() ) )
31 if(ops.size() != 0 && !op->OperatorDomainMap().SameAs( OperatorRangeMap()))
35 inverted.push_back(inverted_);
36 vects.push_back(
static_cast<vector_Type *>(NULL) );
44 if(!X.Map().PointSameAs(OperatorDomainMap()))
46 if(!Y.Map().PointSameAs(OperatorRangeMap()))
52 EPETRA_CHK_ERR( allocateTmpVects(X, Y) );
55 for(UInt i(0); i < ops.size(); ++i)
59 EPETRA_CHK_ERR( ops[i]->Apply(*vects[i], *vects[i+1]) );
63 EPETRA_CHK_ERR( ops[i]->ApplyInverse(*vects[i], *vects[i+1]) );
74 if(!X.Map().PointSameAs(OperatorDomainMap()))
76 if(!Y.Map().PointSameAs(OperatorRangeMap()))
82 EPETRA_CHK_ERR( allocateTmpVects(X, Y) );
85 for(UInt i(0); i < ops.size(); ++i)
89 EPETRA_CHK_ERR( ops[i]->Apply(*vects[i], *vects[i+1]) );
93 EPETRA_CHK_ERR( ops[i]->ApplyInverse(*vects[i], *vects[i+1]) );
102 if(X.NumVectors() != Y.NumVectors())
105 int nVect(X.NumVectors());
110 for(UInt i(1); i<vects.size()-1; ++i)
111 vects[i] =
new vector_Type(ops[i]->OperatorDomainMap(), nVect);
114 vects.front() =
const_cast<vector_Type *>(&X);
123 for( UInt i(1); i < vects.size()-1; ++i)
virtual int ApplyInverse(const vector_Type &X, vector_Type &Y) const
Applies all the operator (with their flags) starting from the first that was pushed.
int pushBack(const operatorPtr_Type &op, const bool inverted)
The first operator we push is the first to be applied.
void updateInverseJacobian(const UInt &iQuadPt)
virtual int Apply(const vector_Type &X, vector_Type &Y) const
Applies all the operator (with their flags) starting from the first that was pushed.
virtual ~CompositeOperator()
int nAllocatedVectorsInMultVect
int allocateTmpVects(const vector_Type &X, vector_Type &Y) const
void deleteTmpVects() const
Epetra_MultiVector vector_Type
std::shared_ptr< operator_Type > operatorPtr_Type