--- /dev/null
+Removed: The PETSc Eisenstat preconditioner wrapper, which has never worked
+correctly in parallel, has been removed.
+<br>
+(David Wells, 2021/06/11)
AdditionalData additional_data;
};
-
-
- /**
- * A class that implements the interface to use the PETSc Eisenstat
- * preconditioner, which implements SSOR on the diagonal block owned by
- * each processor.
- *
- * See the comment in the base class
- * @ref PreconditionBase
- * for when this preconditioner may or may not work.
- *
- * @ingroup PETScWrappers
- */
- class PreconditionEisenstat : public PreconditionBase
- {
- public:
- /**
- * Standardized data struct to pipe additional flags to the
- * preconditioner.
- */
- struct AdditionalData
- {
- /**
- * Constructor. By default, set the damping parameter to one.
- */
- AdditionalData(const double omega = 1);
-
- /**
- * Relaxation parameter.
- */
- double omega;
- };
-
- /**
- * Empty Constructor. You need to call initialize() before using this
- * object.
- */
- PreconditionEisenstat() = default;
-
- /**
- * Constructor. Take the matrix which is used to form the preconditioner,
- * and additional flags if there are any.
- */
- PreconditionEisenstat(
- const MatrixBase & matrix,
- const AdditionalData &additional_data = AdditionalData());
-
- /**
- * Initialize the preconditioner object and calculate all data that is
- * necessary for applying it in a solver. This function is automatically
- * called when calling the constructor with the same arguments and is only
- * used if you create the preconditioner without arguments.
- */
- void
- initialize(const MatrixBase & matrix,
- const AdditionalData &additional_data = AdditionalData());
-
- protected:
- /**
- * Store a copy of the flags for this particular preconditioner.
- */
- AdditionalData additional_data;
- };
-
-
-
/**
* A class that implements the interface to use the PETSc Incomplete
* Cholesky preconditioner.
}
- /* ----------------- PreconditionEisenstat -------------------- */
-
- PreconditionEisenstat::AdditionalData::AdditionalData(const double omega)
- : omega(omega)
- {}
-
-
-
- PreconditionEisenstat::PreconditionEisenstat(
- const MatrixBase & matrix,
- const AdditionalData &additional_data)
- {
- initialize(matrix, additional_data);
- }
-
-
- void
- PreconditionEisenstat::initialize(const MatrixBase & matrix_,
- const AdditionalData &additional_data_)
- {
- clear();
-
- matrix = static_cast<Mat>(matrix_);
- additional_data = additional_data_;
-
- create_pc();
-
- PetscErrorCode ierr = PCSetType(pc, const_cast<char *>(PCEISENSTAT));
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- // then set flags as given
- ierr = PCEisenstatSetOmega(pc, additional_data.omega);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- ierr = PCSetFromOptions(pc);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
-
- ierr = PCSetUp(pc);
- AssertThrow(ierr == 0, ExcPETScError(ierr));
- }
-
-
/* ----------------- PreconditionICC -------------------- */
test<PETScWrappers::PreconditionJacobi>();
test<PETScWrappers::PreconditionBlockJacobi>();
- test<PETScWrappers::PreconditionEisenstat>();
test<PETScWrappers::PreconditionBoomerAMG>();
test<PETScWrappers::PreconditionParaSails>();
test<PETScWrappers::PreconditionNone>();
test<PETScWrappers::PreconditionBlockJacobi>();
test<PETScWrappers::PreconditionSOR>();
test<PETScWrappers::PreconditionSSOR>();
- // todo: this crashes test<PETScWrappers::PreconditionEisenstat> ();
test<PETScWrappers::PreconditionICC>();
test<PETScWrappers::PreconditionILU>();
test<PETScWrappers::PreconditionLU>();
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2004 - 2020 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE.md at
-// the top level directory of deal.II.
-//
-// ---------------------------------------------------------------------
-
-
-// test the PETSc CG solver
-
-
-#include <deal.II/lac/petsc_precondition.h>
-#include <deal.II/lac/petsc_solver.h>
-#include <deal.II/lac/petsc_sparse_matrix.h>
-#include <deal.II/lac/petsc_vector.h>
-#include <deal.II/lac/vector_memory.h>
-
-#include <iostream>
-#include <typeinfo>
-
-#include "../tests.h"
-
-#include "../testmatrix.h"
-
-
-int
-main(int argc, char **argv)
-{
- initlog();
- deallog << std::setprecision(4);
-
- Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
- {
- SolverControl control(100, 1.e-3);
-
- const unsigned int size = 32;
- unsigned int dim = (size - 1) * (size - 1);
-
- deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
- // Make matrix
- FDMatrix testproblem(size, size);
- PETScWrappers::SparseMatrix A(dim, dim, 5);
- testproblem.five_point(A);
-
- IndexSet indices(dim);
- indices.add_range(0, dim);
- PETScWrappers::MPI::Vector f(indices, MPI_COMM_WORLD);
- PETScWrappers::MPI::Vector u(indices, MPI_COMM_WORLD);
- f = 1.;
- A.compress(VectorOperation::insert);
-
- PETScWrappers::SolverCG solver(control);
- PETScWrappers::PreconditionEisenstat preconditioner(A);
- deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
- check_solver_within_range(solver.solve(A, u, f, preconditioner),
- control.last_step(),
- 19,
- 21);
- }
-}
+++ /dev/null
-
-DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Solver stopped within 19 - 21 iterations