Continuous Device in addition to discrete device #18
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.
This pull request includes several changes to the
fdtdx
package, focusing on updating the device class structure and fixing some inconsistencies. The most important changes include replacing theDevice
class withDiscreteDevice
and introducing a new abstract base classBaseDevice
. Additionally, a new constraint moduleContinuousPermittivityTransition
has been added, and some minor typo corrections were made. I insist on separating the original device with continuous device due to the fact that in the future, support for multiple optimization scheme might be necessary, and I hope to maintain simplicity for each class (instead of having a lot of if-else statements). This allows for devices that has already been manually sub-pixel averaged to be simulated.Device Class Structure Update:
src/fdtdx/objects/multi_material/device.py
: Replaced theDevice
class withDiscreteDevice
and introduced an abstract base classBaseDevice
for better structure and flexibility. [1] [2]Device
in example files to useDiscreteDevice
instead. [1] [2] [3] [4] [5]New Constraint Module:
src/fdtdx/constraints/module.py
: Added a new constraint moduleContinuousPermittivityTransition
to enable smooth interpolation between materials.Typo Corrections:
src/fdtdx/objects/initialization.py
: Fixed multiple instances of the typo "Inconsisten" to "Inconsistent". [1] [2] [3] [4] [5] [6]Other Minor Changes:
src/fdtdx/objects/container.py
: Updated references fromDevice
toBaseDevice
in property methods. [1] [2]