33 SystemType & system = es.add_system<SystemType>(
"ScalarSystem");
35 system.time_solver = std::make_unique<TimeSolverType>(system);
39 DiffSolver & solver = *(system.time_solver->diff_solver().get());
44 NewtonSolver & newton = cast_ref<NewtonSolver &>(solver);
51 system.deltat = deltat;
53 TimeSolverType * time_solver = cast_ptr<TimeSolverType *>(system.time_solver.get());
60 std::vector<dof_id_type> solution_index;
61 solution_index.push_back(0);
62 const bool has_solution = system.get_dof_map().all_semilocal_indices(solution_index);
64 for (
unsigned int t_step=0; t_step != n_timesteps; ++t_step)
67 system.time_solver->advance_timestep();
73 Number exact_soln = system.u(system.time);
74 rel_error =
std::abs((exact_soln - (*system.solution)(0))/exact_soln);
76 system.comm().max(rel_error);
79 LIBMESH_ASSERT_FP_EQUAL( rel_error,
81 std::numeric_limits<Real>::epsilon()*10 );
LinearSolver< Number > & get_linear_solver()
This is the EquationSystems class.
libMesh::Parallel::Communicator * TestCommWorld
Real absolute_residual_tolerance
The DiffSolver should exit after the residual is reduced to either less than absolute_residual_tolera...
This class defines a solver which uses the default libMesh linear solver in a quasiNewton method to h...
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
This is a generic class that defines a solver to handle ImplicitSystem classes, including NonlinearIm...
void set_preconditioner_type(const PreconditionerType pct)
Sets the type of preconditioner to use.
void set_solver_type(const SolverType st)
Sets the type of solver to use.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
Real relative_residual_tolerance
Real relative_step_tolerance
virtual void aux_time_solver_init(Euler2Solver &)