IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class CIBSaddlePointSolver solves for the fluid velocity , fluid pressure , and the Lagrange multiplier maintaining the rigidity constraint. More...
#include </home/runner/work/IBAMR/IBAMR/include/ibamr/CIBSaddlePointSolver.h>
Public Member Functions | |
CIBSaddlePointSolver (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< IBAMR::INSStaggeredHierarchyIntegrator > navier_stokes_integrator, SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > cib_strategy, std::string default_options_prefix, MPI_Comm petsc_comm=PETSC_COMM_WORLD) | |
Constructor for a saddle-point solver that employs the PETSc KSP solver framework. | |
virtual | ~CIBSaddlePointSolver () |
Destructor. | |
void | setKSPType (const std::string &ksp_type) |
Set the KSP type. | |
void | setOptionsPrefix (const std::string &options_prefix) |
Set the options prefix used by this PETSc solver object. | |
void | setVelocityPoissonSpecifications (const SAMRAI::solv::PoissonSpecifications &u_problem_coefs) |
Set the PoissonSpecifications object used to specify the coefficients for the momentum equation in the incompressible Stokes operator. | |
void | setPhysicalBcCoefs (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_bc_coefs, SAMRAI::solv::RobinBcCoefStrategy< NDIM > *p_bc_coef) |
Set the SAMRAI::solv::RobinBcCoefStrategy objects used to specify physical boundary conditions. More... | |
void | setPhysicalBoundaryHelper (SAMRAI::tbox::Pointer< IBAMR::StaggeredStokesPhysicalBoundaryHelper > bc_helper) |
Set the StokesSpecifications object and timestep size used to specify the coefficients for the time-dependent incompressible Stokes operator. | |
SAMRAI::tbox::Pointer< IBTK::LinearOperator > | getA () const |
Return the linear operator for the saddle-point solver. | |
SAMRAI::tbox::Pointer< IBAMR::StaggeredStokesSolver > | getStokesSolver () const |
Return the Stokes solver used in the preconditioner of the solver. | |
double | getInterpScale () const |
Return the interpolation scale factor. | |
double | getSpreadScale () const |
Return the spreading scale factor. | |
double | getRegularizationWeight () const |
Return the regularization scale factor. | |
bool | getNormalizeSpreadForce () const |
Return if the spread force is to be normalized. | |
bool | solveSystem (Vec x, Vec b) |
Solve the linear system of equations for . More... | |
void | initializeSolverState (Vec x, Vec b) |
Compute hierarchy dependent data required for solving . | |
void | deallocateSolverState () |
Remove all hierarchy dependent data allocated by initializeSolverState(). More... | |
void | setSolutionTime (double solution_time) |
Set the time at which the solution is to be evaluated. | |
void | setTimeInterval (double current_time, double new_time) |
Set the current time interval. | |
SAMRAI::tbox::Pointer< IBAMR::CIBMobilitySolver > | getCIBMobilitySolver () const |
Get the mobility solver. | |
Class CIBSaddlePointSolver solves for the fluid velocity , fluid pressure , and the Lagrange multiplier maintaining the rigidity constraint.
For free-moving (self-moving bodies) it also solves for the rigid body translational and rotational velocities .
Here, is the Helmholtz operator, is the spreading operator, is the gradient operator, is the interpolation operator, and is the rigid body operator (with denoting its adjoint), is the net external force/torque on the body (excluding the hydrodynamic force/torque), is the deformational velocity of the body, and is the velocity imposed on the body. and are two scaling parameters to make the system well-scaled. is the regularization parameter that regularizes the problem in presence of many IB/control points in a grid cell.
Here, we employ the Krylov solver to solve the above saddle-point problem. We use Schur complement preconditioner to precondition the iterative solver.
void IBAMR::CIBSaddlePointSolver::deallocateSolverState | ( | ) |
Remove all hierarchy dependent data allocated by initializeSolverState().
void IBAMR::CIBSaddlePointSolver::setPhysicalBcCoefs | ( | const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > & | u_bc_coefs, |
SAMRAI::solv::RobinBcCoefStrategy< NDIM > * | p_bc_coef | ||
) |
Set the SAMRAI::solv::RobinBcCoefStrategy objects used to specify physical boundary conditions.
u_bc_coefs | IBTK::Vector of pointers to objects that can set the Robin boundary condition coefficients for the velocity. |
p_bc_coef | Pointer to object that can set the Robin boundary condition coefficients for the pressure. |
bool IBAMR::CIBSaddlePointSolver::solveSystem | ( | Vec | x, |
Vec | b | ||
) |
Solve the linear system of equations for .
true
if the solver converged to the specified tolerances, false
otherwise