Poisson step and resets only after time resolution

This commit is contained in:
2024-05-15 09:12:43 +02:00
parent 77fa8d175a
commit fcbff96f17
4 changed files with 29 additions and 44 deletions
+3 -18
View File
@@ -30,20 +30,6 @@ namespace generator {
auto boundaries = buildBoundaries(parameter, {"PoissonSolver", "Boundary"});
int solver_intervall = json_int(json_object_by_path(object, {"Intervall"}));
if (solver_intervall == 0 &&
json_string(json_object_by_path(
object, {"Intervall"})) == "EachSync") {
solver_intervall = 1;
}
ASSERT_POSITIVE(&solver_intervall,
"The intervall for poisson solver stride must be positive"
" or 'EachSync'");
int solver_offset = json_int(json_object_by_path(object, {"Offset"}));
ASSERT_NOTNEGATIVE(&solver_offset,
"The offset for poisson solver has to be non-negative");
std::vector<std::shared_ptr<Electrode>> electrodes{};
double target_accuracy = parameter.doubleValue(
@@ -52,13 +38,12 @@ namespace generator {
int num_cycles = parameter.intValue(json_path_append({"PoissonSolver"},
{"NumCycles"}));
bool reset_after_solving = parameter.boolValue(
json_path_append({"PoissonSolver"}, {"ResetAfterSolving"}), false);
bool do_solver = parameter.boolValue(
json_path_append({"PoissonSolver"}, {"DoSolver"}), false);
return std::shared_ptr<PoissonSolver>(new PoissonSolver(boundaries.at("Bottom"),
boundaries.at("Top"), boundaries.at("Hull"), geometry, position_binning,
electrodes, target_accuracy, num_cycles, solver_intervall, solver_offset,
reset_after_solving));
electrodes, target_accuracy, num_cycles, do_solver));
}
std::map<std::string, GlobalBoundary> buildBoundaries(Parameter& parameter,