forked from terrapower/armi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Grid to be ABC, intermediate StructuredGrid
Heavier lift, but the classes defined in `armi.reactor.grids` follow this inheritance pattern - `Grid(abc.ABC)` :: abstract interface for _a_ grid, or things that reside in space - `StructuredGrid(Grid)` :: still abstract, but for things that have some structure, known to ARMI as unit steps and bounds - `HexGrid(StructuredGrid)` - `CartesianGrid(StructuredGrid) - `ThetaRZGrid(StructuredGrid)` - though how "structured" is this really? - `AxialGrid(StructuredGrid)` In some cases, the shared interface between structured grids falls apart. For example, `HexGrid.pitch` returns a single float, while `CartesianGrid.pitch` is a 2-ple of float, one for x and one for y. And the concept of ring and position appears to be stressed since the inception of cartesian grids. But parts of ARMI require an interface and so an attempt was made to define that interface. The decision was made to not have `StructuredGrid` the base class, and to introduce `Grid` as the base intentionally. There are cases for some multiphysics codes where a grid may still be "structured" but not with the level of structure the previous `Grid` implementations expect. One example would be an irregular cartesian grid, where the unit cell spacing in one or more dimensions may change. So the cell spacing is a function of the cell position in that dimension.
- Loading branch information
1 parent
1df8cf1
commit a312849
Showing
8 changed files
with
900 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.