![]() |
|
#include <fsi_preconditioners.h>
Inheritance diagram for oomph::FSIPreconditioner:Public Member Functions | |
| FSIPreconditioner (Problem *problem_pt) | |
| ~FSIPreconditioner () | |
| Destructor: Clean up. More... | |
| FSIPreconditioner (const FSIPreconditioner &)=delete | |
| Broken copy constructor. More... | |
| void | set_solid_preconditioner_pt (Preconditioner *solid_preconditioner_pt) |
| Broken assignment operator. More... | |
| Preconditioner * | solid_preconditioner_pt () const |
| Read-only access to solid preconditoner (use set_... to set it) More... | |
| void | use_block_diagonal_version () |
| Switch to block-diagonal preconditioner. More... | |
| void | use_block_triangular_version_with_fluid_on_solid () |
| void | use_block_triangular_version_with_solid_on_fluid () |
| void | set_navier_stokes_mesh (Mesh *mesh_pt, const bool &allow_multiple_element_type_in_navier_stokes_mesh=false) |
| void | set_wall_mesh (Mesh *mesh_pt, const bool &allow_multiple_element_type_in_wall_mesh=false) |
| void | setup () |
| Setup the preconditioner. More... | |
| void | preconditioner_solve (const DoubleVector &r, DoubleVector &z) |
| Apply preconditioner to r. More... | |
| NavierStokesSchurComplementPreconditioner * | navier_stokes_preconditioner_pt () const |
| Access function to the Navier Stokes preconditioner (inexact solver) More... | |
| void | enable_doc_time () |
| Enable documentation of time. More... | |
| void | disable_doc_time () |
| Disable documentation of time. More... | |
Public Member Functions inherited from oomph::BlockPreconditioner< CRDoubleMatrix > | |
| 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 |
Public Member Functions inherited from oomph::Preconditioner | |
| 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 | clean_up_memory () |
| Clean up memory (empty). Generic interface function. 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) |
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 | |
| NavierStokesSchurComplementPreconditioner * | Navier_stokes_preconditioner_pt |
| Pointer the Navier Stokes preconditioner (inexact solver) More... | |
| Preconditioner * | Solid_preconditioner_pt |
| Pointer to the solid preconditioner (inexact solver) More... | |
| MatrixVectorProduct * | Matrix_vector_product_0_1_pt |
| Pointer to fluid/solid interaction matrix. More... | |
| MatrixVectorProduct * | Matrix_vector_product_1_0_pt |
| Pointer to solid/fluid solid interaction matrix. More... | |
| bool | Preconditioner_has_been_setup |
| Boolean indicating the preconditioner has been set up. More... | |
| bool | Retain_solid_onto_fluid_terms |
| bool | Retain_fluid_onto_solid_terms |
| bool | Doc_time |
| Set Doc_time to true for outputting results of timings. More... | |
| Mesh * | Navier_stokes_mesh_pt |
| Pointer to the navier stokes mesh. More... | |
| Mesh * | Wall_mesh_pt |
| pointer to the solid mesh More... | |
| bool | Allow_multiple_element_type_in_navier_stokes_mesh |
| bool | Allow_multiple_element_type_in_wall_mesh |
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// FSI preconditioner. This extracts upper/lower triangular blocks in the 3x3 overall block matrix structure arising from the monolithic discretisation of FSI problems with algebraic node updates. Dofs are decomposed into fluid velocity, pressure and solid unknowns. NavierStokesSchurComplementPreconditioner is used as the inexact solver for the fluid block; SuperLU (in its incarnation as an "exact" preconditioner) is used for the solid block. By default we retain the fluid on solid off diagonal blocks.
|
inline |
Constructor: By default use block triangular form with retained fluid on solid terms. A problem pointer is required for the underlying NavierStokesSchurComplementPreconditioner.
References Allow_multiple_element_type_in_navier_stokes_mesh, Allow_multiple_element_type_in_wall_mesh, Doc_time, Matrix_vector_product_0_1_pt, Matrix_vector_product_1_0_pt, Navier_stokes_mesh_pt, Navier_stokes_preconditioner_pt, Preconditioner_has_been_setup, Retain_fluid_onto_solid_terms, Retain_solid_onto_fluid_terms, oomph::BlockPreconditioner< CRDoubleMatrix >::set_nmesh(), Solid_preconditioner_pt, and Wall_mesh_pt.
|
inline |
Destructor: Clean up.
References Matrix_vector_product_0_1_pt, Matrix_vector_product_1_0_pt, Navier_stokes_preconditioner_pt, and Solid_preconditioner_pt.
|
delete |
Broken copy constructor.
|
inline |
|
inline |
|
inline |
Access function to the Navier Stokes preconditioner (inexact solver)
References Navier_stokes_preconditioner_pt.
Referenced by main(), PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >::switch_to_iterative_linear_solver(), and TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().
|
virtual |
Apply preconditioner to r.
Apply preconditioner to Vector r.
Implements oomph::Preconditioner.
References oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::DoubleVector::clear(), oomph::BlockPreconditioner< CRDoubleMatrix >::get_block_vector(), Matrix_vector_product_0_1_pt, Matrix_vector_product_1_0_pt, oomph::MatrixVectorProduct::multiply(), Navier_stokes_preconditioner_pt, oomph::NavierStokesSchurComplementPreconditioner::preconditioner_solve(), oomph::Preconditioner::preconditioner_solve(), UniformPSDSelfTest::r, res, Retain_fluid_onto_solid_terms, Retain_solid_onto_fluid_terms, oomph::BlockPreconditioner< CRDoubleMatrix >::return_block_vector(), and Solid_preconditioner_pt.
|
inline |
Setter function for the mesh containing the block-preconditionable Navier-Stokes elements. The optional argument indicates if there are more than one type of elements in same mesh.
References Allow_multiple_element_type_in_navier_stokes_mesh, oomph::BlockPreconditioner< CRDoubleMatrix >::mesh_pt(), and Navier_stokes_mesh_pt.
Referenced by FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), main(), PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >::switch_to_iterative_linear_solver(), and TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().
|
inline |
Broken assignment operator.
Set solid preconditioner (deletes existing one)
References solid_preconditioner_pt(), and Solid_preconditioner_pt.
Referenced by RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >::switch_to_iterative_linear_solver().
|
inline |
Setter function for the mesh containing the block-preconditionable FSI solid elements. The optional argument indicates if there are more than one type of elements in the same mesh.
References Allow_multiple_element_type_in_wall_mesh, oomph::BlockPreconditioner< CRDoubleMatrix >::mesh_pt(), and Wall_mesh_pt.
Referenced by FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), main(), PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >::switch_to_iterative_linear_solver(), and TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().
|
virtual |
Setup the preconditioner.
Setup the preconditioner. Note: Matrix must be a CRDoubleMatrix.
/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
Implements oomph::Preconditioner.
References Allow_multiple_element_type_in_navier_stokes_mesh, Allow_multiple_element_type_in_wall_mesh, oomph::BlockPreconditioner< CRDoubleMatrix >::block_setup(), oomph::CRDoubleMatrix::clear(), Doc_time, oomph::BlockPreconditioner< CRDoubleMatrix >::get_block(), i, oomph::BlockPreconditioner< CRDoubleMatrix >::matrix_pt(), Matrix_vector_product_0_1_pt, Matrix_vector_product_1_0_pt, Navier_stokes_mesh_pt, Navier_stokes_preconditioner_pt, oomph::BlockPreconditioner< CRDoubleMatrix >::ndof_types_in_mesh(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, Preconditioner_has_been_setup, Retain_fluid_onto_solid_terms, Retain_solid_onto_fluid_terms, oomph::BlockPreconditioner< CRDoubleMatrix >::set_mesh(), oomph::NavierStokesSchurComplementPreconditioner::set_navier_stokes_mesh(), oomph::NavierStokesSchurComplementPreconditioner::setup(), oomph::Preconditioner::setup(), oomph::BlockPreconditioner< CRDoubleMatrix >::setup_matrix_vector_product(), oomph::Preconditioner::setup_time(), Solid_preconditioner_pt, oomph::TimingHelpers::timer(), oomph::BlockPreconditioner< MATRIX >::turn_into_subsidiary_block_preconditioner(), and Wall_mesh_pt.
|
inline |
Read-only access to solid preconditoner (use set_... to set it)
References Solid_preconditioner_pt.
Referenced by set_solid_preconditioner_pt().
|
inline |
Switch to block-diagonal preconditioner.
References Retain_fluid_onto_solid_terms, and Retain_solid_onto_fluid_terms.
Referenced by PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem().
|
inline |
Switch to block-triangular preconditioner in which action of fluid dofs onto solid equations is retained
References Retain_fluid_onto_solid_terms, and Retain_solid_onto_fluid_terms.
Referenced by FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), and TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().
|
inline |
Switch to block-triangular preconditioner in which action of solid dofs onto fluid equations is retained
References Retain_fluid_onto_solid_terms, and Retain_solid_onto_fluid_terms.
Referenced by PreconditionedFSICollapsibleChannelProblem< ELEMENT >::PreconditionedFSICollapsibleChannelProblem(), and RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >::switch_to_iterative_linear_solver().
|
private |
Flag to indicate if there are multiple element types in the Navier-Stokes mesh.
Referenced by FSIPreconditioner(), set_navier_stokes_mesh(), and setup().
|
private |
Referenced by FSIPreconditioner(), set_wall_mesh(), and setup().
|
private |
Set Doc_time to true for outputting results of timings.
Referenced by disable_doc_time(), enable_doc_time(), FSIPreconditioner(), and setup().
|
private |
Pointer to fluid/solid interaction matrix.
Referenced by FSIPreconditioner(), preconditioner_solve(), setup(), and ~FSIPreconditioner().
|
private |
Pointer to solid/fluid solid interaction matrix.
Referenced by FSIPreconditioner(), preconditioner_solve(), setup(), and ~FSIPreconditioner().
|
private |
Pointer to the navier stokes mesh.
Referenced by FSIPreconditioner(), set_navier_stokes_mesh(), and setup().
|
private |
Pointer the Navier Stokes preconditioner (inexact solver)
Referenced by FSIPreconditioner(), navier_stokes_preconditioner_pt(), preconditioner_solve(), setup(), and ~FSIPreconditioner().
|
private |
Boolean indicating the preconditioner has been set up.
Referenced by FSIPreconditioner(), and setup().
|
private |
Boolean flag used to indicate that the fluid onto solid interaction terms are to be retained
Referenced by FSIPreconditioner(), preconditioner_solve(), setup(), use_block_diagonal_version(), use_block_triangular_version_with_fluid_on_solid(), and use_block_triangular_version_with_solid_on_fluid().
|
private |
Boolean flag used to indicate that the solid onto fluid interaction terms are to be retained
Referenced by FSIPreconditioner(), preconditioner_solve(), setup(), use_block_diagonal_version(), use_block_triangular_version_with_fluid_on_solid(), and use_block_triangular_version_with_solid_on_fluid().
|
private |
Pointer to the solid preconditioner (inexact solver)
Referenced by FSIPreconditioner(), preconditioner_solve(), set_solid_preconditioner_pt(), setup(), solid_preconditioner_pt(), and ~FSIPreconditioner().
|
private |
pointer to the solid mesh
Referenced by FSIPreconditioner(), set_wall_mesh(), and setup().