Skip to content

Conversation

@tylerflex
Copy link
Collaborator

@tylerflex tylerflex commented Dec 14, 2021

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).

  • The coordinates are placed onto the simulation center and size specifications such that the midpoint of A (in terms of sum()) is located at simulation.center[axis].
  • If the sum() of A does not fully cover the simulation.size[axis], the first and last values of A are repeatedly added to the coords until filling up the domain.
  • The simulation size (and corresponding coordinates) is snapped down to include only coordinates that lie within (inclusive) the simulation center and size bounds.
  • If PML layers are included, the extreme (min and max) values of the snapped 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.

@tylerflex
Copy link
Collaborator Author

fixes #45

Copy link
Collaborator

@momchil-flex momchil-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tylerflex tylerflex merged commit 55c5490 into develop Dec 14, 2021
@tylerflex tylerflex deleted the nonuniform_grid branch December 14, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants