aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-03-08 18:38:25 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-08 09:38:25 -0800
commit0a64c2b8a42d766e5a893fcab2d4573b33cca74f (patch)
tree16f5979ff152251fc443f2e5ee67f929d6534228 /Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
parent7425721ccced342615c054ea8147fbdc484d6620 (diff)
downloadWarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.tar.gz
WarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.tar.zst
WarpX-0a64c2b8a42d766e5a893fcab2d4573b33cca74f.zip
Make error and info messages visually uniform (#2939)
* initial work to add msg formatter * wip * replace AMREX_ALWAYS_ASSERT_WITH_MESSAGE with WarpX equivalent
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
index 6d31116b6..ca26682a9 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
@@ -7,6 +7,7 @@
*/
#include "SpectralKSpace.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include <AMReX_BLassert.H>
@@ -38,7 +39,7 @@ SpectralKSpace::SpectralKSpace( const BoxArray& realspace_ba,
const RealVect realspace_dx )
: dx(realspace_dx) // Store the cell size as member `dx`
{
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
realspace_ba.ixType()==IndexType::TheCellType(),
"SpectralKSpace expects a cell-centered box.");
@@ -104,9 +105,9 @@ SpectralKSpace::getKComponent( const DistributionMapping& dm,
// Fill the k vector
IntVect fft_size = realspace_ba[mfi].length();
const Real dk = 2*MathConst::pi/(fft_size[i_dim]*dx[i_dim]);
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE( bx.smallEnd(i_dim) == 0,
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE( bx.smallEnd(i_dim) == 0,
"Expected box to start at 0, in spectral space.");
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE( bx.bigEnd(i_dim) == N-1,
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE( bx.bigEnd(i_dim) == N-1,
"Expected different box end index in spectral space.");
if (only_positive_k){
// Fill the full axis with positive k values
@@ -280,7 +281,7 @@ SpectralKSpace::getModifiedKComponent( const DistributionMapping& dm,
Vector<Real>
getFornbergStencilCoefficients(const int n_order, const bool nodal)
{
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(n_order % 2 == 0, "n_order must be even");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(n_order % 2 == 0, "n_order must be even");
const int m = n_order / 2;
Vector<Real> coefs;