Skip to content

Commit

Permalink
Throw low priority warning when cleaning MR saying that only level 0 …
Browse files Browse the repository at this point in the history
…was cleaned.
  • Loading branch information
clarkse committed Aug 21, 2024
1 parent 7915c7b commit 3ed8c0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Regression/WarpX-tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ analysisRoutine = Examples/Tests/pec/analysis_pec.py
[PEC_field_mr]
buildDir = .
inputFile = Examples/Tests/pec/inputs_field_PEC_mr_3d
runtime_params =
runtime_params = warpx.abort_on_warning_threshold=medium
dim = 3
addToCompileString =
cmakeSetupOpts = -DWarpX_DIMS=3
Expand Down
9 changes: 8 additions & 1 deletion Source/Initialization/DivCleaner/ProjectionDivCleaner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ ProjectionDivCleaner::ProjectionDivCleaner(warpx::fields::FieldType a_field_type
}

auto& warpx = WarpX::GetInstance();
m_levels = warpx.finestLevel() + 1;

// Only div clean level 0
m_levels = 1;
if (warpx.finestLevel() > 0) {
ablastr::warn_manager::WMRecordWarning("Projection Div Cleaner",
"Multiple AMR levels detected, only first level has been cleaned.",
ablastr::warn_manager::WarnPriority::low);
}

m_solution.resize(m_levels);
m_source.resize(m_levels);
Expand Down

0 comments on commit 3ed8c0d

Please sign in to comment.