Skip to topic | Skip to bottom

Start of topic | Skip to actions


The shells/filters directory in the repository holds several filters to convert to VTU files from SFC (SMF) formats. This will need to be done on each available file. In order to merge several files into a single one you can either create a PVD collection file, or use the TecTetraMerge or TecTrigMerge filters.

A collection PVD, is an XML file that looks like:

<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian">
<DataSet part="1" file="parts/result-0000-000200.tec.vtu"/>
<DataSet part="2" file="parts/result-0001-000200.tec.vtu"/>
<DataSet part="29" file="parts/result-0028-000200.tec.vtu"/>

If you have a series of timesteps dumped per processor as VTUs, you can easly construct these PVD files with a CSH script (or BASH, or anything you preferr)

foreach i (parts/result-0000-*.tec.vtu)
  set n = `echo $i | sed -e 's/parts.result.0000.//' | sed -e 's/.tec.vtu//'`
  echo $n
  ls parts/result-*-$n.tec.vtu | awk '\
    BEGIN { printf ("<?xml version=\"1.0\"?>\n\
                     <VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"LittleEndian\">\n\
                     <Collection>\n"); } \
    { print "<DataSet part=\""NR"\" file=\""$0"\"/>"} \
    END {printf("</Collection></VTKFile>");}' > solid.$n.pvd


tectetramerge and tectrimerge are both filters that read in tecplot ascii meshes, and have the option of dumping VTU ascii or VTU binary files. These filters have the advantage that they can take multiple files and dump one single file. In

  • vtf/viz/filters/tectetramerge
  • vtf/viz/filters/tectrigscleanup

Tectetramerge currently only works with (most) tecplot ascii files. After compiling tectetramerge (small C++ program, requires no additional libraries), you can do a ./tectetramerge -h to see the different options you can use. For the most part what you will do is = ./tectetramerge -input myfilename.tec -vtu > myfilename.vtu =.

If you have partial files for each timestep, then you can use tectetramerge to create a single file.

# tcsh example
# for example, if your file names are in the format adlib.timestep.processor.tec

foreach i (adlib.*.0000.tec)
  set j = `echo $i | sed -e 's/.0000.tec//'`
  tectetramerge -bvtu -readsequence $j.\*.tec > sollid.$j.vtu

-- SantiagoLombeyda - 06 Sep 2005

You are here: Visualization > OtherVizFilters

to top

Copyright © 1997-2022 California Institute of Technology.