HybridADRSolver
Loading...
Searching...
No Matches
main_2d.cpp File Reference

2D benchmark driver for comparing hybrid vs fully distributed solvers More...

#include "core/problem_definition.h"
#include "core/types.h"
#include "matrix_based/matrix_based_solver.h"
#include "matrix_free/matrix_free_solver.h"
#include "utils.h"
#include <deal.II/base/mpi.h>
#include <deal.II/base/multithread_info.h>
#include <getopt.h>
#include <iostream>
#include <string>
Include dependency graph for main_2d.cpp:

Functions

template<int dim>
BenchmarkResult run_matrix_based_benchmark (const ProblemInterface< dim > &problem, int n_refinements, int degree, MPI_Comm comm, const std::string &test_type)
 Run a single benchmark for the matrix-based solver (2D)
template<int dim, int fe_degree>
BenchmarkResult run_matrix_free_benchmark (const ProblemInterface< dim > &problem, int n_refinements, MPI_Comm comm, const std::string &test_type)
 Run a single benchmark for the matrix-free solver (2D)
void run_time_complexity_benchmark (ResultCollector &collector, int min_refs, int max_refs, int degree, MPI_Comm comm)
 Run time complexity benchmark (refinement 2 to 10)
void print_usage (const char *program_name)
int main (int argc, char *argv[])

Detailed Description

2D benchmark driver for comparing hybrid vs fully distributed solvers

This benchmark compares:

  1. Matrix-based solver (MPI distributed with WorkStream threading)
  2. Matrix-free solver (Hybrid MPI + threading throughout)

Tests: Time complexity analysis from refinement 2 to 10

Usage: mpirun -np <N> ./benchmark_2d [options]

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

◆ print_usage()

void print_usage ( const char * program_name)

◆ run_matrix_based_benchmark()

template<int dim>
BenchmarkResult run_matrix_based_benchmark ( const ProblemInterface< dim > & problem,
int n_refinements,
int degree,
MPI_Comm comm,
const std::string & test_type )

Run a single benchmark for the matrix-based solver (2D)

◆ run_matrix_free_benchmark()

template<int dim, int fe_degree>
BenchmarkResult run_matrix_free_benchmark ( const ProblemInterface< dim > & problem,
int n_refinements,
MPI_Comm comm,
const std::string & test_type )

Run a single benchmark for the matrix-free solver (2D)

◆ run_time_complexity_benchmark()

void run_time_complexity_benchmark ( ResultCollector & collector,
int min_refs,
int max_refs,
int degree,
MPI_Comm comm )

Run time complexity benchmark (refinement 2 to 10)