Skip to content

Commit

Permalink
report and assert on complexity early for ref loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Jul 6, 2022
1 parent ec5cf22 commit 64bac94
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/ref_subcommand.c
Expand Up @@ -2941,6 +2941,14 @@ static REF_STATUS loop(REF_MPI ref_mpi_orig, int argc, char *argv[]) {
gradation = atof(argv[pos + 1]);
}

if (ref_mpi_once(ref_mpi)) {
printf("complexity %f\n", complexity);
printf("Lp=%d\n", p);
printf("gradation %f\n", gradation);
printf("reconstruction %d\n", (int)reconstruction);
}
RAS(complexity > 1.0e-20, "complexity must be greater than zero");

aspect_ratio = -1.0;
RXS(ref_args_find(argc, argv, "--aspect-ratio", &pos), REF_NOT_FOUND,
"arg search");
Expand Down Expand Up @@ -3189,13 +3197,6 @@ static REF_STATUS loop(REF_MPI ref_mpi_orig, int argc, char *argv[]) {
"extract displacments");
}

if (ref_mpi_once(ref_mpi)) {
printf("complexity %f\n", complexity);
printf("Lp=%d\n", p);
printf("gradation %f\n", gradation);
printf("reconstruction %d\n", (int)reconstruction);
}

ref_malloc_init(metric, 6 * ref_node_max(ref_grid_node(ref_grid)), REF_DBL,
0.0);

Expand Down

0 comments on commit 64bac94

Please sign in to comment.