![]() |
|
#include <matrix_vector_product.h>
Inheritance diagram for oomph::MatrixVectorProduct:Public Member Functions | |
| MatrixVectorProduct () | |
| Constructor. More... | |
| MatrixVectorProduct (const MatrixVectorProduct &)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const MatrixVectorProduct &)=delete |
| Broken assignment operator. More... | |
| ~MatrixVectorProduct () | |
| Destructor. More... | |
| void | clean_up_memory () |
| clear the memory More... | |
| void | setup (CRDoubleMatrix *matrix_pt, const LinearAlgebraDistribution *col_dist_pt=0) |
| void | multiply (const DoubleVector &x, DoubleVector &y) const |
| void | multiply_transpose (const DoubleVector &x, DoubleVector &y) const |
| const unsigned & | ncol () const |
| Access function to the number of columns. More... | |
Public Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
| DistributableLinearAlgebraObject () | |
| Default constructor - create a distribution. More... | |
| DistributableLinearAlgebraObject (const DistributableLinearAlgebraObject &matrix)=delete | |
| Broken copy constructor. More... | |
| void | operator= (const DistributableLinearAlgebraObject &)=delete |
| Broken assignment operator. More... | |
| virtual | ~DistributableLinearAlgebraObject () |
| Destructor. More... | |
| LinearAlgebraDistribution * | distribution_pt () const |
| access to the LinearAlgebraDistribution More... | |
| unsigned | nrow () const |
| access function to the number of global rows. More... | |
| unsigned | nrow_local () const |
| access function for the num of local rows on this processor. More... | |
| unsigned | nrow_local (const unsigned &p) const |
| access function for the num of local rows on this processor. More... | |
| unsigned | first_row () const |
| access function for the first row on this processor More... | |
| unsigned | first_row (const unsigned &p) const |
| access function for the first row on this processor More... | |
| bool | distributed () const |
| distribution is serial or distributed More... | |
| bool | distribution_built () const |
| void | build_distribution (const LinearAlgebraDistribution *const dist_pt) |
| void | build_distribution (const LinearAlgebraDistribution &dist) |
Private Attributes | |
| bool | Using_trilinos |
| CRDoubleMatrix * | Oomph_matrix_pt |
| an oomph-lib matrix More... | |
| LinearAlgebraDistribution * | Column_distribution_pt |
| unsigned | Ncol |
| number of columns of the matrix More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oomph::DistributableLinearAlgebraObject | |
| void | clear_distribution () |
Matrix vector product helper class - primarily a wrapper to Trilinos's Epetra matrix vector product methods. This allows the epetra matrix to be assembled once and the matrix vector product to be performed many times.
|
inline |
Constructor.
References Column_distribution_pt, and Oomph_matrix_pt.
|
delete |
Broken copy constructor.
|
inline |
Destructor.
References clean_up_memory().
|
inline |
clear the memory
References Column_distribution_pt, and Oomph_matrix_pt.
Referenced by oomph::PseudoElasticFSIPreconditioner::clean_up_memory(), setup(), and ~MatrixVectorProduct().
| void oomph::MatrixVectorProduct::multiply | ( | const DoubleVector & | x, |
| DoubleVector & | y | ||
| ) | const |
Apply the operator to the vector x and return the result in the vector y
References Column_distribution_pt, oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::CRDoubleMatrix::multiply(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Oomph_matrix_pt, Using_trilinos, plotDoE::x, and y.
Referenced by oomph::FSIPreconditioner::preconditioner_solve(), oomph::PseudoElasticFSIPreconditioner::preconditioner_solve(), oomph::PressureBasedSolidLSCPreconditioner::preconditioner_solve(), and oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::preconditioner_solve().
| void oomph::MatrixVectorProduct::multiply_transpose | ( | const DoubleVector & | x, |
| DoubleVector & | y | ||
| ) | const |
Apply the transpose of the operator to the vector x and return the result in the vector y
References Column_distribution_pt, oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::CRDoubleMatrix::multiply_transpose(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Oomph_matrix_pt, Using_trilinos, plotDoE::x, and y.
Referenced by oomph::PressureBasedSolidLSCPreconditioner::preconditioner_solve(), and oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::preconditioner_solve().
|
inline |
Access function to the number of columns.
References Ncol.
|
delete |
Broken assignment operator.
| void oomph::MatrixVectorProduct::setup | ( | CRDoubleMatrix * | matrix_pt, |
| const LinearAlgebraDistribution * | col_dist_pt = 0 |
||
| ) |
Setup the matrix vector product operator. WARNING: This class is wrapper to Trilinos Epetra matrix vector multiply methods, if Trilinos is not installed then this class will function as expected, but there will be no computational speed gain. By default the Epetra_CrsMatrix::multiply(...) are employed. The optional argument col_dist_pt is the distribution of: x if using multiply(...) or y if using multiply_transpose(...) where this is A x = y. By default, this is assumed to the uniformly distributed based on matrix_pt->ncol().
References oomph::DistributableLinearAlgebraObject::build_distribution(), clean_up_memory(), Column_distribution_pt, oomph::LinearAlgebraDistribution::communicator_pt(), oomph::TrilinosEpetraHelpers::create_distributed_epetra_matrix(), oomph::LinearAlgebraDistribution::distributed(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::MPI_Helpers::mpi_has_been_initialised(), oomph::CRDoubleMatrix::ncol(), Ncol, oomph::oomph_info, Oomph_matrix_pt, oomph::TimingHelpers::timer(), and Using_trilinos.
Referenced by oomph::BlockPreconditioner< MATRIX >::setup_matrix_vector_product().
|
private |
The distribution of: x if using multiply(...) or y if using multiply_transpose(...) where this is A x = y.
Referenced by clean_up_memory(), MatrixVectorProduct(), multiply(), multiply_transpose(), and setup().
|
private |
|
private |
an oomph-lib matrix
Referenced by clean_up_memory(), MatrixVectorProduct(), multiply(), multiply_transpose(), and setup().
|
private |
boolean indicating whether we are using trilinos to perform matvec
Referenced by multiply(), multiply_transpose(), and setup().