Task 5, 5* some fixes and cleanup

This commit is contained in:
Markus Schmidt 2025-12-09 23:33:08 +01:00
commit c8bf307391
154 changed files with 214851 additions and 93 deletions

View file

@ -23,6 +23,7 @@ void JacobiSolve(CRS_Matrix const &SK, vector<double> const &f, vector<double> &
cout << endl << " Start Jacobi solver for " << nrows << " d.o.f.s" << endl;
// Choose initial guess
#pragma omp parallel for
for (int k = 0; k < nrows; ++k)
{
u[k] = 0.0; // u := 0
@ -44,6 +45,7 @@ void JacobiSolve(CRS_Matrix const &SK, vector<double> const &f, vector<double> &
// Iteration sweeps
int iter = 0;
double sigma = sigma0;
// i dont parallelize this cause its iteration dependent
while ( sigma > tol2 * sigma0 && maxiter > iter)
{
++iter;