diff --git a/nsd/11arraydesign/code/solve_cpp_simplearray.cpp b/nsd/11arraydesign/code/solve_cpp_simplearray.cpp index d6862aa..7bf9a1c 100644 --- a/nsd/11arraydesign/code/solve_cpp_simplearray.cpp +++ b/nsd/11arraydesign/code/solve_cpp_simplearray.cpp @@ -30,9 +30,9 @@ void import_numpy() } } -} +} /* end namespace python */ -} +} /* end namespace modmesh */ template T calc_norm_amax(modmesh::SimpleArray const & arr0, modmesh::SimpleArray const & arr1) @@ -61,15 +61,21 @@ solve1(modmesh::SimpleArray u) double norm; while (!converged) { + norm = 0.0; ++step; for (size_t it=1; it norm) + { + norm = v; + } } } - norm = calc_norm_amax(u, un); + // additional loop slows down: norm = calc_norm_amax(u, un); if (norm < 1.e-5) { converged = true; } u = un; }