-
Notifications
You must be signed in to change notification settings - Fork 647
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
sim.chunk_layout is not accessible in Python if not specified at class instantiation time #1648
Labels
Comments
Probably the code would go in You may also need some refactoring in the |
ahoenselaar
added a commit
to ahoenselaar/meep
that referenced
this issue
Jul 2, 2021
* Store the binary partition - whether passed in externally or generated via `choose_chunkdivision` in `structure` and expose it via a getter. * Remove the unused default constructor of `structure`. * Remove a redundant copy constructor of `structure`. * Clean up the copy constructor `structure`. * Make `binary_partition` copyable. Prepares for making the BinaryPartition visible in Python (NanoComp#1648).
stevengj
pushed a commit
that referenced
this issue
Jul 2, 2021
* Store the binary partition - whether passed in externally or generated via `choose_chunkdivision` in `structure` and expose it via a getter. * Remove the unused default constructor of `structure`. * Remove a redundant copy constructor of `structure`. * Clean up the copy constructor `structure`. * Make `binary_partition` copyable. Prepares for making the BinaryPartition visible in Python (#1648).
bencbartlett
pushed a commit
to bencbartlett/meep
that referenced
this issue
Sep 9, 2021
* Store the binary partition - whether passed in externally or generated via `choose_chunkdivision` in `structure` and expose it via a getter. * Remove the unused default constructor of `structure`. * Remove a redundant copy constructor of `structure`. * Clean up the copy constructor `structure`. * Make `binary_partition` copyable. Prepares for making the BinaryPartition visible in Python (NanoComp#1648).
mawc2019
pushed a commit
to mawc2019/meep
that referenced
this issue
Nov 3, 2021
* Store the binary partition - whether passed in externally or generated via `choose_chunkdivision` in `structure` and expose it via a getter. * Remove the unused default constructor of `structure`. * Remove a redundant copy constructor of `structure`. * Clean up the copy constructor `structure`. * Make `binary_partition` copyable. Prepares for making the BinaryPartition visible in Python (NanoComp#1648).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a
meep.Simulation
object is created without specifyingchunk_layout
, then the default logic for choosing chunk divisions is invoked whensim.init_sim()
is called. However, thechunk_layout
attribute on the PythonSimulation
object is not updated to reflect this change and will still read asNone
.When converting from a Python
meep.BinaryPartition
object,py_bp_to_bp()
is called to convert the Python object into a C++ object. It would be useful to have the inverse operation present with abp_to_py_bp()
function, perhaps as a class construction method to live onmeep.BinaryPartition
. Then inSimulation._init_structure()
at line 1709, this function could be called to update theSimulation.chunk_layout
attribute:The text was updated successfully, but these errors were encountered: