IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
|
Class DirectMobilitySolver solves the mobility and body-mobility sub-problem by employing direct solvers. More...
#include </home/runner/work/IBAMR/IBAMR/include/ibamr/DirectMobilitySolver.h>
Public Member Functions | |
DirectMobilitySolver (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > cib_strategy) | |
The only constructor of this class. | |
virtual | ~DirectMobilitySolver () |
Destructor for this class. | |
void | registerMobilityMat (const std::string &mat_name, const unsigned prototype_struct_id, MobilityMatrixType mat_type, std::pair< MobilityMatrixInverseType, MobilityMatrixInverseType > inv_type, const int managing_proc=0, const std::string &filename="", std::pair< double, double > scale=std::pair< double, double >(1.0, 0.0)) |
Register a prototypical structure with a particular mobility matrix identified by its name. More... | |
void | registerMobilityMat (const std::string &mat_name, const std::vector< unsigned > &prototype_struct_ids, MobilityMatrixType mat_type, std::pair< MobilityMatrixInverseType, MobilityMatrixInverseType > inv_type, const int managing_proc=0, const std::string &filename="", std::pair< double, double > scale=std::pair< double, double >(1.0, 0.0)) |
Register mutiple prototype structures with a particular matrix identified by its name. A combined dense mobility matrix for all the associated prototypical structures will be formed. More... | |
void | registerStructIDsWithMobilityMat (const std::string &mat_name, const std::vector< std::vector< unsigned > > &struct_ids) |
Register all structures that will be managed by this particular dense mobility matrix. More... | |
void | initializeSolverState (Vec x, Vec b) |
Initialize the solver. | |
void | deallocateSolverState () |
Deallocate the solver. | |
void | setSolutionTime (const double solution_time) |
Set the time at which the solution is to be evaluated. | |
void | setTimeInterval (const double current_time, const double new_time) |
Set the time interval of integration. | |
void | setStokesSpecifications (const IBAMR::StokesSpecifications &stokes_spec) |
Set stokes specifications. | |
bool | solveSystem (Vec x, Vec b) |
Solves the mobility problem. More... | |
bool | solveBodySystem (Vec x, Vec b) |
Solves the body mobility problem. More... | |
const std::vector< unsigned > & | getPrototypeStructIDs (const std::string &mat_name) |
Return the ids of the structures associated with the dense mobility matrix formation. More... | |
const std::vector< std::vector< unsigned > > & | getStructIDs (const std::string &mat_name) |
Return the ids of the structure associated with the dense mobility matrix. More... | |
Class DirectMobilitySolver solves the mobility and body-mobility sub-problem by employing direct solvers.
const std::vector< unsigned > & IBAMR::DirectMobilitySolver::getPrototypeStructIDs | ( | const std::string & | mat_name | ) |
Return the ids of the structures associated with the dense mobility matrix formation.
mat_name | Matrix handle. |
const std::vector< std::vector< unsigned > > & IBAMR::DirectMobilitySolver::getStructIDs | ( | const std::string & | mat_name | ) |
Return the ids of the structure associated with the dense mobility matrix.
mat_name | Matrix handle. |
void IBAMR::DirectMobilitySolver::registerMobilityMat | ( | const std::string & | mat_name, |
const std::vector< unsigned > & | prototype_struct_ids, | ||
MobilityMatrixType | mat_type, | ||
std::pair< MobilityMatrixInverseType, MobilityMatrixInverseType > | inv_type, | ||
const int | managing_proc = 0 , |
||
const std::string & | filename = "" , |
||
std::pair< double, double > | scale = std::pair<double, double>(1.0, 0.0) |
||
) |
Register mutiple prototype structures with a particular matrix identified by its name. A combined dense mobility matrix for all the associated prototypical structures will be formed.
mat_name | Matrix handle. |
prototype_struct_ids | Vector of prototypical structure ids as defined while registering structures with IBAMR::IBStrategy class. |
mat_type | Matrix type to be used for dense mobility matrix. |
inv_type | Inversion method to be used for the mobility and body-mobility matrix. |
filename | If the mobility matrix is to be read from an input file. |
scale | Scale for improving the conditioning number of dense mobility matrix. The matrix is scaled as |
managing_proc | MPI processor that manages this mobility matrix. |
void IBAMR::DirectMobilitySolver::registerMobilityMat | ( | const std::string & | mat_name, |
const unsigned | prototype_struct_id, | ||
MobilityMatrixType | mat_type, | ||
std::pair< MobilityMatrixInverseType, MobilityMatrixInverseType > | inv_type, | ||
const int | managing_proc = 0 , |
||
const std::string & | filename = "" , |
||
std::pair< double, double > | scale = std::pair<double, double>(1.0, 0.0) |
||
) |
Register a prototypical structure with a particular mobility matrix identified by its name.
mat_name | Matrix handle. |
prototype_struct_id | Prototypical structure id as defined while registering structures with IBAMR::IBStrategy class. |
mat_type | Matrix type to be used for dense mobility matrix. |
inv_type | Inversion method to be used for the mobility and body-mobility matrix. |
filename | If the mobility matrix is to be read from an input file. |
scale | Scale for improving the conditioning number of dense mobility matrix. The matrix is scaled as |
managing_proc | MPI processor that manages this mobility matrix. |
void IBAMR::DirectMobilitySolver::registerStructIDsWithMobilityMat | ( | const std::string & | mat_name, |
const std::vector< std::vector< unsigned > > & | struct_ids | ||
) |
Register all structures that will be managed by this particular dense mobility matrix.
bool IBAMR::DirectMobilitySolver::solveBodySystem | ( | Vec | x, |
Vec | b | ||
) |
Solves the body mobility problem.
x | Vec storing the rigid body center of mass translational and rotational velocity. |
b | Vec storing the applied external force. |
true
if the solver converged to the specified tolerances, false
otherwise. bool IBAMR::DirectMobilitySolver::solveSystem | ( | Vec | x, |
Vec | b | ||
) |
Solves the mobility problem.
x | Vec storing the Lagrange multiplier. |
b | Vec storing the desired velocity. |
true
if the solver converged to the specified tolerances, false
otherwise.