Skip to content

Commit

Permalink
also reports complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Jun 30, 2021
1 parent f3cd9af commit 9b9bbc7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ref_subcommand.c
Expand Up @@ -2219,7 +2219,7 @@ static REF_STATUS parse_p(int argc, char *argv[], REF_INT *p) {

static REF_STATUS ref_subcommand_report_error(
REF_DBL *metric, REF_GRID ref_grid, REF_DBL *scalar,
REF_RECON_RECONSTRUCTION reconstruction) {
REF_RECON_RECONSTRUCTION reconstruction, REF_DBL complexity) {
REF_DBL *hess, *error;
REF_DBL total_error;
ref_malloc(hess, 6 * ref_node_max(ref_grid_node(ref_grid)), REF_DBL);
Expand All @@ -2231,7 +2231,8 @@ static REF_STATUS ref_subcommand_report_error(
ref_free(error);
ref_free(hess);
if (ref_mpi_once(ref_grid_mpi(ref_grid)))
printf("interpolation error %e\n", total_error);
printf("complexity and interpolation error %e %e\n", complexity,
total_error);
return REF_SUCCESS;
}

Expand Down Expand Up @@ -2684,7 +2685,8 @@ static REF_STATUS loop(REF_MPI ref_mpi_orig, int argc, char *argv[]) {
gradation, complexity),
"lp norm");
ref_mpi_stopwatch_stop(ref_mpi, "multiscale metric");
RSS(ref_subcommand_report_error(metric, ref_grid, scalar, reconstruction),
RSS(ref_subcommand_report_error(metric, ref_grid, scalar, reconstruction,
complexity),
"report error");
}
ref_free(scalar);
Expand Down

0 comments on commit 9b9bbc7

Please sign in to comment.