aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/SpectralSolver')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralHankelTransform/HankelTransform.cpp3
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp9
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpaceRZ.cpp3
-rw-r--r--Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp16
4 files changed, 19 insertions, 12 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/HankelTransform.cpp b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/HankelTransform.cpp
index d6a357b7f..9d9089caf 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/HankelTransform.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralHankelTransform/HankelTransform.cpp
@@ -7,6 +7,7 @@
#include "HankelTransform.H"
#include "BesselRoots.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "WarpX.H"
@@ -23,7 +24,7 @@ HankelTransform::HankelTransform (int const hankel_order,
{
// Check that azimuthal_mode has a valid value
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(hankel_order-1 <= azimuthal_mode && azimuthal_mode <= hankel_order+1,
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(hankel_order-1 <= azimuthal_mode && azimuthal_mode <= hankel_order+1,
"azimuthal_mode must be either hankel_order-1, hankel_order or hankel_order+1");
amrex::Vector<amrex::Real> alphas;
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;
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpaceRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpaceRZ.cpp
index 133b2ef65..4b02d1b7e 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralKSpaceRZ.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralKSpaceRZ.cpp
@@ -4,6 +4,7 @@
*
* License: BSD-3-Clause-LBNL
*/
+#include "Utils/TextMsg.H"
#include "Utils/WarpXConst.H"
#include "SpectralKSpaceRZ.H"
@@ -22,7 +23,7 @@ SpectralKSpaceRZ::SpectralKSpaceRZ (const amrex::BoxArray& realspace_ba,
{
dx = realspace_dx; // Store the cell size as member `dx`
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
realspace_ba.ixType() == amrex::IndexType::TheCellType(),
"SpectralKSpaceRZ expects a cell-centered box.");
diff --git a/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp b/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp
index f612143be..676d4a5bb 100644
--- a/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp
+++ b/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp
@@ -7,6 +7,8 @@
#include "AnyFFT.H"
+#include "Utils/TextMsg.H"
+
namespace AnyFFT
{
@@ -35,7 +37,7 @@ namespace AnyFFT
result = cufftPlan2d(
&(fft_plan.m_plan), real_size[1], real_size[0], VendorR2C);
} else {
- amrex::Abort("only dim=2 and dim=3 have been implemented");
+ amrex::Abort(Utils::TextMsg::Err("only dim=2 and dim=3 have been implemented"));
}
} else {
if (dim == 3) {
@@ -45,13 +47,14 @@ namespace AnyFFT
result = cufftPlan2d(
&(fft_plan.m_plan), real_size[1], real_size[0], VendorC2R);
} else {
- amrex::Abort("only dim=2 and dim=3 have been implemented");
+ amrex::Abort(Utils::TextMsg::Err("only dim=2 and dim=3 have been implemented"));
}
}
if ( result != CUFFT_SUCCESS ) {
- amrex::Print() << " cufftplan failed! Error: " <<
- cufftErrorToString(result) << "\n";
+ amrex::Print() << Utils::TextMsg::Err(
+ "cufftplan failed! Error: "
+ + cufftErrorToString(result));
}
// Store meta-data in fft_plan
@@ -89,8 +92,9 @@ namespace AnyFFT
amrex::Abort("direction must be AnyFFT::direction::R2C or AnyFFT::direction::C2R");
}
if ( result != CUFFT_SUCCESS ) {
- amrex::Print() << " forward transform using cufftExec failed ! Error: " <<
- cufftErrorToString(result) << "\n";
+ amrex::Print() << Utils::TextMsg::Err(
+ "forward transform using cufftExec failed ! Error: "
+ +cufftErrorToString(result));
}
}