From d14c50e4a75238371f98af621b875e1f8d14fc39 Mon Sep 17 00:00:00 2001
From: Emilie Marchandise <emilie.marchandise@uclouvain.be>
Date: Thu, 7 Jan 2010 08:59:38 +0000
Subject: [PATCH]

---
 Solver/dgSlopeLimiter.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Solver/dgSlopeLimiter.cpp b/Solver/dgSlopeLimiter.cpp
index 33cd53fb71..5225862323 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    
   //----------------------------------------------------------   
 
-- 
GitLab