mirror of
https://codeberg.org/vcbferreira/NuFI_deal.ii
synced 2026-08-12 14:33:18 +02:00
.
This commit is contained in:
@@ -46,9 +46,6 @@ void CellLocator<dim>::rebuild(const DoFHandler<dim> &dof_handler,
|
||||
info.lower = cell->vertex(0);
|
||||
info.upper = cell->vertex(GeometryInfo<dim>::vertices_per_cell - 1);
|
||||
|
||||
if (info.lower[0] > info.upper[0])
|
||||
std::swap(info.lower, info.upper);
|
||||
|
||||
info.h = info.upper[0] - info.lower[0];
|
||||
|
||||
cells.push_back(info);
|
||||
|
||||
+11
-1
@@ -13,6 +13,7 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "nufi/fields.h"
|
||||
@@ -151,7 +152,10 @@ NuFISolver::eval_rho(unsigned int n, std::vector<double> &X,
|
||||
}
|
||||
|
||||
void NuFISolver::run() {
|
||||
std::cout << "Building E_sline\n\n";
|
||||
|
||||
//====//====//
|
||||
// Run prep //
|
||||
//====//====//
|
||||
|
||||
using std::abs;
|
||||
using std::max;
|
||||
@@ -185,6 +189,10 @@ void NuFISolver::run() {
|
||||
const double x_min = Parameters::X_DOMAIN_LEFT;
|
||||
double dx = Parameters::CALC_DX;
|
||||
|
||||
//====//====//
|
||||
// Time loop//
|
||||
//====//====//
|
||||
|
||||
for (unsigned int it = 0; it < Nt; ++it) {
|
||||
stopwatch<double> timer;
|
||||
|
||||
@@ -239,6 +247,8 @@ void NuFISolver::run() {
|
||||
double refine_start = timer.elapsed();
|
||||
poisson.coarse_and_refine_grid(it, phi_history);
|
||||
refine_time = timer.elapsed() - refine_start;
|
||||
std::cout << "Refinement step done in "
|
||||
<< std::to_string(std::floor(refine_time)) << "[s]";
|
||||
}
|
||||
|
||||
double timer_elapsed = timer.elapsed();
|
||||
|
||||
Reference in New Issue
Block a user