3 #include <boost/numeric/ublas/matrix.hpp> 5 #include <Epetra_CrsMatrix.h> 6 #include <Epetra_Vector.h> 8 #include <lifev/core/linear_algebra/BlockEpetra_Map.hpp> 9 #include <lifev/core/linear_algebra/LinearOperatorAlgebra.hpp> 11 #include <lifev/navier_stokes_blocks/solver/NavierStokesPreconditionerOperator.hpp> 12 #include <lifev/navier_stokes_blocks/solver/aSIMPLEOperator.hpp> 14 #include <lifev/navier_stokes_blocks/solver/NavierStokesOperator.hpp> 16 #include <lifev/core/array/MatrixEpetra.hpp> 17 #include <lifev/core/linear_algebra/ApproximatedInvertibleRowMatrix.hpp> 18 #include <Teuchos_ParameterList.hpp> 19 #include <Teuchos_XMLParameterListHelpers.hpp> 21 #include <lifev/core/interpolation/Interpolation.hpp> 23 #include <lifev/core/fem/FESpace.hpp> 24 #include <lifev/core/fem/BCHandler.hpp> 25 #include <lifev/core/fem/BCManage.hpp> 27 #ifndef _BlockJacobiPreconditioner_H_ 28 #define _BlockJacobiPreconditioner_H_ 84 void setDomainMap(
const std::shared_ptr<BlockEpetra_Map> & domainMap){M_operatorDomainMap = domainMap;}
86 void setRangeMap(
const std::shared_ptr<BlockEpetra_Map> & rangeMap){M_operatorRangeMap = rangeMap;}
103 const char *
Label()
const {
return M_label.c_str();}
109 const comm_Type &
Comm()
const {
return *M_comm;}
170 void setOptions(
const Teuchos::ParameterList& solversOptions);
void setGamma(Real gamma)
std::shared_ptr< Epetra_Vector > M_invD
std::shared_ptr< Teuchos::ParameterList > parameterListPtr_Type
VectorEpetra - The Epetra Vector format Wrapper.
std::shared_ptr< lumpedMatrix_Type > lumpedMatrixPtr_Type
matrixEpetraPtr_Type M_shapePressure
std::shared_ptr< VectorEpetra_Type > M_Y_pressure
int SetUseTranspose(bool UseTranspose)
matrixEpetraPtr_Type M_schurComplement
void setMaps()
Create the domain and the range maps.
std::shared_ptr< Operators::InvertibleOperator > M_invOper
std::shared_ptr< Operators::ApproximatedInvertibleRowMatrix > M_approximatedStructureMomentumOperator
std::shared_ptr< VectorEpetra_Type > M_X_displacement
std::shared_ptr< Operators::ApproximatedInvertibleRowMatrix > M_approximatedFluidMomentumOperator
void setPressureMassOptions(const parameterListPtr_Type &_oList)
Set the list of the shur complement of the fluid.
std::shared_ptr< VectorEpetra_Type > M_Y_displacement
void setStructureBlock(const matrixEpetraPtr_Type &S)
Set the structure block.
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
std::shared_ptr< Operators::ApproximatedInvertibleRowMatrix > M_approximatedSchurComplementCouplingOperator
matrixEpetraPtr_Type M_Mu
mapEpetraPtr_Type M_monolithicMap
interpolationPtr_Type M_StructureToFluidInterpolant
BlockJacobiPreconditioner()
Empty constructor.
matrixEpetraPtr_Type M_Fp
PCD blocks.
matrixEpetraPtr_Type M_C1transpose
Coupling blocks.
VectorEpetra VectorEpetra_Type
void setOptions(const Teuchos::ParameterList &solversOptions)
Interface to set the parameters of each block.
const char * Label() const
Return a character string describing the operator.
void setUseShapeDerivatives(const bool &useShapeDerivatives)
Set the use of shape derivatives.
void setBDFcoeff(Real coef)
std::shared_ptr< Operators::ApproximatedInvertibleRowMatrix > M_approximatedSchurComplementOperator
FESpace< RegionMesh< LinearTetra >, mapEpetra_Type > FESpace_Type
parameterListPtr_Type M_structureMomentumOptions
Parameters for the structure.
parameterListPtr_Type M_geometryOptions
Parameters for the geometry.
Abstract class which defines the interface of a Linear Operator.
std::shared_ptr< BlockEpetra_Map > M_operatorRangeMap
Range Map.
void setGeometryOptions(const parameterListPtr_Type &_oList)
Set the list of the geometry.
MatrixEpetra< Real > matrixEpetra_Type
const map_Type & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
void updateApproximatedStructureMomentumOperator()
Update the approximation of the structure momentum.
void updateInverseJacobian(const UInt &iQuadPt)
void setFluidBlocks(const matrixEpetraPtr_Type &F, const matrixEpetraPtr_Type &Btranspose, const matrixEpetraPtr_Type &B, const matrixEpetraPtr_Type &D)
Set the fluid blocks.
std::shared_ptr< VectorEpetra_Type > M_Y_velocity
Vectors needed for the applyInverse - output vectors associated to each part.
parameterListPtr_Type M_pressureMassOptions
Parameters for the pressure mass of the PCD.
std::shared_ptr< VectorEpetra_Type > M_X_pressure
void setGeometryBlock(const matrixEpetraPtr_Type &G)
Set the geometry block.
virtual ~BlockJacobiPreconditioner()
bool M_subiterateFluidDirichlet
std::shared_ptr< MapEpetra > M_lagrangeMap
parameterListPtr_Type M_schurCouplingOptions
Parameters for the shur complent of the couplig.
std::shared_ptr< FESpace_Type > FESpacePtr_Type
int ApplyInverse(const vector_Type &X, vector_Type &Y) const
Returns the High Order Yosida approximation of the inverse pressure Schur Complement applied to X...
void setStructureMomentumOptions(const parameterListPtr_Type &_oList)
Set the list of the structure momentum.
matrixEpetraPtr_Type M_C1
Epetra_Import const & importer()
Getter for the Epetra_Import.
void setDomainMap(const std::shared_ptr< BlockEpetra_Map > &domainMap)
set the domain map
void setTimeStep(Real dt)
Copy the value of the timestep.
std::shared_ptr< VectorEpetra_Type > VectorEpetraPtr_Type
int Apply(const vector_Type &, vector_Type &) const
void setVelocityFESpace(const FESpacePtr_Type &fluid_vel_FESpace)
Copy the pointer of the fluid velocity fespace.
std::shared_ptr< BCHandler > M_myBC
bool UseTranspose() const
Return the current UseTranspose setting.
std::shared_ptr< VectorEpetra_Type > M_X_lambda
const std::string M_label
Label.
void setPCDBlocks(const matrixEpetraPtr_Type &Fp, const matrixEpetraPtr_Type &Mp, const matrixEpetraPtr_Type &Mu)
Set the blocks needed by the PCD preconditioner.
void setBC(const BCHandlerPtr_Type &bc)
Copy the pointer of the fluid velocity fespace.
void setCouplingOperators_nonconforming(interpolationPtr_Type fluidToStructure, interpolationPtr_Type structureToFluid, mapEpetraPtr_Type lagrangeMap)
Copy the pointer of the interpolation objects.
std::shared_ptr< BCHandler > BCHandlerPtr_Type
matrixEpetraPtr_Type M_Mp
Epetra_Vector lumpedMatrix_Type
bool HasNormInf() const
Return false.
commPtr_Type M_comm
Communicator.
parameterListPtr_Type M_schurOptions
Parameters for the shur complent of the fluid.
std::shared_ptr< Operators::NavierStokesOperator > M_oper
double Real
Generic real data.
const char * preconditionerTypeFluid() const
void showMe()
Show information about the class.
std::shared_ptr< VectorEpetra_Type > M_X_velocity
Vectors needed for the applyInverse - input vectors associated to each part.
void setFluidBlocks(const matrixEpetraPtr_Type &F, const matrixEpetraPtr_Type &Btranspose, const matrixEpetraPtr_Type &B)
Set the fluid blocks.
matrixEpetraPtr_Type M_shapeVelocity
matrixEpetraPtr_Type M_schurComplementCoupling
void setFluidPreconditioner(const std::string &type)
Set the preconditioner type.
std::shared_ptr< VectorEpetra_Type > M_Y_geometry
matrixEpetraPtr_Type M_G
Geometry block.
parameterListPtr_Type M_fluidMomentumOptions
Parameters for the fluid momentum.
matrixEpetraPtr_Type M_C2transpose
const map_Type & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
void setRangeMap(const std::shared_ptr< BlockEpetra_Map > &rangeMap)
set the range map
std::shared_ptr< Operators::ApproximatedInvertibleRowMatrix > M_approximatedGeometryOperator
const comm_Type & Comm() const
return a reference to the Epetra_Comm communicator associated with this operator
matrixEpetraPtr_Type M_C3
Epetra_MultiVector vector_Type
std::shared_ptr< comm_Type > commPtr_Type
void setFluidMomentumOptions(const parameterListPtr_Type &_oList)
Set the list of the fluid momentum.
void setComm(const commPtr_Type &comm)
set the communicator
matrixEpetraPtr_Type M_C2
std::shared_ptr< VectorEpetra_Type > M_Y_lambda
void setSchurOptions(const parameterListPtr_Type &_oList)
Set the list of the shur complement of the fluid.
void updateApproximatedGeometryOperator()
Update the approximation of the the geometry.
void setShapeDerivativesBlocks(const matrixEpetraPtr_Type &ShapeVelocity, const matrixEpetraPtr_Type &ShapePressure)
Set the shape derivatives.
std::shared_ptr< matrix_Type > matrixPtr_Type
matrixEpetraPtr_Type M_S
Structure block.
interpolationPtr_Type M_FluidToStructureInterpolant
Epetra_CrsMatrix matrix_Type
std::shared_ptr< Interpolation > interpolationPtr_Type
void setSubiterateFluidDirichlet(const bool &subiterateFluidDirichlet)
void updateApproximatedFluidOperator()
Update the approximation of the the geometry.
std::shared_ptr< mapEpetra_Type > mapEpetraPtr_Type
std::shared_ptr< VectorEpetra_Type > M_X_geometry
void setCouplingBlocks(const matrixEpetraPtr_Type &C1transpose, const matrixEpetraPtr_Type &C2transpose, const matrixEpetraPtr_Type &C2, const matrixEpetraPtr_Type &C1, const matrixEpetraPtr_Type &C3)
Set the coupling blocks.
matrixEpetraPtr_Type M_F
Fluid blocks.
FESpacePtr_Type M_velocityFESpace
std::shared_ptr< BlockEpetra_Map > M_operatorDomainMap
std::shared_ptr< matrixEpetra_Type > matrixEpetraPtr_Type
void setMonolithicMap(const mapEpetraPtr_Type &monolithicMap)
Set the monolithic map.
std::shared_ptr< Operators::NavierStokesPreconditionerOperator > M_FluidPrec
matrixEpetraPtr_Type M_Btranspose
LinearOperatorAlgebra super