Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearranging make_coords_initial and fixing symmetry bug in auto mesh #347

Merged
merged 6 commits into from
Apr 29, 2022

Conversation

momchil-flex
Copy link
Collaborator

  • The first structure in the structures list is the simulation, so the center and size can be taken from there - don't need to be passed
  • The symmetry on the other hand needs to be passed, because we need to truncate the domain to the symmetry quadrant when we do the auto meshing

interval_structs.insert(indmin, struct_list.copy())

indsmax = np.argwhere(bbox[1, 2] > interval_coords)
indmax = int(indsmax[-1])
Copy link
Collaborator

Choose a reason for hiding this comment

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

One possible issue here is the possibility of indsmax=[], which can arise e.g. when looking at mesh at x=0 but there is a structure of zero size along x and placed at x=0. I added the following lines to make it work, but not sure if it's correct,

if len(indsmax)==0:
              continue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this cannot happen, because previously we have made sure that only structures that are at least partially in the simulation domain are being meshed. Therefore, the "right" edge of a given structure has to be at least larger than the left edge of the simulation domain, which is the first element in interval_coords.

@momchil-flex momchil-flex merged commit 0777bd5 into develop Apr 29, 2022
@momchil-flex momchil-flex deleted the momchil/grid_spec_fixes branch June 18, 2022 23:35
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