IBAMR  IBAMR version 0.19.
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
IBAMR::CIBMobilitySolver Class Reference

Class CIBMobilitySolver solves for the constraint forces \( \vec{\lambda}\) and rigid body velocity \( \vec{U}\) of the structure(s). Specifically, the class solves two types of matrix-equations. More...

#include <ibamr/CIBMobilitySolver.h>

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

Public Member Functions

 CIBMobilitySolver (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)
 The only constructor of this class. More...
 
virtual ~CIBMobilitySolver ()
 Destructor for this class. More...
 
void setSolutionTime (const double solution_time)
 Set the time at which the solution is to be evaluated. More...
 
void setTimeInterval (const double current_time, const double new_time)
 Set the time interval of integration. More...
 
void setInterpScale (const double interp_scale)
 Set scale for interp operator. More...
 
void setSpreadScale (const double spread_scale)
 Set scale for spread operator. More...
 
void setRegularizeMobilityScale (const double reg_mob_scale)
 Set scale for regularizing mobility matrix. More...
 
void setNormalizeSpreadForce (const bool normalize_force)
 Set if the mean of the Lagrangian force is to be subtracted from the Eulerian force variable. More...
 
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. More...
 
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. More...
 
bool solveMobilitySystem (Vec x, Vec b)
 Solves the mobility problem. More...
 
bool solveBodyMobilitySystem (Vec x, Vec b)
 Solves the mobility problem. More...
 
void initializeSolverState (Vec x, Vec b)
 Initialize the mobility solver. More...
 
void deallocateSolverState ()
 Deallocate the mobility solver. More...
 
void getMobilitySolvers (IBAMR::KrylovMobilitySolver **km_solver=nullptr, IBAMR::DirectMobilitySolver **dm_solver=nullptr, IBAMR::KrylovFreeBodyMobilitySolver **fbm_solver=nullptr)
 Get access to mobility solvers. More...
 

Private Types

enum  MobilitySolverType { DIRECT, KRYLOV, UNKNOWN_MOBILITY_SOLVER_TYPE = -1 }
 

Private Member Functions

void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Get various options from input db. More...
 

Private Attributes

std::string d_object_name
 
unsigned d_num_rigid_parts
 
SAMRAI::tbox::Pointer< IBAMR::CIBStrategyd_cib_strategy
 
SAMRAI::tbox::Pointer< IBAMR::DirectMobilitySolverd_direct_mob_solver
 
SAMRAI::tbox::Pointer< IBAMR::KrylovMobilitySolverd_krylov_mob_solver
 
SAMRAI::tbox::Pointer< IBAMR::KrylovFreeBodyMobilitySolverd_krylov_freebody_mob_solver
 
double d_solution_time
 
double d_current_time
 
double d_new_time
 
bool d_is_initialized = false
 
bool d_reinitializing_solver
 
bool d_has_free_parts
 
double d_interp_scale = 1.0
 
double d_spread_scale = 1.0
 
double d_reg_mob_scale
 
MobilitySolverType d_mobility_solver_type
 

Detailed Description

\begin{eqnarray*} \beta J L^{-1} S \gamma \vec{\lambda} &=& M \vec{\lambda} = \vec{w} \\ T M T^* \vec{U} &=& \vec{F}. \end{eqnarray*}

Here, \( J \) is the interpolation operator, \( S \) is the spreading operator, \( L \) is the incompressible Stokes operator, \( T \) is the rigid body operator, \( \vec{w} \) is the desired velocity at the nodes of the structure(s), and \( \vec{F} \) is the net external force and torque on the body.

This class employs direct solver for the approximate mobility and body-mobility sub-problems. The approximate mobility matrix is intended to be used in the preconditioning step of the overall constraint solver. The overall preconditioner is implemented in

See also
IBAMR::CIBSaddlePointSolver class. The class also supports Krylov body mobility solver for bodies moving under external force and torque.

Member Enumeration Documentation

◆ MobilitySolverType

Enumerator
DIRECT 
KRYLOV 
UNKNOWN_MOBILITY_SOLVER_TYPE 

Constructor & Destructor Documentation

◆ CIBMobilitySolver()

IBAMR::CIBMobilitySolver::CIBMobilitySolver ( 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 
)

◆ ~CIBMobilitySolver()

virtual IBAMR::CIBMobilitySolver::~CIBMobilitySolver ( )
virtual

Member Function Documentation

◆ setSolutionTime()

void IBAMR::CIBMobilitySolver::setSolutionTime ( const double  solution_time)

◆ setTimeInterval()

void IBAMR::CIBMobilitySolver::setTimeInterval ( const double  current_time,
const double  new_time 
)

◆ setInterpScale()

void IBAMR::CIBMobilitySolver::setInterpScale ( const double  interp_scale)

◆ setSpreadScale()

void IBAMR::CIBMobilitySolver::setSpreadScale ( const double  spread_scale)

◆ setRegularizeMobilityScale()

void IBAMR::CIBMobilitySolver::setRegularizeMobilityScale ( const double  reg_mob_scale)

