Skip to content

Commit

Permalink
Updated documentation and beginning and delete greedy sample after using
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonw1 committed Jan 25, 2024
1 parent fe2221f commit a42d889
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions examples/prom/de_parametric_maxwell_greedy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
// The de phase applies the differential evolution algorithm.
//
// Example commands:
// Before running the simulations below, make sure to delete the parameters file with "rm -r parameters.txt"
//
// Small example:
// build_database phase: mpirun -np 8 de_parametric_maxwell_greedy -build_database -greedy-param-min 1.0 -greedy-param-max 1.2 -greedy-param-size 5 -greedysubsize 2 -greedyconvsize 3 -greedyrelerrortol 0.01
// FOM phase: mpirun -np 8 de_parametric_maxwell_greedy -visit -fom -f 1.15 (create a new solution to compare with)
// DE phase: mpirun -np 8 de_parametric_maxwell_greedy -f 1.15 -visit -de -de_f 0.9 -de_cr 0.9 -de_ps 50 -de_min_iter 10 -de_max_iter 100 -de_ct 0.001 -de_min_freq 1.0 -de_max_freq 1.2 (Run interpolative differential evolution to see if target FOM can be matched. -visit outputs visualization for the vector field E with lowest relative error)
Expand Down Expand Up @@ -770,15 +773,6 @@ int main(int argc, char *argv[])
infile.close();
}

if (build_database)
{
greedy_sampler = new CAROM::GreedyRandomSampler(greedy_param_space_min,
greedy_param_space_max,
greedy_param_space_size, false, greedy_relative_error_tol, 1.05,
2.0, greedy_subset_size, greedy_convergence_subset_size,
true, "de_parametric_maxwell_greedy_log.txt");
}

if (build_database)
{
// The simulation is wrapped in a do-while statement so that the greedy
Expand Down Expand Up @@ -898,6 +892,8 @@ int main(int argc, char *argv[])
simulation();
}

delete greedy_sampler;

MPI_Finalize();

return 0;
Expand Down

0 comments on commit a42d889

Please sign in to comment.