Comments (5)
@mjberger and I also just discussed the possibility of specifying that the finest level(s) should be frozen beyond some time, after which re-gridding is never done for these level(s). This would be useful e.g. in GeoClaw simulations where the finest levels cover a fixed coastal region at very fine resolution, and frequent re-gridding is both expensive and unnecessary. This may take a bit of work to implement but should be possible.
from amrclaw.
See clawpack/geoclaw#454 for a related suggestion in GeoClaw, eliminating the automatic creation of regions corresponding to each topo or dtopo file.
from amrclaw.
Another suggestion: I think in setrun.py, in addition to e.g.
amrdata.amr_levels_max = 3
we should also have something like:
amrdata.amr_levels_max_outside_flagregions = 2
as the default maximum refinement level in portions of the computational domain not covered by any flagregion.
This would be equivalent to specifying a flagregion with spatial extent covering the entire domain and with minlevel = 1, maxlevel = 2
(in the case shown above), but without having to specify a flagregion. This would be convenient and also perhaps clearer to the user.
Currently the default is that any level up to amr_levels_max
is allowed for any cell that is not in any flagregion (whether the cell is flagged or not then depends on other criteria such as flag2refine or Richardson).
Sometimes this is what one wants, but often not. In particular, if the finest levels are only intended to be used in a small part of the domain (e.g. one coastal site for a tsunami simulation) then there might be a flagregion that forces refinement to this level in a small region, but another flagregion would have to be introduced to forbid refinement to this level elsewhere, regardless of the size of wave.
from amrclaw.
For the former suggestion were you thinking of specifying a time at which a level would be frozen?
from amrclaw.
@mandli: Yes, it would be good to be able to specify a time at which each level is frozen. Perhaps we could allow this to also vary with level, with default time infinity, and with the requirement that frozen_time[L+1] <= frozen_time[L]
since if a level is frozen then all finer levels must also be frozen.
For the tsunami application I mentioned, we often have a finest level with minlevel==maxlevel
but that doesn't turn on until some time time t1
just before we expect the tsunami to arrive (based on coarse exploratory runs) and so it would be natural to freeze at time t1
.
However, one potentially tricky issue is that the regridding that introduces this finest grid will not in general happen exactly at time t1
, but only at the next regridding time after t1
. So it has to do this regridding to introduce the fine level in the first place before it is frozen, and hence it's not enough to check if t > frozen_time
when deciding whether to regrid this level, at least not if the user sets frozen_time = t1
. If the user is aware of this they could specify a frozen_time
somewhat larger than t1
, if they know how much larger it needs to be (to guarantee that at least one regridding happened between t1
and this time), or we could try to automate this by keeping track of whether it has already regridded after frozen_time
and only freezing it after the first regridding following frozen_time
.
Or since in general there would probably only be one such time for each run (or very few at least), we could force the code to adjust the time step if need to hit that time exactly (as we do for output times) and then force a regridding at exactly that time and freeze afterwards.
None of these is a perfect solution, but could be workable.
from amrclaw.
Related Issues (20)
- Remove extraneous function variations
- Remove fixed number of grids
- Add generalized aux variable setting by multiple files HOT 1
- Add example for new gauge output formats
- subroutine outlev in src/2d needed? HOT 1
- clean up tick.f and sync up 1d, 2d, 3d
- 7 nosetests fail when trap uninitialized variable flag is on, due to num_dim in valout.f90 HOT 1
- Add UNSET option to amrflags in 3d code
- Binary output : writing out ghost cells? HOT 11
- Adding new limiters? HOT 4
- Remove `do` loops that do not have a `continue` or `end do`
- Strange output for timing results HOT 5
- Gauge info not used in 1d
- Remove "free list" output to the console
- Timer Initialization in 1D is a Mess
- Remove `output_format == 4` option (hdf and/or netcdf)? HOT 1
- Does binary output need to call `bound` for ghost cells? HOT 2
- Add a Burgers' equation 1D example
- add some plotting to 3d examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amrclaw.