|
HybridADRSolver
|
Matrix-free solver with hybrid MPI+threading parallelization and GMG. More...
#include <matrix_free_solver.h>


Public Types | |
| using | Number = double |
| using | LevelNumber = float |
| using | VectorType = LinearAlgebra::distributed::Vector<Number> |
| using | LevelVectorType = LinearAlgebra::distributed::Vector<LevelNumber> |
| using | SystemMatrixType = ADROperator<dim, fe_degree, Number> |
| using | LevelMatrixType = ADROperator<dim, fe_degree, LevelNumber> |
| using | SmootherType |
| using | SmootherPreconditionerType |
Public Member Functions | |
| MatrixFreeSolver (const ProblemInterface< dim > &problem, MPI_Comm comm, const SolverParameters ¶ms=SolverParameters()) | |
| Constructor. | |
| void | run (unsigned int n_refinements) override |
| Run the complete solve cycle. | |
| SolverType | get_solver_type () const override |
| Returns the solver type identifier. | |
| std::string | get_name () const override |
| Returns a descriptive name for this solver. | |
| const SystemMatrixType & | get_system_operator () const |
| Get the system operator (for analysis/debugging). | |
| const VectorType & | get_solution () const |
| Get the solution vector. | |
| double | compute_memory_usage () const |
| Compute memory usage in MB. | |
| double | compute_l2_error () const |
| Compute the L2 error against the exact solution. | |
| Public Member Functions inherited from HybridADRSolver::ParallelSolverBase< dim > | |
| ParallelSolverBase (MPI_Comm comm, SolverParameters params, bool construct_mg_hierarchy=false) | |
| virtual | ~ParallelSolverBase ()=default |
| const TimingResults & | get_timing_results () const |
Protected Member Functions | |
| void | setup_dofs () override |
| void | assemble_system () override |
| void | solve () override |
| void | output_results (unsigned int cycle) const override |
| void | setup_matrix_free () |
| Setup the MatrixFree data structure for the finest level. | |
| void | setup_multigrid () |
| Setup the multigrid hierarchy. | |
| void | assemble_rhs () |
| Assemble the right-hand side vector. | |
| void | solve_gmres_gmg () |
| Solve using GMRES with GMG preconditioning. | |
| void | solve_cg_gmg () |
| Solve using CG with GMG preconditioning (for symmetric problems). | |
| void | solve_gmres_jacobi () |
| Solve using GMRES with Jacobi preconditioning (fallback). | |
| void | solve_cg_jacobi () |
| Solve using CG with Jacobi preconditioning (fallback). | |
| Protected Member Functions inherited from HybridADRSolver::ParallelSolverBase< dim > | |
| virtual void | setup_grid (unsigned int n_refinements) |
Additional Inherited Members | |
| Protected Attributes inherited from HybridADRSolver::ParallelSolverBase< dim > | |
| MPI_Comm | mpi_communicator |
| unsigned int | n_mpi_processes |
| unsigned int | this_mpi_process |
| parallel::distributed::Triangulation< dim > | triangulation |
| std::unique_ptr< FiniteElement< dim > > | fe |
| DoFHandler< dim > | dof_handler |
| std::unique_ptr< Mapping< dim > > | mapping |
| AffineConstraints< double > | constraints |
| IndexSet | locally_owned_dofs |
| IndexSet | locally_relevant_dofs |
| SolverParameters | parameters |
| TimingResults | timing_results |
| ConditionalOStream | pcout |
| TimerOutput | computing_timer |
| bool | has_mg_hierarchy |
Matrix-free solver with hybrid MPI+threading parallelization and GMG.
This class implements a matrix-free finite element solver that:
| dim | Spatial dimension |
| fe_degree | Polynomial degree of finite elements |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::LevelMatrixType = ADROperator<dim, fe_degree, LevelNumber> |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::LevelNumber = float |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::LevelVectorType = LinearAlgebra::distributed::Vector<LevelNumber> |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::Number = double |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::SmootherPreconditionerType |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::SmootherType |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::SystemMatrixType = ADROperator<dim, fe_degree, Number> |
| using HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::VectorType = LinearAlgebra::distributed::Vector<Number> |
| HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::MatrixFreeSolver | ( | const ProblemInterface< dim > & | problem, |
| MPI_Comm | comm, | ||
| const SolverParameters & | params = SolverParameters() ) |
Constructor.
| problem | The PDE problem to solve |
| comm | MPI communicator |
| params | Solver parameters |
|
protected |
Assemble the right-hand side vector.
|
overrideprotectedvirtual |
Assemble the system (matrix and/or RHS)
Implements HybridADRSolver::ParallelSolverBase< dim >.
| double HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::compute_l2_error | ( | ) | const |
Compute the L2 error against the exact solution.
| double HybridADRSolver::MatrixFreeSolver< dim, fe_degree >::compute_memory_usage | ( | ) | const |
Compute memory usage in MB.
|
inlineoverridevirtual |
Returns a descriptive name for this solver.
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
inline |
Get the solution vector.
|
inlineoverridevirtual |
Returns the solver type identifier.
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
inline |
Get the system operator (for analysis/debugging).
|
overrideprotectedvirtual |
Output results to files
| cycle | Current refinement cycle |
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
overridevirtual |
Run the complete solve cycle.
| n_refinements | Number of global mesh refinements |
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
overrideprotectedvirtual |
Distribute degrees of freedom and setup constraints
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
protected |
Setup the MatrixFree data structure for the finest level.
|
protected |
Setup the multigrid hierarchy.
|
overrideprotectedvirtual |
Solve the linear system
Implements HybridADRSolver::ParallelSolverBase< dim >.
|
protected |
Solve using CG with GMG preconditioning (for symmetric problems).
|
protected |
Solve using CG with Jacobi preconditioning (fallback).
|
protected |
Solve using GMRES with GMG preconditioning.
|
protected |
Solve using GMRES with Jacobi preconditioning (fallback).