← Back to team overview

dolfin team mailing list archive

Re: [Question #159696]: Saving 1-d solution in simple text format

 

Question #159696 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/159696

    Status: Open => Answered

Johan Hake proposed the following answer:
Have you tried using

  plot(u, interactive=True)

or saving to vtk files which can be view using Paraview?

If you prefer Gnuplot you should be able to do something like:

  f = open("data.txt", "w")
  for x in some_x_range:
      f.write("%f, %f\n"%(x, u(x)))
  f.close()

Johan

On Monday May 30 2011 21:45:54 Praveen C wrote:
> New question #159696 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/159696
> 
> Hello
> 
> How can I save the solution of a 1-d problem as a two column output "x 
> u(x)". I would like to use gnuplot or some such program to see the
> solution.
> 
> Thanks
> praveen

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.