-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparameters.h
110 lines (91 loc) · 2.79 KB
/
parameters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef _PARAMETERS_H
#define _PARAMETERS_H
#include "util.h"
#include "equations.h"
template <int dim>
class Parameters
{
public:
// Parameters constructor takes a triangulation as an attribute (passed by reference), and the constructor is responsible for filling out the triangulation.
Parameters();
void delete_old_outputs(MPI_Comm& mpi_communicator) const;
bool is_periodic_boundary(int boundary_id) const;
// Use exactly Div-Free space.
bool use_div_free_space_for_B;
// Gravity acceleration - in z-direction
double g;
// Limiter
bool limit;
enum Limiter { vertexBased, barthJespersen};
Limiter slope_limiter;
double start_limiting_at;
bool limit_edges_and_vertices, limitB;
// Flux enumeration - for potentially adding more fluxes, decision which one to use is then made in Equations<>::numerical_normal_flux.
enum NumFluxType { hlld, lax_friedrich };
NumFluxType num_flux_type;
// A special value for lax_friedrich
double lax_friedrich_stabilization_value;
// Output step - either < 0 (output all steps), or > 0 (time difference between two outputs)
double output_step;
// File name
std::string output_file_prefix;
// Output matrix after assemble_system() in Problem::run().
bool output_matrix;
// Output rhs after assemble_system() in Problem::run().
bool output_rhs;
// Output limited_solution after solve() in Problem::run().
bool output_solution;
// Number of patches
unsigned int patches;
// Gas gamma value.
double gas_gamma;
// Linear solver type enumeration
enum SolverType { gmres, direct };
// Linear solver type selected
SolverType solver;
// Verbosity enumeration
enum OutputType { quiet_solver, verbose_solver };
// Verbosity selected
OutputType output;
// Tolerance for linear residual norm
double linear_residual;
// Maximum allowed linear iterations count, succeed the linear loop exceeded
int max_iterations;
// Linear solver parameters.
double ilut_fill;
double ilut_atol;
double ilut_rtol;
double ilut_drop;
// Global - obvious
double current_time_step_length, final_time, cfl_coefficient;
// Polynomial order for the flow part.
int polynomial_order_dg;
// Quadrature order.
int quadrature_order;
Point<dim> corner_a;
Point<dim> corner_b;
std::vector<unsigned int> refinements;
std::vector<std::array<int, 3> > periodic_boundaries;
// Debugging
enum DebuggingFlag
{
None = 0,
BasicSteps = 1,
PeriodicBoundaries = 2,
Assembling = 4,
SlopeLimiting = 8,
NumFlux = 16,
Adaptivity = 32,
DetailSteps = 64
};
int debug;
// Adaptivity
int max_cells;
int refine_every_nth_time_step;
int perform_n_initial_refinements;
double refine_threshold;
double coarsen_threshold;
int volume_factor;
double time_interval_max_cells_multiplicator;
};
#endif