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

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

This comment has been minimized.

Copy link
Contributor

commented May 2, 2019

@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 Jun 10, 2019

@aemerick

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

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!");

This comment has been minimized.

Copy link
@cbrummelsmith

cbrummelsmith Jun 10, 2019

Contributor
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)");

This comment has been minimized.

Copy link
@cbrummelsmith

cbrummelsmith Jun 10, 2019

Contributor
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)");

bwoshea added some commits Jun 10, 2019

@kohdaegene kohdaegene merged commit a2c2c50 into enzo-project:master Jun 11, 2019

1 of 2 checks passed

ci/circleci: test-suite Your tests failed on CircleCI
Details
ci/circleci: docs-build Your tests passed on CircleCI!
Details

@bwoshea bwoshea deleted the bwoshea:moving_refine_regions branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.