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

[mini]For RZ, added assert that periodicity is not set radially #1115

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,11 @@ WarpX::ReadParameters ()

// Only needs to be set with WARPX_DIM_RZ, otherwise defaults to 1
pp.query("n_rz_azimuthal_modes", n_rz_azimuthal_modes);

#if defined WARPX_DIM_RZ
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(Geom(0).isPeriodic(0) == 0,
Copy link
Member

Choose a reason for hiding this comment

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

Minor question, do we need to indicate that Geom() is from GetInstance()?

Suggested change
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(Geom(0).isPeriodic(0) == 0,
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(GetInstance().Geom(0).isPeriodic(0) == 0,

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. Geom is used earlier in this routine and I just copied that code. 'ReadParameters' is not a static routine so it has direct access to the attributes of the WarpX object. Compare this to CellSize which is declared static.

Copy link
Member

Choose a reason for hiding this comment

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

'ReadParameters' is not a static routine so it has direct access to the attributes of the WarpX object.
Thanks for explaining @dpgrote ! That does makes sense.

"The problem must not be periodic in the radial direction");
#endif
#if (defined WARPX_DIM_RZ) && (defined WARPX_USE_PSATD)
// Force do_nodal=true (that is, not staggered) and
// use same shape factors in all directions, for gathering
Expand Down