v0.14.0
Classes | Namespaces | Functions | Variables
Schur.cpp File Reference

Implementation of Schur Complement. More...

Go to the source code of this file.

Classes

struct  MoFEM::OpSchurAssembleBaseImpl
 
struct  MoFEM::OpSchurAssembleBegin
 Clear Schur complement internal data. More...
 
struct  MoFEM::OpSchurAssembleEndImpl< OP_SCHUR_ASSEMBLE_BASE >
 Assemble Schur complement (Implementation) More...
 
struct  MoFEM::OpSchurAssembleEnd< I >
 Assemble Schur complement. More...
 
struct  MoFEM::OpSchurAssembleEnd< SchurDSYSV >
 
struct  MoFEM::OpSchurAssembleEnd< SchurDGESV >
 
struct  MoFEM::SchurElemMats
 Schur complement data storage. More...
 
struct  MoFEM::SchurElemMats::uid_mi_tag
 
struct  MoFEM::SchurElemMats::col_mi_tag
 
struct  MoFEM::DiagBlockIndex
 
struct  MoFEM::DiagBlockIndex::Indexes
 block data indexes More...
 
struct  MoFEM::BlockStructure
 
struct  MoFEM::SchurDSYSV
 
struct  MoFEM::SchurDGESV
 
struct  MoFEM::SchurElemMatsBlock
 
struct  MoFEM::SchurElemMatsPreconditionedBlock
 

Namespaces

 MoFEM
 implementation of Data Operators for Forces and Sources
 

Functions

boost::shared_ptr< BlockStructure > MoFEM::createBlockMatStructure (DM dm, SchurFEOpsFEandFields schur_fe_op_vec)
 Create a Mat Diag Blocks object. More...
 
static MoFEMErrorCode MoFEM::mult_schur_block_shell (Mat mat, Vec x, Vec y, InsertMode iora, boost::function< int(DiagBlockIndex::BlockIndex::nth_index< 0 >::type::iterator)> shift_extractor, boost::shared_ptr< std::vector< double >> data_blocks_ptr, bool multiply_by_preconditioner)
 
static MoFEMErrorCode MoFEM::solve_schur_block_shell (Mat mat, Vec y, Vec x, InsertMode iora)
 
static PetscErrorCode MoFEM::mult (Mat mat, Vec x, Vec y)
 
static PetscErrorCode MoFEM::mult_add (Mat mat, Vec x, Vec y)
 
static PetscErrorCode MoFEM::solve (Mat mat, Vec x, Vec y)
 
static PetscErrorCode MoFEM::solve_add (Mat mat, Vec x, Vec y)
 
static PetscErrorCode MoFEM::zero_rows_columns (Mat A, PetscInt N, const PetscInt rows[], PetscScalar diag, Vec x, Vec b)
 
static PetscErrorCode MoFEM::mat_zero (Mat m)
 
static MoFEMErrorCode MoFEM::setSchurBlockMatOps (Mat mat_raw)
 
SchurShellMatData MoFEM::createBlockMat (DM dm, boost::shared_ptr< BlockStructure > data)
 Create a Schur Mat object. More...
 
MoFEMErrorCode MoFEM::shell_block_mat_asmb_wrap_impl (BlockStructure *ctx, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora, boost::function< int(const DiagBlockIndex::Indexes *)> shift_extractor, boost::shared_ptr< std::vector< double >> data_blocks_ptr)
 
MoFEMErrorCode MoFEM::shell_block_mat_asmb_wrap (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
MoFEMErrorCode MoFEM::shell_block_preconditioner_mat_asmb_wrap (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
boost::shared_ptr< NestSchurData > MoFEM::createSchurNestedMatrixStruture (std::pair< SmartPetscObj< DM >, SmartPetscObj< DM >> dms, boost::shared_ptr< BlockStructure > block_mat_data, std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, bool add_preconditioner_block=false)
 Get the Schur Nest Mat Array object. More...
 
std::pair< SmartPetscObj< Mat >, boost::shared_ptr< NestSchurData > > MoFEM::createSchurNestedMatrix (boost::shared_ptr< NestSchurData > schur_net_data_ptr)
 Create a Mat Diag Blocks object. More...
 
OpSchurAssembleBase * MoFEM::createOpSchurAssembleBegin ()
 
OpSchurAssembleBase * MoFEM::createOpSchurAssembleEnd (std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, SmartPetscObj< AO > ao=SmartPetscObj< AO >(), SmartPetscObj< Mat > schur=SmartPetscObj< Mat >(), bool sym_schur=false, bool symm_op=false)
 Construct a new Op Schur Assemble End object. More...
 
OpSchurAssembleBase * MoFEM::createOpSchurAssembleEnd (std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, std::vector< SmartPetscObj< AO >> sequence_of_aos, std::vector< SmartPetscObj< Mat >> sequence_of_mats, std::vector< bool > sym_schur, bool symm_op, boost::shared_ptr< BlockStructure > diag_blocks)
 
OpSchurAssembleBase * MoFEM::createOpSchurAssembleEnd (std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, std::vector< SmartPetscObj< AO >> sequence_of_aos, std::vector< SmartPetscObj< Mat >> sequence_of_mats, std::vector< bool > sym_schur, std::vector< double > diag_eps, bool symm_op, boost::shared_ptr< BlockStructure > diag_blocks)
 
MoFEMErrorCode MoFEM::setSchurA00MatSolvePC (SmartPetscObj< PC > pc)
 Set PC for A00 block. More...
 
MoFEMErrorCode MoFEM::setSchurMatSolvePC (SmartPetscObj< PC > pc)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< SchurElemMats > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
MoFEMErrorCode MoFEM::schur_mat_set_values_wrap (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< AssemblyTypeSelector< SCHUR > > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< BlockStructure > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< SchurElemMatsBlock > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< SchurElemMatsPreconditionedBlock > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
MoFEMErrorCode MoFEM::schurSwitchPreconditioner (boost::shared_ptr< BlockStructure > block_mat_data)
 Switch preconditioner. More...
 
MoFEMErrorCode MoFEM::schurSaveBlockMesh (boost::shared_ptr< BlockStructure > block_mat_data, std::string filename)
 Save block matrix as a mesh. More...
 

Variables

constexpr bool MoFEM::debug_schur = false
 
constexpr int MoFEM::max_gemv_size = 2
 

Detailed Description

Implementation of Schur Complement.

Date
2023-02-03

Definition in file Schur.cpp.