|
IBAMR
IBAMR version 0.19.
|
Class DirectMobilitySolver solves the mobility and body-mobility sub-problem by employing direct solvers.
#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. More... | |
| virtual | ~DirectMobilitySolver () |
| Destructor for this class. More... | |
| 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. More... | |
| void | deallocateSolverState () |
| Deallocate the solver. 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 | setStokesSpecifications (const IBAMR::StokesSpecifications &stokes_spec) |
| Set stokes specifications. More... | |
| 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... | |
Private Member Functions | |
| void | getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db) |
| Get input options. More... | |
| void | factorizeMobilityMatrix () |
| Factorize mobility matrix using direct solvers. More... | |
| void | constructBodyMobilityMatrix () |
| Construct body mobility matrix as N = K^T inv(M) K. More... | |
| void | factorizeBodyMobilityMatrix () |
| Factorize body mobility matrix using direct solvers. More... | |
| void | factorizeDenseMatrix (double *mat_data, const int mat_size, const MobilityMatrixInverseType &inv_type, int *ipiv, const std::string &mat_name, const std::string &err_msg) |
| Factorize dense matrix. More... | |
| void | computeSolution (Mat &mat, const MobilityMatrixInverseType &inv_type, int *ipiv, double *rhs) |
| Compute solution and store in the rhs vector. More... | |
Private Attributes | |
| std::string | d_object_name |
| bool | d_is_initialized = false |
| double | d_solution_time |
| double | d_current_time |
| double | d_new_time |
| SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > | d_cib_strategy |
| std::map< std::string, std::pair< std::vector< double >, std::vector< double > > > | d_mat_map |
| std::map< std::string, std::vector< double > > | d_geometric_mat_map |
| std::map< std::string, int > | d_mat_proc_map |
| std::map< std::string, std::vector< unsigned > > | d_mat_prototype_id_map |
| std::map< std::string, std::vector< std::vector< unsigned > > > | d_mat_actual_id_map |
| std::map< std::string, MobilityMatrixType > | d_mat_type_map |
| std::map< std::string, std::pair< MobilityMatrixInverseType, MobilityMatrixInverseType > > | d_mat_inv_type_map |
| std::map< std::string, unsigned int > | d_mat_nodes_map |
| std::map< std::string, unsigned int > | d_mat_parts_map |
| std::map< std::string, std::pair< double, double > > | d_mat_scale_map |
| std::map< std::string, std::string > | d_mat_filename_map |
| std::map< std::string, std::pair< std::vector< int >, std::vector< int > > > | d_ipiv_map |
| std::map< std::string, std::pair< Mat, Mat > > | d_petsc_mat_map |
| std::map< std::string, Mat > | d_petsc_geometric_mat_map |
| double | d_mu |
| double | d_rho |
| double | d_f_periodic_corr = 0.0 |
| bool | d_recompute_mob_mat = false |
| double | d_svd_replace_value |
| double | d_svd_eps |
| IBAMR::DirectMobilitySolver::DirectMobilitySolver | ( | std::string | object_name, |
| SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | input_db, | ||
| SAMRAI::tbox::Pointer< IBAMR::CIBStrategy > | cib_strategy | ||
| ) |
|
virtual |
| 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) |
||
| ) |
| 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 \( [MM] = \alpha*[MM] + \beta*[I]. \) |
| managing_proc | MPI processor that manages this mobility matrix. |
| 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) |
||
| ) |
| 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 \( [MM] = \alpha*[MM] + \beta*[I]. \) |
| 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 | ||
| ) |
| void IBAMR::DirectMobilitySolver::initializeSolverState | ( | Vec | x, |
| Vec | b | ||
| ) |
| void IBAMR::DirectMobilitySolver::deallocateSolverState | ( | ) |
| void IBAMR::DirectMobilitySolver::setSolutionTime | ( | const double | solution_time | ) |
| void IBAMR::DirectMobilitySolver::setTimeInterval | ( | const double | current_time, |
| const double | new_time | ||
| ) |
| void IBAMR::DirectMobilitySolver::setStokesSpecifications | ( | const IBAMR::StokesSpecifications & | stokes_spec | ) |
| bool IBAMR::DirectMobilitySolver::solveSystem | ( | Vec | x, |
| Vec | b | ||
| ) |
| x | Vec storing the Lagrange multiplier. |
| b | Vec storing the desired velocity. |
true if the solver converged to the specified tolerances, false otherwise. | bool IBAMR::DirectMobilitySolver::solveBodySystem | ( | Vec | x, |
| Vec | b | ||
| ) |
| 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. | const std::vector<unsigned>& IBAMR::DirectMobilitySolver::getPrototypeStructIDs | ( | const std::string & | mat_name | ) |
| mat_name | Matrix handle. |
| const std::vector<std::vector<unsigned> >& IBAMR::DirectMobilitySolver::getStructIDs | ( | const std::string & | mat_name | ) |
| mat_name | Matrix handle. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17