|
IBAMR
IBAMR version 0.19.
|
Class BJacobiPreconditioner is a block Jacobi preconditioner which implements the abstract LinearSolver interface. More...
#include <ibtk/BJacobiPreconditioner.h>

Public Member Functions | |
| BJacobiPreconditioner (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, const std::string &default_options_prefix) | |
| Constructor. More... | |
| ~BJacobiPreconditioner () | |
| Destructor. More... | |
| void | setComponentPreconditioner (SAMRAI::tbox::Pointer< LinearSolver > preconditioner, unsigned int component) |
| Set the preconditioner to be employed on the specified vector component. More... | |
Linear solver functionality. | |
| bool | solveSystem (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override |
| Solve the linear system of equations \(Ax=b\) for \(x\). More... | |
| void | initializeSolverState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &b) override |
| Compute hierarchy dependent data required for solving \(Ax=b\). More... | |
| void | deallocateSolverState () override |
| Remove all hierarchy dependent data allocated by initializeSolverState(). More... | |
Functions to access solver parameters. | |
| void | setInitialGuessNonzero (bool initial_guess_nonzero=true) override |
| Set whether the initial guess is non-zero. More... | |
| void | setMaxIterations (int max_iterations) override |
| Set the maximum number of iterations to use per solve. More... | |
Functions to access data on the most recent solve. | |
| std::map< unsigned int, SAMRAI::tbox::Pointer< LinearSolver > > | d_pc_map |
| int | getNumIterations () const override |
| Return the iteration count from the most recent linear solve. More... | |
| double | getResidualNorm () const override |
| Return the residual norm from the most recent iteration. More... | |
| BJacobiPreconditioner ()=delete | |
| Default constructor. More... | |
| BJacobiPreconditioner (const BJacobiPreconditioner &from)=delete | |
| Copy constructor. More... | |
| BJacobiPreconditioner & | operator= (const BJacobiPreconditioner &that)=delete |
Logging functions. | |
| virtual void | setLoggingEnabled (bool enable_logging=true) |
| Enable or disable logging. More... | |
| virtual bool | getLoggingEnabled () const |
| Determine whether logging is enabled or disabled. More... | |
| std::string | d_object_name = "unitialized" |
| bool | d_is_initialized = false |
| bool | d_homogeneous_bc = false |
| double | d_solution_time = std::numeric_limits<double>::quiet_NaN() |
| double | d_current_time = std::numeric_limits<double>::quiet_NaN() |
| double | d_new_time = std::numeric_limits<double>::quiet_NaN() |
| double | d_rel_residual_tol = 0.0 |
| double | d_abs_residual_tol = 0.0 |
| int | d_max_iterations = 100 |
| int | d_current_iterations = 0 |
| double | d_current_residual_norm = std::numeric_limits<double>::quiet_NaN() |
| SAMRAI::tbox::Pointer< HierarchyMathOps > | d_hier_math_ops |
| bool | d_hier_math_ops_external = false |
| bool | d_enable_logging = false |
| void | init (const std::string &object_name, bool homogeneous_bc) |
| virtual void | initSpecialized (const std::string &object_name, bool homogeneous_bc) |
Logging functions. | |
| virtual void | printClassData (std::ostream &stream) override |
| Print class data to stream. More... | |
| bool | d_initial_guess_nonzero = true |
| bool | d_nullspace_contains_constant_vec = false |
| std::vector< SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > > | d_nullspace_basis_vecs |
This solver class performs a single block Jacobi sweep, applying specified component LinearSolver objects to the components of a supplied SAMRAI::solv::SAMRAIVectorReal vector, and doing so in an additive fashion. Note that the block Jacobi algorithm is not generally convergent, but can be used as a preconditioner for a KrylovLinearSolver.
Sample parameters for initialization from database (and their default values):
initial_guess_nonzero = FALSE // see setInitialGuessNonzero() rel_residual_tol = 1.0e-6 // see setRelativeTolerance() abs_residual_tol = 1.0e-30 // see setAbsoluteTolerance() max_iterations = 1 // see setMaxIterations()
| IBTK::BJacobiPreconditioner::BJacobiPreconditioner | ( | std::string | object_name, |
| SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | input_db, | ||
| const std::string & | default_options_prefix | ||
| ) |
| IBTK::BJacobiPreconditioner::~BJacobiPreconditioner | ( | ) |
|
privatedelete |
|
privatedelete |
| from | The value to copy to this object. |
| void IBTK::BJacobiPreconditioner::setComponentPreconditioner | ( | SAMRAI::tbox::Pointer< LinearSolver > | preconditioner, |
| unsigned int | component | ||
| ) |
|
overridevirtual |
Before calling solveSystem(), the form of the solution x and right-hand-side b vectors must be set properly by the user on all patch interiors on the specified range of levels in the patch hierarchy. The user is responsible for all data management for the quantities associated with the solution and right-hand-side vectors. In particular, patch data in these vectors must be allocated prior to calling this method.
| x | solution vector |
| b | right-hand-side vector |
Conditions on Parameters:
true if the solver converged to the specified tolerances, false otherwise Implements IBTK::GeneralSolver.
|
overridevirtual |
By default, the solveSystem() method computes some required hierarchy dependent data before solving and removes that data after the solve. For multiple solves that use the same hierarchy configuration, it is more efficient to:
Note that it is generally necessary to reinitialize the solver state when the hierarchy configuration changes.
| x | solution vector |
| b | right-hand-side vector |
Conditions on Parameters:
Reimplemented from IBTK::GeneralSolver.
|
overridevirtual |
Reimplemented from IBTK::GeneralSolver.
|
overridevirtual |
Reimplemented from IBTK::LinearSolver.
|
overridevirtual |
Reimplemented from IBTK::GeneralSolver.
|
overridevirtual |
Reimplemented from IBTK::GeneralSolver.
|
overridevirtual |
Reimplemented from IBTK::GeneralSolver.
|
privatedelete |
]brief Assignment operator.
| that | The value to assign to this object. |
|
virtualinherited |
Implementations can require the nullspace basis vectors to be orthogonal but should not assume the basis vectors to be orthonormal. If the basis vectors are not orthonormal, the solver may normalize them in place.
Reimplemented in IBTK::PETScKrylovLinearSolver, and IBTK::PETScLevelSolver.
|
virtualinherited |
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
overridevirtualinherited |
Reimplemented from IBTK::GeneralSolver.
|
inherited |
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBTK::FACPreconditioner, IBTK::NewtonKrylovSolver, and IBTK::KrylovLinearSolver.
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBAMR::CIBStaggeredStokesSolver, IBTK::FACPreconditioner, IBTK::NewtonKrylovSolver, and IBTK::KrylovLinearSolver.
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBAMR::CIBStaggeredStokesSolver, IBTK::FACPreconditioner, IBTK::NewtonKrylovSolver, and IBTK::KrylovLinearSolver.
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBTK::NewtonKrylovSolver, and IBTK::KrylovLinearSolver.
|
virtualinherited |
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
virtualinherited |
Reimplemented in IBTK::PETScPCLSWrapper.
|
virtualinherited |
|
virtualinherited |
|
protectedinherited |
|
protectedvirtualinherited |
Reimplemented in IBTK::PoissonSolver.
|
private |
The component preconditioners.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
1.8.17