Skip to content

Commit

Permalink
fix warning and error strig
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Nov 15, 2023
1 parent 595177f commit a4a58d5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,12 +997,17 @@ WarpX::ReadParameters ()
bool fine_tag_hi_specified = utils::parser::queryArrWithParser(pp_warpx, "fine_tag_hi", hi);
std::string ref_patch_function;
bool parser_specified = pp_warpx.query("ref_patch_function(x,y,z)",ref_patch_function);
const std::string error_string = std::string( "For max_level > 0, you need to either set\
warpx.fine_tag_lo and warpx.fine_tag_hi\
or warpx.ref_patch_function(x,y,z)");
WARPX_ALWAYS_ASSERT_WITH_MESSAGE( ((fine_tag_lo_specified && fine_tag_hi_specified) ||
parser_specified ),
error_string);
"For max_level > 0, you need to either set\
warpx.fine_tag_lo and warpx.fine_tag_hi\
or warpx.ref_patch_function(x,y,z)");

if ( (fine_tag_lo_specified && fine_tag_hi_specified) && parser_specified) {
ablastr::warn_manager::WMRecordWarning("Refined patch", "Both fine_tag_lo,fine_tag_hi\
and ref_patch_function(x,y,z) are provided. Note that the ref_patch_function will\
override the fine_tag_lo/fine_tag_hi definition for the refined patches");
}
if (fine_tag_lo_specified && fine_tag_hi_specified) {
fine_tag_lo = RealVect{lo};
fine_tag_hi = RealVect{hi};
Expand Down

0 comments on commit a4a58d5

Please sign in to comment.