Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 54c163ba authored by snuverink_j's avatar snuverink_j
Browse files

replace BL_ASSERT with PAssert

parent 26c45c26
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
#include "Algorithms/AmrPartBunch.h" #include "Algorithms/AmrPartBunch.h"
#include "Structure/FieldSolver.h" #include "Structure/FieldSolver.h"
#include "Solvers/PoissonSolver.h" #include "Solvers/PoissonSolver.h"
#include "Utility/PAssert.h"
#include "Amr/AmrYtWriter.h" #include "Amr/AmrYtWriter.h"
#include <AMReX_MultiFabUtil.H> #include <AMReX_MultiFabUtil.H>
#include <AMReX_ParmParse.H> // used in initialize function #include <AMReX_ParmParse.H> // used in initialize function
...@@ -721,7 +722,7 @@ void AmrBoxLib::doRegrid_m(int lbase, double time) { ...@@ -721,7 +722,7 @@ void AmrBoxLib::doRegrid_m(int lbase, double time) {
MakeNewGrids(lbase, time, new_finest, new_grids); MakeNewGrids(lbase, time, new_finest, new_grids);
BL_ASSERT(new_finest <= finest_level+1); PAssert(new_finest <= finest_level+1);
for (int lev = lbase+1; lev <= new_finest; ++lev) for (int lev = lbase+1; lev <= new_finest; ++lev)
{ {
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "BoxLibLayout.h" #include "BoxLibLayout.h"
#include "Message/Formatter.h" #include "Message/Formatter.h"
#include "Utility/PAssert.h"
#include "Utilities/OpalException.h" #include "Utilities/OpalException.h"
#include <cmath> #include <cmath>
...@@ -472,7 +473,7 @@ void BoxLibLayout<T, Dim>::buildLevelMask(int lev, const int ncells) { ...@@ -472,7 +473,7 @@ void BoxLibLayout<T, Dim>::buildLevelMask(int lev, const int ncells) {
template <class T, unsigned Dim> template <class T, unsigned Dim>
void BoxLibLayout<T, Dim>::clearLevelMask(int lev) { void BoxLibLayout<T, Dim>::clearLevelMask(int lev) {
BL_ASSERT(lev < (int)masks_m.size()); PAssert(lev < (int)masks_m.size());
masks_m[lev].reset(nullptr); masks_m[lev].reset(nullptr);
} }
...@@ -547,9 +548,9 @@ bool BoxLibLayout<T, Dim>::Where(AmrParticleBase< BoxLibLayout<T,Dim> >& p, ...@@ -547,9 +548,9 @@ bool BoxLibLayout<T, Dim>::Where(AmrParticleBase< BoxLibLayout<T,Dim> >& p,
if (lev_max == -1) if (lev_max == -1)
lev_max = finestLevel(); lev_max = finestLevel();
BL_ASSERT(lev_max <= finestLevel()); PAssert(lev_max <= finestLevel());
BL_ASSERT(nGrow == 0 || (nGrow >= 0 && lev_min == lev_max)); PAssert(nGrow == 0 || (nGrow >= 0 && lev_min == lev_max));
std::vector< std::pair<int, AmrBox_t> > isects; std::vector< std::pair<int, AmrBox_t> > isects;
...@@ -557,7 +558,7 @@ bool BoxLibLayout<T, Dim>::Where(AmrParticleBase< BoxLibLayout<T,Dim> >& p, ...@@ -557,7 +558,7 @@ bool BoxLibLayout<T, Dim>::Where(AmrParticleBase< BoxLibLayout<T,Dim> >& p,
{ {
const AmrIntVect_t& iv = Index(p, ip, lev); const AmrIntVect_t& iv = Index(p, ip, lev);
const AmrGrid_t& ba = ParticleBoxArray(lev); const AmrGrid_t& ba = ParticleBoxArray(lev);
BL_ASSERT(ba.ixType().cellCentered()); PAssert(ba.ixType().cellCentered());
if (lev == (int)p.Level[ip]) { if (lev == (int)p.Level[ip]) {
// The fact that we are here means this particle does not belong to any finer grids. // The fact that we are here means this particle does not belong to any finer grids.
...@@ -604,7 +605,7 @@ bool BoxLibLayout<T, Dim>::EnforcePeriodicWhere (AmrParticleBase< BoxLibLayout<T ...@@ -604,7 +605,7 @@ bool BoxLibLayout<T, Dim>::EnforcePeriodicWhere (AmrParticleBase< BoxLibLayout<T
if (lev_max == -1) if (lev_max == -1)
lev_max = finestLevel(); lev_max = finestLevel();
BL_ASSERT(lev_max <= finestLevel()); PAssert(lev_max <= finestLevel());
// //
// Create a copy "dummy" particle to check for periodic outs. // Create a copy "dummy" particle to check for periodic outs.
// //
...@@ -677,7 +678,7 @@ bool BoxLibLayout<T, Dim>::PeriodicShift (SingleParticlePos_t R) const ...@@ -677,7 +678,7 @@ bool BoxLibLayout<T, Dim>::PeriodicShift (SingleParticlePos_t R) const
// //
R[i] += .125*geom.CellSize(i); R[i] += .125*geom.CellSize(i);
BL_ASSERT(R[i] >= geom.ProbLo(i)); PAssert(R[i] >= geom.ProbLo(i));
shifted = true; shifted = true;
} }
...@@ -699,7 +700,7 @@ bool BoxLibLayout<T, Dim>::PeriodicShift (SingleParticlePos_t R) const ...@@ -699,7 +700,7 @@ bool BoxLibLayout<T, Dim>::PeriodicShift (SingleParticlePos_t R) const
// //
R[i] -= .125*geom.CellSize(i); R[i] -= .125*geom.CellSize(i);
BL_ASSERT(R[i] <= geom.ProbHi(i)); PAssert(R[i] <= geom.ProbHi(i));
shifted = true; shifted = true;
} }
...@@ -809,8 +810,8 @@ void BoxLibLayout<T, Dim>::initBaseBox_m(int nGridPoints, ...@@ -809,8 +810,8 @@ void BoxLibLayout<T, Dim>::initBaseBox_m(int nGridPoints,
AmrDomain_t real_box; AmrDomain_t real_box;
for (int d = 0; d < AMREX_SPACEDIM; ++d) { for (int d = 0; d < AMREX_SPACEDIM; ++d) {
BL_ASSERT(lowerBound[d] < 0); PAssert(lowerBound[d] < 0);
BL_ASSERT(upperBound[d] > 0); PAssert(upperBound[d] > 0);
real_box.setLo(d, lowerBound[d] * (1.0 + dh)); real_box.setLo(d, lowerBound[d] * (1.0 + dh));
real_box.setHi(d, upperBound[d] * (1.0 + dh)); real_box.setHi(d, upperBound[d] * (1.0 + dh));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment