IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
#include </home/runner/work/IBAMR/IBAMR/include/ibamr/KrylovMobilitySolver.h>
Public Member Functions | |
KrylovMobilitySolver (std::string object_name, SAMRAI::tbox::Pointer< IBAMR::INSStaggeredHierarchyIntegrator > navier_stokes_integrator, SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > cib_strategy, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, std::string default_options_prefix, MPI_Comm petsc_comm=PETSC_COMM_WORLD) | |
Constructor for mobility solver that employs the PETSc KSP solver framework. | |
virtual | ~KrylovMobilitySolver () |
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. | |
const KSP & | getPETScKSP () const |
Get the PETSc KSP object. | |
SAMRAI::tbox::Pointer< IBAMR::StaggeredStokesSolver > | getStokesSolver () const |
Return the Stokes solver used in the preconditioner of the solver. | |
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 | 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. | |
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... | |
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 . More... | |
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. | |
void | setInterpScale (const double scale_interp) |
Set scale factor for interp operator. | |
void | setSpreadScale (const double scale_spread) |
Set scale factor for spread operator. | |
void | setRegularizeMobilityScale (const double scale_reg_mob) |
Set scale factor for regularizing mobility matrix. | |
void | setNormalizeSpreadForce (const bool normalize_force) |
Set if the mean of the Lagrangian force is to be subtracted from the Eulerian force variable. More... | |
We are trying to solve the problem
; for .
Here, is the mobility matrix, is the interpolation operator, is the Stokes operator, and is the spreading operator.
void IBAMR::KrylovMobilitySolver::deallocateSolverState | ( | ) |
Remove all hierarchy dependent data allocated by initializeSolverState().
void IBAMR::KrylovMobilitySolver::initializeSolverState | ( | Vec | x, |
Vec | b | ||
) |
Compute hierarchy dependent data required for solving .
x | solution vector |
b | right-hand-side vector |
void IBAMR::KrylovMobilitySolver::setNormalizeSpreadForce | ( | const bool | normalize_force | ) |
Set if the mean of the Lagrangian force is to be subtracted from the Eulerian force variable.
void IBAMR::KrylovMobilitySolver::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 | 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::KrylovMobilitySolver::solveSystem | ( | Vec | x, |
Vec | b | ||
) |
Solve the linear system of equations for .
x | solution vector |
b | right-hand-side vector |
true
if the solver converged to the specified tolerances, false
otherwise