clawpack / amrclaw

AMR version of Clawpack
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
26 stars 45 forks source link

Flagregions to replace regions #258

Closed rjleveque closed 4 years ago

rjleveque commented 4 years ago

FlagRegion objects are more general but can include rectangles similar to old regions. Also allows "ruled rectangles", polygons that can be described by a set of x values and for each x a range of y values to include (or vice versa).

Some description and examples can be found at

These will be converted into new documentation pages.

A new examples/advection_2d_flagregions also illustrates this, and tests/advection_2d_square has been modified to test this. (others should be updated in the future).

The only library changes are to src/2d/flagregions2.f90 and src/2d/region_modules.f90.

For now original rectangular regions are still supported too, but eventually we plan to deprecate them. For now this is backwards compatible, and a new flagregions.data file is created along with regions.data.

Requires clawpack/clawutil#142 to create flagregions.data from setrun.py