Skip to content

Commit

Permalink
limit ar for spalding
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed May 4, 2021
1 parent 0b99445 commit df8c6d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ref_subcommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ static REF_STATUS spalding_metric(REF_GRID ref_grid, REF_DICT ref_dict_bcs,
REF_INT node;
REF_RECON_RECONSTRUCTION reconstruction = REF_RECON_L2PROJECTION;
REF_DBL gradation = 10.0;
REF_INT pos;

ref_malloc(metric, 6 * ref_node_max(ref_grid_node(ref_grid)), REF_DBL);
ref_malloc(distance, ref_node_max(ref_grid_node(ref_grid)), REF_DBL);
Expand All @@ -301,6 +302,15 @@ static REF_STATUS spalding_metric(REF_GRID ref_grid, REF_DICT ref_dict_bcs,
"floor metric eigenvalues based on grid size and solution jitter");
RSS(ref_metric_local_scale(metric, NULL, ref_grid, 4),
"local lp=4 norm scaling");
RXS(ref_args_find(argc, argv, "--aspect-ratio", &pos), REF_NOT_FOUND,
"arg search");
if (REF_EMPTY != pos && pos < argc - 1) {
REF_DBL aspect_ratio = atof(argv[pos + 1]);
if (ref_mpi_once(ref_mpi))
printf("limit --aspect-ratio to %f\n", aspect_ratio);
RSS(ref_metric_limit_aspect_ratio(metric, ref_grid, aspect_ratio),
"limit aspect ratio");
}
ref_mpi_stopwatch_stop(ref_mpi, "spalding metric");
RSS(ref_metric_gradation_at_complexity(metric, ref_grid, gradation,
complexity),
Expand Down

0 comments on commit df8c6d7

Please sign in to comment.