Skip to content

Commit

Permalink
removes --iles option, which has been replaced with --aspect-ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Oct 5, 2022
1 parent f4990bb commit 93414a0
Showing 1 changed file with 2 additions and 64 deletions.
66 changes: 2 additions & 64 deletions src/ref_subcommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -2606,7 +2606,7 @@ static REF_STATUS fixed_point_metric(
REF_DBL *metric, REF_GRID ref_grid, REF_INT first_timestep,
REF_INT last_timestep, REF_INT timestep_increment, const char *in_project,
const char *solb_middle, REF_RECON_RECONSTRUCTION reconstruction, REF_INT p,
REF_DBL gradation, REF_DBL complexity, REF_BOOL iles, REF_DBL aspect_ratio,
REF_DBL gradation, REF_DBL complexity, REF_DBL aspect_ratio,
REF_BOOL strong_sensor_bc, REF_DBL strong_value, REF_DICT ref_dict_bcs) {
REF_MPI ref_mpi = ref_grid_mpi(ref_grid);
REF_DBL *hess, *scalar;
Expand All @@ -2616,17 +2616,6 @@ static REF_STATUS fixed_point_metric(
REF_INT im, node;
REF_INT fixed_point_ldim;

REF_DBL *min_scalar = NULL;
REF_DBL *max_scalar = NULL;
REF_BOOL first = REF_TRUE;

if (iles) {
ref_malloc_init(min_scalar, 1 * ref_node_max(ref_grid_node(ref_grid)),
REF_DBL, 0);
ref_malloc_init(max_scalar, 1 * ref_node_max(ref_grid_node(ref_grid)),
REF_DBL, 0);
}

ref_malloc(hess, 6 * ref_node_max(ref_grid_node(ref_grid)), REF_DBL);
total_timesteps = 0;
for (timestep = first_timestep; timestep <= last_timestep;
Expand All @@ -2644,20 +2633,6 @@ static REF_STATUS fixed_point_metric(
"apply strong sensor bc");
}
RSS(ref_recon_hessian(ref_grid, scalar, hess, reconstruction), "hess");
if (NULL != min_scalar && NULL != max_scalar) {
if (first) {
first = REF_FALSE;
each_ref_node_valid_node(ref_grid_node(ref_grid), node) {
min_scalar[node] = scalar[node];
max_scalar[node] = scalar[node];
}
} else {
each_ref_node_valid_node(ref_grid_node(ref_grid), node) {
min_scalar[node] = MIN(min_scalar[node], scalar[node]);
max_scalar[node] = MAX(max_scalar[node], scalar[node]);
}
}
}
ref_free(scalar);
total_timesteps++;
each_ref_node_valid_node(ref_grid_node(ref_grid), node) {
Expand All @@ -2681,39 +2656,6 @@ static REF_STATUS fixed_point_metric(
RSS(ref_metric_local_scale(metric, NULL, ref_grid, p),
"local lp norm scaling");
ref_mpi_stopwatch_stop(ref_mpi, "local scale metric");
if (NULL != min_scalar && NULL != max_scalar) {
REF_DBL threshold, local;
threshold = REF_DBL_MIN;
each_ref_node_valid_node(ref_grid_node(ref_grid), node) {
threshold = MAX(threshold, max_scalar[node]);
}
local = threshold;
RSS(ref_mpi_max(ref_mpi, &local, &threshold, REF_DBL_TYPE), "max thresh");
RSS(ref_mpi_bcast(ref_mpi, &threshold, 1, REF_DBL_TYPE), "thresh bcast");
if (ref_mpi_once(ref_mpi)) printf("iles threshold %f\n", threshold);
each_ref_node_valid_node(ref_grid_node(ref_grid), node) {
REF_DBL diag_system[12];
REF_DBL eiglimit = 1.0;
RSS(ref_matrix_diag_m(&(metric[6 * node]), diag_system), "diag");
if (ref_grid_twod(ref_grid)) {
RSS(ref_matrix_descending_eig_twod(diag_system), "2D ascend");
ref_matrix_eig(diag_system, 1) =
MAX(ref_matrix_eig(diag_system, 0) * eiglimit,
ref_matrix_eig(diag_system, 1));
} else {
RSS(ref_matrix_descending_eig(diag_system), "3D ascend");
ref_matrix_eig(diag_system, 1) =
MAX(ref_matrix_eig(diag_system, 0) * eiglimit,
ref_matrix_eig(diag_system, 1));
ref_matrix_eig(diag_system, 2) =
MAX(ref_matrix_eig(diag_system, 0) * eiglimit,
ref_matrix_eig(diag_system, 2));
}
RSS(ref_matrix_form_m(diag_system, &(metric[6 * node])), "form m");
}
}
ref_free(min_scalar);
ref_free(max_scalar);

if (aspect_ratio > 0.0) {
if (ref_mpi_once(ref_mpi))
Expand Down Expand Up @@ -3517,11 +3459,7 @@ static REF_STATUS loop(REF_MPI ref_mpi_orig, int argc, char *argv[]) {
RXS(ref_args_find(argc, argv, "--deforming", &deforming_pos), REF_NOT_FOUND,
"arg search");
if (REF_EMPTY == deforming_pos) {
REF_BOOL iles = REF_FALSE;
REF_BOOL hrles = REF_FALSE;
RXS(ref_args_find(argc, argv, "--iles", &pos), REF_NOT_FOUND,
"arg search");
if (REF_EMPTY != pos) iles = REF_TRUE;
RXS(ref_args_find(argc, argv, "--hrles", &pos), REF_NOT_FOUND,
"arg search");
if (REF_EMPTY != pos) hrles = REF_TRUE;
Expand All @@ -3540,7 +3478,7 @@ static REF_STATUS loop(REF_MPI ref_mpi_orig, int argc, char *argv[]) {
} else {
RSS(fixed_point_metric(metric, ref_grid, first_timestep, last_timestep,
timestep_increment, in_project, solb_middle,
reconstruction, p, gradation, complexity, iles,
reconstruction, p, gradation, complexity,
aspect_ratio, strong_sensor_bc, strong_value,
ref_dict_bcs),
"fixed point");
Expand Down

0 comments on commit 93414a0

Please sign in to comment.