262 std::constructible_from<
265 std::constructible_from<
268 std::constructible_from<AMatrixType, Mat>))
269 class NonlinearSolver
277 using real_type = PetscReal;
283 const MPI_Comm mpi_comm = PETSC_COMM_WORLD);
295 operator SNES()
const;
307 get_mpi_communicator()
const;
334 set_matrix(PMatrixType &P);
342 set_matrices(AMatrixType &A, PMatrixType &P);
352 solve(VectorType &x);
364 solve(VectorType &x, PMatrixType &P);
377 solve(VectorType &x, AMatrixType &A, PMatrixType &P);
387 std::function<void(
const VectorType &x, VectorType &res)> residual;
398 std::function<void(
const VectorType &x, AMatrixType &A, PMatrixType &P)>
413 std::function<void(
const VectorType &x,
414 const unsigned int step_number,
415 const real_type f_norm)>
431 std::function<void(
const VectorType &x)> setup_jacobian;
444 std::function<void(
const VectorType &src, VectorType &dst)>
464 std::function<void(
const VectorType &x, real_type &energy_value)> energy;
481 bool need_dummy_assemble;
488 mutable std::exception_ptr pending_exception;
NonlinearSolverData(const std::string &options_prefix="", const std::string &snes_type="", const std::string &snes_linesearch_type="", const real_type absolute_tolerance=0, const real_type relative_tolerance=0, const real_type step_tolerance=0, const int maximum_non_linear_iterations=-1, const int max_n_function_evaluations=-1)