[Getdp] sample of time steps

Christophe Geuzaine christophe.geuzaine at case.edu
Thu Feb 23 20:25:11 CET 2006


David Felsenthal wrote:
> I am doing a non-linear simulation, and am saving a sub-set of the
> calculated solutions. I have:
> 
> Function {
>   .
>   .
>   .
>   dt = 0.001;
> 
>   SaveFct[] = !($TimeStep % ((1/dt)/100));
> 
> 
> }
> 
> and
> Resolution {
>    { Name nonlinear;
>      System {
>        { Name T; NameOfFormulation The_T; }
>      }
>      Operation {
>        InitSolution [T];
>        SaveSolution [T];
>        TimeLoopTheta [t0 , t1 , dt, 1.] {
> 	IterativeLoop[NL_NbrMaxIter, NL_Eps, NL_Relax] {
> 	  GenerateJac [T] ;  SolveJac [T] ;
> 	}
>         	Test [ SaveFct[] ] { SaveSolution [T]; }
>        }
>      }
>    }
> 
> 
> When I do
> 
> getdp  -v 0  box.pro -solve nonlinear; getdp    box.pro  -pos pos
> 
> from the command line all works as expected, I get a sub-set of the data
> points.
> 
> If I type:
> 
> getdp  -v 0  box.pro -solve nonlinear -pos pos
> 
> I get all the data points. I didn't expect this behavior. Is this expected?
> 

It is expected (although I agree it can be a little confusing ;-).

Your test on SaveFct[] only changes the solutions that are saved in the 
resolution file (.res). When you do the post-processing at the same time 
as the resolution, all the solutions are available in memory and they 
are all used (we don't read the .res file in that case). If you 
post-process after the computation is done, only those solutions that 
have been saved in the file are available, so only those solutions are used.

One "fix" for this is to actually execute the post-processing operations 
inside the resolution using the "PostOperation[..., LastTimeStepOnly];" 
command, that you add inside your test (then you don't need to use 
"-pos" at all).

Or you could play with the TimeStep option in the PostOperation (but it 
can get tricky if you want to use both combined and separate 
post-processing steps).

The easiest is probably to just do the -solve and the -pos steps 
separately...



> 
> Thanks,
> 
> David Felsenthal
> 
> p.s. Sorry about sending this to the gmsh list.
> 
> 
> 
> 
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp
> 


-- 
Christophe Geuzaine
Assistant Professor, Case Western Reserve University, Mathematics
http://www.case.edu/artsci/math/geuzaine