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

Python: sim.set_diag_iota_invariants() #476

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Nov 30, 2023

Expose the parameters for the IOTA nonlinear lens invariants diagnostics to Python.

Example usage before sim.evolve() call:

sim.set_diag_iota_invariants(
    alpha=0.0,
    beta=1.0,
    tn=0.4,
    cn=0.01
)

Expose the parameters for the IOTA nonlinear lens
invariants diagnostics to Python.

Example usage before `sim.evolve()` call:
```py
sim.set_diag_iota_invariants(
    alpha=0.0,
    beta=1.0,
    tn=0.4,
    cn=0.01
)
@ax3l ax3l added component: diagnostics all types of outputs component: python Python bindings labels Nov 30, 2023
@ax3l ax3l requested review from RTSandberg and cemitch99 November 30, 2023 23:21
@cemitch99
Copy link
Member

cemitch99 commented Nov 30, 2023

First attempt to use this in a Python script input yields for me the following run-time error:

sim.set_diag_iota_invariants(
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'impactx.impactx_pybind.ImpactX' object has no attribute 'set_diag_iota_invariants'
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
#000: H5T.c line 1963 in H5Tclose(): not a datatype
  major: Invalid arguments to routine
  minor: Inappropriate type
[HDF5] Internal error: Failed to close bool enum
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
#000: H5T.c line 1963 in H5Tclose(): not a datatype
  major: Invalid arguments to routine
  minor: Inappropriate type
[HDF5] Internal error: Failed to close complex float type
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
#000: H5T.c line 1963 in H5Tclose(): not a datatype
  major: Invalid arguments to routine
  minor: Inappropriate type
[HDF5] Internal error: Failed to close complex double type
HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
#000: H5T.c line 1963 in H5Tclose(): not a datatype
  major: Invalid arguments to routine
  minor: Inappropriate type
[HDF5] Internal error: Failed to close complex long double type

@ax3l
Copy link
Member Author

ax3l commented Dec 1, 2023

@cemitch99 I think something might not have worked on your install when you checked out this branch? This works for me locally without an error.

@ax3l
Copy link
Member Author

ax3l commented Dec 1, 2023

Pushed a test now :)

@ax3l ax3l enabled auto-merge (squash) December 1, 2023 02:07
@ax3l ax3l merged commit 4e8abf5 into ECP-WarpX:development Dec 1, 2023
13 checks passed
@ax3l ax3l deleted the topic-py-diag-iota-invariants branch December 1, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: diagnostics all types of outputs component: python Python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants