From fbe57b2a1203165ec187ff5c16cd855292e68714 Mon Sep 17 00:00:00 2001 From: "Vasco C. B. Ferreira" Date: Mon, 27 Jul 2026 20:28:33 +0200 Subject: [PATCH] bug corection, removal of bloat --- nufi/poisson_problem.h | 7 ------- src/nufi_solver.cc | 10 ++++++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/nufi/poisson_problem.h b/nufi/poisson_problem.h index e8548fe..0d15e69 100644 --- a/nufi/poisson_problem.h +++ b/nufi/poisson_problem.h @@ -434,13 +434,6 @@ template void PoissonProblem::coarse_and_refine_grid(size_t it) { std::string grid_file_name = Parameters::PLOT_DIR + "grid_" + std::to_string(it); save_grid_to_file(grid_file_name); - - // std::vector Ex = - // sample_electric_potential(Parameters::X_DOMAIN_LEFT, - // Parameters::X_DOMAIN_RIGHT, - // Parameters::PLOT_NX); - // - // save_space_vector(Ex, "Ex_after_coarsed", it); } template void PoissonProblem::estimate_error() { diff --git a/src/nufi_solver.cc b/src/nufi_solver.cc index 95fc568..418c061 100644 --- a/src/nufi_solver.cc +++ b/src/nufi_solver.cc @@ -193,7 +193,7 @@ void NuFISolver::run() { std::vector int_E_squared; int_E_squared.reserve(Nt); - std::vector int_E_squared_times; // <-- add this + std::vector int_E_squared_times; int_E_squared_times.reserve(Nt); std::vector> grid_versions; @@ -215,7 +215,8 @@ void NuFISolver::run() { << "\n"; std::ofstream error_file(Parameters::PLOT_DIR + "error_estimate.dat"); - error_file << "it error_estimate\n"; + error_file << "# nufi Kelly l2 error estimate\n"; + error_file << "# it l2_error_estimate\n"; [[maybe_unused]] const double x_min = Parameters::X_DOMAIN_LEFT; [[maybe_unused]] double dx = Parameters::CALC_DX; @@ -237,8 +238,9 @@ void NuFISolver::run() { << std::endl; // START: diagnostics - // std::cout << "cells = " << poisson.triangulation.n_active_cells() << "\n" - // << " dofs = " << poisson.dof_handler.n_dofs() << "\n"; + std::cout << "cells = " << poisson.get_triangulation().n_active_cells() + << "\n" + << " dofs = " << poisson.get_dof_handler().n_dofs() << "\n"; // double min_h = 1e100; // double max_h = 0; //