← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3450: -insert debugOut. (core dump fixed by ulimit -s 16000)

 

------------------------------------------------------------
revno: 3450
committer: Chao Yuan <chaoyuan2012@xxxxxxxxx>
timestamp: Thu 2014-09-11 18:50:26 +0200
message:
  -insert debugOut. (core dump fixed by ulimit -s 16000)
modified:
  pkg/pfv/UnsaturatedEngine.cpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/pfv/UnsaturatedEngine.cpp'
--- pkg/pfv/UnsaturatedEngine.cpp	2014-09-10 13:21:52 +0000
+++ pkg/pfv/UnsaturatedEngine.cpp	2014-09-11 16:50:26 +0000
@@ -398,13 +398,15 @@
     if(solver->debugOut) {cout<<"----updateReservoirs1.initAirReservoirBound----"<<endl;}
     
     for (FlowSolver::VCellIterator it = solver->boundingCells[2].begin(); it != solver->boundingCells[2].end(); it++) {
-        if ((*it)->info().index == 0) continue;
+        cerr<< "iterating on "<<bool((*it)==NULL)<<endl;
+        if ((*it)==NULL or (*it)->info().index == 0) continue;
         waterReservoirRecursion(*it);
     }
     if(solver->debugOut) {cout<<"----updateReservoirs1.waterReservoirRecursion----"<<endl;}
     
     for (FlowSolver::VCellIterator it = solver->boundingCells[3].begin(); it != solver->boundingCells[3].end(); it++) {
-        if ((*it)->info().index == 0) continue;
+        cerr<< "iterating(2) on "<<bool((*it)==NULL)<<endl;
+        if ((*it)==NULL or (*it)->info().index == 0) continue;
         airReservoirRecursion(*it);
     }
     if(solver->debugOut) {cout<<"----updateReservoirs1.airReservoirRecursion----"<<endl;}
@@ -412,17 +414,25 @@
 
 void UnsaturatedEngine::waterReservoirRecursion(CellHandle cell)
 {
+    if (cell==NULL) cerr<<"null cell found"<<endl;
+    if(solver->debugOut) cerr<<"checking cell ="<<cell->info().index<<endl;
     for (int facet = 0; facet < 4; facet ++) {
+	if(solver->debugOut) cerr<<"checking facet ="<<facet<<", i.e. cell"<<cell->neighbor(facet)->info().index<<endl;
         CellHandle nCell = cell->neighbor(facet);
-        if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
+	if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
+        
         if (nCell->info().Pcondition) continue;
+	if(solver->debugOut) {cout<<"----updateReservoirs1.waterReservoirRecursion.1----"<<endl;}
+	
 	if ( (nCell->info().isFictious) && (!isInvadeBoundary) ) continue;
         if (nCell->info().p() != bndCondValue[2]) continue;
         if (nCell->info().isWaterReservoir==true) continue;
         nCell->info().isWaterReservoir = true;
 	nCell->info().isAirReservoir = false;
+	if(solver->debugOut) {cout<<"----updateReservoirs1.waterReservoirRecursion.2----"<<endl;}
         waterReservoirRecursion(nCell);
     }
+//     cerr<<"done"<<endl;
 }
 
 void UnsaturatedEngine::airReservoirRecursion(CellHandle cell)