-
Notifications
You must be signed in to change notification settings - Fork 95
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
Added functionality: new types of moving refinement regions #59
Conversation
@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. |
PR looks good overall. Just had a couple minor comments / questions. |
src/enzo/SetEvolveRefineRegion.C
Outdated
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!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!"); |
src/enzo/SetEvolveRefineRegion.C
Outdated
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)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)"); |
This PR expands Enzo's capabilities by adding two main types of functionality and fixes one bug. The new functionality is:
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.
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.