Skip to content
Arto Sandroos edited this page Jul 2, 2015 · 12 revisions

VLSV File Format

Table of Contents

Introduction

VLSV file format was created for writing domain-decomposed meshes, and variables defined on their zones, efficiently in parallel using message passing interface (MPI). Here is a list of features:

  • Data written in parallel using collective MPI calls
  • Parallel visualization with VisIt
  • Scalability tested up to tens of millions of zones per mesh
  • Multiple meshes per file
  • Stretched Cartesian, Cylindrical, and Spherical coordinate systems
  • Arbitrary coordinate scaling for visualization purposes (for example, from meters to Earth radii)
  • User-defined axis labels and units

HOWTO: Write a Multi-Domain Mesh

HOWTO: Write Multi-Domain Variables

VLSV file format accepts all types of variables. Variables are defined as tuples that exist of all zones in the domain. VisIt, however, only supports scalars (tuple size 1), vectors (tuple size 2 or 3), and tensors (tuple size 9). Variable data must be written in the same order as zones were written to array MESH above. Variables are written to arrays called VARIABLE. Example below shows how to write a three-component vector variable to VLSV file:

// Copy variable data to temporary buffer:
int arraySize=<<number of local zones in domain>>;
int vectorSize=3;
double* buffer = new double[arraySize*vectorSize];
int localID=0;
for all local zones z {
   for (i=0; i<vectorSize; ++i) {
      buffer[localID*vectorSize+i] = <<value of i:th component of vector in zone z>>
   }
   ++localID;
}

// Write buffer to file:
map<string,string> xmlAttributes;
xmlAttributes["mesh"]=<<name of your variable>>;
xmlAttributes["mesh"]=<<name of your mesh>>;
bool success=vlsv.writeArray("VARIABLE",xmlAttributes,arraySize,vectorSize,buffer);
delete [] buffer;

Rationale: each domain only writes variable data on its local zones. Plugin uses MESH_GHOST_DOMAINS and MESH_GHOST_LOCALIDS arrays to fetch values to domain's ghost zones.

Following XML attributes are supported:

Clone this wiki locally