DOLFIN User Manual - FEniCS Project
DOLFIN User Manual - FEniCS Project DOLFIN User Manual - FEniCS Project
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
- Page 12 and 13: DOLFIN User ManualHoffman, Jansson,
- Page 14 and 15: DOLFIN User ManualHoffman, Jansson,
- Page 16 and 17: DOLFIN User ManualHoffman, Jansson,
- Page 18 and 19: DOLFIN User ManualHoffman, Jansson,
- Page 20 and 21: DOLFIN User ManualHoffman, Jansson,
- Page 22 and 23: DOLFIN User ManualHoffman, Jansson,
- Page 25 and 26: Chapter 3Linear algebra◮ Develope
- Page 27 and 28: DOLFIN User ManualHoffman, Jansson,
- Page 29 and 30: Chapter 4The mesh◮ Developer’s
- Page 31 and 32: DOLFIN User ManualHoffman, Jansson,
- Page 33 and 34: Chapter 5Functions◮ Developer’s
- Page 35 and 36: DOLFIN User ManualHoffman, Jansson,
- Page 37 and 38: DOLFIN User ManualHoffman, Jansson,
- Page 39 and 40: DOLFIN User ManualHoffman, Jansson,
- Page 41 and 42: DOLFIN User ManualHoffman, Jansson,
- Page 43: Chapter 6Ordinary differential equa
- Page 46 and 47: DOLFIN User ManualHoffman, Jansson,
- Page 48 and 49: DOLFIN User ManualHoffman, Jansson,
- Page 50 and 51: DOLFIN User ManualHoffman, Jansson,
- Page 53 and 54: Chapter 8Nonlinear solver◮ Develo
- Page 55: DOLFIN User ManualHoffman, Jansson,
- Page 58 and 59: DOLFIN User ManualHoffman, Jansson,
- Page 62 and 63: DOLFIN User ManualHoffman, Jansson,
- Page 65 and 66: Chapter 10The log systemDOLFIN prov
- Page 67 and 68: DOLFIN User ManualHoffman, Jansson,
- Page 69 and 70: DOLFIN User ManualHoffman, Jansson,
- Page 71: DOLFIN User ManualHoffman, Jansson,
- Page 74 and 75: DOLFIN User ManualHoffman, Jansson,
- Page 76 and 77: DOLFIN User ManualHoffman, Jansson,
- Page 78 and 79: DOLFIN User ManualHoffman, Jansson,
- Page 80 and 81: DOLFIN User ManualHoffman, Jansson,
- Page 82 and 83: DOLFIN User ManualHoffman, Jansson,
- Page 85: Bibliography[1] Cygwin, 2005. http:
- Page 88 and 89: v 2 v 0 = (0, 0)DOLFIN User ManualH
- Page 90 and 91: DOLFIN User ManualHoffman, Jansson,
- Page 92 and 93: DOLFIN User ManualHoffman, Jansson,
- Page 94 and 95: DOLFIN User ManualHoffman, Jansson,
- Page 96 and 97: DOLFIN User ManualHoffman, Jansson,
- Page 98 and 99: DOLFIN User ManualHoffman, Jansson,
- Page 100 and 101: DOLFIN User ManualHoffman, Jansson,
- Page 102 and 103: DOLFIN User ManualHoffman, Jansson,
- Page 105 and 106: Appendix CContributing codeIf you h
- Page 107 and 108: DOLFIN User ManualHoffman, Jansson,
- Page 109 and 110: Appendix DLicenseDOLFIN is licensed
<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, 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 <strong>DOLFIN</strong>. 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. <strong>DOLFIN</strong> provides a ready-made visual program suitablefor visualization of <strong>DOLFIN</strong> data in OpenDX. The visual program can befound in the subdirectory src/utils/opendx/ of the <strong>DOLFIN</strong> 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 <strong>DOLFIN</strong>, using the commands pdemesh, pdesurf61