HybridADRSolver
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
8
9#ifndef HYBRIDADRSOLVER_TYPES_H
10#define HYBRIDADRSOLVER_TYPES_H
11
12#include <deal.II/lac/generic_linear_algebra.h>
13#include <deal.II/lac/la_parallel_vector.h>
14
15namespace HybridADRSolver {
19namespace LADistributed {
20using namespace dealii::LinearAlgebraPETSc;
21}
22
26namespace LAMatrixFree {
27template <typename Number = double>
28using Vector = dealii::LinearAlgebra::distributed::Vector<Number>;
29}
30
35
40 None, // No preconditioning
41 Jacobi, // Diagonal/Jacobi preconditioning
42 ILU, // Incomplete LU (matrix-based only)
43 AMG, // Algebraic Multigrid (matrix-based only)
44 Chebyshev, // Chebyshev polynomial preconditioning
45 GMG // Geometric Multigrid (matrix-free)
46};
47
51enum class LinearSolverType {
52 CG, // Conjugate Gradient (symmetric positive definite)
53 GMRES, // Generalized Minimal Residual (general)
54 BiCGStab // BiConjugate Gradient Stabilized
55};
56
64 // Multigrid settings
65 bool enable_multigrid = true; // Enable GMG preconditioning
66 unsigned int mg_smoother_degree = 5; // Chebyshev smoother degree
67 double mg_smoothing_range = 15.0; // Smoothing range
68
69 // Linear solver settings
70 unsigned int max_iterations = 1000;
71 double tolerance = 1e-10;
72
73 // Threading parameters
74 unsigned int n_threads = numbers::invalid_unsigned_int;
75
76 // Output options
77 bool verbose = true;
78 bool output_solution = true;
79 std::string output_prefix = "solution";
80};
81
86 double setup_time = 0.0;
87 double assembly_time = 0.0;
88 double solve_time = 0.0;
89 double total_time = 0.0;
90 double operator_apply_time = 0.0;
91
92 unsigned int n_iterations = 0;
93 double memory_mb = 0.0;
94 unsigned int n_dofs = 0;
95
96 unsigned int n_cells = 0;
97 double l2_error = 0.0;
98};
99
100} // namespace HybridADRSolver
101
102#endif // HYBRIDADRSOLVER_TYPES_H
Definition types.h:19
Definition types.h:26
dealii::LinearAlgebra::distributed::Vector< Number > Vector
Definition types.h:28
Definition problem_definition.h:25
LinearSolverType
Definition types.h:51
@ BiCGStab
Definition types.h:54
@ CG
Definition types.h:52
@ GMRES
Definition types.h:53
PreconditionerType
Definition types.h:39
@ Jacobi
Definition types.h:41
@ Chebyshev
Definition types.h:44
SolverType
Definition types.h:34
@ MatrixBased
Definition types.h:34
@ MatrixFree
Definition types.h:34
bool verbose
Definition types.h:77
unsigned int n_threads
Definition types.h:74
bool enable_multigrid
Definition types.h:65
double tolerance
Definition types.h:71
unsigned int max_iterations
Definition types.h:70
SolverType solver_type
Definition types.h:61
unsigned int mg_smoother_degree
Definition types.h:66
bool output_solution
Definition types.h:78
LinearSolverType linear_solver
Definition types.h:63
double mg_smoothing_range
Definition types.h:67
PreconditionerType preconditioner
Definition types.h:62
std::string output_prefix
Definition types.h:79
Definition types.h:85
double solve_time
Definition types.h:88
unsigned int n_dofs
Definition types.h:94
double l2_error
Definition types.h:97
double assembly_time
Definition types.h:87
double total_time
Definition types.h:89
unsigned int n_cells
Definition types.h:96
double operator_apply_time
Definition types.h:90
double setup_time
Definition types.h:86
unsigned int n_iterations
Definition types.h:92
double memory_mb
Definition types.h:93