v0.14.0
Classes | Namespaces | Typedefs | Functions | Variables
Schur.hpp File Reference

Assemble Schur complement. More...

Go to the source code of this file.

Classes

struct  MoFEM::SchurEvents
 Structure to register events for Schur block assembly and solver. More...
 
struct  MoFEM::OpSchurAssembleBase
 
struct  MoFEM::SchurBackendMatSetValuesPtr
 

Namespaces

 MoFEM
 implementation of Data Operators for Forces and Sources
 

Typedefs

using MoFEM::SchurFieldPair = std::pair< std::string, std::string >
 
using MoFEM::SchurFEOpsFEandFields = std::vector< std::pair< std::string, std::vector< SchurFieldPair > > >
 
using MoFEM::SchurShellMatData = std::pair< SmartPetscObj< Mat >, boost::shared_ptr< BlockStructure > >
 
using MoFEM::NestSchurData = std::tuple< std::array< SmartPetscObj< Mat >, 4 >, std::array< boost::shared_ptr< BlockStructure >, 4 >, boost::shared_ptr< BlockStructure >, std::pair< SmartPetscObj< IS >, SmartPetscObj< IS > > >
 

Functions

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...
 
boost::shared_ptr< BlockStructure > MoFEM::createBlockMatStructure (DM dm, SchurFEOpsFEandFields schur_fe_op_vec)
 Create a Mat Diag Blocks object. More...
 
SchurShellMatData MoFEM::createBlockMat (DM dm, boost::shared_ptr< BlockStructure > data)
 Create a Schur Mat object. More...
 
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...
 
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...
 
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...
 
template<>
MoFEMErrorCode MoFEM::DMMoFEMSetNestSchurData (DM dm, boost::shared_ptr< NestSchurData >)
 
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)
 
template<>
MoFEMErrorCode MoFEM::VecSetValues< SchurElemMats > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, 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::VecSetValues< AssemblyTypeSelector< SCHUR > > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, 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< AssemblyTypeSelector< BLOCK_MAT > > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::VecSetValues< AssemblyTypeSelector< BLOCK_MAT > > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, 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::VecSetValues< SchurElemMatsBlock > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< AssemblyTypeSelector< BLOCK_SCHUR > > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::VecSetValues< AssemblyTypeSelector< BLOCK_SCHUR > > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< SchurElemMatsPreconditionedBlock > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< AssemblyTypeSelector< BLOCK_PRECONDITIONER_SCHUR > > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const MatrixDouble &mat, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::VecSetValues< AssemblyTypeSelector< BLOCK_PRECONDITIONER_SCHUR > > (Vec V, const EntitiesFieldData::EntData &data, const VectorDouble &nf, InsertMode iora)
 
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)
 
DEPRECATED boost::shared_ptr< NestSchurData > MoFEM::getNestSchurData (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)
 

Variables

constexpr const char MoFEM::MoFEM_BLOCK_MAT [] = "mofem_block_mat"
 

Detailed Description

Assemble Schur complement.

Date
2023-02-02

To create nested system of Schur complements, you push sequence of operator, to set up data on entities, and then assemble complements.

Note
Try separate floating points operations from book keeping. Also, align memory that blocks follow floating point operations.

Definition in file Schur.hpp.