[Gmsh] Two modification patches to gmsh-2.0.7

OSHIMA Takuya oshima at eng.niigata-u.ac.jp
Mon May 21 10:17:06 CEST 2007


Hi Christophe,

So many thanks for including the patches into the Gmsh source!

And although the 20070521 nightly source seems to work basically fine,
I'd like to make further modifications as attached
(StreamLines.fix.patch) if possible, so that

* multi-step plot correctly works for a view that starts from time
  other than zero,
* "Time display mode" -> "Value" works for the streamline view.

Maybe I should have included the fixes from the first post of the
patch...

Cheers,
Takuya

From: Christophe Geuzaine <cgeuzaine at ulg.ac.be>
Subject: Re: [Gmsh] Two modification patches to gmsh-2.0.7
Date: Sun, 20 May 2007 22:47:04 +0200

> 
> Hi Takukya - Thanks for the patches. I've applied "StepButtons.patch" as
> is, and I've applied a slightly modified version of "StreamLines.patch" 
> (there's a new "TimeStep" variable in the plugin, which must be set to 
> "-1" for the multi-step magic to be performed).
> 
> Let me know if it works...
> 
> Cheers,
> 
> Christophe
-------------- next part --------------
--- gmsh-2.0.8-nightly-20070521/Plugin/StreamLines.cpp	2007-05-20 07:02:50.000000000 +0900
+++ gmsh-2.0.8-nightly-20070521.new/Plugin/StreamLines.cpp	2007-05-21 10:03:59.000000000 +0900
@@ -299,11 +299,13 @@
 	double XPREV[3] = { X[0], X[1], X[2] };
 
 	if(timestep < 0){
-	  const double currentT = DT * iter;
+	  const double currentT = DT * iter
+            + *(double*)List_Pointer(v1->Time, 0);
 	  for(; currentTimeStep < v1->NbTimeStep - 1 && currentT > 0.5 *
 		(*(double*)List_Pointer(v1->Time, currentTimeStep) +
 		 *(double*)List_Pointer(v1->Time, currentTimeStep + 1));
               currentTimeStep++);
+          List_Add(View->Time, (double*)&currentT);
 	}
 	else{
 	  currentTimeStep = timestep;