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

[WIP] Rename Efield/Bfield to E/B #5315

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

RemiLehe
Copy link
Member

@RemiLehe RemiLehe commented Sep 24, 2024

This makes names shorter and more consistent.

This is a breaking change for Python users that access he E- and B-field directly by name.
Was, e.g.,:

.multifab("Efield_fp", ...)

is now:

.multifab("E_fp", ...)

For:

  • Efield_...
  • Bfield_...
  • .._fp, ..._cp, ..._aux, ..._cax, ..._fp_external, ..._avg_fp, ..._avg_cp

@ax3l ax3l added the changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults label Sep 24, 2024
@ax3l ax3l added the component: Python Python layer label Sep 24, 2024
Copy link
Member

@clarkse clarkse left a comment

Choose a reason for hiding this comment

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

Looks like a decent search and replace refactor. I am happy to not have to type the word 'field' nearly as often in the future.

@ax3l
Copy link
Member

ax3l commented Sep 25, 2024

@RemiLehe this needs a small update for merge conflicts please :)

In tests, it looks like only test_2d_embedded_circle.run is failing right now with

STEP 11 starts ...
terminate called after throwing an instance of 'std::runtime_error'
  what():  Assertion `flo * fhi <= T(0)' failed, file "/home/vsts/work/1/s/build/_deps/fetchedamrex-src/Src/Base/AMReX_Algorithm.H", line 116, Msg: "Error - calling bisect but lo and hi don't bracket a root."
SIGABRT

@@ -134,7 +134,7 @@ This example accesses the :math:`E_x(x,y,z)` field at level 0 after every time s
warpx = sim.extension.warpx

# data access
E_x_mf = warpx.multifab(f"Efield_fp[x][level=0]")
E_x_mf = warpx.multifab(f"E_fp[x][level=0]")
Copy link
Member

Choose a reason for hiding this comment

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

This should be changed to E_x_mf = warpx.multifab("E_fp", dir=0, level=0) in a later PR if not already fixed.

@RemiLehe RemiLehe changed the title Rename Efield/Bfield to E/B [WIP] Rename Efield/Bfield to E/B Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults component: Python Python layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants