39 #include <lifev/core/LifeV.hpp> 52 #ifdef HAVE_LIFEV_DEBUG 53 debugStream ( 7100 ) <<
"PreconditionerAztecOO::PreconditionerAztecOO() \n";
66 #ifdef HAVE_LIFEV_DEBUG 67 debugStream ( 7100 ) <<
"PreconditionerAztecOO::buildPreconditioner( Operator ) \n";
75 M_solver->solver().SetPrecMatrix ( matrix->matrixPtr().get() );
77 M_solver->solver().SetAztecOption ( AZ_pre_calc, AZ_calc );
78 M_solver->solver().SetAztecOption ( AZ_keep_info, 1 );
80 Real estimateConditionNumber;
81 M_solver->solver().ConstructPreconditioner ( estimateConditionNumber );
85 return ( EXIT_SUCCESS );
92 #ifdef HAVE_LIFEV_DEBUG 93 debugStream ( 7100 ) <<
"PreconditionerAztecOO::precReset() \n";
96 M_solver->solver().SetAztecOption ( AZ_keep_info, 0 );
97 M_solver->solver().SetAztecOption ( AZ_pre_calc, AZ_calc );
100 Int AZoutputOption = M_solver->solver().GetAztecOption ( AZ_output );
101 M_solver->solver().SetAztecOption ( AZ_output, AZ_none );
102 M_solver->solver().Iterate ( 0, 1.e14 );
103 M_solver->solver().SetAztecOption ( AZ_output, AZoutputOption );
112 M_solver->getParametersList().set (
"precond", dataFile ( ( section +
"/" + subSection +
"/precond" ).data(),
"dom_decomp" ) );
115 M_solver->getParametersList().set (
"pre_calc", dataFile ( ( section +
"/" + subSection +
"/pre_calc" ).data(),
"calc" ) );
118 M_solver->getParametersList().set (
"reorder", dataFile ( ( section +
"/" + subSection +
"/reorder" ).data(), 1 ) );
121 M_solver->getParametersList().set (
"keep_info", dataFile ( ( section +
"/" + subSection +
"/keep_info" ).data(), 1 ) );
127 M_solver->getParametersList().set (
"overlap", dataFile ( ( section +
"/" + subSection +
"/overlap" ).data(), AZ_none ) );
130 M_solver->getParametersList().set (
"type_overlap", dataFile ( ( section +
"/" + subSection +
"/type_overlap" ).data(), AZ_standard ) );
135 M_solver->getParametersList().set (
"subdomain_solve", dataFile ( ( section +
"/" + subSection +
"/subdomain_solve" ).data(),
"ILUT" ) );
137 M_solver->getParametersList().set (
"drop", dataFile ( ( section +
"/" + subSection +
"/drop" ).data(), 1.e-5 ) );
141 M_solver->getParametersList().set (
"ilut_fill", dataFile ( ( section +
"/" + subSection +
"/ilut_fill" ).data(), 4. ) );
163 if ( dataFile ( (section +
"/displayList").data(),
false ) )
165 M_solver->getParametersList().print ( std::cout );
172 output <<
"showMe must be implemented for the PreconditionerAztecOO class" << std::endl;
179 #ifdef HAVE_LIFEV_DEBUG 180 debugStream ( 7100 ) <<
"PreconditionerAztecOO::Condest() \n";
183 return M_solver->solver().Condest();
191 const std::string& section )
194 #ifdef HAVE_LIFEV_DEBUG 195 debugStream ( 7100 ) <<
"PreconditionerAztecOO::setDataFromGetPot(dataFile, section) \n";
198 createParametersList ( M_list, dataFile, section,
"AztecOO" );
209 #ifdef HAVE_LIFEV_DEBUG 210 debugStream ( 7100 ) <<
"PreconditionerAztecOO::getPrec() \n";
215 return M_solver->solver().GetPrecMatrix();
225 #ifdef HAVE_LIFEV_DEBUG 226 debugStream ( 7100 ) <<
"PreconditionerAztecOO::getPrec() \n";
229 std::shared_ptr<Epetra_RowMatrix> prec;
232 prec.reset (M_solver->solver().GetPrecMatrix() );
Int buildPreconditioner(operator_type &matrix)
Build the preconditioner.
void createParametersList(list_Type &list, const GetPot &dataFile, const std::string §ion, const std::string &subSection)
Create the list of parameters of the preconditioner.
void setDataFromGetPot(const GetPot &dataFile, const std::string §ion)
Set the data of the preconditioner using a GetPot object.
void resetPreconditioner()
Reset the preconditioner.
bool M_preconditionerCreated
Real condest()
Compute the condition number of the preconditioner.
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
PreconditionerAztecOO - The implementation of Preconditioner for AztecOO preconditioners.
Epetra_Operator prec_raw_type
PreconditionerAztecOO()
Constructor.
Preconditioner(const commPtr_Type &comm=commPtr_Type())
Constructor.
double Real
Generic real data.
Teuchos::ParameterList list_Type
Preconditioner - Abstract preconditioner class.
std::shared_ptr< prec_raw_type > prec_type
void setParameters(bool cerrWarningIfUnused=false)
Set the current parameters with the internal parameters list.
super::prec_raw_type * preconditioner()
Return the pointer to the preconditioner.
super::prec_type preconditionerPtr()
Return the shared pointer to the preconditioner.
virtual void showMe(std::ostream &output=std::cout) const
Show informations about the preconditioner.