ff3d-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ff3d-users] Question on the solver 'solve'


From: Stephane Del Pino
Subject: Re: [ff3d-users] Question on the solver 'solve'
Date: Wed, 11 Aug 2004 11:17:56 +0200
User-agent: KMail/1.6.2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Wednesday 11 August 2004 01:47, Arun Viswanathan a écrit :
> Hi!! I am solving for a variable in the solver and I
> want to monitor the value of that variable at the end
> of each solver iteration. My solver is set up as:
>
> solve(C) in <domain> by <mesh>
>
> I tried using "cout << C;" at the end of the solver,
> but get an error that says " ';' unexpected". Could
> anybody please tell me if it is possible to monitor
> the value of the variable being solved for, and if so,
> how?? I would also like to know if it is possible to
> use this variable ("C" in this case) in a for-loop
> condition??
>
> Would appreciate any suggestions and ideas.
Dear Arun.
writing function is not implemented since what should be done is not clear.
Ploting "standard" functions and fem functions can be very different: In the 
first case we can just plot the function definition, in the second, should we 
plot the functions values on its mesh definition?
This could be a strategy, but what should we do if someone does this for 
instance:
        function sum = f+g;
        cout << sum;
where f and g are 2 FEM functions defined on different meshes...

Maybe I should replace this syntax error by something nicer, but no more.

By the way, if you are interested by the values of the function, you can 
proceed as follows:

for (i=0 ; i<nx ; i++) {
  x0=a0+i*hx;
  for (j=0 ; j<nx ; j++) {
    x1=a1+j*hy;
    for (k=0 ; k<nx ; k++) {
      x2=a2+k*hz;
      cout << C(x0,x1,x2) << "\n";
    }
  }
}

where you have to define a0,...,hz to fit your needs. The trick is that we ask 
explicitly to plot the values...

Best regards,
Stephane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBGeREbZyhKhZwdc0RAjtYAKCKS7+FABBHuJLgcQjlgr69iwpVyACeJYZM
fIcUX55GdYYyHRTcaEXVGL4=
=EgHr
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]