30 #ifndef OOMPH_SOLID_PRECONDITIONERS_HEADER 31 #define OOMPH_SOLID_PRECONDITIONERS_HEADER 36 #include <oomph-lib-config.h> 41 #include "../generic/matrices.h" 42 #include "../generic/assembly_handler.h" 43 #include "../generic/problem.h" 44 #include "../generic/block_preconditioner.h" 45 #include "../generic/preconditioner.h" 46 #include "../generic/SuperLU_preconditioner.h" 47 #include "../generic/matrix_vector_product.h" 420 template<
typename MATRIX>
bool Form_BFBt_product
indicates whether BFBt should be formed or the component matrices should be retained. If true then: in setup(...) : BFBt is computed. in preconditioner_solve(...) : a single matrix vector product with BFBt is performed. if false then: in setup(...) : the matrices B, F are assembled and stored. in preconditioner_solve(...) : a sequence of matrix vector products with B, F, and Bt is performed. (Note: in this discussion no scaling was considered but B and Bt are replaced with BQ and QBt with scaling)
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Preconditioner * P_preconditioner_pt
Pointer to the 'preconditioner' for the pressure matrix.
void clean_up_memory()
Helper function to delete preconditioner data.
MatrixVectorProduct * Bt_mat_vec_pt
MatrixVectorProduct operator for Bt;.
PressureBasedSolidExactPreconditioner()
Constructor - do nothing.
void set_solid_mesh(Mesh *mesh_pt)
void enable_doc_time()
Enable documentation of time.
CRDoubleMatrix * assemble_mass_matrix_diagonal()
bool P_matrix_using_scaling
Control flag is true if mass matrix diagonal scaling is used in the Schur complement approximation...
const Mesh * mesh_pt(const unsigned &i) const
Access to i-th mesh (of the various meshes that contain block preconditionable elements of the same n...
The exact solid preconditioner. This extracts 2x2 blocks (corresponding to the displacement/position ...
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply preconditioner to Vector r.
PressureBasedSolidLSCPreconditioner(const PressureBasedSolidLSCPreconditioner &)
Broken copy constructor.
MatrixVectorProduct * F_mat_vec_pt
MatrixVectorProduct operator for F if BFBt is not to be formed.
PressureBasedSolidLSCPreconditioner()
Constructor - sets defaults for control flags.
MatrixVectorProduct * QBt_mat_vec_pt
MatrixVectorProduct operator for QBt if BFBt is not to be formed.
PressureBasedSolidExactPreconditioner(const PressureBasedSolidExactPreconditioner &)
Broken copy constructor.
~PressureBasedSolidLSCPreconditioner()
Destructor.
void disable_doc_time()
Disable documentation of time.
~PressureBasedSolidExactPreconditioner()
Destructor - do nothing.
bool Using_default_f_preconditioner
flag indicating whether the default F preconditioner is used
MATRIX P_matrix
Preconditioner matrix.
void disable_form_BFBt_product()
if this function is called then: in setup(...) : the matrices B, F are assembled and stored (the defa...
void enable_form_BFBt_product()
If this function is called then: in setup(...) : BFBt is computed. in preconditioner_solve(...) : a single matrix vector product with BFBt is performed.
The least-squares commutator (LSC; formerly BFBT) preconditioner. It uses blocks corresponding to the...
MatrixVectorProduct * E_mat_vec_pt
MatrixVectorProduct operator for E (BFBt) if BFBt is to be formed.
void set_f_superlu_preconditioner()
Function to (re-)set momentum matrix preconditioner (inexact solver) to SuperLU.
void set_f_preconditioner(Preconditioner *new_f_preconditioner_pt)
Function to set a new momentum matrix preconditioner (inexact solver)
void set_nmesh(const unsigned &n)
Specify the number of meshes required by this block preconditioner. Note: elements in different meshe...
bool F_preconditioner_is_block_preconditioner
Boolean indicating whether the momentum system preconditioner is a block preconditioner.
void set_p_superlu_preconditioner()
Function to (re-)set pressure matrix preconditioner (inexact solver) to SuperLU.
void set_p_preconditioner(Preconditioner *new_p_preconditioner_pt)
Function to set a new pressure matrix preconditioner (inexact solver)
bool Preconditioner_has_been_setup
Control flag is true if the preconditioner has been setup (used so we can wipe the data when the prec...
An interface to allow SuperLU to be used as an (exact) Preconditioner.
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
void setup()
Broken assignment operator.
void enable_p_matrix_scaling()
Enable mass matrix diagonal scaling in the Schur complement approximation.
Matrix vector product helper class - primarily a wrapper to Trilinos's Epetra matrix vector product m...
A vector in the mathematical sense, initially developed for linear algebra type applications. If MPI then this vector can be distributed - its distribution is described by the LinearAlgebraDistribution object at Distribution_pt. Data is stored in a C-style pointer vector (double*)
bool Using_default_p_preconditioner
flag indicating whether the default P preconditioner is used
bool is_p_matrix_using_scaling() const
Return whether the mass matrix is using diagonal scaling or not.
Mesh * Solid_mesh_pt
the pointer to the mesh of block preconditionable solid elements.
A class for compressed row matrices. This is a distributable object.
void disable_p_matrix_scaling()
Enable mass matrix diagonal scaling in the.
Preconditioner * F_preconditioner_pt
Pointer to the 'preconditioner' for the F matrix.
bool Doc_time
Set Doc_time to true for outputting results of timings.