* ./myApp -snes_type newtontr -ksp_type cg
* @endcode
* in case the user wants to change the default nonlinear solver to
- * a trust region solver and iterate on the tangent system with CG,
- * still using NonlinearSolver::solve_with_jacobian as a preconditioner.
+ * a trust region solver and iterate on the matrix-free tangent system with
+ * CG, still using NonlinearSolver::solve_with_jacobian as a preconditioner.
*
* The first approach has instead the advantage that only the matrix assembly
* procedure has to be provided, thus allowing quicker implementations and
* @code
* ./myApp -ksp_type cg -pc_type gamg
* @endcode
+ * See NonlinearSolver::set_matrix and NonlinearSolver::set_matrices for
+ * additional details.
*
* In case the nonlinear equations are derived from energy minimization
* arguments, it may be beneficial to perform linesearch or test trust-region
*
* Error parameters:
*
- * @param tsadapttype The string indicating the PETSc time step adaptor type.
+ * @param ts_adapt_type The string indicating the PETSc time step adaptor type.
* @param minimum_step_size Minimum step size allowed.
* @param maximum_step_size Maximum step size allowed.
* @param absolute_tolerance Absolute error tolerance.
const int max_steps = -1,
const bool match_step = false,
// Error parameters
- const std::string &tsadapttype = "none",
+ const std::string &ts_adapt_type = "none",
const real_type minimum_step_size = -1.0,
const real_type maximum_step_size = -1.0,
const real_type absolute_tolerance = -1.0,
, initial_step_size(initial_step_size)
, max_steps(max_steps)
, match_step(match_step)
- , tsadapttype(tsadapttype)
+ , ts_adapt_type(ts_adapt_type)
, minimum_step_size(minimum_step_size)
, maximum_step_size(maximum_step_size)
, absolute_tolerance(absolute_tolerance)
/**
* PETSc time step adaptor type.
*/
- std::string tsadapttype;
+ std::string ts_adapt_type;
/**
* Minimum allowed step size for adaptive time stepping.
* @code
* ./myApp -ksp_type cg -pc_type gamg
* @endcode
+ * See TimeStepper::set_matrix and TimeStepper::set_matrices for
+ * additional details.
*
* @ingroup PETScWrappers
*/
// Adaptive time stepping
TSAdapt tsadapt;
AssertPETSc(TSGetAdapt(ts, &tsadapt));
- AssertPETSc(TSAdaptSetType(tsadapt, data.tsadapttype.c_str()));
+ AssertPETSc(TSAdaptSetType(tsadapt, data.ts_adapt_type.c_str()));
// As of 3.19, PETSc does not propagate options prefixes to the
// adaptors.
{
// Customize solver: use BDF and basic adaptive time stepping
PETScWrappers::TimeStepperData data;
- data.ts_type = "bdf";
- data.final_time = 1.0;
- data.tsadapttype = "basic";
+ data.ts_type = "bdf";
+ data.final_time = 1.0;
+ data.ts_adapt_type = "basic";
reinit(data);
// Here we solve the two variables system: