diff --git a/Solver/dgSlopeLimiter.cpp b/Solver/dgSlopeLimiter.cpp index 33cd53fb712e46d994f3da868a3ccd9c3059acc9..5225862323f3995216a6c3a1d01a85e525c8e97c 100644 --- a/Solver/dgSlopeLimiter.cpp +++ b/Solver/dgSlopeLimiter.cpp @@ -17,6 +17,20 @@ bool dgSlopeLimiter::apply ( dgDofContainer &solution, int nbFields = solution.getNbFields(); int totNbElems = solution.getNbElements(); + + //--- CLIPPING: check unphysical values + // double fmin = 1.e-10; +// for (int iElement=0;iElement<totNbElems;iElement++){ +// fullMatrix<double> solElem; +// solElem.setAsProxy(SolRight, nbFields*iElement, nbFields ); +// for (int k=0;k< solElem.size1() ;k++){ +// if (solElem(k,0) < fmin) { +// printf("ARGG negative density \n"); +// solElem(k,0) = fmin; +// } +// } +// } + // first compute max and min of all fields for all stencils //----------------------------------------------------------