![]() |
|
#include <navier_stokes_preconditioners.h>
Public Member Functions | |
NavierStokesSchurComplementPreconditioner (Problem *problem_pt) | |
Constructor - sets defaults for control flags. More... | |
virtual | ~NavierStokesSchurComplementPreconditioner () |
Destructor. More... | |
NavierStokesSchurComplementPreconditioner (const NavierStokesSchurComplementPreconditioner &)=delete | |
Broken copy constructor. More... | |
void | set_problem_pt (Problem *problem_pt) |
Broken assignment operator. More... | |
Problem * | problem_pt () const |
void | enable_accept_non_NavierStokesElementWithDiagonalMassMatrices_elements () |
void | disable_accept_non_NavierStokesElementWithDiagonalMassMatrices_elements () |
void | setup () |
Setup the preconditioner. More... | |
void | preconditioner_solve (const DoubleVector &r, DoubleVector &z) |
Apply preconditioner to Vector r. More... | |
void | set_navier_stokes_mesh (Mesh *mesh_pt, const bool &allow_multiple_element_type_in_navier_stokes_mesh=false) |
void | set_p_preconditioner (Preconditioner *new_p_preconditioner_pt) |
Function to set a new pressure matrix preconditioner (inexact solver) More... | |
void | set_p_superlu_preconditioner () |
void | set_f_preconditioner (Preconditioner *new_f_preconditioner_pt) |
Function to set a new momentum matrix preconditioner (inexact solver) More... | |
void | use_lsc () |
Use LSC version of the preconditioner. More... | |
void | use_fp () |
Use Fp version of the preconditioner. More... | |
void | set_f_superlu_preconditioner () |
void | enable_doc_time () |
Enable documentation of time. More... | |
void | disable_doc_time () |
Disable documentation of time. More... | |
void | clean_up_memory () |
Helper function to delete preconditioner data. More... | |
void | enable_robin_for_fp () |
Use Robin BC elements for the Fp preconditioner. More... | |
void | disable_robin_for_fp () |
Don't use Robin BC elements for the Fp preconditioenr. More... | |
void | pin_first_pressure_dof_in_press_adv_diff () |
void | unpin_first_pressure_dof_in_press_adv_diff () |
template<class ELEMENT > | |
void | validate (DocInfo &doc_info, Problem *orig_problem_pt) |
void | pin_all_non_pressure_dofs () |
Pin all non-pressure dofs. More... | |
void | get_pressure_advection_diffusion_matrix (CRDoubleMatrix &fp_matrix) |
Get the pressure advection diffusion matrix. More... | |
void | reset_pin_status () |
Reset pin status of all values. More... | |
void | setup (DoubleMatrixBase *matrix_pt) |
void | setup (const Problem *problem_pt, DoubleMatrixBase *matrix_pt) |
virtual void | setup ()=0 |
![]() | |
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) |
![]() | |
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 Member Functions | |
void | assemble_inv_press_and_veloc_mass_matrix_diagonal (CRDoubleMatrix *&inv_p_mass_pt, CRDoubleMatrix *&inv_v_mass_pt, const bool &do_both) |
Private Attributes | |
Preconditioner * | P_preconditioner_pt |
Pointer to the 'preconditioner' for the pressure matrix. More... | |
Preconditioner * | F_preconditioner_pt |
Pointer to the 'preconditioner' for the F matrix. More... | |
bool | Using_default_f_preconditioner |
flag indicating whether the default F preconditioner is used More... | |
bool | Using_default_p_preconditioner |
flag indicating whether the default P preconditioner is used More... | |
bool | Preconditioner_has_been_setup |
bool | Accept_non_NavierStokesElementWithDiagonalMassMatrices_elements |
bool | F_preconditioner_is_block_preconditioner |
bool | Doc_time |
Set Doc_time to true for outputting results of timings. More... | |
MatrixVectorProduct * | QBt_mat_vec_pt |
MatrixVectorProduct operator for Qv^{-1} Bt. More... | |
MatrixVectorProduct * | Bt_mat_vec_pt |
MatrixVectorProduct operator for Bt. More... | |
MatrixVectorProduct * | F_mat_vec_pt |
MatrixVectorProduct operator for F. More... | |
MatrixVectorProduct * | E_mat_vec_pt |
MatrixVectorProduct operator for E = Fp Qp^{-1} (only for Fp variant) More... | |
Mesh * | Navier_stokes_mesh_pt |
bool | Allow_multiple_element_type_in_navier_stokes_mesh |
bool | Use_LSC |
Boolean to indicate use of LSC (true) or Fp (false) variant. More... | |
bool | Use_robin_for_fp |
Use Robin BC elements for Fp preconditoner? More... | |
std::map< Data *, std::vector< int > > | Eqn_number_backup |
bool | Pin_first_pressure_dof_in_press_adv_diff |
Problem * | Problem_pt |
///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// The least-squares commutator (LSC; formerly BFBT) Navier Stokes preconditioner. It uses blocks corresponding to the velocity and pressure unknowns, i.e. there are a total of 2x2 blocks, and all velocity components are treated as a single block of unknowns.
Here are the details: An "ideal" Navier-Stokes preconditioner would solve the system
\[ \left( \begin{array}{cc} {\bf F} & {\bf G} \\ {\bf D} & {\bf 0} \end{array} \right) \left( \begin{array}{c} {\bf z}_u \\ {\bf z}_p \end{array} \right) = \left( \begin{array}{c} {\bf r}_u \\ {\bf r}_p \end{array} \right) \]
where \( {\bf F}\) is the momentum block, \( {\bf G} \) the discrete gradient operator, and \( {\bf D}\) the discrete divergence operator. (For unstabilised elements, we have \( {\bf D} = {\bf G}^T \) and in much of the literature the divergence matrix is denoted by \( {\bf B} \) .) The use of this preconditioner would ensure the convergence of any iterative linear solver in a single iteration but its application is, of course, exactly as expensive as a direct solve. The LSC/BFBT preconditioner replaces the exact Jacobian by a block-triangular approximation
\[ \left( \begin{array}{cc} {\bf F} & {\bf G} \\ {\bf 0} & -{\bf M}_s \end{array} \right) \left( \begin{array}{c} {\bf z}_u \\ {\bf z}_p \end{array} \right) = \left( \begin{array}{c} {\bf r}_u \\ {\bf r}_p \end{array} \right), \]
where \({\bf M}_s\) is an approximation to the pressure Schur-complement \( {\bf S} = {\bf D} {\bf F}^{-1}{\bf G}. \) This system can be solved in two steps:
Solve the second row for \( {\bf z}_p\) via
\[ {\bf z}_p = - {\bf M}_s^{-1} {\bf r}_p \]
Given \( {\bf z}_p \) , solve the first row for \( {\bf z}_u\) via
\[ {\bf z}_u = {\bf F}^{-1} \big( {\bf r}_u - {\bf G} {\bf z}_p \big) \]
In the LSC/BFBT preconditioner, the action of the inverse pressure Schur complement
\[ {\bf z}_p = - {\bf M}_s^{-1} {\bf r}_p \]
is approximated by
\[ {\bf z}_p = - \big({\bf D} \widehat{\bf Q}^{-1}{\bf G} \big)^{-1} \big({\bf D} \widehat{\bf Q}^{-1}{\bf F} \widehat{\bf Q}^{-1}{\bf G}\big) \big({\bf D} \widehat{\bf Q}^{-1}{\bf G} \big)^{-1} {\bf r}_p, \]
where \( \widehat{\bf Q} \) is the diagonal of the velocity mass matrix. The evaluation of this expression involves two linear solves involving the matrix
\[ {\bf P} = \big({\bf D} \widehat{\bf Q}^{-1}{\bf G} \big) \]
which has the character of a matrix arising from the discretisation of a Poisson problem on the pressure space. We also have to evaluate matrix-vector products with the matrix
\[ {\bf E}={\bf D}\widehat{\bf Q}^{-1}{\bf F}\widehat{\bf Q}^{-1}{\bf G} \]
Details of the theory can be found in "Finite Elements and Fast Iterative Solvers with Applications in Incompressible Fluid Dynamics" by Howard C. Elman, David J. Silvester, and Andrew J. Wathen, published by Oxford University Press, 2006.
In our implementation of the preconditioner, the linear systems can either be solved "exactly", using SuperLU (in its incarnation as an exact preconditioner; this is the default) or by any other Preconditioner (inexact solver) specified via the access functions
or
|
inline |
Constructor - sets defaults for control flags.
References Accept_non_NavierStokesElementWithDiagonalMassMatrices_elements, Allow_multiple_element_type_in_navier_stokes_mesh, Bt_mat_vec_pt, Doc_time, E_mat_vec_pt, F_mat_vec_pt, F_preconditioner_pt, Navier_stokes_mesh_pt, P_preconditioner_pt, Pin_first_pressure_dof_in_press_adv_diff, Preconditioner_has_been_setup, QBt_mat_vec_pt, Use_LSC, Use_robin_for_fp, Using_default_f_preconditioner, and Using_default_p_preconditioner.
|
inlinevirtual |
|
delete |
Broken copy constructor.
|
private |
Helper function to assemble the inverse diagonals of the pressure and velocity mass matrices from the elemental contributions defined in NavierStokesEquations<DIM>. If do_both=true, both are computed, otherwise only the velocity mass matrix (the LSC version of the preconditioner only needs that one)
Helper function to assemble the inverse diagonals of the pressure and velocity mass matrix from the elemental contributions defined in NavierStokesElementWithDiagonalMassMatrices:: get_pressure_and_velocity_mass_matrix_diagonal(...) If do_both=true, both are computed, otherwise only the velocity mass matrix (the LSC version of the preconditioner only needs that one)
References oomph::BlockPreconditioner< CRDoubleMatrix >::block_distribution_pt(), oomph::BlockPreconditioner< CRDoubleMatrix >::block_number(), oomph::CRDoubleMatrix::build_without_copy(), oomph::Preconditioner::comm_pt(), oomph::DistributableLinearAlgebraObject::distributed(), e(), oomph::Mesh::element_pt(), oomph::GeneralisedElement::eqn_number(), oomph::LinearAlgebraDistribution::first_row(), oomph::NavierStokesElementWithDiagonalMassMatrices::get_pressure_and_velocity_mass_matrix_diagonal(), i, oomph::BlockPreconditioner< CRDoubleMatrix >::index_in_block(), int(), j, oomph::BlockPreconditioner< CRDoubleMatrix >::master_distribution_pt(), oomph::OomphCommunicator::my_rank(), Navier_stokes_mesh_pt, oomph::GeneralisedElement::ndof(), oomph::Mesh::nelement(), oomph::OomphCommunicator::nproc(), oomph::LinearAlgebraDistribution::nrow(), oomph::LinearAlgebraDistribution::nrow_local(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, p, problem_pt(), Use_LSC, and v.
|
virtual |
Helper function to delete preconditioner data.
Reimplemented from oomph::Preconditioner.
References Bt_mat_vec_pt, E_mat_vec_pt, F_mat_vec_pt, F_preconditioner_pt, P_preconditioner_pt, Preconditioner_has_been_setup, QBt_mat_vec_pt, Using_default_f_preconditioner, and Using_default_p_preconditioner.
Referenced by oomph::PseudoElasticFSIPreconditioner::clean_up_memory(), and ~NavierStokesSchurComplementPreconditioner().
|
inline |
Do not accept presence of elements that are not of type NavierStokesElementWithDiagonalMassMatrices without issuing a warning.
References Accept_non_NavierStokesElementWithDiagonalMassMatrices_elements.
|
inline |
|
inline |
Don't use Robin BC elements for the Fp preconditioenr.
References Use_robin_for_fp.
Referenced by FpTestProblem::FpTestProblem().
|
inline |
Accept presence of elements that are not of type NavierStokesElementWithDiagonalMassMatrices without issuing a warning.
References Accept_non_NavierStokesElementWithDiagonalMassMatrices_elements.
|
inline |
|
inline |
Use Robin BC elements for the Fp preconditioner.
References Use_robin_for_fp.
Referenced by FpTestProblem::FpTestProblem().
|
inline |
Get the pressure advection diffusion matrix.
References oomph::Problem::add_sub_mesh(), oomph::Problem::assembly_handler_pt(), b, oomph::Mesh::boundary_element_pt(), oomph::TemplateFreeNavierStokesEquationsBase::build_fp_press_adv_diff_robin_bc_element(), oomph::Preconditioner::comm_pt(), oomph::TemplateFreeNavierStokesEquationsBase::delete_pressure_advection_diffusion_robin_elements(), oomph::FiniteElement::dim(), oomph::Problem::distributed(), e(), oomph::Mesh::element_pt(), oomph::GeneralisedElement::eqn_number(), oomph::Mesh::face_index_at_boundary(), oomph::Mesh::finite_element_pt(), oomph::Problem::flush_sub_meshes(), oomph::Problem::get_jacobian(), i, oomph::Problem::mesh_pt(), Navier_stokes_mesh_pt, oomph::Mesh::nboundary(), oomph::Mesh::nboundary_element(), oomph::Mesh::nelement(), oomph::Problem::nsub_mesh(), oomph::TemplateFreeNavierStokesEquationsBase::p_local_eqn(), pin_all_non_pressure_dofs(), Pin_first_pressure_dof_in_press_adv_diff, oomph::TemplateFreeNavierStokesEquationsBase::pinned_fp_pressure_eqn(), problem_pt(), reset_pin_status(), and Use_robin_for_fp.
|
inline |
Pin all non-pressure dofs.
References e(), oomph::Mesh::element_pt(), Eqn_number_backup, Navier_stokes_mesh_pt, oomph::Mesh::nelement(), and oomph::TemplateFreeNavierStokesEquationsBase::pin_all_non_pressure_dofs().
Referenced by get_pressure_advection_diffusion_matrix().
|
inline |
Set boolean indicating that we want to pin first pressure dof in Navier Stokes mesh when assembling the pressure advection diffusion system for Fp preconditoner – needed at zero Reynolds number for non-enclosed flows but seems harmless in any case
References Pin_first_pressure_dof_in_press_adv_diff.
|
virtual |
Apply preconditioner to Vector r.
Apply preconditioner to r.
Implements oomph::Preconditioner.
References oomph::DoubleVector::build(), oomph::DoubleVector::built(), oomph::LinearAlgebraDistribution::built(), oomph::DoubleVector::clear(), oomph::DistributableLinearAlgebraObject::distribution_pt(), oomph::DistributableLinearAlgebraObject::nrow(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and UniformPSDSelfTest::r.
Referenced by oomph::FSIPreconditioner::preconditioner_solve(), and oomph::PseudoElasticFSIPreconditioner::preconditioner_solve().
|
inline |
References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and Problem_pt.
Referenced by assemble_inv_press_and_veloc_mass_matrix_diagonal(), get_pressure_advection_diffusion_matrix(), and set_problem_pt().
|
inline |
Reset pin status of all values.
References e(), oomph::Mesh::element_pt(), oomph::Data::eqn_number(), Eqn_number_backup, i, oomph::GeneralisedElement::internal_data_pt(), j, Navier_stokes_mesh_pt, oomph::Mesh::nelement(), oomph::GeneralisedElement::ninternal_data(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), oomph::Data::nvalue(), and oomph::SolidNode::variable_position_pt().
Referenced by get_pressure_advection_diffusion_matrix().
|
inline |
Function to set a new momentum matrix preconditioner (inexact solver)
References F_preconditioner_pt, and Using_default_f_preconditioner.
Referenced by FpTestProblem::FpTestProblem(), main(), FSIChannelWithLeafletProblem< ELEMENT >::set_iterative_solver(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), set_pseudo_elastic_fsi_solver(), TiltedCavityProblem< ELEMENT >::TiltedCavityProblem(), and TorusProblem< ELEMENT >::TorusProblem().
|
inline |
Function to (re-)set momentum matrix preconditioner (inexact solver) to SuperLU
References F_preconditioner_pt, and Using_default_f_preconditioner.
|
inline |
Specify the mesh containing the block-preconditionable Navier-Stokes elements. The optional argument indicates if there are multiple types of elements in the same mesh.
References Allow_multiple_element_type_in_navier_stokes_mesh, oomph::BlockPreconditioner< CRDoubleMatrix >::mesh_pt(), and Navier_stokes_mesh_pt.
Referenced by FpTestProblem::FpTestProblem(), main(), oomph::FSIPreconditioner::setup(), oomph::PseudoElasticFSIPreconditioner::setup(), TiltedCavityProblem< ELEMENT >::TiltedCavityProblem(), and TorusProblem< ELEMENT >::TorusProblem().
|
inline |
Function to set a new pressure matrix preconditioner (inexact solver)
References P_preconditioner_pt, and Using_default_p_preconditioner.
Referenced by FpTestProblem::FpTestProblem(), main(), FSIChannelWithLeafletProblem< ELEMENT >::set_iterative_solver(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::set_pseudo_elastic_fsi_solver(), set_pseudo_elastic_fsi_solver(), TiltedCavityProblem< ELEMENT >::TiltedCavityProblem(), and TorusProblem< ELEMENT >::TorusProblem().
|
inline |
Function to (re-)set pressure matrix preconditioner (inexact solver) to SuperLU
References P_preconditioner_pt, and Using_default_p_preconditioner.
|
inline |
Broken assignment operator.
Set the problem pointer (non-const pointer, the problem WILL be changed) for use in get_pressure_advection_diffusion_matrix().
References problem_pt(), and Problem_pt.
|
virtual |
Setup the preconditioner.
Setup the least-squares commutator Navier Stokes preconditioner. This extracts blocks corresponding to the velocity and pressure unknowns, creates the matrices actually needed in the application of the preconditioner and deletes what can be deleted... Note that this preconditioner needs a CRDoubleMatrix.
///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// Setup the least-squares commutator Navier Stokes preconditioner. This extracts blocks corresponding to the velocity and pressure unknowns, creates the matrices actually needed in the application of the preconditioner and deletes what can be deleted... Note that this preconditioner needs a CRDoubleMatrix.
Implements oomph::Preconditioner.
References oomph::TerminateHelper::clean_up_memory(), i, oomph::CRDoubleMatrix::multiply(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, and oomph::SuperLUPreconditioner::setup().
Referenced by oomph::FSIPreconditioner::setup().
|
virtual |
for some reason we have to remind the compiler that there is a setup() function in Preconditioner base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
for some reason we have to remind the compiler that there is a setup() function in Preconditioner base class.
Implements oomph::Preconditioner.
|
inlinevirtual |
for some reason we have to remind the compiler that there is a setup() function in Preconditioner base class.
Implements oomph::Preconditioner.
|
inline |
Set boolean indicating that we do not want to pin first pressure dof in Navier Stokes mesh when assembling the pressure advection diffusion system for Fp preconditoner – needed at zero Reynolds number for non-enclosed flows but seems harmless in any case
References Pin_first_pressure_dof_in_press_adv_diff.
|
inline |
Use Fp version of the preconditioner.
References Use_LSC.
Referenced by FpTestProblem::FpTestProblem().
|
inline |
Use LSC version of the preconditioner.
References Use_LSC.
Referenced by FpTestProblem::FpTestProblem(), and TiltedCavityProblem< ELEMENT >::TiltedCavityProblem().
|
inline |
Validate auxiliary pressure advection diffusion problem in 2D
References Navier_stokes_mesh_pt, and oomph::FpPressureAdvectionDiffusionProblem< ELEMENT >::validate().
|
private |
Boolean to indicate that presence of elements that are not of type NavierStokesElementWithDiagonalMassMatrices is acceptable (suppresses warning that issued otherwise).
Referenced by disable_accept_non_NavierStokesElementWithDiagonalMassMatrices_elements(), enable_accept_non_NavierStokesElementWithDiagonalMassMatrices_elements(), and NavierStokesSchurComplementPreconditioner().
|
private |
Flag to indicate if there are multiple element types in the Navier-Stokes mesh.
Referenced by NavierStokesSchurComplementPreconditioner(), and set_navier_stokes_mesh().
|
private |
MatrixVectorProduct operator for Bt.
Referenced by clean_up_memory(), and NavierStokesSchurComplementPreconditioner().
|
private |
Set Doc_time to true for outputting results of timings.
Referenced by disable_doc_time(), enable_doc_time(), and NavierStokesSchurComplementPreconditioner().
|
private |
MatrixVectorProduct operator for E = Fp Qp^{-1} (only for Fp variant)
Referenced by clean_up_memory(), and NavierStokesSchurComplementPreconditioner().
|
private |
Map to store original eqn numbers of various Data values when assembling pressure advection diffusion matrix
Referenced by pin_all_non_pressure_dofs(), and reset_pin_status().
|
private |
MatrixVectorProduct operator for F.
Referenced by clean_up_memory(), and NavierStokesSchurComplementPreconditioner().
|
private |
Boolean indicating whether the momentum system preconditioner is a block preconditioner
|
private |
Pointer to the 'preconditioner' for the F matrix.
Referenced by clean_up_memory(), NavierStokesSchurComplementPreconditioner(), set_f_preconditioner(), and set_f_superlu_preconditioner().
|
private |
the pointer to the mesh of block preconditionable Navier Stokes elements.
Referenced by assemble_inv_press_and_veloc_mass_matrix_diagonal(), get_pressure_advection_diffusion_matrix(), NavierStokesSchurComplementPreconditioner(), pin_all_non_pressure_dofs(), reset_pin_status(), set_navier_stokes_mesh(), and validate().
|
private |
Pointer to the 'preconditioner' for the pressure matrix.
Referenced by clean_up_memory(), NavierStokesSchurComplementPreconditioner(), set_p_preconditioner(), and set_p_superlu_preconditioner().
|
private |
Boolean indicating if we want to pin first pressure dof in Navier Stokes mesh when assembling the pressure advection diffusion system for Fp preconditoner – needed at zero Reynolds number for non-enclosed flows but seems harmless in any case
Referenced by get_pressure_advection_diffusion_matrix(), NavierStokesSchurComplementPreconditioner(), pin_first_pressure_dof_in_press_adv_diff(), and unpin_first_pressure_dof_in_press_adv_diff().
|
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(), and NavierStokesSchurComplementPreconditioner().
|
private |
Storage for the (non-const!) problem pointer for use in get_pressure_advection_diffusion_matrix().
Referenced by problem_pt(), and set_problem_pt().
|
private |
MatrixVectorProduct operator for Qv^{-1} Bt.
Referenced by clean_up_memory(), and NavierStokesSchurComplementPreconditioner().
|
private |
Boolean to indicate use of LSC (true) or Fp (false) variant.
Referenced by assemble_inv_press_and_veloc_mass_matrix_diagonal(), NavierStokesSchurComplementPreconditioner(), use_fp(), and use_lsc().
|
private |
Use Robin BC elements for Fp preconditoner?
Referenced by disable_robin_for_fp(), enable_robin_for_fp(), get_pressure_advection_diffusion_matrix(), and NavierStokesSchurComplementPreconditioner().
|
private |
flag indicating whether the default F preconditioner is used
Referenced by clean_up_memory(), NavierStokesSchurComplementPreconditioner(), set_f_preconditioner(), and set_f_superlu_preconditioner().
|
private |
flag indicating whether the default P preconditioner is used
Referenced by clean_up_memory(), NavierStokesSchurComplementPreconditioner(), set_p_preconditioner(), and set_p_superlu_preconditioner().