formatting adjustments

This commit is contained in:
2024-02-27 16:02:31 +01:00
parent 22cfb97087
commit 0471363834
4 changed files with 9 additions and 14 deletions
-1
View File
@@ -20,7 +20,6 @@ enum class BoundaryType {
};
struct PotentialGridPoint {
//PotentialGridPoint(BoundaryType _type, double _value);
BoundaryType type;
double value;
};
+2 -2
View File
@@ -42,8 +42,8 @@ CylinderBinning buildPositionBinning(json_t* object) {
std::to_string(number_of_bins_azimuthal));
DEBUG_LEVEL_3("with number of bins longitudinal: " +
std::to_string(number_of_bins_longitudinal));
DEBUG_LEVEL_3("with radius: " + std::to_string(max_radius));
DEBUG_LEVEL_3("with height: " + std::to_string(max_length));
DEBUG_LEVEL_3("with radius: " + std::to_string(max_radius) + "m");
DEBUG_LEVEL_3("with height: " + std::to_string(max_length) + "m");
return CylinderBinning(number_of_bins_radial, max_radius,
number_of_bins_azimuthal,
+6 -9
View File
@@ -31,7 +31,7 @@ PoissonSolver::PoissonSolver(GlobalBoundary bottom_boundary,
electrodes_(electrodes),
target_accuracy_(target_accuracy),
num_cycles_(num_cycles) {
// set inner values
blitz::TinyVector<double, 3> stepsize = density_binning_.stepsize();
for (int i = potential_.lbound(0); i <= potential_.ubound(0); ++i) {
for (int j = potential_.lbound(1); j <= potential_.ubound(1); ++j) {
@@ -204,11 +204,13 @@ bool PoissonSolver::converged(
std::sqrt(cumulated_quadradic_difference / (nr * nth * nz));
DEBUG_LEVEL_0("Poisson solver reached a normalized difference of: " +
std::to_string(normalized_difference));
double normalized_maximum =
maximum_difference*SI::eps0/(fabs(blitz::max(interpolated_density)) + 1e-12);
std::ostringstream message;
message << "Maximum Differenece normalized by order of magnitude: "
<< maximum_difference*SI::eps0/(fabs(blitz::max(interpolated_density)) + 1e-12);
<< normalized_difference;
DEBUG_LEVEL_0(message.str());
return maximum_difference*SI::eps0/(fabs(blitz::max(interpolated_density)) + 1e-12) < target_accuracy_;
return normalized_difference < target_accuracy_;
}
void PoissonSolver::solvePotential(
@@ -376,9 +378,4 @@ bool RearWall::isOnElectrode(const Coordinate& position) {
}
//PotentialGridPoint::PotentialGridPoint(BoundaryType _type, double _value): type(_type), value(_value) {};
//TODO:
// look for a function that calculates the E-Field from the potential (if it doesn't exist, one has to be written)
// get the "main" code to also output the potential if specified(for testing purposes)
// same for the electric field
// make sure .lbound(0) always makes sense as a replacement of r=0
+1 -2
View File
@@ -31,8 +31,7 @@ blitz::Array<double, 3> initiateVolumeArray(
const double bin_volume =
M_PI * (std::pow(r2, 2) - std::pow(r1, 2)) * (z2 - z1) / phi.length();
if (ir == 0 && iz == -1) {
}
volume(ir, blitz::Range::all(), iz) = bin_volume;
}
}