IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBAMR::KrylovFreeBodyMobilitySolver Class Reference

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/KrylovFreeBodyMobilitySolver.h>

Inheritance diagram for IBAMR::KrylovFreeBodyMobilitySolver:
Inheritance graph
[legend]

Public Member Functions

 KrylovFreeBodyMobilitySolver (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, std::string default_options_prefix, SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > cib_strategy, MPI_Comm petsc_comm=PETSC_COMM_WORLD)
 Constructor for $ [T M^{-1} T^{*}]^{-1} $ solver that employs the PETSc KSP solver framework.
 
virtual ~KrylovFreeBodyMobilitySolver ()
 Destructor.
 
void setMobilitySolver (SAMRAI::tbox::Pointer< IBAMR::CIBMobilitySolver > mobility_solver)
 Set the mobility solver for this class.
 
void setInterpScale (const double interp_scale)
 Set scale for interp operator.
 
void setSpreadScale (const double spread_scale)
 Set scale for spread operator.
 
void setStokesSpecifications (const IBAMR::StokesSpecifications &stokes_spec)
 Set stokes specifications.
 
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.
 

Functions to access the underlying PETSc objects.

const KSP & getPETScKSP () const
 Get the PETSc KSP object.
 
bool solveSystem (Vec x, Vec b)
 Solve the linear system of equations $ Nx = b $ for $ x $. More...
 
void initializeSolverState (Vec x, Vec b)
 Compute hierarchy dependent data required for solving $ Nx = b $. 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.
 

Detailed Description

We are trying to solve the problem

$ Nx = [T M^{-1} T^{*}]x = b $; for $ x $,

in this class. Here, $ N $ is the body mobility matrix, $ M $ is the mobility matrix, $ T $ is the rigid body operator, and $ T^{*} $ is the rigid body velocity operator. We employ Krylov solver preconditioned by direct solver to solve the body-mobility equation.

Member Function Documentation

◆ deallocateSolverState()

void IBAMR::KrylovFreeBodyMobilitySolver::deallocateSolverState ( )

Remove all hierarchy dependent data allocated by initializeSolverState().

Note
It is safe to call deallocateSolverState() when the solver state is already deallocated.
See also
initializeSolverState

◆ initializeSolverState()

void IBAMR::KrylovFreeBodyMobilitySolver::initializeSolverState ( Vec  x,
Vec  b 
)

Compute hierarchy dependent data required for solving $ Nx = b $.

Parameters
xsolution vector
bright-hand-side vector

◆ solveSystem()

bool IBAMR::KrylovFreeBodyMobilitySolver::solveSystem ( Vec  x,
Vec  b 
)

Solve the linear system of equations $ Nx = b $ for $ x $.

Parameters
xsolution vector
bright-hand-side vector
Returns
true if the solver converged to the specified tolerances, false otherwise

The documentation for this class was generated from the following files: