Getting Data Into Visit
Total Page:16
File Type:pdf, Size:1020Kb
LLNL-SM-446033 Getting Data Into VisIt July 2010 Version 2.0.0 Brad Whitlock wrence La Livermore National Laboratory ii DISCLAIMER This document was prepared as an account of work sponsored by an agency of the United States government. Neither the United States government nor Lawrence Livermore National Security, LLC, nor any of their employees makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trade- mark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States government or Lawrence Liver- more National Security, LLC, and shall not be used for advertising or product endorsement purposes. This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory in part under Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344. iii iv Table of Contents Introduction Manual chapters . 2 Manual conventions . 2 Strategies . 2 Picking a strategy . 3 Definition of terms . 4 Creating compatible files Creating a conversion utility or extending a simulation . 7 Survey of database reader plug-ins. 9 BOV file format . 9 X-Y Curve file format. 12 Plain text ASCII files . 12 NETCDF files . 13 HDF5 files. 13 Writing Silo files . 13 Using the Silo library . 14 Inspecting Silo files. 16 Silo files and parallel codes . 16 Creating a new Silo file. 16 Dealing with time . 18 Option lists . 19 Writing a rectilinear mesh. 20 Writing a curvilinear mesh . 23 Writing a point mesh. 26 Writing an unstructured mesh. 29 Writing a scalar variable . 35 Single precision vs. Double precision. 47 Writing expressions . 47 Creating a master file for parallel . 48 Writing VTK files . 54 Getting started with visit_writer . 55 Regular meshes with data . 56 Rectilinear meshes with data . 58 Curvilinear meshes with data . 60 Point meshes with data . 63 Unstructured meshes with data . 64 Creating a master file for parallel (.visit file) . 66 Creating compatible files II Advanced topics Writing vector data. 69 Adding metadata for performance boosts . 72 Writing data extents . 72 Writing spatial extents . 75 Ghost zones . 76 Writing ghost zones to your files . 78 Materials . 83 Creating a database reader plug-in Structure of VisIt . 89 plug-ins . 91 Starting your plug-in . 92 Picking a database reader plug-in interface . 92 Using XMLEdit . 92 Generating a plug-in code skeleton. 96 Building your plug-in . 97 Calling your plug-in for the first time. 100 Implementing your plug-in . 101 Required plug-in methods. 101 Debugging your plug-in . 103 Opening your file . 105 Returning file metadata. 106 Returning a mesh . 113 Returning a scalar variable . 126 Returning a vector variable. 127 Using a VTK reader class . 129 Advanced topics . 129 Returning cycles and times . 129 Auxiliary data . 134 Returning ghost zones. 139 Parallelizing your reader. 141 Instrumenting a simulation code Architecture. 143 Using libsim . 146 Getting libsim . 146 Building in libsim support . ..