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

Warning if a nonuniform custom medium is intersecting certain sources and monitors #1588

Merged
merged 1 commit into from
May 1, 2024

Conversation

weiliangjin2021
Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 commented Apr 8, 2024

Resolves #1373

  • Add is_spatially_uniform property to materials
  • Add is_uniform property to data array and unstructured dataset

@weiliangjin2021 weiliangjin2021 force-pushed the weiliang/custom_medium_validation branch from d2a7e6c to 6589c52 Compare April 8, 2024 23:52
Copy link
Collaborator

@tylerflex tylerflex 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 to me, thanks @weiliangjin2021 !

CHANGELOG.md Outdated Show resolved Hide resolved
@weiliangjin2021 weiliangjin2021 force-pushed the weiliang/custom_medium_validation branch 2 times, most recently from 40aef78 to 50fc403 Compare April 19, 2024 17:48
@momchil-flex momchil-flex added the 2.7 will go into version 2.7.* label Apr 23, 2024
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.

Hey, sorry, just now had a look at this, I have a small comment and then if you could please rebase to fix conflicts.

f"{len(mediums)} different mediums detected on plane "
f"intersecting a {monitor.type}. Plane must be homogeneous."
)
# if <=1 medium, check if the medium is spatially uniform
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to have 0 media? That kinda feels like something is wrong too, unless we're not taking the simulation background into account, but I think we are?

In other words not sure if we can remove the for mat in mediums and / or raise a different error if mediums is empty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It shouldn't be possible. An error has been raised now if 0 media.

"not supported."
)

# if <=1 medium, check if the medium is spatially uniform
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as above.

@weiliangjin2021 weiliangjin2021 force-pushed the weiliang/custom_medium_validation branch from 50fc403 to f3f2b99 Compare May 1, 2024 16:44
… and monitors

Add is_spatially_uniform property to materials

Add is_uniform property to data array and unstructured dataset
@weiliangjin2021 weiliangjin2021 force-pushed the weiliang/custom_medium_validation branch from f3f2b99 to e0af8d2 Compare May 1, 2024 18:14
@momchil-flex momchil-flex merged commit 3b3bc3f into pre/2.7 May 1, 2024
16 checks passed
@momchil-flex momchil-flex deleted the weiliang/custom_medium_validation branch May 1, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.7 will go into version 2.7.*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants