removal of unused vars/parameters

This commit is contained in:
VCB Ferreira
2026-08-02 17:26:43 +02:00
parent 08bb8f05c7
commit a4d0f67f61
2 changed files with 2 additions and 37 deletions
+2 -5
View File
@@ -14,9 +14,6 @@ constexpr double X_DOMAIN_RIGHT = 4 * M_PI;
constexpr double LX = std::abs(X_DOMAIN_RIGHT - X_DOMAIN_LEFT);
constexpr double LX_INV = 1 / LX;
constexpr size_t CALC_NX = 512;
constexpr double CALC_DX = LX / CALC_NX;
constexpr double V_DOMAIN_LEFT = -10.;
constexpr double V_DOMAIN_RIGHT = 10.;
@@ -31,7 +28,7 @@ constexpr double DV = std::abs(V_DOMAIN_RIGHT - V_DOMAIN_LEFT) / NV;
constexpr size_t f0_TYPE = 1;
// deal.ii options
constexpr unsigned int GLOBAL_REFINEMENT = 7;
constexpr unsigned int GLOBAL_REFINEMENT = 8;
constexpr unsigned int FE_DEGREE = 3;
constexpr unsigned int CONVERGENCE_ITERATIONS = 5000;
constexpr double CONVERGENCE_LIMIT = 1e-8;
@@ -55,7 +52,7 @@ constexpr unsigned int TMAX = 100;
// Plotting options
constexpr int PLOT_FREQUENCY = 10;
constexpr size_t PLOT_NX = CALC_NX;
constexpr size_t PLOT_NX = 512;
constexpr double PLOT_DX = LX / PLOT_NX;
const std::string PLOT_DIR = "results/";
} // namespace Parameters
-32
View File
@@ -200,8 +200,6 @@ void NuFISolver::run() {
std::vector<GridStructure<1>> grid_versions;
std::vector<SolutionSnapshot<1>> phi_history;
std::vector<double> x_eval(Parameters::CALC_NX);
std::ofstream time_file(Parameters::PLOT_DIR + "simulation_time.dat");
double total_time = 0;
@@ -219,13 +217,9 @@ void NuFISolver::run() {
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;
//====//====//
// Time loop//
//====//====//
for (unsigned int it = 0; it < Nt; ++it) {
stopwatch<double> timer;
@@ -242,35 +236,10 @@ void NuFISolver::run() {
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;
//
// for (auto cell : poisson.triangulation.active_cell_iterators()) {
// min_h = std::min(min_h, cell->diameter());
// max_h = std::max(max_h, cell->diameter());
// }
//
// std::cout << "h ratio = " << max_h / min_h << std::endl;
// std::vector<double> x = make_x_eval(Parameters::CALC_NX);
// auto rho = eval_rho(it, x, grid_versions, phi_history, Parameters::NV);
//
// double mean = 0;
//
// for (auto r : rho)
// mean += r;
//
// mean /= rho.size();
//
// std::cout << "rho mean = " << mean << "\n";
// std::cout << "rho min = " << *std::min_element(rho.begin(), rho.end())
// << "\n";
// std::cout << "rho max = " << *std::max_element(rho.begin(), rho.end())
// << "\n";
// END: diagnostics
double compute_start = timer.elapsed();
// compute rho
//
poisson.set_rhs_function([&](const std::vector<Point<1>> &points) {
std::vector<double> x(points.size());
@@ -281,7 +250,6 @@ void NuFISolver::run() {
});
if (it % Parameters::REFINE_FREQUENCY == 0) {
// if (it == 0) {
refine_time = poisson.solve_step(it, grid_versions, true);
compute_time = timer.elapsed() - compute_start - refine_time;
} else {