LifeV
|
#include <ComposedOperator.hpp>
Typedefs | |
typedef OperatorType | operator_Type |
typedef std::shared_ptr< operator_Type > | operatorPtr_Type |
Constructors, destructor | |
ComposedOperator (const std::shared_ptr< Epetra_Comm > &comm) | |
The constructor builds an empty chain of composed operators. More... | |
ComposedOperator (const ComposedOperator< operator_Type > &P) | |
Copy constructor: it doesn't make a real copy of the operators, it just copies the vector of shared pointer (note that the implementation is mandatory in order to avoid a bit-copy of the shared_ptr vector) More... | |
virtual | ~ComposedOperator () |
Public Methods | |
UInt | push_back (operatorPtr_Type P, const bool useInverse=false, const bool useTranspose=false, const bool summed=false) |
Method to add an operator at the end of the operators list. More... | |
UInt | push_back (operator_Type *P, const bool useInverse=false, const bool useTranspose=false, const bool summed=false) |
Method to add an operator at the end of the operators list. More... | |
UInt | replace (operatorPtr_Type P, const UInt index, const bool useInverse=false, const bool useTranspose=false) |
we expecte an external matrix shared pointer, we will not destroy the matrix! remember: P = M_operator(0) * ... More... | |
void | reset () |
Resets all the factors in the operator. More... | |
void | swap (UInt first, UInt second) |
swaps two factors More... | |
void | resetOperator () |
resets the sandard vector holding all the factors More... | |
Implementation of Epetra_Operator Methods | |
int | SetUseTranspose (bool UseTranspose) |
Method to set the flag M_useTranspose, which specifies if the composed operator is to be transposed. More... | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Method returning the result of applying the operator to a vector. More... | |
int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
double | NormInf () const |
Returns the quantity such that
. More... | |
double | Condest () const |
Returns an estimation of the condition number. More... | |
const char * | Label () const |
Method returning a string identifying the type of operator. More... | |
bool | UseTranspose () const |
Returns true if all the operators composed have to be considered transpose (i.e. More... | |
bool | HasNormInf () const |
Never called: it is implemented for compatibility with Epetra_Operator. More... | |
const Epetra_Comm & | Comm () const |
Returns the communicator. More... | |
const std::shared_ptr< Epetra_Comm > | commPtr () const |
Returns a shared pointer to the communicator. More... | |
const Epetra_Map & | OperatorDomainMap () const |
returns the OperatorDomainMap of the operators contained More... | |
const Epetra_Map & | OperatorRangeMap () const |
returns the OperatorRangeMap of the operators contained More... | |
const std::vector< operatorPtr_Type > & | Operator () const |
Public Get Methods. More... | |
std::vector< operatorPtr_Type > & | OperatorView () const |
returns the std::vector of factors by (non const) reference More... | |
bool | allTranspose () const |
Returns true if the operator is transposed. More... | |
const std::vector< bool > & | transpose () const |
Returns a vector saying for each factor if it is considered transposed or not. More... | |
const std::vector< ID > & | summed () const |
Returns a vector of UInt specifying the form of the operator. More... | |
const std::vector< bool > & | inverse () const |
Returns a vector saying which factors have to be considered as inverse. More... | |
UInt | number () const |
returns the number of factors present in the operator More... | |
const double & | meanIter () const |
int | numCalled () const |
const Displayer & | displayer () |
Setter Methods | |
void | setComm (const std::shared_ptr< Epetra_Comm > comm) |
Set Methods. More... | |
Protected Methods | |
{ | |
int | Apply_DirectOperator (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Protected Methods. More... | |
int | Apply_InverseOperator (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
Protected Members | |
std::vector< operatorPtr_Type > | M_operator |
std::vector< bool > | M_inverse |
std::vector< bool > | M_transpose |
std::vector< ID > | M_summed |
bool | M_allTranspose |
UInt | M_set |
double | M_meanIter |
int | M_numCalled |
Displayer | M_displayer |
Definition at line 64 of file ComposedOperator.hpp.
typedef OperatorType operator_Type |
Definition at line 73 of file ComposedOperator.hpp.
typedef std::shared_ptr<operator_Type> operatorPtr_Type |
Definition at line 74 of file ComposedOperator.hpp.
ComposedOperator | ( | const std::shared_ptr< Epetra_Comm > & | comm | ) |
The constructor builds an empty chain of composed operators.
Constructors and Destructor.
The resulting operator shall be equal to the identity.
Definition at line 340 of file ComposedOperator.hpp.
ComposedOperator | ( | const ComposedOperator< operator_Type > & | P | ) |
Copy constructor: it doesn't make a real copy of the operators, it just copies the vector of shared pointer (note that the implementation is mandatory in order to avoid a bit-copy of the shared_ptr vector)
Definition at line 355 of file ComposedOperator.hpp.
|
virtual |
Definition at line 374 of file ComposedOperator.hpp.
UInt push_back | ( | operatorPtr_Type | P, |
const bool | useInverse = false , |
||
const bool | useTranspose = false , |
||
const bool | summed = false |
||
) |
Method to add an operator at the end of the operators list.
we expect an external Operator shared pointer, we will not destroy the matrix! remember: P = M_operator(0) * ... * M_operator(Qp-1)
P | the operator |
useTranspose | flag specifying if we want to applly the transposed operator |
summed | flag specifying if we want the operator to be summed. Note that the operator would be "out of the vector", summed in a second step after all the multiplications. |
Definition at line 398 of file ComposedOperator.hpp.
UInt push_back | ( | operator_Type * | P, |
const bool | useInverse = false , |
||
const bool | useTranspose = false , |
||
const bool | summed = false |
||
) |
Method to add an operator at the end of the operators list.
Public Methods.
Deprecated. The input parameter P is a standard pointer.
P | the operator |
useTranspose | flag specifying if we want to applly the transposed operator |
summed | flag specifying if we want the operator to be summed. Note that the operator would be "out of the vector", summed in a second step after all the multiplications. |
Definition at line 385 of file ComposedOperator.hpp.
UInt replace | ( | operatorPtr_Type | P, |
const UInt | index, | ||
const bool | useInverse = false , |
||
const bool | useTranspose = false |
||
) |
we expecte an external matrix shared pointer, we will not destroy the matrix! remember: P = M_operator(0) * ...
P | input operator |
index | position (starting from 0) |
useInverse | flag specifying if the operator is already inverted (if AllpyInverse() is implemented) |
Definition at line 435 of file ComposedOperator.hpp.
void reset | ( | ) |
Resets all the factors in the operator.
Calls reset() on all the factors
Definition at line 469 of file ComposedOperator.hpp.
swaps two factors
Swaps the factors and all the related flags (useTranspose, etc...)
first | first factor |
second | second factor |
Definition at line 479 of file ComposedOperator.hpp.
|
inline |
resets the sandard vector holding all the factors
calls clear on the std::vector
resetOperator
Definition at line 156 of file ComposedOperator.hpp.
int SetUseTranspose | ( | bool | UseTranspose | ) |
Method to set the flag M_useTranspose, which specifies if the composed operator is to be transposed.
Implementation of Epetra_Operator methods.
Definition at line 492 of file ComposedOperator.hpp.
int Apply | ( | const Epetra_MultiVector & | X, |
Epetra_MultiVector & | Y | ||
) | const |
Method returning the result of applying the operator to a vector.
X | input vector |
Y | output vector |
Definition at line 519 of file ComposedOperator.hpp.
int ApplyInverse | ( | const Epetra_MultiVector & | X, |
Epetra_MultiVector & | Y | ||
) | const |
Definition at line 527 of file ComposedOperator.hpp.
double NormInf | ( | ) | const |
Returns the quantity such that
.
Definition at line 533 of file ComposedOperator.hpp.
double Condest | ( | ) | const |
Returns an estimation of the condition number.
the estimation is devised from an estimation on each factor with the rule
Definition at line 540 of file ComposedOperator.hpp.
const char * Label | ( | ) | const |
Method returning a string identifying the type of operator.
Definition at line 560 of file ComposedOperator.hpp.
bool UseTranspose | ( | ) | const |
Returns true if all the operators composed have to be considered transpose (i.e.
Get Methods.
if M_allTranspose==true)
Definition at line 570 of file ComposedOperator.hpp.
bool HasNormInf | ( | ) | const |
Never called: it is implemented for compatibility with Epetra_Operator.
Definition at line 577 of file ComposedOperator.hpp.
const Epetra_Comm & Comm | ( | ) | const |
Returns the communicator.
Definition at line 585 of file ComposedOperator.hpp.
const std::shared_ptr< Epetra_Comm > commPtr | ( | ) | const |
Returns a shared pointer to the communicator.
Definition at line 594 of file ComposedOperator.hpp.
const Epetra_Map & OperatorDomainMap | ( | ) | const |
returns the OperatorDomainMap of the operators contained
Definition at line 602 of file ComposedOperator.hpp.
const Epetra_Map & OperatorRangeMap | ( | ) | const |
returns the OperatorRangeMap of the operators contained
Definition at line 611 of file ComposedOperator.hpp.
|
inline |
Public Get Methods.
returns a const reference tor the std::vector of factors
Definition at line 235 of file ComposedOperator.hpp.
|
inline |
returns the std::vector of factors by (non const) reference
Definition at line 243 of file ComposedOperator.hpp.
|
inline |
Returns true if the operator is transposed.
The operator transposed means that all its factors have to be considered transposed
Definition at line 252 of file ComposedOperator.hpp.
|
inline |
Returns a vector saying for each factor if it is considered transposed or not.
Definition at line 258 of file ComposedOperator.hpp.
|
inline |
Returns a vector of UInt specifying the form of the operator.
The size of the vector corresponds to the number of '+' operation in the operator. Each element of the output vector says how many factors are there between two '+' operation. For instance for the operator AB+CDE the vector M_summed returned would be [2,3]
Definition at line 269 of file ComposedOperator.hpp.
|
inline |
Returns a vector saying which factors have to be considered as inverse.
Definition at line 275 of file ComposedOperator.hpp.
|
inline |
returns the number of factors present in the operator
Definition at line 280 of file ComposedOperator.hpp.
|
inline |
Definition at line 285 of file ComposedOperator.hpp.
|
inline |
Definition at line 290 of file ComposedOperator.hpp.
|
inline |
Definition at line 295 of file ComposedOperator.hpp.
void setComm | ( | const std::shared_ptr< Epetra_Comm > | comm | ) |
Set Methods.
Definition at line 624 of file ComposedOperator.hpp.
|
protected |
Protected Methods.
Definition at line 636 of file ComposedOperator.hpp.
|
protected |
Definition at line 692 of file ComposedOperator.hpp.
|
mutableprotected |
Definition at line 320 of file ComposedOperator.hpp.
|
protected |
Definition at line 321 of file ComposedOperator.hpp.
|
protected |
Definition at line 322 of file ComposedOperator.hpp.
|
protected |
Definition at line 323 of file ComposedOperator.hpp.
|
protected |
Definition at line 324 of file ComposedOperator.hpp.
|
protected |
Definition at line 326 of file ComposedOperator.hpp.
|
mutableprotected |
Definition at line 328 of file ComposedOperator.hpp.
|
mutableprotected |
Definition at line 329 of file ComposedOperator.hpp.
|
protected |
Definition at line 331 of file ComposedOperator.hpp.