Support for Nonuniform grid spec in grid_size #107
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still work in progress.
The components of
grid_size
now accept lists of non-negative floats in addition to non-negative floats.if list, the simulation.grid creation is augmented to include a boundary coordinate generation based on user specification of nonuniform mesh via grid_sizes.
The rules governing this generation are as specified as follows for a list of grid sizes along an axis (call this
A
).A
(in terms ofsum()
) is located atsimulation.center[axis]
.sum()
ofA
does not fully cover thesimulation.size[axis]
, the first and last values ofA
are repeatedly added to the coords until filling up the domain.A
are used to tile these layers on the beginning and end of the simulation.Please comment if you have a clarification or issues with this definition and see test to get a feeling for the expected output given my implementation in this PR.