One idea is to introduce a auxiliary variable c = ||v||
when you can see the problem as minimisation under constraint and use IPOPT to solve the non
linear problem for fully implicite schema in time
but otherwise you can explicite c a do a semi implicite schema in time.
start you 1d or 2d cas to see if the scheme converge (no idea)
try do solve a problem with no dependance in time,
Thank you very much Professor
I would like to know what this part of the code is for so that I can do it for the 2d
case before moving on to the time dependent case.
up-= u;
real err= up.linfty;
cout << iter << " c "<< c<< " err = "<< err<< endl;
if(err < 1e-6) break;
// here up = previous u
up-= u; // in up = up -u
real err= up.linfty; // nom of the diff up-u ..
cout << iter << " c "<< c<< " err = "<< err<< endl;
if(err < 1e-6) break;
AFAIK, linifinty is just a fancy way of saying maximum absolute error
but you can presumably pick a criteria you like.
The static case is intersting ( or would be interesting )f the signs
change ) as the period is related to the amplitude. Wavelengths
tend to be fixed by geometry and boundary conditions too.
Since you speciffied initial conditions over omega you already have an
expression for the time derivative which is probably not entirely zero.
You could write the thing as v=v_0 + dt*( \laplacian v + cv)
with c derived from v_0 and hopefully in the limit of small dt results make sense
of as I have done do a 2d+1 case where the âzâ dimension in the mesh is actually time.
You could write the thing as v=v_0 + dt*( \laplacian v + cv)
with c derived from v_0 and hopefully in the limit of small dt results make sense
of as I have done do a 2d+1 case where the âzâ dimension in the mesh is actually time.
I donât understand it is the L^2 norm of v .
I donât see how it is the derivative of v0 and the derivative is with respect to which variable
It says attachment is missing or something similar.
Typically you can test your discretization by letting the steps get smaller until
the results donât change. Some of these things are unstable with steps too
big also.
I had to edit a lot of your upload so I did not do a diff but there are a number of
issues. I used one of the idp files to move your parameters to the command line,
see the uploaded fie.
First, you appear to be using âupâ for convergence testing and time stepping.
Then, dt is in the wrong place. and you can see the huge difference
by changing the time step although you expect a lot of this when
the time step is too big anywya I thought your initial conditions were given and you
appear to iterate those away. Iâll see if I can change it a bit if I get time later.
I always end up with simple algebra mistakes.
The integration by parts for the weak form is almost magic- it seems
to remove a lot of terms when more things vary spatially- but it is also
another source of sign mistakes in algebra
What do you think of this ( note that this is probably one or more sign mistakes
but if you have a theory you can compare it to that lol). Note
that the result is not too sensitive to dt although ti may still be wrong.
( note Iâm just doing this for practice and any feedback would help ).
First of all, I would like to thank you for the help you have given me. It encourages me to learn more about FreeFem++.
.
I am not yet used to using the new version of Freefem
so I noticed that you have integrated a lot of things in your code.
My first concern is to know the usefulness of
include âmacro_ddm.idpâ
and why define the parameters dt and Tfinal in this form.