Skip to content

Commit

Permalink
Adding checks to make sure Hybrid external field loading is skipped w…
Browse files Browse the repository at this point in the history
…hen not enabled.

Signed-off-by: S. Eric Clark <[email protected]>
  • Loading branch information
clarkse committed Sep 26, 2024
1 parent ae4fc4e commit e31b639
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ void HybridPICModel::InitData ()
// if the current is time dependent which is what needs to be done to
// write time independent fields on the first step.
GetCurrentExternal(true);
GetFieldsExternal(warpx.gett_new(0));
if (m_add_external_fields)
GetFieldsExternal(warpx.gett_new(0));
}

void HybridPICModel::GetCurrentExternal (bool skip_check /*=false*/)
Expand All @@ -301,6 +302,8 @@ void HybridPICModel::GetCurrentExternal (bool skip_check /*=false*/)

void HybridPICModel::GetFieldsExternal (amrex::Real t)
{
if (!m_add_external_fields) return;

using ablastr::fields::Direction;
auto& warpx = WarpX::GetInstance();

Expand Down

0 comments on commit e31b639

Please sign in to comment.