Franculino / microBlooM

GNU General Public License v3.0
4 stars 2 forks source link

[solver]: Solver for large linear systems. #11

Closed epprob closed 1 year ago

epprob commented 1 year ago

image

Use an iterative or conjugate gradient solver for both blood flow and adjoint equations. Currently, the direct solver requires 96% of run time while solving an inverse problem with 100'000 vertices

epprob commented 1 year ago

Maybe, @clambr when you have done the implementation of the iterative solver, you could post a comparison of the run time of both solvers here (screenshot of profiling, as I did above).

clambr commented 1 year ago

For an iterative solver, I used the PyAMG, a library of Algebraic Multigrid (AMG) solvers. from pyamg import smoothed_aggregation_solver from scipy.sparse.linalg import cg

testcase_inverse_problem.py

for max_nr_of_iterations = 5

Direct Solver

Στιγμιότυπο 2023-02-28, 16 02 59

Iterative Solver

image image