aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles')
-rw-r--r--Source/Particles/Collision/BackgroundMCC/MCCProcess.cpp4
-rw-r--r--Source/Particles/Collision/BinaryCollision/BinaryCollision.H3
-rw-r--r--Source/Particles/Collision/BinaryCollision/BinaryCollisionUtils.cpp8
-rw-r--r--Source/Particles/Collision/BinaryCollision/NuclearFusion/NuclearFusionFunc.H2
-rw-r--r--Source/Particles/Collision/BinaryCollision/ParticleCreationFunc.cpp3
-rw-r--r--Source/Particles/Collision/CollisionHandler.cpp2
-rw-r--r--Source/Particles/Deposition/CurrentDeposition.H7
-rw-r--r--Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp4
-rw-r--r--Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp4
-rw-r--r--Source/Particles/ElementaryProcess/QEDSchwingerProcess.H3
-rw-r--r--Source/Particles/LaserParticleContainer.cpp2
-rw-r--r--Source/Particles/MultiParticleContainer.cpp43
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp4
-rw-r--r--Source/Particles/Resampling/Resampling.cpp3
-rw-r--r--Source/Particles/ShapeFactors.H6
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp6
16 files changed, 59 insertions, 45 deletions
diff --git a/Source/Particles/Collision/BackgroundMCC/MCCProcess.cpp b/Source/Particles/Collision/BackgroundMCC/MCCProcess.cpp
index 0f6dae3bc..0451f62be 100644
--- a/Source/Particles/Collision/BackgroundMCC/MCCProcess.cpp
+++ b/Source/Particles/Collision/BackgroundMCC/MCCProcess.cpp
@@ -97,14 +97,14 @@ MCCProcess::readCrossSectionFile (
amrex::Gpu::HostVector<amrex::ParticleReal>& sigmas )
{
std::ifstream infile(cross_section_file);
- if(!infile.is_open()) amrex::Abort("Failed to open cross-section data file");
+ if(!infile.is_open()) WARPX_ABORT_WITH_MESSAGE("Failed to open cross-section data file");
amrex::ParticleReal energy, sigma;
while (infile >> energy >> sigma) {
energies.push_back(energy);
sigmas.push_back(sigma);
}
- if (infile.bad()) amrex::Abort("Failed to read cross-section data from file.");
+ if (infile.bad()) WARPX_ABORT_WITH_MESSAGE("Failed to read cross-section data from file.");
infile.close();
}
diff --git a/Source/Particles/Collision/BinaryCollision/BinaryCollision.H b/Source/Particles/Collision/BinaryCollision/BinaryCollision.H
index 2c1cdc689..ea439a071 100644
--- a/Source/Particles/Collision/BinaryCollision/BinaryCollision.H
+++ b/Source/Particles/Collision/BinaryCollision/BinaryCollision.H
@@ -18,6 +18,7 @@
#include "Particles/MultiParticleContainer.H"
#include "Particles/WarpXParticleContainer.H"
#include "Utils/ParticleUtils.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "WarpX.H"
@@ -87,7 +88,7 @@ public:
: CollisionBase(collision_name)
{
if(m_species_names.size() != 2)
- amrex::Abort("Binary collision " + collision_name + " must have exactly two species.");
+ WARPX_ABORT_WITH_MESSAGE("Binary collision " + collision_name + " must have exactly two species.");
if (m_species_names[0] == m_species_names[1])
m_isSameSpecies = true;
diff --git a/Source/Particles/Collision/BinaryCollision/BinaryCollisionUtils.cpp b/Source/Particles/Collision/BinaryCollision/BinaryCollisionUtils.cpp
index d7cc754d0..c94cd8812 100644
--- a/Source/Particles/Collision/BinaryCollision/BinaryCollisionUtils.cpp
+++ b/Source/Particles/Collision/BinaryCollision/BinaryCollisionUtils.cpp
@@ -63,7 +63,7 @@ namespace BinaryCollisionUtils{
||(product_species1.AmIA<PhysicalSpecies::hydrogen1>() && product_species2.AmIA<PhysicalSpecies::hydrogen3>())){
return NuclearFusionType::DeuteriumDeuteriumToProtonTritium;
} else {
- amrex::Abort("ERROR: Product species of deuterium-deuterium fusion must be of type helium3 and neutron, or tritium and proton");
+ WARPX_ABORT_WITH_MESSAGE("ERROR: Product species of deuterium-deuterium fusion must be of type helium3 and neutron, or tritium and proton");
}
}
else if ((species1.AmIA<PhysicalSpecies::hydrogen2>() && species2.AmIA<PhysicalSpecies::helium3>())
@@ -97,7 +97,7 @@ namespace BinaryCollisionUtils{
"ERROR: Product species of proton-boron fusion must be of type alpha");
return NuclearFusionType::ProtonBoronToAlphas;
}
- amrex::Abort("Binary nuclear fusion not implemented between species " +
+ WARPX_ABORT_WITH_MESSAGE("Binary nuclear fusion not implemented between species " +
species_names[0] + " of type " + species1.getSpeciesTypeName() +
" and species " + species_names[1] + " of type " +
species2.getSpeciesTypeName());
@@ -114,7 +114,7 @@ namespace BinaryCollisionUtils{
NuclearFusionType fusion_type = get_nuclear_fusion_type(collision_name, mypc);
return nuclear_fusion_type_to_collision_type(fusion_type);
}
- amrex::Abort(type + " is not a valid type of collision that creates new particles");
+ WARPX_ABORT_WITH_MESSAGE(type + " is not a valid type of collision that creates new particles");
return CollisionType::Undefined;
}
@@ -130,7 +130,7 @@ namespace BinaryCollisionUtils{
return CollisionType::DeuteriumHeliumToProtonHeliumFusion;
if (fusion_type == NuclearFusionType::ProtonBoronToAlphas)
return CollisionType::ProtonBoronToAlphasFusion;
- amrex::Abort("Invalid nuclear fusion type");
+ WARPX_ABORT_WITH_MESSAGE("Invalid nuclear fusion type");
return CollisionType::Undefined;
}
}
diff --git a/Source/Particles/Collision/BinaryCollision/NuclearFusion/NuclearFusionFunc.H b/Source/Particles/Collision/BinaryCollision/NuclearFusion/NuclearFusionFunc.H
index 2dcbe22e9..c4e769d2c 100644
--- a/Source/Particles/Collision/BinaryCollision/NuclearFusion/NuclearFusionFunc.H
+++ b/Source/Particles/Collision/BinaryCollision/NuclearFusion/NuclearFusionFunc.H
@@ -59,7 +59,7 @@ public:
using namespace amrex::literals;
#ifdef AMREX_SINGLE_PRECISION_PARTICLES
- amrex::Abort("Nuclear fusion module does not currently work with single precision");
+ WARPX_ABORT_WITH_MESSAGE("Nuclear fusion module does not currently work with single precision");
#endif
m_fusion_type = BinaryCollisionUtils::get_nuclear_fusion_type(collision_name, mypc);
diff --git a/Source/Particles/Collision/BinaryCollision/ParticleCreationFunc.cpp b/Source/Particles/Collision/BinaryCollision/ParticleCreationFunc.cpp
index 3b1951107..f1efb9716 100644
--- a/Source/Particles/Collision/BinaryCollision/ParticleCreationFunc.cpp
+++ b/Source/Particles/Collision/BinaryCollision/ParticleCreationFunc.cpp
@@ -9,6 +9,7 @@
#include "BinaryCollisionUtils.H"
#include "Particles/MultiParticleContainer.H"
+#include "Utils/TextMsg.H"
#include <AMReX_GpuContainers.H>
#include <AMReX_ParmParse.H>
@@ -49,7 +50,7 @@ ParticleCreationFunc::ParticleCreationFunc (const std::string collision_name,
}
else
{
- amrex::Abort("Unknown collision type in ParticleCreationFunc");
+ WARPX_ABORT_WITH_MESSAGE("Unknown collision type in ParticleCreationFunc");
}
#ifdef AMREX_USE_GPU
diff --git a/Source/Particles/Collision/CollisionHandler.cpp b/Source/Particles/Collision/CollisionHandler.cpp
index e8f25a78b..a6bcbbf46 100644
--- a/Source/Particles/Collision/CollisionHandler.cpp
+++ b/Source/Particles/Collision/CollisionHandler.cpp
@@ -58,7 +58,7 @@ CollisionHandler::CollisionHandler(MultiParticleContainer const * const mypc)
collision_names[i], mypc);
}
else{
- amrex::Abort("Unknown collision type.");
+ WARPX_ABORT_WITH_MESSAGE("Unknown collision type.");
}
}
diff --git a/Source/Particles/Deposition/CurrentDeposition.H b/Source/Particles/Deposition/CurrentDeposition.H
index bf5b9e393..a3cb5e21f 100644
--- a/Source/Particles/Deposition/CurrentDeposition.H
+++ b/Source/Particles/Deposition/CurrentDeposition.H
@@ -12,6 +12,7 @@
#include "ablastr/parallelization/KernelTimer.H"
#include "Particles/Pusher/GetAndSetPosition.H"
#include "Particles/ShapeFactors.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXConst.H"
#ifdef WARPX_DIM_RZ
@@ -541,7 +542,7 @@ void doDepositionSharedShapeN (const GetParticlePosition& GetPosition,
// using HIP/CUDA, and those things are checked prior
//don't use any args
ignore_unused( GetPosition, wp, uxp, uyp, uzp, ion_lev, jx_fab, jy_fab, jz_fab, np_to_depose, relative_time, dx, xyzmin, lo, q, n_rz_azimuthal_modes, cost, load_balance_costs_update_algo, a_bins, box, geom, a_tbox_max_size);
- amrex::Abort("Shared memory only implemented for HIP/CUDA");
+ WARPX_ABORT_WITH_MESSAGE("Shared memory only implemented for HIP/CUDA");
#endif
}
@@ -974,14 +975,14 @@ void doVayDepositionShapeN (const GetParticlePosition& GetPosition,
amrex::ignore_unused(GetPosition,
wp, uxp, uyp, uzp, ion_lev, Dx_fab, Dy_fab, Dz_fab,
np_to_depose, dt, relative_time, dx, xyzmin, lo, q, n_rz_azimuthal_modes);
- amrex::Abort("Vay deposition not implemented in RZ geometry");
+ WARPX_ABORT_WITH_MESSAGE("Vay deposition not implemented in RZ geometry");
#endif
#if defined(WARPX_DIM_1D_Z)
amrex::ignore_unused(GetPosition,
wp, uxp, uyp, uzp, ion_lev, Dx_fab, Dy_fab, Dz_fab,
np_to_depose, dt, relative_time, dx, xyzmin, lo, q, n_rz_azimuthal_modes);
- amrex::Abort("Vay deposition not implemented in cartesian 1D geometry");
+ WARPX_ABORT_WITH_MESSAGE("Vay deposition not implemented in cartesian 1D geometry");
#endif
#if !defined(AMREX_USE_GPU)
diff --git a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp
index 9cc9ba25a..249e35f6f 100644
--- a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp
+++ b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp
@@ -6,6 +6,8 @@
*/
#include "BreitWheelerEngineWrapper.H"
+#include "Utils/TextMsg.H"
+
#include <AMReX.H>
#include <AMReX_BLassert.H>
#include <AMReX_GpuDevice.H>
@@ -153,7 +155,7 @@ void BreitWheelerEngine::compute_lookup_tables (
m_lookup_tables_initialized = true;
#else
amrex::ignore_unused(ctrl, bw_minimum_chi_phot);
- amrex::Abort("WarpX was not compiled with table generation support!");
+ WARPX_ABORT_WITH_MESSAGE("WarpX was not compiled with table generation support!");
#endif
}
diff --git a/Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp b/Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp
index 3bb02f27e..280c1cfd4 100644
--- a/Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp
+++ b/Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp
@@ -6,6 +6,8 @@
*/
#include "QuantumSyncEngineWrapper.H"
+#include "Utils/TextMsg.H"
+
#include <AMReX.H>
#include <AMReX_BLassert.H>
#include <AMReX_GpuDevice.H>
@@ -152,7 +154,7 @@ void QuantumSynchrotronEngine::compute_lookup_tables (
m_lookup_tables_initialized = true;
#else
amrex::ignore_unused(ctrl, qs_minimum_chi_part);
- amrex::Abort("WarpX was not compiled with table generation support!");
+ WARPX_ABORT_WITH_MESSAGE("WarpX was not compiled with table generation support!");
#endif
}
diff --git a/Source/Particles/ElementaryProcess/QEDSchwingerProcess.H b/Source/Particles/ElementaryProcess/QEDSchwingerProcess.H
index 53f515d06..cab63b967 100644
--- a/Source/Particles/ElementaryProcess/QEDSchwingerProcess.H
+++ b/Source/Particles/ElementaryProcess/QEDSchwingerProcess.H
@@ -9,6 +9,7 @@
#define QED_SCHWINGER_PROCESS_H_
#include "Particles/ElementaryProcess/QEDInternals/SchwingerProcessWrapper.H"
+#include "Utils/TextMsg.H"
/**
* This structure is a functor which calls getSchwingerProductionNumber to
@@ -82,7 +83,7 @@ struct SchwingerTransformFunc
for (int n = 0; n < N; ++n){
#if defined(WARPX_DIM_1D_Z)
amrex::ignore_unused(dst1, dst2, i_dst1, i_dst2, N, total_weight);
- amrex::Abort("SchwingerTransformFunc not implemented in 1D");
+ WARPX_ABORT_WITH_MESSAGE("SchwingerTransformFunc not implemented in 1D");
#elif defined(WARPX_DIM_3D)
dst1.m_rdata[m_weight_index][i_dst1+n] = total_weight/N;
dst2.m_rdata[m_weight_index][i_dst2+n] = total_weight/N;
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp
index fbf61d579..8221683c1 100644
--- a/Source/Particles/LaserParticleContainer.cpp
+++ b/Source/Particles/LaserParticleContainer.cpp
@@ -158,7 +158,7 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
//Check if profile exists
if(laser_profiles_dictionary.count(laser_type_s) == 0 ){
- amrex::Abort(std::string("Unknown laser type: ").append(laser_type_s));
+ WARPX_ABORT_WITH_MESSAGE(std::string("Unknown laser type: ").append(laser_type_s));
}
m_up_laser_profile = laser_profiles_dictionary.at(laser_type_s)();
//__________
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index e397d1aa8..f0f416b60 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -33,6 +33,7 @@
#include "Particles/WarpXParticleContainer.H"
#include "SpeciesPhysicalProperties.H"
#include "Utils/Parser/ParserUtils.H"
+#include "Utils/TextMsg.H"
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXProfilerWrapper.H"
#include "Utils/WarpXUtil.H"
@@ -1031,7 +1032,7 @@ void MultiParticleContainer::InitQuantumSync ()
pp_qed_qs.query("lookup_table_mode", lookup_table_mode);
if(lookup_table_mode.empty()){
- amrex::Abort("Quantum Synchrotron table mode should be provided");
+ WARPX_ABORT_WITH_MESSAGE("Quantum Synchrotron table mode should be provided");
}
if(lookup_table_mode == "generate"){
@@ -1039,7 +1040,7 @@ void MultiParticleContainer::InitQuantumSync ()
"A new Quantum Synchrotron table will be generated.",
ablastr::warn_manager::WarnPriority::low);
#ifndef WARPX_QED_TABLE_GEN
- amrex::Error("Error: Compile with QED_TABLE_GEN=TRUE to enable table generation!\n");
+ WARPX_ABORT_WITH_MESSAGE("Error: Compile with QED_TABLE_GEN=TRUE to enable table generation!\n");
#else
QuantumSyncGenerateTable();
#endif
@@ -1051,7 +1052,7 @@ void MultiParticleContainer::InitQuantumSync ()
"The Quantum Synchrotron table will be read from the file: " + load_table_name,
ablastr::warn_manager::WarnPriority::low);
if(load_table_name.empty()){
- amrex::Abort("Quantum Synchrotron table name should be provided");
+ WARPX_ABORT_WITH_MESSAGE("Quantum Synchrotron table name should be provided");
}
Vector<char> table_data;
ParallelDescriptor::ReadAndBcastFile(load_table_name, table_data);
@@ -1067,12 +1068,12 @@ void MultiParticleContainer::InitQuantumSync ()
m_shr_p_qs_engine->init_builtin_tables(qs_minimum_chi_part);
}
else{
- amrex::Abort("Unknown Quantum Synchrotron table mode");
+ WARPX_ABORT_WITH_MESSAGE("Unknown Quantum Synchrotron table mode");
}
- if(!m_shr_p_qs_engine->are_lookup_tables_initialized()){
- amrex::Abort("Table initialization has failed!");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ m_shr_p_qs_engine->are_lookup_tables_initialized(),
+ "Table initialization has failed!");
}
void MultiParticleContainer::InitBreitWheeler ()
@@ -1085,11 +1086,11 @@ void MultiParticleContainer::InitBreitWheeler ()
// the optical depth is not evolved and photon generation is ignored
amrex::Real bw_minimum_chi_part;
if(!utils::parser::queryWithParser(pp_qed_bw, "chi_min", bw_minimum_chi_part))
- amrex::Abort("qed_bw.chi_min should be provided!");
+ WARPX_ABORT_WITH_MESSAGE("qed_bw.chi_min should be provided!");
pp_qed_bw.query("lookup_table_mode", lookup_table_mode);
if(lookup_table_mode.empty()){
- amrex::Abort("Breit Wheeler table mode should be provided");
+ WARPX_ABORT_WITH_MESSAGE("Breit Wheeler table mode should be provided");
}
if(lookup_table_mode == "generate"){
@@ -1109,7 +1110,7 @@ void MultiParticleContainer::InitBreitWheeler ()
"The Breit Wheeler table will be read from the file:" + load_table_name,
ablastr::warn_manager::WarnPriority::low);
if(load_table_name.empty()){
- amrex::Abort("Breit Wheeler table name should be provided");
+ WARPX_ABORT_WITH_MESSAGE("Breit Wheeler table name should be provided");
}
Vector<char> table_data;
ParallelDescriptor::ReadAndBcastFile(load_table_name, table_data);
@@ -1125,12 +1126,12 @@ void MultiParticleContainer::InitBreitWheeler ()
m_shr_p_bw_engine->init_builtin_tables(bw_minimum_chi_part);
}
else{
- amrex::Abort("Unknown Breit Wheeler table mode");
+ WARPX_ABORT_WITH_MESSAGE("Unknown Breit Wheeler table mode");
}
- if(!m_shr_p_bw_engine->are_lookup_tables_initialized()){
- amrex::Abort("Table initialization has failed!");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ m_shr_p_bw_engine->are_lookup_tables_initialized(),
+ "Table initialization has failed!");
}
void
@@ -1139,8 +1140,9 @@ MultiParticleContainer::QuantumSyncGenerateTable ()
ParmParse pp_qed_qs("qed_qs");
std::string table_name;
pp_qed_qs.query("save_table_in", table_name);
- if(table_name.empty())
- amrex::Abort("qed_qs.save_table_in should be provided!");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ !table_name.empty(),
+ "qed_qs.save_table_in should be provided!");
// qs_minimum_chi_part is the minimum chi parameter to be
// considered for Synchrotron emission. If a lepton has chi < chi_min,
@@ -1228,8 +1230,9 @@ MultiParticleContainer::BreitWheelerGenerateTable ()
ParmParse pp_qed_bw("qed_bw");
std::string table_name;
pp_qed_bw.query("save_table_in", table_name);
- if(table_name.empty())
- amrex::Abort("qed_bw.save_table_in should be provided!");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ !table_name.empty(),
+ "qed_bw.save_table_in should be provided!");
// bw_minimum_chi_phot is the minimum chi parameter to be
// considered for pair production. If a photon has chi < chi_min,
@@ -1326,10 +1329,10 @@ MultiParticleContainer::doQEDSchwinger ()
"ERROR: Schwinger process not implemented with mesh refinement");
#ifdef WARPX_DIM_RZ
- amrex::Abort("Schwinger process not implemented in rz geometry");
+ WARPX_ABORT_WITH_MESSAGE("Schwinger process not implemented in rz geometry");
#endif
#ifdef WARPX_DIM_1D_Z
- amrex::Abort("Schwinger process not implemented in 1D geometry");
+ WARPX_ABORT_WITH_MESSAGE("Schwinger process not implemented in 1D geometry");
#endif
// Get cell volume. In 2D the transverse size is
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 0c9b7ce69..60a5afbeb 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -375,13 +375,13 @@ PhysicalParticleContainer::BackwardCompatibility ()
ParmParse pp_species_name(species_name);
std::vector<std::string> backward_strings;
if (pp_species_name.queryarr("plot_vars", backward_strings)){
- amrex::Abort("<species>.plot_vars is not supported anymore. "
+ WARPX_ABORT_WITH_MESSAGE("<species>.plot_vars is not supported anymore. "
"Please use the new syntax for diagnostics, see documentation.");
}
int backward_int;
if (pp_species_name.query("plot_species", backward_int)){
- amrex::Abort("<species>.plot_species is not supported anymore. "
+ WARPX_ABORT_WITH_MESSAGE("<species>.plot_species is not supported anymore. "
"Please use the new syntax for diagnostics, see documentation.");
}
}
diff --git a/Source/Particles/Resampling/Resampling.cpp b/Source/Particles/Resampling/Resampling.cpp
index 2034f291c..66bff5ac5 100644
--- a/Source/Particles/Resampling/Resampling.cpp
+++ b/Source/Particles/Resampling/Resampling.cpp
@@ -7,6 +7,7 @@
#include "Resampling.H"
#include "LevelingThinning.H"
+#include "Utils/TextMsg.H"
#include <AMReX.H>
#include <AMReX_ParmParse.H>
@@ -22,7 +23,7 @@ Resampling::Resampling (const std::string species_name)
m_resampling_algorithm = std::make_unique<LevelingThinning>(species_name);
}
else
- { amrex::Abort("Unknown resampling algorithm."); }
+ { WARPX_ABORT_WITH_MESSAGE("Unknown resampling algorithm."); }
m_resampling_trigger = ResamplingTrigger(species_name);
}
diff --git a/Source/Particles/ShapeFactors.H b/Source/Particles/ShapeFactors.H
index 647e48cf8..60e54b5d5 100644
--- a/Source/Particles/ShapeFactors.H
+++ b/Source/Particles/ShapeFactors.H
@@ -7,6 +7,8 @@
#ifndef SHAPEFACTORS_H_
#define SHAPEFACTORS_H_
+#include "Utils/TextMsg.H"
+
#include <AMReX.H>
#include <AMReX_GpuQualifiers.H>
@@ -63,7 +65,7 @@ struct Compute_shape_factor
return j-1;
}
else{
- amrex::Abort("Unknown particle shape selected in Compute_shape_factor");
+ WARPX_ABORT_WITH_MESSAGE("Unknown particle shape selected in Compute_shape_factor");
amrex::ignore_unused(sx, xmid);
}
return 0;
@@ -117,7 +119,7 @@ struct Compute_shifted_shape_factor
return i - 1;
}
else{
- amrex::Abort("Unknown particle shape selected in Compute_shifted_shape_factor");
+ WARPX_ABORT_WITH_MESSAGE("Unknown particle shape selected in Compute_shifted_shape_factor");
amrex::ignore_unused(sx, x_old, i_new);
}
return 0;
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index b6e33180a..87bbff624 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -445,7 +445,7 @@ WarpXParticleContainer::DepositCurrent (WarpXParIter& pti,
if (WarpX::current_deposition_algo == CurrentDepositionAlgo::Esirkepov) {
if (WarpX::grid_type == GridType::Collocated) {
- amrex::Abort("The Esirkepov algorithm cannot be used with a collocated grid.");
+ WARPX_ABORT_WITH_MESSAGE("The Esirkepov algorithm cannot be used with a collocated grid.");
}
}
@@ -503,10 +503,10 @@ WarpXParticleContainer::DepositCurrent (WarpXParIter& pti,
// Now pick current deposition algorithm
if (WarpX::current_deposition_algo == CurrentDepositionAlgo::Esirkepov) {
- amrex::Abort("Cannot do shared memory deposition with Esirkepov algorithm");
+ WARPX_ABORT_WITH_MESSAGE("Cannot do shared memory deposition with Esirkepov algorithm");
}
else if (WarpX::current_deposition_algo == CurrentDepositionAlgo::Vay) {
- amrex::Abort("Cannot do shared memory deposition with Vay algorithm");
+ WARPX_ABORT_WITH_MESSAGE("Cannot do shared memory deposition with Vay algorithm");
}
else {
WARPX_PROFILE_VAR_START(direct_current_dep_kernel);