aboutsummaryrefslogtreecommitdiff
path: root/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-06-02 23:43:53 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-02 14:43:53 -0700
commit57564a09f01a13b315447d7ab942ddd18d1281af (patch)
tree60f8baf45df96160b05717c2c46298e1d82b85ff /Source/EmbeddedBoundary/WarpXFaceExtensions.cpp
parent81619e11b45c6621553e96601682c531c3cc49a3 (diff)
downloadWarpX-57564a09f01a13b315447d7ab942ddd18d1281af.tar.gz
WarpX-57564a09f01a13b315447d7ab942ddd18d1281af.tar.zst
WarpX-57564a09f01a13b315447d7ab942ddd18d1281af.zip
Move warning logger in ablastr (#3154)
* initial work to move the Warning Logger into ablastr * progress with warn manager class * moved Warning Logger in ablastr * fixed bugs * Fix: `SpectralFieldDataRZ.cpp` Missing include for `WarpX::getCosts(lev);` Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/EmbeddedBoundary/WarpXFaceExtensions.cpp')
-rw-r--r--Source/EmbeddedBoundary/WarpXFaceExtensions.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp b/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp
index 772cc9b46..dbfebda66 100644
--- a/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp
+++ b/Source/EmbeddedBoundary/WarpXFaceExtensions.cpp
@@ -5,17 +5,16 @@
* License: BSD-3-Clause-LBNL
*/
-#include "WarpX.H"
-
#include "WarpXFaceInfoBox.H"
-
#include "Utils/TextMsg.H"
+#include "WarpX.H"
+
+#include <ablastr/warn_manager/WarnManager.H>
#include <AMReX_Scan.H>
#include <AMReX_iMultiFab.H>
#include <AMReX_MultiFab.H>
-
/**
* \brief Get the value of arr in the neighbor (i_n, j_n) on the plane with normal 'dim'.
*
@@ -184,39 +183,39 @@ void
WarpX::ComputeFaceExtensions(){
#ifdef AMREX_USE_EB
amrex::Array1D<int, 0, 2> N_ext_faces = CountExtFaces();
- WarpX::RecordWarning("Embedded Boundary",
+ ablastr::warn_manager::WMRecordWarning("Embedded Boundary",
"Faces to be extended in x:\t" + std::to_string(N_ext_faces(0)) + "\n"
+"Faces to be extended in y:\t" + std::to_string(N_ext_faces(1)) + "\n"
+"Faces to be extended in z:\t" + std::to_string(N_ext_faces(2)),
- WarnPriority::low
+ ablastr::warn_manager::WarnPriority::low
);
InitBorrowing();
ComputeOneWayExtensions();
amrex::Array1D<int, 0, 2> N_ext_faces_after_one_way = CountExtFaces();
- WarpX::RecordWarning("Embedded Boundary",
+ ablastr::warn_manager::WMRecordWarning("Embedded Boundary",
"Faces to be extended after one way extension in x:\t"
+ std::to_string(N_ext_faces_after_one_way(0)) + "\n"
+"Faces to be extended after one way extension in y:\t"
+ std::to_string(N_ext_faces_after_one_way(1)) + "\n"
+"Faces to be extended after one way extension in z:\t"
+ std::to_string(N_ext_faces_after_one_way(2)),
- WarnPriority::low
+ ablastr::warn_manager::WarnPriority::low
);
ComputeEightWaysExtensions();
ShrinkBorrowing();
amrex::Array1D<int, 0, 2> N_ext_faces_after_eight_ways = CountExtFaces();
- WarpX::RecordWarning("Embedded Boundary",
+ ablastr::warn_manager::WMRecordWarning("Embedded Boundary",
"Faces to be extended after eight ways extension in x:\t"
+ std::to_string(N_ext_faces_after_eight_ways(0)) + "\n"
+"Faces to be extended after eight ways extension in y:\t"
+ std::to_string(N_ext_faces_after_eight_ways(1)) + "\n"
+"Faces to be extended after eight ways extension in z:\t"
+ std::to_string(N_ext_faces_after_eight_ways(2)),
- WarnPriority::low
+ ablastr::warn_manager::WarnPriority::low
);
bool using_bck = false;
@@ -242,13 +241,13 @@ WarpX::ComputeFaceExtensions(){
#endif
if(using_bck) {
- WarpX::RecordWarning("Embedded Boundary",
+ ablastr::warn_manager::WMRecordWarning("Embedded Boundary",
"Some faces could not be stabilized with the ECT and the BCK correction was used.\n"
"The BCK correction will be used for:\n"
"-" + std::to_string(N_ext_faces_after_eight_ways(0)) + " x-faces\n"
+ "-" + std::to_string(N_ext_faces_after_eight_ways(1)) + " y-faces\n"
+ "-" + std::to_string(N_ext_faces_after_eight_ways(2)) + " z-faces\n",
- WarnPriority::low
+ ablastr::warn_manager::WarnPriority::low
);
}
#endif