hyper.deal
Loading...
Searching...
No Matches
time_loop_parameters.h
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2020 by the hyper.deal authors
4//
5// This file is part of the hyper.deal library.
6//
7// The hyper.deal library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 3.0 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.MD at
12// the top level directory of hyper.deal.
13//
14// ---------------------------------------------------------------------
15
16#ifndef HYPERDEAL_FUNCTIONALITIES_TIME_LOOP_PARAMTERS
17#define HYPERDEAL_FUNCTIONALITIES_TIME_LOOP_PARAMTERS
18
19#include <hyper.deal/base/config.h>
20
21#include <deal.II/base/parameter_handler.h>
22
23#include <functional>
24
25namespace hyperdeal
26{
27 template <typename Number>
29 {
30 void
31 add_parameters(dealii::ParameterHandler &prm)
32 {
33 prm.add_parameter(
34 "TimeStep",
35 time_step,
36 "Time-step size: we take the minimum of this quantity and the maximum time step obtained by the CFL condition.");
37 prm.add_parameter("StartTime", start_time, "Start time.");
38 prm.add_parameter("FinalTime", final_time, "Final time.");
39 prm.add_parameter(
40 "MaxTimeStepNumber",
41 max_time_step_number,
42 "Terminate simulation after a maximum number of iterations (useful for performance studies).");
43 }
44
45 Number time_step = 0.1;
46 Number start_time = 0.0;
47 Number final_time = 20.0;
48 unsigned int max_time_step_number = 100000000;
49 };
50} // namespace hyperdeal
51
52#endif
Definition time_loop_parameters.h:29