17 error_measurement_implementation=PDETerms.User_Defined_Implementation,
18 delta_between_database_flushes=0,
19 output_file_name="FVErrorMeasurement",
20 data_delta_between_snapshots="1e+16",
21 time_delta_between_snapshots=0.0,
22 clear_database_after_flush=True,
24 super(ErrorMeasurement, self).
__init__(
26 error_measurement_implementation=error_measurement_implementation,
27 delta_between_database_flushes=delta_between_database_flushes,
28 output_file_name=output_file_name,
29 data_delta_between_snapshots=data_delta_between_snapshots,
30 time_delta_between_snapshots=time_delta_between_snapshots,
31 clear_database_after_flush=clear_database_after_flush,
34 solver._finish_time_step_implementation += create_finish_time_step_implementation_for_error_measurement(
35 guard=
"_solverState == SolverState::GridInitialisation or (_solverState == SolverState::TimeStep and isLastGridSweepOfTimeStep())"
39 solver._action_set_postprocess_solution.guard =
"""
40 (repositories::{{SOLVER_INSTANCE}}.getSolverState() == {{SOLVER_NAME}}::SolverState::GridInitialisation or
41 repositories::{{SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep())"""
42 solver._action_set_postprocess_solution.add_postprocessing_kernel(
43 create_postprocessing_kernel_for_error_measurement()