![]() |
|
#include <general_purpose_space_time_subsidiary_block_preconditioner.h>
Public Member Functions | |
GMRESBlockPreconditioner () | |
Constructor (empty) More... | |
virtual | ~GMRESBlockPreconditioner () |
Destructor. More... | |
virtual void | clean_up_memory () |
Clean up the memory (empty for now...) More... | |
GMRESBlockPreconditioner (const GMRESBlockPreconditioner &)=delete | |
Broken copy constructor. More... | |
void | operator= (const GMRESBlockPreconditioner &)=delete |
Broken assignment operator. More... | |
void | setup () |
Setup the preconditioner. More... | |
void | preconditioner_solve (const DoubleVector &r, DoubleVector &z) |
Apply preconditioner to r. More... | |
void | solve (Problem *const &problem_pt, DoubleVector &result) |
unsigned | iterations () const |
Handle to the number of iterations taken. More... | |
void | set_preconditioner_LHS () |
Set left preconditioning (the default) More... | |
void | set_preconditioner_RHS () |
Enable right preconditioning. More... | |
void | enable_doc_memory_usage () |
Document the memory usage. More... | |
void | disable_doc_memory_usage () |
Don't document the memory usage! More... | |
double | get_memory_usage_in_bytes () |
Get the memory statistics. More... | |
SpaceTimeNavierStokesSubsidiaryPreconditioner * | navier_stokes_subsidiary_preconditioner_pt () const |
GMRESBlockPreconditioner () | |
Constructor (empty) More... | |
virtual | ~GMRESBlockPreconditioner () |
Destructor. More... | |
virtual void | clean_up_memory () |
Clean up the memory (empty for now...) More... | |
GMRESBlockPreconditioner (const GMRESBlockPreconditioner &)=delete | |
Broken copy constructor. More... | |
void | operator= (const GMRESBlockPreconditioner &)=delete |
Broken assignment operator. More... | |
void | setup () |
Setup the preconditioner. More... | |
void | preconditioner_solve (const DoubleVector &r, DoubleVector &z) |
Apply preconditioner to r. More... | |
void | solve (Problem *const &problem_pt, DoubleVector &result) |
unsigned | iterations () const |
Handle to the number of iterations taken. More... | |
void | set_preconditioner_LHS () |
Set left preconditioning (the default) More... | |
void | set_preconditioner_RHS () |
Enable right preconditioning. More... | |
void | enable_doc_memory_statistics () |
Document the memory usage. More... | |
void | disable_doc_memory_statistics () |
Don't document the memory usage! More... | |
double | get_memory_usage_in_bytes () |
Get the memory statistics. More... | |
SpaceTimeNavierStokesSubsidiaryPreconditioner * | navier_stokes_subsidiary_preconditioner_pt () const |
void | setup (DoubleMatrixBase *matrix_pt) |
void | setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt) |
virtual void | setup ()=0 |
void | setup (DoubleMatrixBase *matrix_pt) |
void | setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt) |
virtual void | setup ()=0 |
![]() | |
IterativeLinearSolver () | |
IterativeLinearSolver (const IterativeLinearSolver &)=delete | |
Broken copy constructor. More... | |
void | operator= (const IterativeLinearSolver &)=delete |
Broken assignment operator. More... | |
virtual | ~IterativeLinearSolver () |
Destructor (empty) More... | |
Preconditioner *& | preconditioner_pt () |
Access function to preconditioner. More... | |
Preconditioner *const & | preconditioner_pt () const |
Access function to preconditioner (const version) More... | |
double & | tolerance () |
Access to convergence tolerance. More... | |
unsigned & | max_iter () |
Access to max. number of iterations. More... | |
void | enable_doc_convergence_history () |
Enable documentation of the convergence history. More... | |
void | disable_doc_convergence_history () |
Disable documentation of the convergence history. More... | |
void | open_convergence_history_file_stream (const std::string &file_name, const std::string &zone_title="") |
void | close_convergence_history_file_stream () |
Close convergence history output stream. More... | |
double | jacobian_setup_time () const |
double | linear_solver_solution_time () const |
return the time taken to solve the linear system More... | |
virtual double | preconditioner_setup_time () const |
returns the the time taken to setup the preconditioner More... | |
void | enable_setup_preconditioner_before_solve () |
Setup the preconditioner before the solve. More... | |
void | disable_setup_preconditioner_before_solve () |
Don't set up the preconditioner before the solve. More... | |
void | enable_error_after_max_iter () |
Throw an error if we don't converge within max_iter. More... | |
void | disable_error_after_max_iter () |
Don't throw an error if we don't converge within max_iter (default). More... | |
void | enable_iterative_solver_as_preconditioner () |
void | disable_iterative_solver_as_preconditioner () |
![]() | |
LinearSolver () | |
Empty constructor, initialise the member data. More... | |
LinearSolver (const LinearSolver &dummy)=delete | |
Broken copy constructor. More... | |
void | operator= (const LinearSolver &)=delete |
Broken assignment operator. More... | |
virtual | ~LinearSolver () |
Empty virtual destructor. More... | |
void | enable_doc_time () |
Enable documentation of solve times. More... | |
void | disable_doc_time () |
Disable documentation of solve times. More... | |
bool | is_doc_time_enabled () const |
Is documentation of solve times enabled? More... | |
bool | is_resolve_enabled () const |
Boolean flag indicating if resolves are enabled. More... | |
virtual void | enable_resolve () |
virtual void | disable_resolve () |
virtual void | solve (DoubleMatrixBase *const &matrix_pt, const DoubleVector &rhs, DoubleVector &result) |
virtual void | solve (DoubleMatrixBase *const &matrix_pt, const Vector< double > &rhs, Vector< double > &result) |
virtual void | solve_transpose (Problem *const &problem_pt, DoubleVector &result) |
virtual void | solve_transpose (DoubleMatrixBase *const &matrix_pt, const DoubleVector &rhs, DoubleVector &result) |
virtual void | solve_transpose (DoubleMatrixBase *const &matrix_pt, const Vector< double > &rhs, Vector< double > &result) |
virtual void | resolve (const DoubleVector &rhs, DoubleVector &result) |
virtual void | resolve_transpose (const DoubleVector &rhs, DoubleVector &result) |
virtual void | enable_computation_of_gradient () |
void | disable_computation_of_gradient () |
void | reset_gradient () |
void | get_gradient (DoubleVector &gradient) |
function to access the gradient, provided it has been computed More... | |
![]() | |
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) |
![]() | |
BlockPreconditioner () | |
Constructor. More... | |
BlockPreconditioner (const BlockPreconditioner &)=delete | |
Broken copy constructor. More... | |
virtual | ~BlockPreconditioner () |
Destructor. More... | |
void | operator= (const BlockPreconditioner &)=delete |
Broken assignment operator. More... | |
CRDoubleMatrix * | matrix_pt () const |
void | turn_on_recursive_debug_flag () |
void | turn_off_recursive_debug_flag () |
void | turn_on_debug_flag () |
Toggles on the debug flag. More... | |
void | turn_off_debug_flag () |
Toggles off the debug flag. More... | |
void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse) |
void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse, const Vector< Vector< unsigned >> &doftype_coarsen_map_coarse) |
virtual void | block_setup () |
void | block_setup (const Vector< unsigned > &dof_to_block_map) |
void | get_block (const unsigned &i, const unsigned &j, CRDoubleMatrix &output_matrix, const bool &ignore_replacement_block=false) const |
CRDoubleMatrix | get_block (const unsigned &i, const unsigned &j, const bool &ignore_replacement_block=false) const |
void | set_master_matrix_pt (CRDoubleMatrix *in_matrix_pt) |
Set the matrix_pt in the upper-most master preconditioner. More... | |
void | get_block_other_matrix (const unsigned &i, const unsigned &j, CRDoubleMatrix *in_matrix_pt, CRDoubleMatrix &output_matrix) |
void | get_blocks (DenseMatrix< bool > &required_blocks, DenseMatrix< CRDoubleMatrix * > &block_matrix_pt) const |
void | get_dof_level_block (const unsigned &i, const unsigned &j, CRDoubleMatrix &output_block, const bool &ignore_replacement_block=false) const |
void | get_dof_level_block (const unsigned &block_i, const unsigned &block_j, CRDoubleMatrix &output_block, const bool &ignore_replacement_block) const |
CRDoubleMatrix | get_concatenated_block (const VectorMatrix< BlockSelector > &selected_block) |
void | get_concatenated_block_vector (const Vector< unsigned > &block_vec_number, const DoubleVector &v, DoubleVector &b) |
void | return_concatenated_block_vector (const Vector< unsigned > &block_vec_number, const DoubleVector &b, DoubleVector &v) const |
Takes concatenated block ordered vector, b, and copies its. More... | |
void | get_block_vectors (const Vector< unsigned > &block_vec_number, const DoubleVector &v, Vector< DoubleVector > &s) const |
void | get_block_vectors (const DoubleVector &v, Vector< DoubleVector > &s) const |
void | return_block_vectors (const Vector< unsigned > &block_vec_number, const Vector< DoubleVector > &s, DoubleVector &v) const |
void | return_block_vectors (const Vector< DoubleVector > &s, DoubleVector &v) const |
void | get_block_vector (const unsigned &n, const DoubleVector &v, DoubleVector &b) const |
void | return_block_vector (const unsigned &n, const DoubleVector &b, DoubleVector &v) const |
void | get_block_ordered_preconditioner_vector (const DoubleVector &v, DoubleVector &w) |
void | return_block_ordered_preconditioner_vector (const DoubleVector &w, DoubleVector &v) const |
unsigned | nblock_types () const |
Return the number of block types. More... | |
unsigned | ndof_types () const |
Return the total number of DOF types. More... | |
const Mesh * | mesh_pt (const unsigned &i) const |
unsigned | nmesh () const |
int | block_number (const unsigned &i_dof) const |
Return the block number corresponding to a global index i_dof. More... | |
int | index_in_block (const unsigned &i_dof) const |
const LinearAlgebraDistribution * | block_distribution_pt (const unsigned &b) const |
Access function to the block distributions (const version). More... | |
LinearAlgebraDistribution * | block_distribution_pt (const unsigned b) |
Access function to the block distributions (non-const version). More... | |
LinearAlgebraDistribution * | dof_block_distribution_pt (const unsigned &b) |
Access function to the dof-level block distributions. More... | |
const LinearAlgebraDistribution * | master_distribution_pt () const |
unsigned | ndof_types_in_mesh (const unsigned &i) const |
bool | is_subsidiary_block_preconditioner () const |
bool | is_master_block_preconditioner () const |
void | set_block_output_to_files (const std::string &basefilename) |
void | disable_block_output_to_files () |
Turn off output of blocks (by clearing the basefilename string). More... | |
bool | block_output_on () const |
Test if output of blocks is on or not. More... | |
void | output_blocks_to_files (const std::string &basefilename, const unsigned &precision=8) const |
void | post_block_matrix_assembly_partial_clear () |
BlockPreconditioner< CRDoubleMatrix > * | master_block_preconditioner_pt () const |
Access function to the master block preconditioner pt. More... | |
void | clear_block_preconditioner_base () |
void | document () |
Vector< Vector< unsigned > > | doftype_coarsen_map_fine () const |
Vector< unsigned > | get_fine_grain_dof_types_in (const unsigned &i) const |
unsigned | nfine_grain_dof_types_in (const unsigned &i) const |
MapMatrix< unsigned, CRDoubleMatrix * > | replacement_dof_block_pt () const |
Access function to the replaced dof-level blocks. More... | |
void | setup_matrix_vector_product (MatrixVectorProduct *matvec_prod_pt, CRDoubleMatrix *block_pt, const Vector< unsigned > &block_col_indices) |
void | setup_matrix_vector_product (MatrixVectorProduct *matvec_prod_pt, CRDoubleMatrix *block_pt, const unsigned &block_col_index) |
void | internal_get_block_ordered_preconditioner_vector (const DoubleVector &v, DoubleVector &w) const |
void | internal_return_block_ordered_preconditioner_vector (const DoubleVector &w, DoubleVector &v) const |
unsigned | internal_nblock_types () const |
unsigned | internal_ndof_types () const |
void | internal_return_block_vector (const unsigned &n, const DoubleVector &b, DoubleVector &v) const |
void | internal_get_block_vector (const unsigned &n, const DoubleVector &v, DoubleVector &b) const |
void | internal_get_block_vectors (const Vector< unsigned > &block_vec_number, const DoubleVector &v, Vector< DoubleVector > &s) const |
void | internal_get_block_vectors (const DoubleVector &v, Vector< DoubleVector > &s) const |
void | internal_return_block_vectors (const Vector< unsigned > &block_vec_number, const Vector< DoubleVector > &s, DoubleVector &v) const |
void | internal_return_block_vectors (const Vector< DoubleVector > &s, DoubleVector &v) const |
void | internal_get_block (const unsigned &i, const unsigned &j, CRDoubleMatrix &output_block) const |
void | internal_get_block (const unsigned &block_i, const unsigned &block_j, CRDoubleMatrix &output_block) const |
int | internal_block_number (const unsigned &i_dof) const |
int | internal_index_in_block (const unsigned &i_dof) const |
const LinearAlgebraDistribution * | internal_block_distribution_pt (const unsigned &b) const |
Access function to the internal block distributions. More... | |
void | insert_auxiliary_block_distribution (const Vector< unsigned > &block_vec_number, LinearAlgebraDistribution *dist_pt) |
void | block_matrix_test (const unsigned &i, const unsigned &j, const CRDoubleMatrix *block_matrix_pt) const |
int | get_index_of_value (const Vector< myType > &vec, const myType val, const bool sorted=false) const |
![]() | |
Preconditioner () | |
Constructor. More... | |
Preconditioner (const Preconditioner &)=delete | |
Broken copy constructor. More... | |
void | operator= (const Preconditioner &)=delete |
Broken assignment operator. More... | |
virtual | ~Preconditioner () |
Destructor (empty) More... | |
virtual void | preconditioner_solve_transpose (const DoubleVector &r, DoubleVector &z) |
void | setup (DoubleMatrixBase *matrix_pt) |
void | setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt) |
void | enable_silent_preconditioner_setup () |
Set up the block preconditioner quietly! More... | |
void | disable_silent_preconditioner_setup () |
Be verbose in the block preconditioner setup. More... | |
virtual void | set_matrix_pt (DoubleMatrixBase *matrix_pt) |
Set the matrix pointer. More... | |
virtual const OomphCommunicator * | comm_pt () const |
Get function for comm pointer. More... | |
virtual void | set_comm_pt (const OomphCommunicator *const comm_pt) |
Set the communicator pointer. More... | |
double | setup_time () const |
Returns the time to setup the preconditioner. More... | |
virtual void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse) |
virtual void | turn_into_subsidiary_block_preconditioner (BlockPreconditioner< CRDoubleMatrix > *master_block_prec_pt, const Vector< unsigned > &doftype_in_master_preconditioner_coarse, const Vector< Vector< unsigned >> &doftype_coarsen_map_coarse) |
Private Member Functions | |
void | update (const unsigned &k, const Vector< Vector< double >> &H, const Vector< double > &s, const Vector< DoubleVector > &v, const DoubleVector &block_x_with_size_of_full_x, DoubleVector &x) |
void | generate_plane_rotation (double &dx, double &dy, double &cs, double &sn) |
void | apply_plane_rotation (double &dx, double &dy, double &cs, double &sn) |
void | update (const unsigned &k, const Vector< Vector< double >> &H, const Vector< double > &s, const Vector< DoubleVector > &v, const DoubleVector &block_x_with_size_of_full_x, DoubleVector &x) |
void | generate_plane_rotation (double &dx, double &dy, double &cs, double &sn) |
void | apply_plane_rotation (double &dx, double &dy, double &cs, double &sn) |
Private Attributes | |
CRDoubleMatrix * | Matrix_pt |
Pointer to matrix. More... | |
SpaceTimeNavierStokesSubsidiaryPreconditioner * | Navier_stokes_subsidiary_preconditioner_pt |
Pointer to the preconditioner for the block matrix. More... | |
unsigned | Iterations |
Number of iterations taken. More... | |
bool | Compute_memory_statistics |
double | Memory_usage_in_bytes |
bool | Preconditioner_has_been_setup |
bool | Preconditioner_LHS |
The block preconditioner form of GMRES. This version extracts the blocks from the global systems and assembles the system by concatenating all the matrices together
|
inline |
Constructor (empty)
References Compute_memory_statistics, and Memory_usage_in_bytes.
|
inlinevirtual |
Destructor.
References clean_up_memory().
|
delete |
Broken copy constructor.
|
inline |
|
inlinevirtual |
|
delete |
Broken copy constructor.
|
inlineprivate |
Helper function: Apply plane rotation. This is done using the update:
\[ \begin{bmatrix} dx \newline dy \end{bmatrix} \leftarrow \begin{bmatrix} \cos\theta & \sin\theta \newline -\sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} dx \newline dy \end{bmatrix}. \]
Referenced by preconditioner_solve().
|
inlineprivate |
Helper function: Apply plane rotation. This is done using the update:
\[ \begin{bmatrix} dx \newline dy \end{bmatrix} \leftarrow \begin{bmatrix} \cos\theta & \sin\theta \newline -\sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} dx \newline dy \end{bmatrix}. \]
|
inlinevirtual |
Clean up the memory (empty for now...)
Reimplemented from oomph::LinearSolver.
References Matrix_pt, Navier_stokes_subsidiary_preconditioner_pt, and Preconditioner_has_been_setup.
Referenced by setup(), and ~GMRESBlockPreconditioner().
|
inlinevirtual |
Clean up the memory (empty for now...)
Reimplemented from oomph::LinearSolver.
References Matrix_pt, Navier_stokes_subsidiary_preconditioner_pt, and Preconditioner_has_been_setup.
|
inline |
Don't document the memory usage!
Set the appropriate flag to false
References Compute_memory_statistics.
|
inline |
Don't document the memory usage!
Set the appropriate flag to false
References Compute_memory_statistics.
|
inline |
|
inline |
|
inlineprivate |
Helper function: Generate a plane rotation. This is done by finding the values of \( \cos(\theta) \) (i.e. cs) and \sin(\theta) (i.e. sn) such that:
\[ \begin{bmatrix} \cos\theta & \sin\theta \newline -\sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} dx \newline dy \end{bmatrix} = \begin{bmatrix} r \newline 0 \end{bmatrix}, \]
where \( r=\sqrt{pow(dx,2)+pow(dy,2)} \). The values of a and b are given by:
\[ \cos\theta&=\dfrac{dx}{\sqrt{pow(dx,2)+pow(dy,2)}}, \]
and
\[ \sin\theta&=\dfrac{dy}{\sqrt{pow(dx,2)+pow(dy,2)}}. \]
Taken from: Saad Y."Iterative methods for sparse linear systems", p.192
References boost::multiprecision::fabs(), and sqrt().
Referenced by preconditioner_solve().
|
inlineprivate |
Helper function: Generate a plane rotation. This is done by finding the values of \( \cos(\theta) \) (i.e. cs) and \sin(\theta) (i.e. sn) such that:
\[ \begin{bmatrix} \cos\theta & \sin\theta \newline -\sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} dx \newline dy \end{bmatrix} = \begin{bmatrix} r \newline 0 \end{bmatrix}, \]
where \( r=\sqrt{pow(dx,2)+pow(dy,2)} \). The values of a and b are given by:
\[ \cos\theta&=\dfrac{dx}{\sqrt{pow(dx,2)+pow(dy,2)}}, \]
and
\[ \sin\theta&=\dfrac{dy}{\sqrt{pow(dx,2)+pow(dy,2)}}. \]
Taken from: Saad Y."Iterative methods for sparse linear systems", p.192
References boost::multiprecision::fabs(), and sqrt().
|
inline |
Get the memory statistics.
References Compute_memory_statistics, Memory_usage_in_bytes, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and Preconditioner_has_been_setup.
Referenced by oomph::BandedBlockTriangularPreconditioner< MATRIX >::setup().
|
inline |
Get the memory statistics.
References Compute_memory_statistics, Memory_usage_in_bytes, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and Preconditioner_has_been_setup.
|
inlinevirtual |
Handle to the number of iterations taken.
Implements oomph::IterativeLinearSolver.
References Iterations.
|
inlinevirtual |
Handle to the number of iterations taken.
Implements oomph::IterativeLinearSolver.
References Iterations.
|
inline |
Handle to the Navier-Stokes subsidiary block preconditioner DRAIG: Make sure the desired const-ness is correct later...
References Navier_stokes_subsidiary_preconditioner_pt.
Referenced by oomph::BandedBlockTriangularPreconditioner< MATRIX >::setup().
|
inline |
Handle to the Navier-Stokes subsidiary block preconditioner DRAIG: Make sure the desired const-ness is correct later...
References Navier_stokes_subsidiary_preconditioner_pt.
|
delete |
Broken assignment operator.
|
delete |
Broken assignment operator.
|
virtual |
Apply preconditioner to r.
Preconditioner solve for the GMRES block preconditioner.
Implements oomph::Preconditioner.
References apply_plane_rotation(), beta, oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::IterativeLinearSolver::Doc_convergence_history, oomph::LinearSolver::Doc_time, boost::multiprecision::fabs(), generate_plane_rotation(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block_vector(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block_vectors(), H, i, oomph::Vector< _Tp >::initialise(), Iterations, k, Matrix_pt, oomph::IterativeLinearSolver::Max_iter, oomph::CRDoubleMatrix::multiply(), Navier_stokes_subsidiary_preconditioner_pt, oomph::BlockPreconditioner< CRDoubleMatrix >::nblock_types(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, oomph::IterativeLinearSolver::Output_file_stream, Preconditioner_LHS, oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::preconditioner_solve(), UniformPSDSelfTest::r, oomph::DoubleMatrixBase::residual(), oomph::BlockPreconditioner< CRDoubleMatrix >::return_block_vector(), s, BiharmonicTestFunctions1::solution(), oomph::IterativeLinearSolver::Solution_time, oomph::IterativeLinearSolver::Throw_error_after_max_iter, oomph::TimingHelpers::timer(), oomph::IterativeLinearSolver::Tolerance, update(), v, and w.
|
virtual |
Apply preconditioner to r.
Implements oomph::Preconditioner.
|
inline |
Set left preconditioning (the default)
References Preconditioner_LHS.
|
inline |
Set left preconditioning (the default)
References Preconditioner_LHS.
|
inline |
Enable right preconditioning.
References Preconditioner_LHS.
|
inline |
Enable right preconditioning.
References Preconditioner_LHS.
|
virtual |
Setup the preconditioner.
Setup for the GMRES block preconditioner.
Implements oomph::Preconditioner.
References oomph::BlockPreconditioner< CRDoubleMatrix >::block_setup(), clean_up_memory(), Compute_memory_statistics, oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::enable_doc_memory_usage(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block(), i, int(), oomph::BlockPreconditioner< CRDoubleMatrix >::is_subsidiary_block_preconditioner(), oomph::BlockPreconditioner< CRDoubleMatrix >::matrix_pt(), Matrix_pt, Memory_usage_in_bytes, Navier_stokes_subsidiary_preconditioner_pt, oomph::BlockPreconditioner< CRDoubleMatrix >::nblock_types(), oomph::BlockPreconditioner< CRDoubleMatrix >::ndof_types(), oomph::CRDoubleMatrix::nnz(), oomph::CRDoubleMatrix::nrow(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, oomph::oomph_nullstream, Preconditioner_has_been_setup, oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::setup(), oomph::Preconditioner::Silent_preconditioner_setup, oomph::OomphInfo::stream_pt(), oomph::Preconditioner::Stream_pt, oomph::TimingHelpers::timer(), and oomph::BlockPreconditioner< MATRIX >::turn_into_subsidiary_block_preconditioner().
|
virtual |
Setup the preconditioner.
Implements oomph::Preconditioner.
|
virtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
virtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
For some reason we need to remind the compiler that there is also a function named setup in the base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
Solver: Takes pointer to problem and returns the results vector which contains the solution of the linear system defined by the problem's fully assembled Jacobian and residual vector.
Implements oomph::LinearSolver.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
inlinevirtual |
Solver: Takes pointer to problem and returns the results vector which contains the solution of the linear system defined by the problem's fully assembled Jacobian and residual vector.
Implements oomph::LinearSolver.
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
inlineprivate |
Helper function to update the result vector using the result, x=x_0+V_m*y
References oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block_vector(), H, i, j, k, Navier_stokes_subsidiary_preconditioner_pt, Preconditioner_LHS, oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::preconditioner_solve(), oomph::BlockPreconditioner< CRDoubleMatrix >::return_block_vector(), s, v, oomph::DoubleVector::values_pt(), plotDoE::x, and y.
Referenced by preconditioner_solve(), and smc.smc::recursiveBayesian().
|
inlineprivate |
Helper function to update the result vector using the result, x=x_0+V_m*y
References oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block_vector(), H, i, j, k, Navier_stokes_subsidiary_preconditioner_pt, Preconditioner_LHS, oomph::SpaceTimeNavierStokesSubsidiaryPreconditioner::preconditioner_solve(), oomph::BlockPreconditioner< CRDoubleMatrix >::return_block_vector(), s, v, oomph::DoubleVector::values_pt(), plotDoE::x, and y.
Referenced by smc.smc::recursiveBayesian().
|
private |
Flag to indicate whether or not to record the memory statistics this preconditioner
Referenced by disable_doc_memory_statistics(), disable_doc_memory_usage(), enable_doc_memory_statistics(), enable_doc_memory_usage(), get_memory_usage_in_bytes(), GMRESBlockPreconditioner(), and setup().
|
private |
Number of iterations taken.
Referenced by iterations(), and preconditioner_solve().
|
private |
Pointer to matrix.
Referenced by clean_up_memory(), preconditioner_solve(), and setup().
|
private |
Storage for the memory usage of the solver if the flag above is set to true (in bytes)
Referenced by get_memory_usage_in_bytes(), GMRESBlockPreconditioner(), and setup().
|
private |
Pointer to the preconditioner for the block matrix.
Referenced by clean_up_memory(), navier_stokes_subsidiary_preconditioner_pt(), preconditioner_solve(), setup(), and update().
|
private |
Control flag is true if the preconditioner has been setup (used so we can wipe the data when the preconditioner is called again)
Referenced by clean_up_memory(), get_memory_usage_in_bytes(), and setup().
|
private |
boolean indicating use of left hand preconditioning (if true) or right hand preconditioning (if false)
Referenced by preconditioner_solve(), set_preconditioner_LHS(), set_preconditioner_RHS(), and update().