TecIO is the library supplied with Tecplot 360 that enables third-party applications to output solution data directly to Tecplot binary-formatted files.
It exists as two separate libraries. The original serial version of TecIO outputs either .plt or the newer .szplt format. The newer parallel version, TecIO-MPI, outputs only .szplt.
Both versions are also available in source form, which enables their use on some otherwise unsupported platforms. And in the case of TecIO-MPI, it enables support for a variety of MPI implementations.
In its serial form, TecIO has been around for a long time, and it’s starting to show its age. A few examples:
- As zone types and features have been added, the routine to create zones (now called TECZNE142) has accumulated parameters to accommodate the new features. It now has 21 parameters—a bit ungainly.
- Only 10 files may be output simultaneously, and you have to do some bookkeeping to keep track of which file you’re currently outputting to.
- Solution data must be output in sequential zone-variable order.
- Integer data types are not supported.
- 32-bit integer parameters limit the size of the zones you can output, a limitation that will become important for some customers in the next few years.
New TecIO API
To address these and other issues, Tecplot 360 2017 R2 introduced a new API (application programming interface) to TecIO, both serial and parallel versions. This new API offers many advantages over the legacy API:
- Separate routines for creating each zone type take only the parameters required for that zone type.
- The number of files you can output simultaneously is limited only by the underlying operating system.
- You can output zone variables out of order—you are not required to output all of your X variables before you can start outputting your Y variables, etc.
- You can output zones that have 8-, 16-, and 32-bit integer data.
- 64-bit integer parameters allow outputting zones whose index limits would overflow 32-bit integers.
You can see the new API at work and compare it with the old API in TecIO’s C++ example flushpartitioned.cpp. You’ll find lines such as the following, which show the old and new side-by-side:
#if defined OLD_API
returnValue = TECDAT142(&pNCells[ptn - 1], p[ptn - 1], &dIsDouble);
returnValue = tecZoneVarWriteFloatValues(fileHandle, zone, 4,
ptn, pNCells[ptn - 1], p[ptn - 1]);
Fortran 90 programmers might prefer to look at the example rewriteszl.F90, which shows both reading and writing a .szplt file using TecIO’s Fortran 90 interfaces.
Please note that this new API in its current form outputs only the newer .szplt format, which is not readable by Tecplot Focus and does not (currently) support polyhedral zones. The legacy API will continue to be available until those limitations are addressed. But if .szplt works for you, please consider using the new API for your Tecplot binary file output.
As always, please contact our excellent technical support team if you have questions.
Learn More and Download the TecIO Library
David E. Taflin, Ph.D.
Senior Software Engineer