void TrilinosPreconditioner<T>::compute() { Ifpack_Preconditioner * ifpack = NULL; #ifdef LIBMESH_HAVE_ML ML_Epetra::MultiLevelPreconditioner * ml = NULL; #endif switch (this->_preconditioner_type) { // IFPACK preconditioners case ILU_PRECOND: case SOR_PRECOND: ifpack = dynamic_cast<Ifpack_Preconditioner *>(_prec); ifpack->Compute(); break; #ifdef LIBMESH_HAVE_ML // ML preconditioners case AMG_PRECOND: ml = dynamic_cast<ML_Epetra::MultiLevelPreconditioner *>(_prec); ml->ComputePreconditioner(); break; #endif default: // no nothing here break; } }
void TrilinosPreconditioner<T>::compute() { #ifdef LIBMESH_TRILINOS_HAVE_IFPACK Ifpack_Preconditioner * ifpack = libmesh_nullptr; #endif #ifdef LIBMESH_TRILINOS_HAVE_ML ML_Epetra::MultiLevelPreconditioner * ml = libmesh_nullptr; #endif switch (this->_preconditioner_type) { #ifdef LIBMESH_TRILINOS_HAVE_IFPACK // IFPACK preconditioners case ILU_PRECOND: case SOR_PRECOND: ifpack = dynamic_cast<Ifpack_Preconditioner *>(_prec); ifpack->Compute(); break; #endif #ifdef LIBMESH_TRILINOS_HAVE_ML // ML preconditioners case AMG_PRECOND: ml = dynamic_cast<ML_Epetra::MultiLevelPreconditioner *>(_prec); ml->ComputePreconditioner(); break; #endif default: // If we made it here, there were no TrilinosPreconditioners // active, so that's probably an error. libmesh_error_msg("ERROR: No valid TrilinosPreconditioners available!"); break; } }