◆ setNormalizeSpreadForce()

void IBAMR::CIBMobilitySolver::setNormalizeSpreadForce ( const bool  normalize_force)
Note
This operation is needed for certain situations like Stokes flow with periodic BCs.

◆ setVelocityPoissonSpecifications()

void IBAMR::CIBMobilitySolver::setVelocityPoissonSpecifications ( const SAMRAI::solv::PoissonSpecifications u_problem_coefs)

◆ setPhysicalBcCoefs()

void IBAMR::CIBMobilitySolver::setPhysicalBcCoefs ( const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  u_bc_coefs,
SAMRAI::solv::RobinBcCoefStrategy< NDIM > *  p_bc_coef 
)
Note
Any of the elements of u_bc_coefs may be nullptr. In this case, homogeneous Dirichlet boundary conditions are employed for that data depth. p_bc_coef may also be nullptr; in that case, homogeneous Neumann boundary conditions are employed for the pressure.
Parameters
u_bc_coefsIBTK::Vector of pointers to objects that can set the Robin boundary condition coefficients for the velocity.
p_bc_coefPointer to object that can set the Robin boundary condition coefficients for the pressure.

◆ setPhysicalBoundaryHelper()

void IBAMR::CIBMobilitySolver::setPhysicalBoundaryHelper ( SAMRAI::tbox::Pointer< IBAMR::StaggeredStokesPhysicalBoundaryHelper bc_helper)

◆ solveMobilitySystem()

bool IBAMR::CIBMobilitySolver::solveMobilitySystem ( Vec  x,
Vec  b 
)
Parameters
xVec storing the Lagrange multiplier.
bVec storing the desired velocity.
Returns
true if the solver converged to the specified tolerances, false otherwise

◆ solveBodyMobilitySystem()

bool IBAMR::CIBMobilitySolver::solveBodyMobilitySystem ( Vec  x,
Vec  b 
)
Parameters
xVec storing the rigid body velocity
bVec storing the net external generalized force
Returns
true if the solver converged to the specified tolerances, false otherwise

◆ initializeSolverState()

void IBAMR::CIBMobilitySolver::initializeSolverState ( Vec  x,
Vec  b 
)
Parameters
xVec storing the Lagrange multiplier
bVec storing the desired velocity

◆ deallocateSolverState()

void IBAMR::CIBMobilitySolver::deallocateSolverState ( )

◆ getMobilitySolvers()

void IBAMR::CIBMobilitySolver::getMobilitySolvers ( IBAMR::KrylovMobilitySolver **  km_solver = nullptr,
IBAMR::DirectMobilitySolver **  dm_solver = nullptr,
IBAMR::KrylovFreeBodyMobilitySolver **  fbm_solver = nullptr 
)
Note
A null argument is simply skipped with no corresponding solver return.

◆ getFromInput()

void IBAMR::CIBMobilitySolver::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db)
private

Member Data Documentation

◆ d_object_name

std::string IBAMR::CIBMobilitySolver::d_object_name
private

◆ d_num_rigid_parts

unsigned IBAMR::CIBMobilitySolver::d_num_rigid_parts
private

◆ d_cib_strategy

SAMRAI::tbox::Pointer<IBAMR::CIBStrategy> IBAMR::CIBMobilitySolver::d_cib_strategy
private

◆ d_direct_mob_solver

SAMRAI::tbox::Pointer<IBAMR::DirectMobilitySolver> IBAMR::CIBMobilitySolver::d_direct_mob_solver
private

◆ d_krylov_mob_solver

SAMRAI::tbox::Pointer<IBAMR::KrylovMobilitySolver> IBAMR::CIBMobilitySolver::d_krylov_mob_solver
private

◆ d_krylov_freebody_mob_solver

SAMRAI::tbox::Pointer<IBAMR::KrylovFreeBodyMobilitySolver> IBAMR::CIBMobilitySolver::d_krylov_freebody_mob_solver
private

◆ d_solution_time

double IBAMR::CIBMobilitySolver::d_solution_time
private

◆ d_current_time

double IBAMR::CIBMobilitySolver::d_current_time
private

◆ d_new_time

double IBAMR::CIBMobilitySolver::d_new_time
private

◆ d_is_initialized

bool IBAMR::CIBMobilitySolver::d_is_initialized = false
private

◆ d_reinitializing_solver

bool IBAMR::CIBMobilitySolver::d_reinitializing_solver
private

◆ d_has_free_parts

bool IBAMR::CIBMobilitySolver::d_has_free_parts
private

◆ d_interp_scale

double IBAMR::CIBMobilitySolver::d_interp_scale = 1.0
private

◆ d_spread_scale

double IBAMR::CIBMobilitySolver::d_spread_scale = 1.0
private

◆ d_reg_mob_scale

double IBAMR::CIBMobilitySolver::d_reg_mob_scale
private

◆ d_mobility_solver_type

MobilitySolverType IBAMR::CIBMobilitySolver::d_mobility_solver_type
private

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