# 2nd resolution Wave_t_ex

Christophe Geuzaine Christophe.Geuzaine at ulg.ac.be
Wed Jun 6 21:23:04 CEST 2001

```Lin Ji wrote:
>
> Hi, Christophe,
>     I did not see the big warning about the second scheme in your last email.
> Now, I read about it. But, I still don't quite understand how to assemble the
> source. I do express TimeFct[] and dfdt[] in the same order as in your
> example:
>
>   yo[]=1/(ct*cy*Sqrt[2*3.1416])*Exp[-((\$Time-t0)^2/(ct^2)+(Y[]-y0)^2/(cy^2)
>        )];
>   yo2[]=Cos[gr*(\$Time-t0)]*yo[];
>   TimeFct[] = yo[];
>   // TimeFct[] = ( (X[]<.03)  )? yo[] : 0 ;
>
>   dfdt[] = TimeFct[] ;
>
>   SaveFct[] = !(\$TimeStep % 2) ;
>
> instead of 'TimeFct[] = dfdt[];'. It seems I have to set 'TimeFct[] =
> dfdt[]/dfdt[t==t0]' in order to make 'dfdt[t==t0]*TimeFct[]' the correct
> source as you explained in the email.

Yes, that's one way to do it.

> Does that mean dfdt[t==t0] can not be
>

Not necessarily: you only have to impose the spatial kind of
distribution you want in the formulation, and modulate by whatever time
function you want in the resolution (i.e. in 'Update[]'). In other
words, with the second kind of resolution, 'dfdt[]' is evaluated only
once at the begining of the processing (at a moment when the time loop
is not even started: check the position of 'GenerateSeparate[]' in the
resolution). It should of course not be equal to zero: but that's no
issue since the time function is specified in the 'Update[]'.

Anyway, if you feel uncomfortable with the second kind of resolution,
just use the first one. This one is the classical (but not very
effective) way to solve the problem. BTW, to speed up the computation,
you may also set the 'Re_Use_ILU' flag to 1 in your SOLVER.PAR file.
This will prevent the incomplete decomposition of the matrix to be
computed at each time step.

Christophe

--
Christophe Geuzaine

Tel: 32 (0) 4 366 37 10    http://geuz.org
Fax: 32 (0) 4 366 29 10    mailto:Christophe.Geuzaine at ulg.ac.be

```