Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality: new types of moving refinement regions #59

Merged
merged 21 commits into from
Jun 11, 2019

Conversation

bwoshea
Copy link
Contributor

@bwoshea bwoshea commented Apr 25, 2019

This PR expands Enzo's capabilities by adding two main types of functionality and fixes one bug. The new functionality is:

  1. It expands the functionality of the MustRefineRegion code (which forces a rectilinear portion of a simulation to be refined to at least a user-determined minimum level) so that the user can have a MustRefineRegion whose bounds and minimum level of refinement vary over time/redshift. This information is specified by a user-supplied data file providing the time/redshift evolution of the MustRefineRegion parameters, and linearly interpolates between entries in this file.

  2. It adds a CoolingRefineRegion option. This allows the user to specify a rectilinear sub-volume of a simulation in which refinement based on the cooling time can take place, and also vary that over time if desired in the same manner as described above. The ability to constrain cooling time-based refinement to a subvolume is particularly desirable because in certain environments refinement based on the cooling time can cause an excessive amount of mesh creation, which can cause out-of-memory errors and generally be very computationally expensive.

In addition to these new features, the original moving RefinementRegion code (which just constrains refinement to be in a subvolume, but does not force refinement or restrict it to a specific type of refinement) now linearly interpolates between times in the same manner as the two new moving RefinementRegion.

All of the moving refinement region options now do error checking - if the current simulation time is before or after the times listed in the entries in the user-supplied RefineRegion file, Enzo gives an error message and exits. This is a highly desirable behavior, because otherwise the refinement region would stay stationary and not give any warnings.

@brittonsmith
Copy link
Contributor

@bwoshea, the automated testing stuff has now been merged into the main repo. If you can merge those changes and update the PR, the test suite will run.

@aemerick aemerick self-requested a review June 10, 2019 17:00
@aemerick
Copy link
Contributor

PR looks good overall. Just had a couple minor comments / questions.

that EvolveMustRefineRegionTime[0] is the earliest time and the last output is the latest time (for
the given track file). */
if(time < EvolveMustRefineRegionTime[0] || time > EvolveMustRefineRegionTime[EvolveMustRefineRegionNtimes-1]){
fprintf(stderr,"SetEvolveRefineRegion ERROR for EvolveMustRefineRegion: current simulation time is outside of range of track file redshifts!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fprintf(stderr,"SetEvolveRefineRegion ERROR for EvolveMustRefineRegion: current simulation time is outside of range of track file redshifts!");
fprintf(stderr,"SetEvolveRefineRegion ERROR for EvolveMustRefineRegion: current simulation time is outside of range of track file times!");

that EvolveRefineRegionTime[0] is the earliest time and the last output is the latest time (for
the given track file). */
if(time < EvolveCoolingRefineRegionTime[0] || time > EvolveCoolingRefineRegionTime[EvolveCoolingRefineRegionNtimes-1]){
fprintf(stderr,"SetEvolveRefineRegion ERROR: current simulation redshift is outside of range of track file redshifts! (Cooling time box)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fprintf(stderr,"SetEvolveRefineRegion ERROR: current simulation redshift is outside of range of track file redshifts! (Cooling time box)");
fprintf(stderr,"SetEvolveRefineRegion ERROR: current simulation time is outside of range of track file times! (Cooling time box)");

@kohdaegene kohdaegene merged commit a2c2c50 into enzo-project:master Jun 11, 2019
@bwoshea bwoshea deleted the moving_refine_regions branch June 11, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants