DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project DOLFIN User Manual - FEniCS Project

fenicsproject.org
from fenicsproject.org More from this publisher
12.07.2015 Views

DOLFIN User ManualHoffman, Jansson, Logg, WellsMesh mesh;File in(‘‘mesh.xml.gz’’);in >> mesh;File out(‘‘mesh.xml’’);out mesh.xmlon the command-line.There is currently no visualization tool that can read DOLFIN XML files,so the main purpose of this format is to save and transfer data.9.2.2 VTKData saved in VTK format [13] can be visualized using various packages. Thepowerful and freely available ParaView [10] is recommended. Alternatively,VTK data can be visualized in MayaVi [5], which is recommended for qualityvector PostScript output. Time-dependent data is handled automatically inthe VTK format.The below code illustrates how to export a function in VTK format:Function u;File out(‘‘data.pvd’’);out

DOLFIN User ManualHoffman, Jansson, Logg, WellsThe sample code produces the file data.pvd, which can be read by ParaView.The file data.pvd contains a list of files which contain the resultscomputed by DOLFIN. For the above example, these files would be nameddataXXX.vtu, where XXX is a counter which is incremented each time thefunction is saved. If the function u was to be saved three times, the filesdata000000.vtudata000001.vtudata000002.vtuwould be produced. Individual snapshots can be visualized by opening thedesired file with the extension .vtu using ParaView.ParaView can produce on-screen animations. High quality animations invarious formats can be produced using a combination of ParaView and MEncoder[6].◮ Developer’s note: Add MEncoder example to create animation.9.2.3 OpenDXOpenDX [9] is a powerful free visualization tool based on IBM’s VisualizationData Explorer. To visualize data with OpenDX, a user needs to build avisual program that instructs OpenDX how to extract and visualize relevantparts of your data. DOLFIN provides a ready-made visual program suitablefor visualization of DOLFIN data in OpenDX. The visual program can befound in the subdirectory src/utils/opendx/ of the DOLFIN source tree(file dolfin.net and accompanying configuration dolfin.cfg).9.2.4 GNU OctaveGNU Octave [7] is a free clone of MATLAB that can be used to visualizesolutions computed in DOLFIN, using the commands pdemesh, pdesurf61

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, WellsMesh mesh;File in(‘‘mesh.xml.gz’’);in >> mesh;File out(‘‘mesh.xml’’);out mesh.xmlon the command-line.There is currently no visualization tool that can read <strong>DOLFIN</strong> XML files,so the main purpose of this format is to save and transfer data.9.2.2 VTKData saved in VTK format [13] can be visualized using various packages. Thepowerful and freely available ParaView [10] is recommended. Alternatively,VTK data can be visualized in MayaVi [5], which is recommended for qualityvector PostScript output. Time-dependent data is handled automatically inthe VTK format.The below code illustrates how to export a function in VTK format:Function u;File out(‘‘data.pvd’’);out

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!