360 Data Format Guide
360 Data Format Guide
Copyright © 1988-2023 Tecplot, Inc. All rights reserved worldwide. Except for personal use, this manual may not be reproduced, transmitted, transcribed,
stored in a retrieval system, or translated in any form, in whole or in part, without the express written permission of Tecplot, Inc., 3535 Factoria Blvd, Ste. 550;
Bellevue, WA 98006 U.S.A.
The software discussed in this documentation and the documentation itself are furnished under license for utilization and duplication only according to the
license terms. The copyright for the software is held by Tecplot, Inc. Documentation is provided for information only. It is subject to change without notice. It
should not be interpreted as a commitment by Tecplot, Inc. Tecplot, Inc. assumes no liability or responsibility for documentation errors or inaccuracies.
Tecplot, Inc.
Post Office Box 52708
Bellevue, WA 98015-2708 U.S.A.
Tecplot®, Tecplot 360,™ Tecplot 360 EX,™ Tecplot Focus, the Tecplot product logos, Preplot,™ Enjoy the View,™ Master the View,™ SZL,™ Sizzle,™ and
Framer™ are registered trademarks or trademarks of Tecplot, Inc. in the United States and other countries. All other product names mentioned herein are
trademarks or registered trademarks of their respective owners.
Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraphs (a) through (d) of the Commercial Computer-
Restricted Rights clause at FAR 52.227-19 when applicable, or in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at
DFARS 252.227-7013, and/or in similar or successor clauses in the DOD or NASA FAR Supplement. Contractor/manufacturer is Tecplot, Inc., 3535 Factoria
Blvd, Ste. 550; Bellevue, WA 98006 U.S.A.
Released: 8/2023
For third-party trademark and copyright information, see the Tecplot 360 EX User’s Manual.
Table of Contents
1 Introduction ............................................................................ 7
Subzone Loading .......................................................................... 7
Creating Data Files for Tecplot 360 EX and Focus ................... 8
Best Practices ................................................................................. 8
Auxiliary Data Influencing Tecplot 360’s Behavior ............... 10
CFDA Auxiliary Data .......................................................................10
3
Table of Contents
Boolean Flags.....................................................................................26
Binary Data File Function Calling Sequence .......................... 26
Additional Requirement for Parallel Output ....................................26
Non-partitioned Zones ......................................................................27
Partitioned Zones ..............................................................................27
Writing to Multiple Binary Data Files ..................................... 28
Linking with the TecIO Library ................................................ 28
Linux/Macintosh ...............................................................................28
Windows............................................................................................29
Notes for Windows Programmers using Fortran..............................29
Binary Data File Function Reference ....................................... 29
Defining Polyhedral and Polygonal Data ............................... 66
Boundary Faces and Boundary Connections ....................................67
FaceNodeCounts and FaceNodes.......................................................68
FaceRightElems and FaceLeftElems..................................................69
FaceBoundaryConnectionElements and Zones.................................70
Partially Obscured Boundary Faces..................................................70
Examples...................................................................................... 71
Face Neighbors ..................................................................................71
Polygonal Example............................................................................78
Multiple Polyhedral Zones................................................................83
Multiple Polygonal Zones.................................................................95
Polyhedral Example........................................................................ 107
IJ-ordered zone................................................................................ 110
Switching Between Two Files......................................................... 113
Text Example .................................................................................. 116
Partitioned Data Examples ............................................................ 118
4
ASCII Data File Conversion to Binary................................... 158
Preplot Options .............................................................................. 158
Preplot Examples............................................................................ 158
5
Table of Contents
6
1
Introduction
Tecplot 360 can read data produced in many different formats using the data loaders provided with the
product. This manual describes a complementary approach: writing your data in the Tecplot 360 data
format so it can be read natively, providing the best experience for Tecplot 360 users.This Data Format
Guide includes the following topics:
• Chapter 2: “Data Structure” Learn about the different types of data structure available in
Tecplot 360 and how to use them.
• Chapter 3: “Binary Data” Refer to this chapter for details on outputting data in Tecplot 360’s
binary file format (.plt) or the newer subzone load format (.szplt) using the “classic” APIs in the
TecIO library, a collection of routines we provide that you can use to write files in these format
from your software.
• Chapter 4: “ASCII Data” We strongly recommend that you create binary data files. However,
we provide the ASCII data format, as it is very convenient for producing small, simple files.
• Chapter 5: “Reading SZL Data Files” and Chapter 6: “Writing SZL Data Files (New API)”
describe using newer TecIO APIs to read and write files in Tecplot’s SZL (.szplt) binary format.
• Appendix A: “Binary Data File Format”, documents the .plt binary file format.
• Appendix C: “Glossary” Refer to the Glossary for the definitions of terms used throughout the
manual.
Before continuing to either the Binary or ASCII chapter, please review this overview of
Best Practices.
7
Introduction
.szplt files instead of, or in addition to, .plt files. For new development, we suggest using the newer API
described in Chapter 6: “Writing SZL Data Files (New API)”.
For the purposes of this discussion, “polyhedral” refers to either polyhedral or polygonal
zones.
If you intend to create data files that will load in both Tecplot 360 and Tecplot Focus, be aware that
polyhedral and polygonal zones are not supported by Tecplot Focus. If any of the zones in a given data file
are polyhedral, you will not be able to load the data file into Tecplot Focus. To create data files that will
load in both products, you must use either ordered zones or “classic” (cell-based) finite element zones
(triangular, quadrilateral, tetrahedral or brick elements).
The TecIO library file included with each release of Tecplot Focus is identical to the library file included
with the corresponding release of Tecplot 360 and can create polyhedral zones, even though you will not
be able to load the data files into Tecplot Focus. Similarly, this guide is largely the same for both products;
we have included reminders throughout about this Tecplot Focus limitation.
The subzone load file format (.szplt) is not supported by Tecplot Focus, nor by legacy versions of Tecplot
360 (versions without “EX” in their designation). Current versions of Tecplot Focus (2016 R1 and later),
derived from Tecplot 360 EX, also limit the number of data elements in a single data set to 5 million.
8
Best Practices
Binary files can only be written in block format. Point format is allowed for ASCII files,
but running the preplot utility will convert the data to block format.
9
Introduction
• SZL doesn’t support big-endian byte ordering and only supports Native Byte Ordering
at this time. TECFOREIGN142 has not yet been implemented in the SZL API.
10
Auxiliary Data Influencing Tecplot 360’s Behavior
each node or cell, and the constant value is used only for reference (free-stream) value
calculations.
Common.GasConstant double For compressible flow only, the gas constant of the fluid.
For compressible flow only, the data set variable that holds
Common.GasConstantVar int
the value of the gas constant.
Common.Gamma double For compressible flow only, the ratio of specific heats.
For compressible flow only, the data set variable that holds
Common.GammaVar int
the value of the ratio of specific heats.
The data set variable that holds the value of the fluid
Common.ViscosityVar int
dynamic viscosity
The data set variable that holds the value of the fluid
Common.ConductivityVar int
thermal conductivity.
• Any zones marked with a ʺCommon.IsBoundaryZoneʺ value of ʺYesʺ, ʺYʺ, ʺTrueʺ, ʺTʺ, or ʺONʺ
are also listed as boundaries in the Geometry and Boundaries dialog. The type of each
boundary zone is taken from the zoneʹs value of ʺCommon.BoundaryConditionʺ. Recognized
boundary types are ʺInterzoneʺ, ʺInflowʺ, ʺOutflowʺ, ʺWallʺ, ʺSlip Wallʺ, ʺSymmetryʺ, and
ʺExtrapolatedʺ.
• In addition to the zone aux data mentioned above for boundary assignments, some dataset
aux data affects settings in the Analyze>Geometry and Boundaries dialog:
• The following data set aux data variables affect settings in the Analyze>Field Variables dialog.
Note that only two of Common.PressureVar, Common.TemperatureVar, Common.DensityVar,
Common.StagnationEnergyVar and Common.MachNumberVar should be set. Also,
11
Introduction
Common.PressureVar double The data set variable that holds values of pressure.
Common.TemperatureVar double The data set variable that holds values of temperature.
For compressible flow only, the data set variable that holds
Common.DensityVar double
values of density.
Common.StagnationEnergyVar double The data set variable that holds values of stagnation energy.
• Reference (free-stream) conditions may be set by the following dataset aux data variables, and
will be reflected in the Analyze/Reference Values dialog. Note that
Common.ReferenceMachNumber, Common.ReferenceDensity and
Common.ReferenceSpeedOfSound should not be used for incompressible flow:
Common.ReferenceMachNumber double For compressible flow only, the reference Mach number.
Common.ReferenceSpeedOfSound double For compressible flow only, the reference speed of sound.
• The following dataset aux data values may be set to identify dataset variables for turbulent
flow calculations. These settings will be reflected in the Analyze>Calculate Turbulence
Functions dialog. You should specify only two of these:
12
Auxiliary Data Influencing Tecplot 360’s Behavior
13
2
Data Structure
Tecplot 360 accommodates two different types of data: Ordered Data and Finite Element Data. Ordered
data is a set of points logically stored in a one-, two-, or three-dimensional array, where I, J, and K are the
index values within the array. The number of data points is the product of all of the dimensions within the
array. Finite-element data is arranged in two arrays, a variable array and a connectivity matrix. The
variable array is a collection of points in 2D or 3D space that are connected into polygonal or polyhedral
units called elements. The connections between the nodes are defined by the connectivity matrix.
A connectivity list is used to define which nodes are included in each element of an ordered or cell-based
finite element zone. You should know your zone type and the number of elements in each zone in order to
create your connectivity list.
The number of nodes required for each element is implied by your zone type. For example, if you have a
finite element quadrilateral zone, you will have four nodes defined for each element. Likewise, you must
provide eight numbers for each cell in a BRICK zone, and three numbers for each element in a TRIANGLE
zone. If you have a cell that has a smaller number of nodes than that required by your zone type, simply
repeat a node number. For example, if you are working with a finite element quadrilateral zone and you
would like to create a triangular element, simply repeat a node in the list (e.g., 1,4,5,5).
In the example below, the zone contains two quadrilateral elements. Therefore, the connectivity list must
have eight values. The first four values define the nodes that form Element 1. The second four values
define the nodes that form Element 2.
14
Ordered Data
15
Data Structure
Figure 2-1. This figure shows finite element data used to model a complex boundary. This plot file,
feexchng.plt, is located in your Tecplot 360 distribution under the examples/2D subdirectory.
Finite element data defines a set of points (nodes) and the connected elements of these points. The
variables may be defined either at the nodes or at the cell (element) center. Finite element data can be
divided into three types:
• Line data is a set of line segments defining a 2D or 3D line. Unlike I-ordered data, a single
finite element line zone may consist of multiple disconnected sections. The values of the
variables at each data point (node) are entered in the data file similarly to I-ordered data,
where the nodes are numbered with the I-index. This data is followed by another set of data
16
Finite Element Data
defining connections between nodes. This second section is often referred to as the
connectivity list. All elements are lines consisting of two nodes, specified in the connectivity
list.
• Surface data is a set of triangular, quadrilateral, or polygonal elements defining a 2D field or a
3D surface. When using polygonal elements, the number of sides may vary from element to
element. In finite element surface data, you can choose (by zone) to arrange your data in three
point (triangle), four point (quadrilateral), or variable-point (polygonal) elements. The number
of points per node and their arrangement are determined by the element type of the zone. If a
mixture of quadrilaterals and triangles is necessary, you may repeat a node in the quadrilateral
element type to create a triangle, or you may use polygonal elements.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
• Volume data is a set of tetrahedral, brick, or polyhedral elements defining a 3D volume field.
When using polyhedral elements, the number of sides may vary from element to element.
Finite element volume cells may contain four points (tetrahedron), eight points (brick), or
variable points (polyhedral). The figure below shows the arrangement of the nodes for
tetrahedral and brick elements. The connectivity arrangement for polyhedral data is governed
by the method in which the polyhedral facemap data is supplied.
For cell-based element types (triangular, quadrilateral, tetrahedral, or brick), you can
simulate zones with mixed element types by repeating nodes as necessary. For example,
a triangle element can be included in a quadrilateral zone by repeating one node in the
element’s connectivity list, and tetrahedral, pyramidal, and prismatic elements can be
included in a brick zone by repeating nodes appropriately.
Section 4 - 5 “Finite Element Data” on page 143 provides detailed information about how to
format your FE data in Tecplot’s data file format.
17
Data Structure
connections between nodes. This second section is often referred to as the connectivity list. All elements are
lines consisting of two nodes, specified in the connectivity list.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
18
Variable Location
A B C
Figure 2-4. A: Example of node and face neighbors for an FE-brick cell or IJK-ordered cell. B: Example of
node and face numbering for an IJ-ordered/ FE-quadrilateral cell. C: Example of tetrahedron
face neighbors.
The implicit connections between elements in a zone may be overridden, or connections between cells in
adjacent zones established by specifying face neighbor criteria in the data file. Refer to Section
“TECFACE142” on page 32 for additional information.
19
Data Structure
20
Time and Date Representation
Tecplot 360 supports dates from 1800-01-01 through 9999-12-31. This formatting matches the
representation method used by Microsoft Excel, enabling you to load time/date data easily from Excel into
Tecplot 360. However, because Excel software’s original formatting incorrectly calculated 1900 as a leap
year, only dates from Mar 1, 1900 forward will import correctly into Tecplot 360.
21
3
Binary Data
This chapter is intended for experienced programmers who need to create Tecplot binary data files
directly. Support for topics discussed in this chapter is limited to general questions about writing Tecplot
binary files. It is beyond the scope of our Technical Support to offer programming advice or to debug
programs.
It is easy to write ASCII files in text format, and they have the advantage that you can inspect them using a
text editor to make sure they are being written correctly. Their primary disadvantages are that they can
consume much more disk space than binary files and are slower to load, which is especially noticeable
when they are large. While users can convert them to the binary format with the Preplot utility (see
Section 4 - 1 “Converting ASCII to Binary” for additional information), it is much more efficient to simply
write them in binary format to begin with.
To output your data directly into Tecplot’s basic binary file format, .plt, you may use the TecIO library,
which is provided at no cost by Tecplot, Inc., or you may write your own binary functions. If you wish to
write your own functions, refer to Appendix A: ʺBinary Data File Formatʺ for details on the structure of
.plt files. If you wish to link with the library provided by Tecplot, begin with Section 3 - 1 “Getting Started”
and use Appendix A: ʺBinary Data File Formatʺ only for reference.
If you wish to write files in the newer .szplt format, you must use the TecIO library, as this file format is
currently not documented.
You can find source files for most of the examples in this chapter in the util/tecio/
examples folder of your Tecplot 360 EX installation.
22
Getting Started
You may also download the latest version of TecIO from the Tecplot Web site. (This may be a newer
version than the one described in this document.) Tecplot 360 EX and Focus both contain precompiled
versions of TecIO in their base installation. The download from the website only contains the source files.
Before preparing to output your data in Tecplot’s binary format using the TecIO library, we recommend
you proceed as follows:
1. Review Chapter 2: “Data Structure” for information on how zones and data are structured,
Section 3 - 5 “Binary Data File Function Calling Sequence” and Section 3 - 6 “Writing to
Multiple Binary Data Files”.
2. Review the example files in the examples/tecio folder. The example programs demonstrate the
use of the TecIO utility functions and are provided in both FORTRAN and C/C++:
• simtest.f, simtest.f90, simtest.cpp - These files demonstrate simple use of the TecIO
utility functions.
• comtest.f, comtest.f90, comtest.cpp - These files demonstrate complex use of TecIO
utility functions, such as multiple file generation and transient data.
Numerous additional, more modern examples included in the TecIO package target specific
actions, like writing polyhedral data. Review these examples for additional guidance.
3. Follow the instructions in Section 3 - 7 “Linking with the TecIO Library” for information on
setting up your project to develop with TecIO and linking with the library.
1. MPI (Message Passing Interface) is a standardized, portable message-passing system available on a variety
of parallel computing architectures. It is commonly used in compute clusters to coordinate tasks running on
multiple nodes.
23
Binary Data
Example Description
Complex Example comtest, create multiple plt files containing multiple zones
(structured/unstructured/XY Line), also creates geometries and text.
FE (Unstructured) faceneighbors, creates plt file of simple squares with face neighbor
Face Neighbors information.
Ordered ij_ordered, creates two, small, 2D, ordered zones with contour
variable information.
Ordered Partitioned ijkpartitioned, creates a .szplt file with an IJK ordered zone in 4
partitions, uses TecIO MPI.
Read/Write Szplt rewriteszl, creates a utility that reads in a .szplt file and writes it out
to another .szplt file
1. On Windows, TeciO-MPI is compiled against Microsoft MPI 4.2.4400.0. On Mac and Linux, it is compiled
against OpenMPI 1.10.0.
24
Binary File Compatibility
By comparison to non-partitioned zones, only a couple of additional TecIO function calls are required
when writing partitioned zones, and only a couple more beyond that when writing in parallel using MPI .
Two versions of the TecIO library are provided: tecio and teciompi. The latter requires a compatible MPI
library. (Note that non-MPI tecio does support writing partitioned zones, just not in parallel.)
The teciompi library only writes SZL (.szplt) files; it does not write traditional Tecplot binary (.plt) files.
Partitioned solution of large CFD cases typically requires that zone partitions overlap slightly. That is, the
nodes or cells on the each side of the boundary between partitions will reside in more than one solver
process: in the one that “owns” it according to the partitioning rules, as well as in any processes solving a
partition spatially adjacent to it. In processes other than the one that “owns” them, such data are
commonly referred to as “ghost cells” and “ghost nodes.”
The TecIO library needs information about these overlapping cells and nodes in order to later allow the
partitioned data to be joined into a single virtual data set suitable for visualization. For finite-element
zones, each solver process must pass a list of its ghost nodes and cells along with the zone data (which
should include the ghost nodes and cells). For ordered zones, the solver need pass only the nodes that
form non-ghost cells, which provides sufficient information for later reassembling the data.
The code sample brickpartitioned is useful for understanding how to write partitioned zones, and includes
the additional function calls needed for writing partitioned data in parallel using MPI. The ijkpartitioned
code sample shows this for an IJK-ordered zone, and also demonstrates outputting non-partitioned zones
from various MPI ranks.
25
Binary Data
API version 142 or later allows applications to select between the .plt and .szplt file formats at runtime, a
feature introduced with Tecplot 360 2014 R2. In Tecplot 360 2014 R1, two versions of the TecIO library were
provided, one that wrote .plt files and one that wrote .szplt files. Both had identical APIs; the file format
was determined solely by the version of the library you linked with your application. In Tecplot 360 2014
R2 and later, a parameter was added to TECINI to choose the format when opening the file for writing (see
TECINI142). The current TecIO library always writes .plt files when using an API version below 142, since
there is no way to specify the file format with these older APIs.
26
Binary Data File Function Calling Sequence
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
27
Binary Data
TECNOD142 or TECNODE142 (One or more calls for each finite element zone)
TECFACE142 (One call for each zone with face connections)
TECZAUXSTR142 (main process only)
TECLAB142 (main rank only)
TECGEO142 (main rank only)
TECTXT142 (main rank only)
TECUSR142 (main rank only)
TECEND142
3 - 7.1 Linux/Macintosh
To link with the TecIO library, pass the full path to the tecio (or teciompi) library to your compiler or linker
along with all other input files needed to compile and link your application. The TecIO library is written in
C++, so in addition to linking it, you will likely also need to link in the C++ standard library.
For example, to create an output file my-executable from a C source file of my-prog.c and link in the TecIO
library and the C++ standard library:
cc -o my-executable my-prog.c /path/to/libtecio.so -lstdc++ (Linux) or
cc -o my-executable my-prog.c /path/to/libtecio.dylib -lstdc++ (Mac)
For TecIO-MPI, instead use /path/to/libteciompi.so or /path/to/libteciompi.dylib depending on platform.
The stdc++ library used to build the tecio library in your Tecplot 360 EX installation may be newer than the
one provided on your platform. If so, link against the version of the stdc++ library provided in your Tecplot
360 EX installation. See the file util/tecio/examples/base.make inside your Tecplot 360 EX installation
directory for an example of this.
28
Binary Data File Function Reference
#include the TecIO header file TECIO.h in your source files. It may be found in the include directory of your
Tecplot 360 installation.
Fortran programmers: some Fortran 90 compilers do not recognize the .f90 filename
extension.
3 - 7.2 Windows
To link with the TecIO library, list tecio.dll (or, for TecIO-MPI, teciompi.dll) as an additional dependency in
your Visual Studio project. #include the TecIO header file TECIO.h in your source files. It may be found in
the include directory of your Tecplot 360 installation.
To ensure Windows finds tecio.dll when launching your executable, ensure its location is in your PATH
environment variable, or else copy it to your executableʹs directory. The latter approach is generally best,
as it ensures that the correct version will be used if multiple copies of the library are installed on the
machine.
TECAUXSTR142
Writes auxiliary data for the data set to the data file. The function may be called at any time between
TECINI142 and TECEND142. Auxiliary data may be used by text, macros, equations (if it is numeric) and
add-ons. It may be viewed directly in the Aux Data page of the Data Set Information dialog (accessed via
the Data menu).
When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECAUXSTR142(Name,
& Value)
CHARACTER*(*) Name
CHARACTER*(*) Value
C Syntax:
#include TECIO.h
INTEGER4 TECAUXSTR142( char *Name,
char *Value)
29
TECDAT142
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Name The name of the auxiliary data. If this duplicates an existing name, the value will overwrite the
existing value. It must be a null-terminated character string and cannot contain spaces.
Value The value to assign to the named auxiliary data. It must be a null-terminated character string.
Example
For example, to set an Auxiliary Variable called DeformationValue to 0.98:
char DeformationValue[128];
strcpy(DeformationValue,"0.98");
TECAUXSTR142("DeformationValue",
DeformationValue);
When the data file is loaded into Tecplot, “Deformation Value” will appear on the Aux Page of the Data Set
Information dialog when “for Data Set” is selected in Show Auxiliary Data menu.
TECDAT142
Writes an array of data to the data file. Data should not be passed for variables that have been indicated as
passive or shared (via TECZNE142 or TECPOLYZNE142 or TECZNEFEMIXED142).
TECDAT142 allows you to write your data in piecemeal fashion in case it is not contained in one contiguous
block in your program or is not available all at once. TECDAT142 must be called enough times to ensure that
the correct number of values is written for each zone and that the aggregate order for the data is correct.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECDAT142(N,
& Data,
& IsDouble)
INTEGER*4 N
REAL or DOUBLE PRECISION Data(1)
INTEGER*4 IsDouble
C Syntax:
#include TECIO.h
INTEGER4 TECDAT142( INTEGER4 *N,
void *Data,
INTEGER4 *IsDouble);
Return Value:
0 if successful, -1 if unsuccessful.
30
TECDAT142
Parameters:
Parameter Description
N Pointer to an integer value specifying number of values to write.
Array of single or double precision data values. Refer to Table 3 - 2 for a description of how to
Data
arrange your data.
IsDouble Pointer to the integer flag stating whether the array Data is single (0) or double (1) precision.
Data Arrangement
The following table describes the order the data must be supplied given different zone types. VarLocation
is a parameter supplied to TECZNE142 or TECPOLYZNE142.or TECZNEFEMIXED142
Example
Refer to the following examples in Section 3 - 10 “Examples” for examples using TECDAT142:
• Section 3 - 10.1 “Face Neighbors”
• Section 3 - 10.2 “Polygonal Example”
• Section 3 - 10.3 “Multiple Polyhedral Zones”
31
TECEND142
TECEND142
Must be called to close the current data file. There must be one call to TECEND142 for each TECINI142 or data
may be lost. (When writing .szplt files, all data are held in memory until TECEND142 is called.)
When writing partitioned data, this call will block until all processes involved in writing the data have
called it.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECEND142()
C Syntax:
#include TECIO.h
INTEGER4 TECEND142();
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
None.
TECFACE142
Writes face connections for the current zone to the file. Face Neighbor Connections are used for ordered or
cell-based finite element zones to specify connections that are not explicitly defined by the connectivity list
or ordered zone structure. You many use face neighbors to specify connections between zones (global
connections) or connections within zones (local connections). Face neighbor connections are used by
Tecplot when deriving variables or drawing contour lines. Specifying face neighbors typically leads to
smoother connections. NOTE: face neighbors have expensive performance implications. Use face
neighbors only to manually specify connections that are not defined via the connectivity list.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
This function must be called after TECNOD142 or TECNODE142, and may only be called if a non-zero
value of NumFaceConnections was used in the previous call to TECZNE142 or TECZNEFEMIXED142.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECFACE142(FaceConnections)
INTEGER*4 FACECONNECTIONS(*)
C Syntax:
#include TECIO.h
32
TECFACE142
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
The array that specifies the face connections. The array must have L values, where L is the
sum of the number of values for each face neighbor connection in the data file. The number
FaceConnections of values in a face neighbor connection is dependent upon the FaceNeighborMode parameter
(set via TECZNE142 or TECZNEFEMIXED142) and is described in the following table.
GlobalOneToMany 2*nz+4 cz, fz, oz, nz, ZZ1, CZ1, ZZ2, CZ2, ...,ZZn, CZn
Where:
cz = cell in current zone
ZZ = remote Zone
cz,fz combinations must be unique. Additionally, Tecplot 360 assumes that with the one-to-one face
neighbor modes a supplied cell face is entirely obscured by its neighbor. With one-to-many, the
obscuration flag must be supplied. Faces that are not supplied with neighbors are run through Tecplot
360’s auto face neighbor generator (FE only).
33
TECFEMIXEDPTN142
The face numbers for cells in the various zone types are defined in Figure 3-1.
A B C
Figure 3-1. A: Example of node and face neighbors for an FE-brick cell or IJK-ordered cell. B: Example of node and
face numbering for an IJ-ordered/ FE-quadrilateral cell. C: Example of tetrahedron face neighbors.
Example
Refer to Section 3 - 10.1 “Face Neighbors” for an example of working with face neighbors. In this example,
face neighbors are used to prevent an Edge line from being drawn between the two zones.
TECFEMIXEDPTN142
When writing a partitioned FE-mixed element zone to a .szplt file, provides information about the
partition about to be written. Must be called after TECZNEFEMIXED142 (and, for TecIO-MPI,
TECZNEMAP142) but before calling TECDAT142 and TECNOD142/TECNODE142 to actually write the
data. Should not be called for non-partitioned zones (or equivalently, zones that have only one partition).
A partition may include nodes and cells that overlap other partitions, commonly referred to as “ghost
nodes” and “ghost cells.” The TECZNEFEMIXED142 function call specifies this ghost data, allowing the
partitions to be later reassembled seamlessly into a single zone when loaded for visualization. Each node
or cell should be considered to be “owned” by one process, and that process should not report that node
or cell as a “ghost.” Any other process that has that node or cell in its partition should include it in the list
of ghost nodes or cells, respectively, passed to TECZNEFEMIXED142. The array containing the number of
cells per section and the number of ghost cells per section must be dimensioned by the number of sections
for the zone. All partitions of the zone must deliver both arrays dimensioned by the number of sections for
the zone. If a partition does not have cells in a given section it must set the number of cells for that section
to zero. The ghostCells array is a flat array containing the ghost cells for each section, back to back,
interpreted by looking at the counts in the numGhostCellsPerSection array.
All partitions must include data for the actual “ghost” nodes and cells using the appropriate function calls
(e.g. TECDAT142, TECNOD142/TECNODE142).
FORTRAN Syntax
INTEGER*4 FUNCTION TECFEMIXEDPTN142(partition
& numNodes,
& numCellsPerSection,
& numGhostNodes,
& ghostNodes,
& neighborPartitions,
& neighborPartitionNodes,
& numGhostCellsPerSection,
34
TECFEMIXEDPTN142
& ghostCells)
INTEGER*4 partition
INTEGER*8 numNodes
INTEGER*8 numCellsPerSection
INTEGER*8 numGhostNodes
INTEGER*4 ghostNodes
INTEGER*4 neighborPartitions
INTEGER*4 neighborPartitionNodes
INTEGER*8 numGhostCellsPerSection
INTEGER*4 ghostCells
C Syntax:
#include "TECIO.h"
INTEGER4 TECFEMIXEDPTN142(
INTEGER4 const* partition,
INTEGER8 const* numNodes,
INTEGER8 const* numCellsPerSection,
INTEGER8 const* numGhostNodes,
INTEGER4 const* ghostNodes,
INTEGER4 const* neighborPartitions,
INTEGER4 const* neighborPartitionNodes,
INTEGER8 const* numGhostCellsPerSection,
INTEGER4 const* ghostCells)
Return value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
The number of the current partition. Partitions are numbered from 1 to the number of partitions
partition
(as specified in the TECZNEMAP142 call) inclusive.
numNodes The number of nodes in the partition, including any ghost nodes.
The number of cells in each section of the partition, including any ghost cells. The array must be
numCellsPerSection dimensioned by the number of sections in the zone and is the same dimension for all partitions. If
a partition does not have any cells in a given section a value of zero should be set for that section.
Array of length numGhostNodes specifying the indices of the ghost nodes. Each ghost node
ghostNodes
must be specified exactly once.
Array of length numGhostNodes specifying the owning partition of each ghost node, in the
neighborPartitions
order in which they are specified in ghostNodes.
Array of length ngnodes specifying the node index by which each ghost node is known in its
neighborPartitionNodes
owning partition, again in the order specified in ghostNodes.
The number of ghost cells in each section of the partition. The array must be dimensioned by the
numGhostCellsPerSection number of sections in the zone and is the same dimension for all partitions. If a partition does not
have any ghost cells in a given section a value of zero should be set for that section.
Flat array of a length that is the sum of the members of the numGhostCellsPerSection array
ghostCells
containing the ghost cells for each section of the partition listed back to back.
35
TECFEPTN142
TECFEPTN142
When writing a partitioned classic finite-element zone to a .szplt file, provides information about the
partition about to be written. Must be called after TECZNE142 or TECZNEMAP142(and, for TecIO-MPI,
TECZNEMAP142) but before calling TECDAT142 and TECNOD142/TECNODE142 to actually write the
data. Should not be called for non-partitioned zones (or equivalently, zones that have only one partition).
A partition may include nodes and cells that overlap other partitions, commonly referred to as “ghost
nodes” and “ghost cells.” The TECFEPTN142 function call specifies this ghost data, allowing the partitions
to be later reassembled seamlessly into a single zone when loaded for visualization. Each node or cell
should be considered to be “owned” by one process, and that process should not report that node or cell
as a “ghost.” Any other process that has that node or cell in its partition should include it in the list of
ghost nodes or cells, respectively, passed to TECFEPTN142.
All partitions must include data for the actual “ghost” nodes and cells using the appropriate function calls
(e.g. TECDAT142, TECNOD142/TECNODE142).
FORTRAN Syntax:
INTEGER*4 FUNCTION TECFEPTN142(partition,
& numnodes,
& numcells,
& ngnodes,
& gnodes,
& gnpartitions,
& gnpnodes,
& ngcells,
& gcells)
INTEGER*4 partition
INTEGER*4 numnodes
INTEGER*4 numcells
INTEGER*4 ngnodes
INTEGER*4 gnodes
INTEGER*4 gnpartitions
INTEGER*4 gnpnodes
INTEGER*4 ngcells
INTEGER*4 gcells
C Syntax:
#include TECIO.h
INTEGER4 TECFEPTN142(INTEGER4 *partition,
INTEGER4 *numnodes,
INTEGER4 *numcells,
INTEGER4 *ngnodes,
INTEGER4 *gnodes,
INTEGER4 *gnpartitions,
INTEGER4 *gnpnodes,
INTEGER4 *ngcells,
INTEGER4 *gcells);
Return Value:
0 if successful, nonzero if unsuccessful.
36
TECFIL142
Parameters:
Parameter Description
The number of the current partition. Partitions are numbered from 1 to the number of partitions
partition
(as specified in the TECZNEMAP142 call) inclusive.
numnodes The number of nodes in the partition, including any ghost nodes.
numcells The number of cells in the partition, including any ghost cells.
Array of length ngnodes specifying the indices of the ghost nodes. Each ghost node must be
gnodes
specified exactly once.
Array of length ngnodes specifying the owning partition of each ghost node, in the order in
gnpartitions
which they are specified in gnodes.
Array of length ngnodes specifying the node index by which each ghost node is known in its
gnpnodes
owning partition, again in the order specified in gnodes.
Array of length ngcells specifying the indices of the ghost cells. Each ghost cell must be specified
gcells
exactly once.
TECFIL142
Switch output context to a different file. Each time TECINI142 is called, a new file context is created. This
allows you to write multiple data files concurrently. When working with multiple files, be sure to call
TECFIL142 each time you wish to write to a file to ensure your data is written to the expected file.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECFIL142(F)
INTEGER*4 F
C Syntax:
#include TECIO.h
INTEGER4 TECFIL142(INTEGER4 *F);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Pointer to integer specifying file number to switch to. A value of 1 indicates a switch to the file
F
opened by the first call to TECINI142.
Examples
Refer to Section 3 - 10.7 “Switching Between Two Files” for a simple example of working with TECFIL142.
37
TECFLUSH142
TECFLUSH142
Optional, implemented for SZL file output only. May be called at any point where the current zone data
and connectivity (if any) are complete. This call will append current data to six temporary files (creating
the files if they do not already exist), and release associated Tecio memory. The names of these files are the
filename supplied to TECINI142, appended with each of six file suffixes: .szhdr, .szdat, .szaux, .sztxt,
.szgeo and .szlab. These six files, along with any data not yet flushed to disk, will be assembled into the
final .szplt file when TECEND142 is called.
If using TecIO-MPI, this is a collective function - it must be called by all processes in the communicator
that was supplied in the call to TECMPIINIT142, and will block until all processes have called it.
This routine is useful for unsteady solvers that write multiple time steps of data to disk and wish to write
them all to a single .szplt file. It prevents Tecio from caching all of those time steps in memory, which
might exhaust all available memory on the solver machine. It is an alternative to grid/solution files, and
should not be used when writing grid/solution files because it adds unnecessary processing overhead for
no benefit.
At any time after the first call to TECFLUSH142, the temporary files may be assembled manually using
shell utility szcombine. Please see the documentation for SZCOMBINE for more information.
The data can be left in the temporary files, and even appended to in subsequent solver runs, by not calling
TECEND142 at the end of the solver run. To append to existing temporary files in a new solver run, pass
the same file name to TECINI142 as was used to create the temporary files in the first solver run. Note that
the time steps of the new solver run will not be able to share variables or connectivity with any time steps
from previous solver runs.
Fortran Syntax:
INTEGER*4 TECFLUSH142(NumZonesToRetain,
& ZonesToRetain)
INTEGER*4 NumZonesToRetain
INTEGER*4 ZonesToRetain(*)
C Syntax:
INTEGER4 TECFLUSH142(
INTEGER4 const* NumZonesToRetain,
INTEGER4 const* ZonesToRetain);
Return value:
0 if successful, -1 otherwise.
38
TECFOREIGN142
Parameters:
Parameters Description
NumZonesToRetain The number of zones to retain in Tecio memory for sharing from subsequent zones.
ZonesToRetain The list of zones to retain in Tecio memory. These zones will be written to the temporary
files, but will also be retained in memory so that they are available for variable or
connectivity sharing by zones to be output later. These are the only zone numbers that
may be referenced by the parameters ShareVarFromZone or
ShareConnectivityFromZone in subsequent calls to TECZNE142 or
TECZNEFEMIXED142.
TECFOREIGN142
Optional function that sets the byte ordering request for subsequent calls to TECINI142. The byte ordering
request will remain in effect until the next call to this function. This has no effect on any files already
opened via TECINI142. Use this function to reverse the byte ordering from the format native to your
operating system. This function is not much needed today, since current Tecplot products are supported
only on Intel-based platforms; however, it may be useful with older versions of TecIO running on legacy
UNIX platforms that have non-Intel byte orders.
If the function call is omitted, native byte ordering is used.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECFOREIGN142(DoForeignByteOrder)
INTEGER*4 DoForeignByteOrder
C Syntax:
#include TECIO.h
INTEGER4 TECFOREIGN142(INTEGER4 *DoForeignByteOrder);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
TECGEO142
Adds a geometry object to the file (e.g. a circle or a square). You cannot set unused parameters to NULL;
use dummy values for unused parameters.
When using TecIO-MPI, may only be called from the main process.
39
TECGEO142
FORTRAN Syntax:
INTEGER*4 FUNCTION TECGEO142( XOrThetaPos,
& YOrRPos,
& ZPos,
& PosCoordMode,
& AttachToZone,
& Zone,
& Color,
& FillColor,
& IsFilled,
& GeomType,
& LinePattern,
& PatternLength,
& LineThicknessness,
& NumEllipsePts,
& ArrowheadStyle,
& ArrowheadAttachment,
& ArrowheadSize,
& ArrowheadAngle,
& Scope,
& Clipping,
& NumSegments,
& NumSegPts,
& XOrThetaGeomData,
& YOrRGeomData,
& ZGeomData,
& MFC)
DOUBLE PRECISION XOrThetaPos
DOUBLE PRECISION YOrRPos
DOUBLE PRECISION ZPos
INTEGER*4 PosCoordMode
INTEGER*4 AttachToZone
INTEGER*4 Zone
INTEGER*4 Color
INTEGER*4 FillColor
INTEGER*4 IsFilled
INTEGER*4 GeomType
INTEGER*4 LinePattern
DOUBLE PRECISION PatternLength
DOUBLE PRECISION LineThicknessness
INTEGER*4 NumEllipsePts
INTEGER*4 ArrowheadStyle
INTEGER*4 ArrowheadAttachment
DOUBLE PRECISION ArrowheadSize
DOUBLE PRECISION ArrowheadAngle
INTEGER*4 Scope
INTEGER*4 Clipping
INTEGER*4 NumSegments
INTEGER*4 NumSegPts
REAL*4 XOrThetaGeomData
REAL*4 YOrRGeomData
REAL*4 ZGeomData
CHARACTER*(*) MFC
C Syntax:
#include TECIO.h
INTEGER4 TECGEO142(double *XOrThetaPos,
double *YOrRPos,
double *ZPos,
INTEGER4 *PosCoordMode,
INTEGER4 *AttachToZone,
INTEGER4 *Zone,
INTEGER4 *Color,
INTEGER4 *FillColor,
INTEGER4 *IsFilled,
INTEGER4 *GeomType,
INTEGER4 *LinePattern,
double *PatternLength,
double *LineThicknessness,
40
TECGEO142
INTEGER4 *NumEllipsePts,
INTEGER4 *ArrowheadStyle,
INTEGER4 *ArrowheadAttachment,
double *ArrowheadSize,
double *ArrowheadAngle,
INTEGER4 *Scope,
INTEGER4 *Clipping,
INTEGER4 *NumSegments,
INTEGER4 *NumSegPts,
float *XOrThetaGeomData,
float *YOrRGeomData,
float *ZGeomData,
char *MFC)
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
XPos
Pointer to double value specifying the X- position or, for polar line plots, the Theta-
or
position of the geometry.
ThetaPos
YPos
Pointer to double value specifying the Y-position or, for polar line plots, the R-position
or
of the geometry.
RPos
Pointer to integer flag to signal that the geometry is “attached” to a zone. When a
AttachToZone geometry is attached to a zone, it will be visible only when that zone is visible.
1 = Yes 0 = No
Pointer to integer value specifying the number of the zone to attach to. Must be greater
Zone
than or equal to one.
Pointer to integer value specifying the color used to fill the geometry. Refer to Color for
FillColor
a list of available values.
41
TECGEO142
Parameter Description
Pointer to integer value specifying the geometry type.
GeomType 0=2D Line Segments 3=Circle
1=Rectangle 4=Ellipse
2=Square 5=3D Line Segments
Pointer to double value specifying the pattern length in frame units (from 0.01 and less
PatternLength
than 100).
Pointer to double value specifying the line thickness in frame units. The value must be
LineThicknessness
greater than 0.0001 and less than 100.
Pointer to integer value specifying the number of points to use for circles and ellipses.
NumEllipsePts
The value must be between 2 and 720.
ArrowheadSize Pointer to double value specifying the arrowhead size in frame units (from 0 to 100).
Pointer to integer value specifying the scope with respect to frames. A local scope places
the object in the active frame. A global scope places the object in all frames that contain
Scope
the active frame’s data set.
0=Global 1=Local.
Specifies whether to clip the geometry (that is, only plot the geometry within) to the
Clipping viewport or the frame.
0=ClipToViewport 1=ClipToFrame.
Array of integer values specifying the number of points in each of the NumSegments
NumSegPts
segments.
XGeomData
ThetaGeomData
Array of floating-point values specifying the X-, Y- and Z-coordinates. Refer to “Data
YGeomData
Values” on page 43 for information regarding the values required for each GeomType.
RGeomData
ZGeomData
Origin positions
The origin (XOrThetaPos, YOrRPos, ZPos) of each geometry type is listed below:
• SQUARE - lower left corner at XOrThetaPos, YOrRPos.
42
TECIJKPTN142
Data Values
The origin (XOrThetaGeomData, YOrRGeomData, ZGeomData) of each geometry type is listed below:
• SQUARE - set XOrThetaGeomData equal to the desired length.
• RECTANGLE - set XOrThetaGeomData equal to the desired width and YOrThetaGeomData equal to
the desired height.
• CIRCLE - set XOrThetaGeomData equal to the desired radius.
• ELLIPSE - set XOrThetaGeomData equal to the desired width along the x-axis and
YOrThetaGeomData equal to the desired width along the y-axis.
• LINE - specify the coordinate positions for the data points in each line segment with
XOrThetaGeomData and YOrRGeomData.
• LINE3D - specify the coordinate positions for the data points in each line segment with
XOrThetaGeomData, YOrRGeomData and ZGeomData.
TECIJKPTN142
When writing a partitioned IJK-ordered zone to a .szplt file, provides information about the partition
about to be written. Must be called after TECZNE142 (and, for TecIO-MPI, TECZNEMAP142) but before
calling TECDAT142 to actually write the data. Should not be called for non-partitioned zones (or
equivalently, zones that have only one partition).
The TECIJKPTN142 function specifies the I, J, and K indices of the partition (excluding any “ghost” cells),
allowing the partitions to be later reassembled seamlessly into a single zone when loaded for
visualization. The indices passed refer to indices of the entire IJK-ordered zone. Therefore, the I dimension
(for example) of a partition is imax - imin + 1.
Index ranges of neighboring partitions must exactly coincide: for example, if one zone’s imax is 25, the imin
of the partition immediately to the right must be 25.
Data subsequently written using TECDAT142 must output only the data corresponding to the nodes and
cells indicated by this range.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECIJKPTN142(partition,
& imin,
& jmin,
& kmin,
& imax,
& jmax,
& kmax)
INTEGER*4 imin
INTEGER*4 jmin
INTEGER*4 kmin
INTEGER*4 imax
INTEGER*4 jmax
INTEGER*4 kmax
43
TECINI142
C Syntax:
#include TECIO.h
INTEGER4 TECIJKPTN(INTEGER4 *partition,
INTEGER4 *imin,
INTEGER4 *jmin,
INTEGER4 *kmin,
INTEGER4 *imax,
INTEGER4 *jmax,
INTEGER4 *kmax);
Return Value:
0 if successful, nonzero if unsuccessful.
Parameters:
Parameter Description
The number of the current partition. Partitions are numbered from 1 to the number of partitions
partition
(as specified in the TECZNEMAP142 call) inclusive.
TECINI142
Initializes the process of writing a binary data file. This function must be called first before any other TecIO
calls are made (except TECFOREIGN142).
You may write to multiple files by calling TECINI142 more than once. Each time TECINI142 is called, a new
file is created and a new context established for it. Use TECFIL142 to switch between files. For each call to
TECINI, there must be a corresponding call to TECEND142.
If using TecIO-MPI, the TECINI142 call must be followed immediately by a call to TECMPIINIT142.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECINI142( Title,
& Variables,
& FName,
& ScratchDir,
& FileFormat,
& FileType,
& Debug,
& VIsDouble)
CHARACTER*(*) Title
CHARACTER*(*) Variables
CHARACTER*(*) ScratchDir
CHARACTER*(*) FName
INTEGER*4 FileFormat
INTEGER*4 FileType
44
TECLAB142
INTEGER*4 Debug
INTEGER*4 VIsDouble
C Syntax:
#include TECIO.h
INTEGER4 TECINI142(char *Title,
char *Variables,
char *FName,
char*ScratchDir,
INTEGER4*FileFormat,
INTEGER4*FileType,
INTEGER4*Debug
INTEGER4*VIsDouble);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Title Title of the data set. Must be null terminated.
List of variable names. If a comma appears in the string it will be used as the separator between
Variables
variable names, otherwise a space is used. Must be null terminated.
ScratchDir Name of the directory to put the scratch file. Must be null terminated.
Specifies the file format to be used. Ignored by TecIO-MPI, which always writes .szplt files.
FileFormat
0=Tecplot binary (.plt) 1=Tecplot subzone (.szplt)
Specify whether the file is a full data file (containing both grid and solution data), a grid file or a
FileType solution file.
0=Full 1=Grid 2=Solution
Pointer to the integer flag for debugging. Set to 0 for no debugging or 1 to debug. When set to 1,
Debug
the debug messages will be sent to the standard output (stdout).
Pointer to the integer flag for specifying whether field data generated in future calls to
VIsDouble TECDAT142 are to be written in single or double precision.
0=Single 1=Double
Examples
Each example in Section 3 - 10 “Examples” calls TECINI142 at least once. Refer to this section for details.
TECLAB142
Adds custom labels to the data file. Custom Labels can be used for axis labels, legend text, and tick mark
labels. The first custom label string corresponds to a value of one on the axis, the next to a value of two, the
next to a value of three, and so forth. You must have at least one zone in your data set.
A custom label set is added to your file each time you call TECLAB142. You may have up to sixty labels in a
set and up to ten sets in a file. Each label must be surrounded by double-quotes, e.g. “Mon” “Tues” “Wed”,
etc. The \\n escape sequence may be used to indicate a line break.
45
TECMPIINIT142
Custom labels are assigned to an object via the Tecplot interface. Refer to User’s Manual for details.
When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECLAB142(Labels)
CHARACTER*(*) Labels
C Syntax:
#include TECIO.h
INTEGER4 TECLAB142(char *Labels);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Character string of custom labels. Each label must be surrounded by double-quotes. Separate
Labels
labels by a comma or space. You may have up to sixty labels in each call to TECLAB142.
Examples
To add the days of the week to your data file, to be displayed along the x-axis:
char Labels[60] = "\"Mon\", \"Tues\",\"Wed\",\"Thurs\", \”Fri\”";
TECLAB142(&Labels[0]);
TECMPIINIT142
Initializes MPI and joins a specified MPI communicator. This is a collective function. Must be called
immediately after TECINI142 by all processes in the supplied communicator, and will block until all
processes have called it. If processes call TECINI142 multiple times to create multiple files, TECMPIINIT142
must be called immediately after each call to TECINI142. All processes may then switch output among the
open files by calling TECFILE142 as usual.
The mainrank process is the only process that may output non-zone data, such as text, geometries and aux
data.
For TecIO-MPI only; does not exist in standard TecIO library.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECMPIINIT142(communicator, mainrank)
INTEGER*4 communicator
INTEGER*4 mainrank
C Syntax:
#include TECIO.h
INTEGER4 TECMPIINIT142(void* communicator, INTEGER4 const* mainrank);
46
TECNOD142
Return Value:
0 if successful, nonzero if error.
Parameters:
Parameter Description
Pointer to MPI communicator. May be MPI_COMM_WORLD or any other MPI_Comm that includes all
communicator
MPI processes involved in output.
The ID of the process (rank) within the communicator designated as the main process. Must be
mainrank
the same for all calling processes.
TECNOD142
Writes an array of node data to the binary data file. This is the connectivity list for cell-based finite element
zones (line segment, triangle, quadrilateral, brick, and tetrahedral zones). The connectivity list for face-
based finite element zones (polygonal and polyhedral) is specified via TECPOLYFACE142.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Note that node data are not stored in solution files, so do not call TECNOD142 if the file type specified in
TECINI142 was SOLUTION.
See also TECNODE142, which allows you to provide connectivity information in arbitrarily-sized chunks
rather than requiring it all at once.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECNOD142(NData)
INTEGER*4 NData (T, M)
C Syntax:
#include TECIO.h
INTEGER4 TECNOD142(INTEGER4 *NData);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Array of integers listing the nodes for each element. This is the connectivity list, dimensioned (T,
M) (T moving fastest), where M is the number of elements in the zone and T is set according to
NData the following list:
2=Line Segment 4=Tetrahedral
3=Triangle 8=Brick
4=Quadrilateral
47
TECNODE142
Examples:
Refer to Section 3 - 10.1 “Face Neighbors” for examples using TECNOD142.
TECNODE142
Writes a chunk of node data to the binary data file. This is the connectivity list for cell-based finite element
zones (line segment, triangle, quadrilateral, brick, and tetrahedral zones). The connectivity list for face-
based finite element zones (polygonal and polyhedral) is specified via TECPOLYFACE142.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Note that node data are not stored in solution files, so do not call TECNODE142 if the file type specified in
TECINI142 was SOLUTION.
This function is similar to TECNOD142 but does not require that the entire connectivity list be provided at
once. Rather, you may call TECNODE142 as many times as you like, providing connectivity information
for as many elements as you like each time, so long as you eventually provide connectivity information for
all elements in the zone.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECNODE142(N, NData)
INTEGER*4 N
INTEGER*4 NData (T, M)
C Syntax:
#include TECIO.h
INTEGER4 TECNODE142(INTEGER4 *N, INTEGER4 *NData);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
N Pointer to an integer indicating the number of values to write.
Array of integers listing the nodes for each element. This is the connectivity list, dimensioned (T,
N) (T moving fastest), where N is the number of elements provided in this call to TECNODE142
NData and T is set according to the following list:
2=Line Segment 4=Tetrahedral
3=Triangle 8=Brick
4=Quadrilateral
48
TECPOLYFACE142
TECPOLYFACE142
Writes the face nodes of the face map for polygonal and polyhedral zones. All numbering schemes are
one-based. The first node is Node 1, the first Face is Face 1, and so forth. Refer to Section 3 - 9 “Defining
Polyhedral and Polygonal Data” on page 66 for additional information.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
This function may be called any number of times, with any number of face nodes each time, so long as face
nodes for all faces are eventually written. You must also, at some point, call TECPOLYBCONN142 to
specify any boundary connections in the zone; this can be done in any order, even to the point of
interleaving calls to specify boundary connections and face nodes.
Note that face data are not stored in solution files, so do not call TECPOLYFACE142 if the file type
specified in TECINI142 was SOLUTION.
Avoid creating concave objects (or bad meshes), as they will not look good when plotted.
FORTRAN syntax:
INTEGER*4 FUNCTION TECPOLYFACE142(
& NumFaces,
& FaceNodeCounts,
& FaceNodes,
& FaceLeftElems,
& FaceRightElems)
INTEGER*4 NumFaces(*)
INTEGER*4 FaceNodeCounts(*)
INTEGER*4 FaceNodes(*)
INTEGER*4 FaceLeftElems(*)
INTEGER*4 FaceRightElems(*)
C Syntax:
include TECIO.h
INTEGER4 TECPOLYFACE142(INTEGER4 *NumFaces,
INTEGER4 *FaceNodeCounts,
INTEGER4 *FaceNodes,
INTEGER4 *FaceLeftElems,
INTEGER4 *FaceRightElems);
Return Value:
0 if successful; -1 if unsuccessful.
Parameters:
Parameter Description
The number of faces being defined in this call. TECPOLYFACE142 may be called any number of
NumFaces times with any number of faces in each call, so long as all faces in the zone are eventually
defined.
An array used to define the number of nodes in each face. The array is dimensioned by
FaceNodeCounts NumFaces. This is NULL for polygonal zones, as each face in a polygonal zone is already
known to have exactly two nodes.
49
TECPOLYBCONN142
Parameter Description
An array used to specify the nodes belonging to each face. The array is dimensioned by the sum
FaceNodes
of the FaceNodeCounts array for polyhedral zones or, for polygonal zones, twice NumFaces.
An array used to define the left neighboring element for each face. The array is dimensioned by
FaceLeftElems
NumFaces.
An array used to define the right neighboring element for each face. The array is dimensioned
FaceRightElems
by NumFaces.
Examples:
Refer to the following sections for examples using TECPOLYFACE142:
• 3 - 10.2 “Polygonal Example”
• 3 - 10.3 “Multiple Polyhedral Zones”
• 3 - 10.4 “Multiple Polygonal Zones”
• 3 - 10.5 “Polyhedral Example”
TECPOLYBCONN142
Writes the boundary connections of the face map for polygonal and polyhedral zones. Boundary faces are
faces that either have more than one neighboring cell on a side or have at least one neighboring cell in
another zone. (Refer to Section 3 - 9.1 “Boundary Faces and Boundary Connections” on page 67 for a
simple example.)
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
All numbering schemes are one-based. The first node is Node 1, the first face is Face 1, and so forth. Refer
to Section 3 - 9 “Defining Polyhedral and Polygonal Data” on page 66 for additional information.
This function may be called any number of times, with any number of boundary connections each time, so
long as boundary connections for all faces are eventually written. You must also, at some point, call
TECPOLYFACE142 at least once to specify the face nodes. This can be done in any order, even to the point
of interleaving calls to specify boundary connections and face nodes.
Note that connection data are not stored in solution files, so do not call TECPOLYBCONN142 if the file
type specified in TECINI142 was SOLUTION.
Avoid creating concave objects (or bad meshes), as they will not look good when plotted.
FORTRAN syntax:
INTEGER*4 FUNCTION TECPOLYBCONN142(
& NumBndryFaces,
& FaceBndryConnectionCounts,
& FaceBndryConnectionElems,
& FaceBndryConnectionZones)
INTEGER*4 NumBndryFaces(*)
INTEGER*4 FaceBndryConnectionCounts(*)
INTEGER*4 FaceBndryConnectionElems(*)
INTEGER*2 FaceBndryConnectionZones(*)
50
TECPOLYZNE142
C Syntax:
#include TECIO.h
INTEGER4 TECPOLYBCONN142(INTEGER4 *NumBndryFaces,
INTEGER4 *FaceBndryConnectionCounts,
INTEGER4 *FaceBndryConnectionElems,
INTEGER4 *FaceBndryConnectionZones);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
The number of boundary faces being defined in this call. Each call to
TECPOLYBCONN142 may define any number of boundary faces, so long as all
NumBndryFaces
boundary faces (i.e., NumConnectedBoundaryFaces in TECZNE142 or
TECPOLYZNE142) are eventually defined.
An array used to define the boundary element(s) to which each boundary face
FaceBndryConnectionElems
is connected.
FaceBndryConnectionZones An array used to define the zone(s) to which each boundary element belongs.
Examples:
Refer to the following sections for examples using TECPOLYBCONN142:
• 3 - 10.2 “Polygonal Example”
• 3 - 10.3 “Multiple Polyhedral Zones”
• 3 - 10.4 “Multiple Polygonal Zones”
• 3 - 10.5 “Polyhedral Example”
TECPOLYZNE142
This function is provided as an alternative to calling TECZNE142 for face-based finite-element zones
(FEPOLYGON or FEPOLYHEDRON). You are encouraged to use this function instead of TECZNE142or
such zone. This function contains only parameters relevant to face-based zones and also supports zones
with number of faces or number of face nodes exceeding 32-bit limitations (beyond about two billion).
TECPOLYZNE142 writes header information about the next face-based zone to be added to the data file.
This function is not currently available in TecIO-MPI, because face-based zones are not currently
supported by the .szplt file format. After TECPOLYZNE142 is called, you must call TECDAT142 one or
more times, then call TECPOLYFACE142 one or more times, and call TECPOLYBCONN142 one or more
times if NumConnectedBoundaryFaces is non-zero..
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
51
TECPOLYZNE142
FORTRAN syntax:
INTEGER*4 FUNCTION TECPOLYZNE142(ZoneTitle,
& ZoneType,
& NumNodes,
& NumCells,
& NumFaces,
& TotalNumFaceNodes,
& SolutionTime,
& StrandID,
& ParentZone,
& NumConnectedBoundaryFaces,
& TotalNumBoundaryConnections,
& PassiveVarList,
& ValueLocation,
& ShareVarFromZone,
& ShareConnectivityFromZone)
CHARACTER*(*) ZoneTitle
INTEGER*4 ZoneType
INTEGER*4 NumNodes
INTEGER*4 NumCells
INTEGER*8 NumFaces
INTEGER*8 TotalNumFaceNodes
DOUBLE PRECISION SolutionTime
INTEGER*4 StrandID
INTEGER*4 ParentZone
INTEGER*4 NumConnectedBoundaryFaces
INTEGER*4 TotalNumBoundaryConnections
INTEGER*4 PassiveVarList(*)
INTEGER*4 ValueLocation(*)
INTEGER*4 ShareVarFromZone(*)
INTEGER*4 ShareConnectivityFromZone
C Syntax:
include TECIO.h
INTEGER4 TECPOLYZNE142(char *ZoneTitle,
INTEGER4 *ZoneType,
INTEGER4 *NumNodes,
INTEGER4 *NumCells,
INTEGER8 *NumFaces,
INTEGER8 *TotalNumFaceNodes,
double *SolutionTime,
INTEGER4 *StrandID,
INTEGER4 *ParentZone,
INTEGER4 *NumConnectedBoundaryFaces,
INTEGER4 *TotalNumBoundaryConnections,
INTEGER4 *PassiveVarList,
INTEGER4 *ValueLocation,
INTEGER4 *ShareVarFromZone,
INTEGER4 *ShareConnectivityFromZone)
Return Value:
0 if successful; -1 if unsuccessful.
Parameters:
Parameter Notes
52
TECPOLYZNE142
Parameter Notes
53
TECTXT142
Parameter Notes
Examples:
Refer to the following sections for examples using TECPOLYZNE142:
• 3 - 10.2 “Polygonal Example”
• 3 - 10.3 “Multiple Polyhedral Zones”
• 3 - 10.4 “Multiple Polygonal Zones”
• 3 - 10.5 “Polyhedral Example”
TECTXT142
Adds a text box to the file. When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECTXT142( XOrThetaPos,
& YOrRPos,
& ZOrUnusedPos,
& PosCoordMode,&
& AttachToZone,
& Zone,
& Font,
& FontHeightUnits,
& FontHeight,
& BoxType,
& BoxMargin,
& BoxLineThickness,
& BoxColor,
& BoxFillColor,
& Angle,
& Anchor,
& LineSpacing,
& TextColor,
& Scope,
& Clipping,
54
TECTXT142
& Text,
& MFC)
DOUBLE PRECISION XOrThetaPos
DOUBLE PRECISION YOrRPos
DOUBLE PRECISION ZOrUnusedPos
INTEGER*4 PosCoordMode
INTEGER*4 AttachToZone
INTEGER*4 Zone
INTEGER*4 Font
INTEGER*4 FontHeightUnits
DOUBLE PRECISION FontHeight
INTEGER*4 BoxType
DOUBLE PRECISION BoxMargin
DOUBLE PRECISION BoxLineThickness
INTEGER*4 BoxColor
INTEGER*4 BoxFillColor
DOUBLE PRECISION Angle
INTEGER*4 Anchor
DOUBLE PRECISION LineSpacing
INTEGER*4 TextColor
INTEGER*4 Scope
INTEGER*4 Clipping
CHARACTER*(*) Text
CHARACTER*(*) MFC
C Syntax:
#include TECIO.h
INTEGER4 TECTXT142( double *XOrThetaPos,
double *YOrRPos,
double *ZOrUnusedPos,
INTEGER4*PosCoordMode,
INTEGER4*AttachToZone,
INTEGER4*Zone,
INTEGER4*Font,
INTEGER4*FontHeightUnits,
double*FontHeight,
INTEGER4*BoxType,
double*BoxMargin,
double*BoxLineThickness,
INTEGER4*BoxColor,
INTEGER4*BoxFillColor,
double*Angle,
INTEGER4*Anchor,
double*LineSpacing,
INTEGER4*TextColor,
INTEGER4*Scope,
INTEGER4*Clipping,
char*Text,
char*MFC)
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Pointer to double value specifying the X-position or Theta-position (polar plots only) of the
XOrThetaPos
text.
YOrRPos Pointer to double value specifying the Y-position or R-position (polar plots only) of the text.
55
TECTXT142
Parameter Description
Pointer to integer value specifying the position coordinate system.
0=Grid
PosCoordMode 1=Frame
6=Grid3D
If you use Grid3D, the plot type must be set to 3D Cartesian to view your text box.
AttachToZone Pointer to integer flag to signal that the text is “attached” to a zone.
Zone Pointer to integer value specifying the zone number to attach to.
Pointer to double value specifying the font height. If PosCoordMode is set to FRAME, the
FontHeight
value range is zero to 100.
BoxMargin Pointer to double value specifying the box margin (in frame units ranging from 0 to 100).
Pointer to double value specifying the box line thickness (in frame units ranging from 0.0001
BoxLineThickness
to 100).
BoxFillColor Pointer to integer value specifying the fill color to assign to the box. (See BoxColor)
TextColor Pointer to integer value specifying the color to assign to the text. (See BoxColor)
Pointer to integer value specifying the scope with respect to frames. A local scope places the
object in the active frame. A global scope places the object in all frames that contain the
Scope
active frame’s data set.
0=Global 1=Local
56
TECUSR142
Parameter Description
Specifies whether to clip the geometry (that is, only plot the geometry within) to the
Clipping viewport or the frame.
0=ClipToViewport 1=ClipToFrame.
Examples
Refer to Section 3 - 10.8 “Text Example” for an example of working with TECTXT142.
TECUSR142
Writes a character string to the data file in a USERREC record. USERREC records are ignored by Tecplot
360, but may be used by add-ons.
When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECUSR142(S)
CHARACTER*(*) S
C Syntax:
#include TECIO.h
INTEGER4 TECUSR142(CHAR *S);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
TECVAUXSTR142
Writes an auxiliary data item to the data file for the specified variable. Must be called after TECINI142 and
before TECEND142. Auxiliary data may be used by text, macros, equations (if the data is numeric) and add-
ons. It may be viewed directly in the Aux Data page of the Data Set Information dialog (accessed via the
Data menu). The value can be verified by selecting “Variable” from the “Show Auxiliary Data” menu and
selecting the corresponding variable number from the menu.
When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECVAUXSTR142(Var, Name, Value)
57
TECZAUXSTR142
INTEGER*4 Var
CHARACTER*(*) Name
CHARACTER*(*) Value
C Syntax:
#include TECIO.h
INTEGER4 TECAUXSTR142(INTEGER4 *Var,
char *Name,
char *Value);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Var The variable number for which to set the auxiliary data. Variable numbers start at one.
The name of the auxiliary data item. If a data item with this name already exists, its value will be
Name
overwritten. Must be a null-terminated character string and cannot contain spaces.
Value The auxiliary data value to be written to the data file. Must be a null-terminated character string.
Example:
The following example illustrates adding auxiliary data to the pressure variable in the data file. In this
case, pressure is the third variable.
INTEGER4 Var = 3;
char PressureUnitsName[16] = "PressureUnits";
char PressureUnitsValue[16] = "Pascal (Pa)";
TECVAUXSTR142(&Var,
&PressureUnitsName[0],
&PressureUnitsValue[0]);
TECZAUXSTR142
Writes an auxiliary data item for the current zone to the data file. Must be called immediately after
TECZNE142 or TECPOLYZNE142 or TECZNEFEMIXED142for the desired zone. Auxiliary data may be
used by text, macros, equations (if it is numeric) and add-ons. It may be viewed directly in the Aux Data
page of the Data Set Information dialog (accessed via the Data menu). The value can be verified by
selecting “Zone” from the “Show Auxiliary Data” menu and selecting the corresponding zone number.
When using TecIO-MPI, may only be called from the main process.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECZAUXSTR142(Name, Value)
CHARACTER*(*) Name
CHARACTER*(*) Value
C Syntax:
#include TECIO.h
INTEGER4 TECZAUXSTR142(char *Name,
58
TECZNE142
char *Value);
Return Value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Name The name of the auxiliary data item. If a data item with this name already exists, its value will be
overwritten. Must be a null-terminated character string and cannot contain spaces.
Value The auxiliary data value to be written to the data file. Must be a null-terminated character string.
Example:
The following example code adds auxiliary data to the zone. NOTE: TECZAUXSTR142 must be called
immediately after TECZNE142 or TECPOLYZNE142 or TECZNEFEMIXED142for the desired zone.
char CreatedByName[16] = "CreatedBy";
char CreatedByValue[16] = "My Company";
TECZAUXSTR142(&CreatedByName[0],
&CreatedByValue[0]);
TECZNE142
Writes header information about the next zone to be added to the data file. For face-based finite-element
zones, you are encouraged to use TECPOLYZNE142 instead because that function is specifically designed
for those zones and has features that TECZNE142 does not support (specifically support for more than
two-billion faces and/or face nodes). For writing mixed-element or higher-order-element zones, you must
instead call TECZNEFEMIXED142. When using TecIO-MPI, TECZNE142 should be immediately followed
by a call to TECZNEMAP142.
After TECZNE142 (and TECZNEMAP142, if necessary) is called, you must call TECDAT142 one or more
times. If the zone is a finite element zone, call TECNOD142/TECNODE142 (cell-based zones) or
TECPOLYFACE142/TECPOLYBCONN142 (face-based zones) after calling TECDAT142.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECZNE142(ZoneTitle,
& ZoneType,
& IMxOrNumPts,
& JMxOrNumElements,
& KMxOrNumFaces,
& ICellMax,
& JCellMax,
& KCellMax,
& SolutionTime,
& StrandID,
& ParentZone,
& IsBlock,
& NumFaceConnections,
59
TECZNE142
& FaceNeighborMode,
& TotalNumFaceNodes,
& NumConnectedBoundaryFaces,
& TotalNumBoundaryConnections,
& PassiveVarList,
& ValueLocation,
& ShareVarFromZone,
& ShareConnectivityFromZone)
CHARACTER*(*) ZoneTitle
INTEGER*4 ZoneType
INTEGER*4 IMxOrNumPts
INTEGER*4 JMxOrNumElements
INTEGER*4 KMxOrNumFaces
INTEGER*4 ICellMax
INTEGER*4 JCellMax
INTEGER*4 KCellMax
DOUBLE PRECISION Solution Time
INTEGER*4 StrandID
INTEGER*4 ParentZone
INTEGER*4 IsBlock
INTEGER*4 NumFaceConnections
INTEGER*4 FaceNeighborMode
INTEGER*4 TotalNumFaceNodes,
INTEGER*4 NumConnectedBoundaryFaces,
INTEGER*4 TotalNumBoundaryConnections,
INTEGER*4 PassiveVarList(*),
INTEGER*4 ValueLocation(*),
INTEGER*4 ShareVarFromZone(*),
INTEGER*4 ShareConnectivityFromZone
C Syntax:
#include TECIO.h
INTEGER4 TECZNE142(char *ZoneTitle,
INTEGER4*ZoneType,
INTEGER4*IMxOrNumPts,
INTEGER4*JMxOrNumElements,
INTEGER4*KMxOrNumFaces,
INTEGER4*ICellMax,
INTEGER4*JCellMax,
INTEGER4*KCellMax,
double *SolutionTime,
INTEGER4*StrandID,
INTEGER4*ParentZone,
INTEGER4*IsBlock,
INTEGER4*NumFaceConnections,
INTEGER4*FaceNeighborMode,
INTEGER4*TotalNumFaceNodes,
INTEGER4*NumConnectedBoundaryFaces,
INTEGER4*TotalNumBoundaryConnections,
INTEGER4*PassiveVarList,
INTEGER4*ValueLocation,
INTEGER4*ShareVarFromZone,
INTEGER4*ShareConnectivityFromZone)
Return Value:
0 if successful, -1 if unsuccessful.
60
TECZNE142
Parameters:
Applies to Zone
Parameter Notes
Type(s)
61
TECZNE142
Applies to Zone
Parameter Notes
Type(s)
ORDERED
FELINESEG
Used for cell-based finite element and ordered zones
FETRIANGLE
NumFaceConnections only. The number of face connections that will be
FEQUADRILATERAL
passed in routine TECFACE142.
FETETRAHEDRON
FEBRICK
62
TECZNEFEMIXED142
Applies to Zone
Parameter Notes
Type(s)
Examples:
Refer to the following examples for illustrations of working with TECZNE142:
• Section 2 - 4 “Face Neighbors”
• Section 3 - 6 “Writing to Multiple Binary Data Files”
• Section 3 - 10.2 “Polygonal Example”
• Section 3 - 10.3 “Multiple Polyhedral Zones”
• Section 3 - 10.4 “Multiple Polygonal Zones”
• Section 3 - 10.5 “Polyhedral Example”
• Section 3 - 10.9 “Partitioned Data Examples”
TECZNEFEMIXED142
Writes header information about the next zone to be added to the data file. TECZNEFEMIXED142
specifies that the next zone is a finite element zone with one or more linear or high order sections. A mixed
element zone can have between 1 and 16 sections. All cells within a section have a the same cell type, grid
order, and basis function. The cell types of all sections within a zone must have the same spatial
dimensionality, or in other words, all sections of a zone must either be all line, surface, or volume cell
types. When using TecIO-MPI, TECZNEFEMIXED142 should be immediately followed by a call to
TECZNEMAP142. After TECZNEFEMIXED142 and TECZNEMAP142 are called, you must call
TECDAT142 one or more times and then TECNOD142 (after calling TECDAT142).
FORTRAN Syntax:
INTEGER*4 FUNCTION TECZNEFEMIXED142(ZoneTitle,
& NumNodes,
& NumSections,
& CellShapePerSection,
63
TECZNEFEMIXED142
& GridOrderPerSection,
& BasisFnPerSection,
& NumElementsPerSection,
& SolutionTime,
& StrandID,
& NumFaceConnections,
& FaceNeighborMode,
& PassiveVarList,
& ValueLocation,
& ShareVarFromZone,
& ShareConnectivityFromZone)
CHARACTER*(*) ZoneTitle
INTEGER*8 NumNodes
INTEGER*4 NumSections
INTEGER*4 CellShapePerSection
INTEGER*4 GridOrderPerSection
INTEGER*4 BasisFnPerSection
INTEGER*8 NumElementsPerSection
DOUBLE PRECISION SolutionTime
INTEGER*4 StrandID
INTEGER*4 NumFaceConnections
INTEGER*4 FaceNeighborMode
INTEGER*4 PassiveVarList
INTEGER*4 ValueLocation
INTEGER*4 ShareVarFromZone
INTEGER*4 ShareConnectivityFromZone
C Syntax:
#include "TECIO.h"
INTEGER4 TECZNEFEMIXED142(
char const* ZoneTitle,
INTEGER8 const* NumNodes,
INTEGER4 const* NumSections,
INTEGER4 const* CellShapePerSection,
INTEGER4 const* GridOrderPerSection,
INTEGER4 const* BasisFnPerSection,
INTEGER8 const* NumElementsPerSection,
double const* SolutionTime,
INTEGER4 const* StrandID,
INTEGER4 const* NumFaceConnections,
INTEGER4 const* FaceNeighborMode,
INTEGER4 const* PassiveVarList,
INTEGER4 const* ValueLocation,
INTEGER4 const* ShareVarFromZone,
INTEGER4 const* ShareConnectivityFromZone)
Return value:
0 if successful, -1 if unsuccessful.
Parameters:
Parameter Description
Number of FE mixed element sections for the zone. Must be between 1 and
NumSections
16, inclusive.
64
TECZNEFEMIXED142
Parameter Description
Array containing the cell shape for each section. Must be between 0 and 6,
inclusive.
0=FECellShape_Bar
1=FECellShape_Triangle
CellShapePerSection 2=FECellShape_Quadrilateral
3=FECellShape_Tetrahedron
4=FECellShape_Hexahedron
5=FECellShape_Pyramid
6=FECellShape_Prism
Array containing the grid order for each section. Grid orders must be
GridOrderPerSection
between 1 and 4, inclusive.
Array containing the basis function for each section. Must be 0 for each
BasisFnPerSection
section.
Scalar double precision value specifying the time associated with the zone.
SolutionTime Refer to User’s Manual for additional information on working with
transient data.
Scalar integer value specifying the strand to which the zone is associated.
If you are converting your function calls from function calls 109 or older,
use “0” for StrandID.
The location of each variable in the data set. ValueLocation(I) indicates the
ValueLocation location of variable I for this zone. 0=cell-centered, 1=node-centered. Pass
null to indicate that all variables are node-centered.
65
TECZNEMAP142
Parameter Description
TECZNEMAP142
When using TecIO-MPI, must be called immediately after calling TECZNE142, or TECZNEFEMIXED142
and must be called by the main process and by each process that will write a zone to indicate which
processes will output each partition of the zone. A zone may be written in non-partitioned fashion (that is,
as in the standard TecIO library) by indicating that a single process will output it (npartitions of 1, and a
one-element ptnranks array). When outputting a partitioned zone, each rank outputting this zone should
then call TECFEPTN142 or TECIJKPTN142 followed by data output calls for each partition it will output.
FORTRAN Syntax:
INTEGER*4 FUNCTION TECZNEMAP142(npartitions, ptnranks)
INTEGER*4 npartitions
INTEGER*4 ptnranks
C Syntax:
#include TECIO.h
INTEGER4 TECZNEMAP142(INTEGER4 *npartitions,
INTEGER4 *ptnranks);
Return Value:
0 if successful, nonzero if unsuccessful.
Parameters:
Parameter Description
npartitions The number of partitions for this zone (1 for a non-partitioned zone).
ptnranks An array of MPI ranks (processes) that indicates the process that will output that partition. The
array may include the main process. For non-partitioned zones, contains a single entry.
66
Defining Polyhedral and Polygonal Data
boundary connections are specified. TECPOLYFACE142 is used to specify the face mapping. If the zone is
connected to neighboring zones, TECPOLYBCONN142 is then used to specify those connections.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Before defining your polyhedral or polygonal data, you should determine the numbering scheme for the
nodes, faces and elements in each zone of your data set. The numbering scheme is communicated to
Tecplot implicitly by the order in which you supply the data. For example, the first nodal value supplied is
for Node 1, followed by the value for Node 2, continuing to node N (where N is the total number of
nodes). Similarly, for faces and elements.
The remainder of this section provides simple examples illustrating how to define polygonal and
polyhedral data.
In the figure shown above, Zone 1 contains a single element (e1) and Zone 2 contains two elements (e1 and
e2). The boundary faces and boundary connections for each zone are as follows:
• Zone 1 - In Zone 1, Face 1 (f1) is the sole connected boundary face. It has two boundary
connections. The first boundary connection is Element 1 in Zone 2. The second boundary
connection is Element 2 in Zone 2.
• NumConnectedBoundaryFaces = 1
• TotalNumBndryConnections = 2
• Zone 2 - In Zone 2, both Face 1 and Face 2 are connected boundary faces. There is a total of two
boundary connections. The boundary connection for each boundary face in Zone 2 is Element
1 in Zone 1.
• NumConnectedBoundaryFaces = 2
• TotalNumBndryConnections = 2
67
TECZNEMAP142
Figure 3-2. A simple pyramid. The remaining triangular faces are Faces 2 and 3. The bottom rectangular
face is Face 5. Node 4 is obscured from view.
The FaceNodeCounts array is used to specify the number of nodes that compose each face. The values in
the array are arranged as follows:
FaceNodeCounts = [NumNodesInFace1,
NumNodesInFace2,
...
NumNodesInFaceF]
where F is the total number of faces in the zone
In this example, the FaceNodeCounts array is: [3 3 3 3 4]. The first four faces are composed of three nodes
and the last face is composed of four nodes.
The FaceNodes array is used to specify which nodes belong to which face. The array is dimensioned by
the total number of face nodes in the zone (specified via TECPOLYZNE142). The total number of face nodes is
defined as the sum of the number of nodes in each face.
The first K values in the FaceNodes array are the node numbers for Face 1, where K is the first value in the
FaceNodeCounts array. The next L values are the node numbers for Face 2, where L is the second value in
the FaceNodeCounts array.
When supplying the node numbers for each face, you must supply the numbers in
either a clockwise or counter-clockwise configuration around the face. Otherwise, the
faces will be contorted when the data is plotted.
It is not important to be consistent when choosing between clockwise or counter-
clockwise ordering. The key is to present the numbers consistently within the
numbering scheme. For example, you may present the node numbers for face 1 in a
clockwise order and the node numbers for the remaining faces in counter-clockwise
order.
Consider the pyramid used above. Using the FaceNodeCounts array we have already defined and the
figure, we can create the FaceNodes array for the pyramid.
FaceNodes = [1, 2, 3
3, 2, 4,
5, 2, 4,
5, 1, 2,
1, 5, 4, 3]
68
Defining Polyhedral and Polygonal Data
Face 2 1 0
Face 3 1 2
Face 4 1 3
69
TECZNEMAP142
Face 6 1 0
Face 7 2 0
Face 8 2 0
Face 9 2 0
Face 10 2 3
Face 11 3 0
Face 12 3 4
Face 13 4 0
Face 14 4 0
Face 15 4 0
The number zero is used to indicate that the face is on the edge of the data (i.e. has “no neighboring
element”).
70
Examples
If Tecplot 360 sees a zero in FaceBndryConnectionElems that is not the first boundary element listed for a
face, an error message will appear, indicating that either the partially obscured boundary face was not
indicated correctly, or FaceBndryConnectionsElems and/or FaceBndryConnectionsZones was not
completely filled out.
3 - 10 Examples
Source code for example programs that use the TecIO library is provided with your Tecplot 360 EX
installation in the util/tecio/examples folder in the installation directory. See the readme.txt file in that folder
for additional information on building the examples.
The examples (written in C) provide a basic illustration of creating a *.plt file using the TecIO library. If
you plan to compile the examples, be sure to review the instructions in Section 3 - 7 “Linking with the
TecIO Library” first.
In order to keep the examples as simple as possible, error checking is not included. For complete details on
the parameters used and the function syntax for each TecIO function, refer to Section 3 - 8 “Binary Data
File Function Reference”. When creating a binary data file using the TecIO library, the functions must be
called in a specific order. Refer to Section 3 - 5 “Binary Data File Function Calling Sequence” for details.
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 FileFormat = 0; // 0 == PLT, 1 == SZPLT
INTEGER4 I = 0; /* Used to track return codes */
71
TECZNEMAP142
* file name.
*/
(char*)”.”,
&FileFormat,
&FileType, /* The FileType is set to
* zero, indicating it is
* a full file (containing
* both grid and solution
* data).
*/
&Debug,
&VIsDouble);
-----------------------
| | | |
| 1 | 2 | 3 |
| | | |
-----------------------
| | |
| 4 | 5 |
| | |
-----------------------
* The face between 1 & 4 is local-one-to-one. The face between
* 5 and (2 & 3) is local one-to-many.
*/
INTEGER4 FNMode = 2;
72
Examples
I = TECZNE142((char*)”Zone 1”,
&ZoneType,
&NumPts,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&unused,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&NumConnectedBoundaryFaces,
&TotalNumBoundaryConnections,
NULL,
ValueLocation,
NULL,
&ShrConn);
It is important that you refer to node numbers consistently. The node numbers will be
used later to define the connectivity for each element.
73
TECZNEMAP142
For this example, we will create two quadrilateral elements. The node numbering for the elements is
defined in the following picture.
X[0] = 0;
X[1] = 0;
X[2] = 1;
X[3] = 1;
X[4] = 2;
X[5] = 2;
Y[0] = 0;
Y[1] = 1;
Y[2] = 0;
Y[3] = 1;
Y[4] = 0;
Y[5] = 1;
74
Examples
75
TECZNEMAP142
76
Examples
X2[ii] = X[ii] + 2;
P2[ii] = 2 * (float)ii;
}
delete X;
delete Y;
delete P;
delete X2;
delete P2;
I = TECNOD142(ConnList);
I = TECEND142();
77
TECZNEMAP142
Summary
When the preceding code is compiled and built, the data file will look as follows (with the Mesh and Edge
layers turned-on):
With the Mesh layer deactivated, the data set will look as follows:
If we had not included face neighbor connections, an Edge line would be drawn in between the two zones.
In order to keep the example as simple as possible, error checking is not included. If you plan to compile
this example, be sure to include TECIO.h.
For complete details on the parameters used and the function syntax for each TecIO function, refer to
Section 3 - 8 “Binary Data File Function Reference”. When creating a binary data file using the TecIO
library, the functions must be called in a specific order. Refer to Section 3 - 5 “Binary Data File Function
Calling Sequence” for details.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
78
Examples
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 FileFormat = 0; // 0 == PLT, 1 == SZPLT; Only PLT is currently
// supported for polygonal zones.
INTEGER4 I; /* used to check return codes */
/*
* Open the file and write the Tecplot datafile
* header information
*/
I = TECINI142((char*)”Octagon”,
(char*)”X Y P”, /* Defines the variables for the data
* file. Each zone must contain each
* of the vars listed here. The order
* of the variables in the list is
* used to define the variable number
* (e.g. X is Variable 1). When
* referring to variables in other
* TecIO functions, you will refer to
* thevariable by its number.
*/
(char*)”octagon.plt”,
(char*)”.”, /* scratch directory */
&FileFormat,
&FileType,
&Debug,
&VIsDouble);
79
TECZNEMAP142
INTEGER4 ShrConn = 0;
I = TECPOLYZNE142((char*)”Octagonal Zone”,
&ZoneType,
&NumNodes,
&NumElems,
&NumFaces,
&NumFaceNodes,
&SolTime,
&StrandID,
&unused,
&NumBFaces,
&NumBConnections,
NULL,
NULL, /* When Value Location is not specified,
* Tecplot will treat all variables as
* nodal variables.
*/
NULL,
&ShrConn);
Step 3 Define node numbering
For this example, we will create a single octagonal cell. Before defining your variables, you must establish
a consistent node numbering scheme for your data. Once the node numbers are defined, supply the
variable values in the node numbering order. In this example, Node 1 is defined at X = .25 and Y = 0. As
such, the first value supplied for X (i.e. X[0]) is .25. Similarly, the first value supplied for Y is 0.
It is important that you refer to node numbers consistently. The node numbers will be used later to define
the connectivity for each element.
80
Examples
X[1] = 0.75;
Y[1] = 0.0;
X[2] = 1.0;
Y[2] = 0.25;
X[3] = 1.0;
Y[3] = 0.75;
X[4] = 0.75;
Y[4] = 1.0;
X[5] = 0.25;
Y[5] = 1.0;
X[6] = 0.0;
Y[6] = 0.75;
X[7] = 0.0;
Y[7] = 0.25;
I = TECDAT142(&NumNodes, X, &DIsDouble);
I = TECDAT142(&NumNodes, Y, &DIsDouble);
I = TECDAT142(&NumNodes, P, &DIsDouble);
delete X;
delete Y;
delete P;
81
TECZNEMAP142
The following picture describes the face numbering for this example:
As you can see, Face 1 is defined by Nodes 1 and 2, Face 2 is defined by Nodes 2 and 3, and so forth.
Because of this simple arrangement, we can use a for-loop to define all but the end points of the face nodes
array.
/*
* Loop over number of sides, and set each side to two
* consecutive nodes.
*/
for (INTEGER4 ii = 0; ii < 8; ii++)
{
FaceNodes[2*ii] = ii + 1;
FaceNodes[2*ii+1] = ii + 2;
}
FaceNodes[15] = 1;
82
Examples
delete FaceNodes;
delete FaceLeftElems;
delete FaceRightElems;
I = TECEND142();
This example covers the following topics: polyhedral data, working with multiple zones, and specifying
partially obscured faces. In order to keep the example as simple as possible, error checking is not included.
If you plan to compile this example, be sure to include: TECIO.h.
For complete details on the parameters used and the function syntax for each TecIO function, refer to
Section 3 - 8 “Binary Data File Function Reference”. When creating a binary data file using the TecIO
library, the functions must be called in a specific order. Refer to Section 3 - 5 “Binary Data File Function
Calling Sequence” for details.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
83
TECZNEMAP142
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 1;
INTEGER4 FileFormat = 0; // 0 == PLT, 1 == SZPLT; Only PLT is currently
// supported for ployhedral zones
INTEGER4 FileType = 0;
INTEGER4 I;
/* TECPOLYZNE Parameters */
INTEGER4 ZoneType = 7; /* sets the zone type
* to polyhedral */
INTEGER4 NumPts_Rect = 8;
INTEGER4 NumElems_Rect = 1;
INTEGER8 NumFaces_Rect = 6;
double SolutionTime = 0.0;
INTEGER4 StrandID = 0;
INTEGER4 Unused = 0; // ParentZone is no longer used
INTEGER4 SharConn = 0;
84
Examples
*/
INTEGER8 TotalNumFaceNodes_Rect = 24;
85
TECZNEMAP142
For nodal variables, provide the values for each variable in nodal order. Similarly, for cell-centered values,
provide the variable values in cell order. The location of each variable is specified with TECPOLYZNE.
Y_Rect[ii] = 3;
Y_Rect[ii+1] = 3;
Y_Rect[ii+2] = 1;
Y_Rect[ii+3] = 1;
}
P_Rect[0] = 10;
INTEGER4 IsDouble = 1;
I = TECDAT142(&NumPts_Rect, X_Rect, &IsDouble);
I = TECDAT142(&NumPts_Rect, Y_Rect, &IsDouble);
I = TECDAT142(&NumPts_Rect, Z_Rect, &IsDouble);
I = TECDAT142(&NumElems_Rect, P_Rect, &IsDouble);
86
Examples
Figure 3-3. Zone 2 of the sample data. Node 7 is obscured from view and located in the back-left hand
corner. Face 6 is the bottom face. Face 3 is opposite Face 1 and Face 4 is opposite Face 2.
In order to specify the face map data, you must first specify how many nodes are in each face using the
FaceNodeCounts array. After defining the FaceNodeCounts array, use the FaceNodes array to identify the
nodes that compose each face. Refer to Section 3 - 9.2 “FaceNodeCounts and FaceNodes” for additional
information.
87
TECZNEMAP142
FaceNodes_Rect[6] = 8;
FaceNodes_Rect[7] = 5;
When providing the node numbers for each face, you must provide the node numbers in
a consistent order (either clockwise or counter-clockwise. Providing the node numbers
out of order results in contorted faces.
/* Since this zone has just one element, all leftelems are
* NoNeighboring Element and all right elems are itself
*/
for (INTEGER4 ii = 0; ii < NumFaces_Rect; ii++)
{
FaceRightElems_Rect[ii] = 1;
88
Examples
FaceLeftElems_Rect[ii] = 0;
}
FaceBndryConnElems_Rect[0] = 1;
FaceBndryConnZones_Rect[0] = 2;
89
TECZNEMAP142
I = TECPOLYBCONN142(&NumConnBndryFaces_Rect,
FaceBndryConnCounts_Rect,
FaceBndryConnElems_Rect,
FaceBndryConnZones_Rect);
/* cleanup */
delete X_Rect;
delete Y_Rect;
delete Z_Rect;
delete P_Rect;
delete FaceNodeCounts_Rect;
delete FaceNodes_Rect;
delete FaceLeftElems_Rect;
delete FaceRightElems_Rect;
delete FaceBndryConnCounts_Rect;
delete FaceBndryConnElems_Rect;
delete FaceBndryConnZones_Rect;
Zone 2 (the arrowhead or prism) has a single element composed of six nodes and five faces.
//TECPOLYZNE Parameters
INTEGER4 NumPts_Prism = 6;
INTEGER4 NumElems_Prism = 1;
INTEGER8 NumFaces_Prism = 5;
90
Examples
INTEGER4 TotalNumBndryConns_Prism = 2;
I = TECPOLYZNE142((char*)”Zone 2: Prism”,
&ZoneType,
&NumPts_Prism,
&NumElems_Prism,
&NumFaces_Prism,
&TotalNumFaceNodes_Prism,
&SolutionTime,
&StrandID,
&Unused,
&NumConnBndryFaces_Prism,
&TotalNumBndryConns_Prism,
NULL,
ValueLocation,
NULL,
&SharConn);
X_Prism[3*ii+1] = 7;
Y_Prism[3*ii+1] = 2;
Z_Prism[3*ii+1] = ZVal;
X_Prism[3*ii+2] = 3;
Y_Prism[3*ii+2] = 0;
Z_Prism[3*ii+2] = ZVal;
91
TECZNEMAP142
ZVal = ZVal - 2;
}
Figure 3-4. The arrowhead with three faces visible (Face 2, Face 3 and Face 5). The remaining rectangular
face is Face 1, and the remaining triangular face is Face 4).
The faces are created from the data file format using the FaceNodeCounts and FaceNodes array. The
FaceNodeCounts array specifies the number of nodes contained in each face. The first value in the array is
the number of nodes in Face 1, followed by the number of nodes in Face 2, and so forth. The FaceNodes
array lists the node numbers in each face. The FaceNodes array first lists all of the nodes in Face 1,
followed by all of the nodes in Face 2, and so forth.
In this example, Face 1 is composed of four nodes (Node 1, Node 3, Node 6 and Node 4). As such, the first
value in the FaceNodeCounts array is “4” and the first four values in the FaceNodes array are [1, 3, 6, 4].
92
Examples
/* Since this zone has just one element, all leftelems are
* NoNeighboring Element and all right elems are itself.
*/
INTEGER4 *FaceLeftElems_Prism = new INTEGER4[NumFaces_Prism];
INTEGER4 *FaceRightElems_Prism = new INTEGER4[NumFaces_Prism];
93
TECZNEMAP142
I = TECPOLYBCONN142(&NumConnBndryFaces_Prism,
FaceBndryConnCounts_Prism,
FaceBndryConnElems_Prism,
FaceBndryConnZones_Prism);
/* cleanup */
delete X_Prism;
delete Y_Prism;
delete Z_Prism;
delete P_Prism;
delete FaceNodeCounts_Prism;
94
Examples
delete FaceNodes_Prism;
delete FaceLeftElems_Prism;
delete FaceRightElems_Prism;
delete FaceBndryConnCounts_Prism;
delete FaceBndryConnElems_Prism;
delete FaceBndryConnZones_Prism;
I = TECEND142();
Before beginning to create a polyhedral data file, you should assign a number to each node, face, element
and zone. The numbering system is used to determine the order that the information is supplied to
Tecplot. You may assign any order you would like. However, once you have supplied information to
95
TECZNEMAP142
Tecplot, you cannot change the number configuration. For this example, we have selected the numbering
system shown below:
Zone 1 has a total of three elements, thirteen unique nodes and fifteen faces. Zone 2 has two elements,
twelve nodes and thirteen faces.
In order to keep the example as simple as possible, error checking is not included. If you plan to compile
this example, be sure to include: TECIO.h.
For complete details on the parameters used and the function syntax for each TecIO function, refer to
Section 3 - 8 “Binary Data File Function Reference”. When creating a binary data file using the TecIO
library, the functions must be called in a specific order. Refer to Section 3 - 5 “Binary Data File Function
Calling Sequence” for details.
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 FileFormat = 0; // 0 == PLT, 1 == SZPLT
96
Examples
/* TECPOLYZNE Parameters */
INTEGER4 ZoneType = 6; /* FE Polygon */
INTEGER4 NumPts_Z1 = 13; /* the number of unique
* nodes in the zone.
*/
INTEGER4 NumElems_Z1 = 3;
INTEGER8 NumFaces_Z1 = 15; /* the number of unique
* faces in the zone.
*/
double SolutionTime = 0.0;
INTEGER4 StrandID = 0;
INTEGER4 unused = 0; // ParentZone is no longer used
INTEGER4 SharConn = 0;
INTEGER4 ValueLocation[3] = { 1, 1, 0 };
97
TECZNEMAP142
/* TECDAT Parameters */
double *X_Z1 = new double[NumPts_Z1];
double *Y_Z1 = new double[NumPts_Z1];
X_Z1[0] = 1;
Y_Z1[0] = 6;
X_Z1[1] = 2;
Y_Z1[1] = 6;
X_Z1[2] = 3;
98
Examples
Y_Z1[2] = 5;
X_Z1[3] = 2;
Y_Z1[3] = 4;
X_Z1[4] = 1;
Y_Z1[4] = 4;
X_Z1[5] = 0;
Y_Z1[5] = 5;
X_Z1[6] = 4;
Y_Z1[6] = 5;
X_Z1[7] = 5;
Y_Z1[7] = 4;
X_Z1[8] = 4;
Y_Z1[8] = 3;
X_Z1[9] = 3;
Y_Z1[9] = 3;
X_Z1[10] = 2;
Y_Z1[10] = 2;
X_Z1[11] = 1;
Y_Z1[11] = 2;
X_Z1[12] = 0;
Y_Z1[12] = 3;
INTEGER4 IsDouble = 1;
I = TECDAT142(&NumPts_Z1, X_Z1, &IsDouble);
I = TECDAT142(&NumPts_Z1, Y_Z1, &IsDouble);
I = TECDAT142(&NumElems_Z1, P_Z1, &IsDouble);
delete X_Z1;
delete Y_Z1;
delete P_Z1;
/* TecPolyFace Parameters */
FaceNodes_Z1[2] = 2;
99
TECZNEMAP142
FaceNodes_Z1[3] = 3;
FaceNodes_Z1[4] = 3;
FaceNodes_Z1[5] = 4;
FaceNodes_Z1[6] = 4;
FaceNodes_Z1[7] = 5;
FaceNodes_Z1[8] = 5;
FaceNodes_Z1[9] = 6;
FaceNodes_Z1[10] = 6;
FaceNodes_Z1[11] = 1;
FaceNodes_Z1[14] = 7;
FaceNodes_Z1[15] = 8;
FaceNodes_Z1[16] = 8;
FaceNodes_Z1[17] = 9;
FaceNodes_Z1[18] = 9;
FaceNodes_Z1[19] = 10;
FaceNodes_Z1[20] = 10;
FaceNodes_Z1[21] = 4;
FaceNodes_Z1[24] = 11;
FaceNodes_Z1[25] = 12;
FaceNodes_Z1[26] = 12;
FaceNodes_Z1[27] = 13;
FaceNodes_Z1[28] = 13;
FaceNodes_Z1[29] = 5;
100
Examples
Zone 2. The term “no neighboring element” is used to describe a face that is on the edge of the entire data
set (not just the zone).
delete FaceNodes_Z1;
delete FaceLeftElems_Z1;
delete FaceRightElems_Z1;
/* TecPolyBConn Parameters */
101
TECZNEMAP142
I = TECPOLYBCONN142(&TotalNumBndryFaces_Z1,
FaceBndryConnectionCounts_Z1,
FaceBndryConnectionElems_Z1,
FaceBndryConnectionZones_Z1);
102
Examples
X_Z2[0] = 5;
Y_Z2[0] = 4;
X_Z2[1] = 6;
Y_Z2[1] = 4;
X_Z2[2] = 7;
Y_Z2[2] = 3;
103
TECZNEMAP142
X_Z2[3] = 6;
Y_Z2[3] = 2;
X_Z2[4] = 5;
Y_Z2[4] = 2;
X_Z2[5] = 4;
Y_Z2[5] = 3;
X_Z2[6] = 3;
Y_Z2[6] = 3;
X_Z2[7] = 5;
Y_Z2[7] = 1;
X_Z2[8] = 4;
Y_Z2[8] = 0;
X_Z2[9] = 3;
Y_Z2[9] = 0;
X_Z2[10] = 2;
Y_Z2[10] = 1;
X_Z2[11] = 2;
Y_Z2[11] = 2;
P_Z2[0] = 8;
P_Z2[1] = 6;
delete X_Z2;
delete Y_Z2;
delete P_Z2;
INTEGER4 *FaceNodes_Z2;
FaceNodes_Z2 = new INTEGER4[TotalNumFaceNodes_Z2];
FaceNodes_Z2[2] = 2;
FaceNodes_Z2[3] = 3;
FaceNodes_Z2[4] = 3;
FaceNodes_Z2[5] = 4;
FaceNodes_Z2[6] = 4;
104
Examples
FaceNodes_Z2[7] = 5;
FaceNodes_Z2[8] = 5;
FaceNodes_Z2[9] = 6;
FaceNodes_Z2[10] = 6;
FaceNodes_Z2[11] = 1;
FaceNodes_Z2[14] = 5;
FaceNodes_Z2[15] = 8;
FaceNodes_Z2[16] = 8;
FaceNodes_Z2[17] = 9;
FaceNodes_Z2[18] = 9;
FaceNodes_Z2[19] = 10;
FaceNodes_Z2[20] = 10;
FaceNodes_Z2[21] = 11;
FaceNodes_Z2[22] = 11;
FaceNodes_Z2[23] = 12;
FaceNodes_Z2[24] = 12;
FaceNodes_Z2[25] = 7;
105
TECZNEMAP142
*/
delete FaceNodes_Z2;
delete FaceLeftElems_Z2;
delete FaceRightElems_Z2;
106
Examples
I = TECPOLYBCONN142(&TotalNumBndryFaces_Z2,
FaceBndryConnectionCounts_Z2,
FaceBndryConnectionElems_Z2,
FaceBndryConnectionZones_Z2);
I = TECEND142();
#include “TECIO.h”
#include “MASTER.h” /* for defintion of NULL */
int main()
{
/* Call TECINI142 */
INTEGER4 FileType = 0; /* 0 for full file */
INTEGER4 FileFormat = 0; // 0 == PLT, 1 == SZPLT; Only PLT is
currently
// supported for polyhedral zones
INTEGER4 Debug = 0;
INTEGER4 VIsDouble = 1;
INTEGER4 I = 0; /* use to check return codes */
/* Call TECPOLYZNE142 */
INTEGER4 ZoneType = 7; /* 7 for FEPolyhedron */
INTEGER4 NumNodes = 5; /* number of unique nodes */
INTEGER4 NumElems = 1; /* number of elements */
INTEGER8 NumFaces = 5; /* number of unique faces */
INTEGER4 ShrConn = 0;
107
TECZNEMAP142
*/
INTEGER8 NumFaceNodes = 16;
INTEGER4 NumBConns = 0; /* No Boundary Connections */
INTEGER4 NumBItems = 0; /* No Boundary Items */
X[0] = 0;
Y[0] = 0;
Z[0] = 0;
X[1] = 1;
Y[1] = 1;
Z[1] = 2;
X[2] = 2;
Y[2] = 0;
Z[2] = 0;
X[3] = 2;
Y[3] = 2;
Z[3] = 0;
X[4] = 0;
Y[4] = 2;
Z[4] = 0;
delete X;
delete Y;
delete Z;
108
Examples
109
TECZNEMAP142
FaceLeftElems[0] = 1;
FaceLeftElems[1] = 1;
FaceLeftElems[2] = 0;
FaceLeftElems[3] = 0;
FaceLeftElems[4] = 0;
delete FaceNodeCounts;
delete FaceNodes;
delete FaceLeftElems;
delete FaceRightElems;
I = TECEND142();
return 0;
}
#include “TECIO.h”
#include “MASTER.h” /* for defintion of NULL */
#include <string.h>
/*
* Open the file and write the tecplot datafile
* header information
*/
I = TECINI142((char*)”IJ Ordered Zones”, /* Name of the entire
* dataset.
*/
110
Examples
float X1[4];
float Y1[4];
float P1[4];
float X2[4];
float Y2[4];
float P2[4];
INTEGER4 ICellMax = 0;
INTEGER4 JCellMax = 0;
INTEGER4 KCellMax = 0;
INTEGER4 DIsDouble = 0;
double SolTime = 360.0;
INTEGER4 StrandID = 0; /* StaticZone */
INTEGER4 unused = 0; // ParentZone is no longer
used
INTEGER4 IsBlock = 1; /* Block */
INTEGER4 NFConns = 0;
INTEGER4 FNMode = 0;
INTEGER4 TotalNumFaceNodes = 1;
INTEGER4 TotalNumBndryFaces = 1;
INTEGER4 TotalNumBndryConnections = 1;
INTEGER4 ShrConn = 0;
X1[0] = .125;
Y1[0] = .5;
P1[0] = 5;
X1[1] = .625;
Y1[1] = .5;
P1[1] = 7.5;
X1[2] = .125;
Y1[2] = .875;
P1[2] = 10;
X1[3] = .625;
Y1[3] = .875;
P1[3] = 7.5;
X2[0] = .375;
Y2[0] = .125;
P2[0] = 5;
X2[1] = .875;
Y2[1] = .125;
111
TECZNEMAP142
P2[1] = 7.5;
X2[2] = .375;
Y2[2] = .5;
P2[2] = 10;
X2[3] = .875;
Y2[3] = .5;
P2[3] = 7.5;
/* Ordered Zone */
INTEGER4 ZoneType = 0;
I = TECZNE142((char*)”Ordered Zone”,
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&unused,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConnections,
NULL,
NULL,
NULL,
&ShrConn);
INTEGER4 III = IMax * JMax * KMax;
I = TECDAT142(&III, X1, &DIsDouble);
I = TECDAT142(&III, Y1, &DIsDouble);
I = TECDAT142(&III, P1, &DIsDouble);
I = TECZNE142((char*)”Ordered Zone2”,
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&unused,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConnections,
NULL,
NULL,
NULL,
&ShrConn);
112
Examples
I = TECEND142();
return 0;
}
#include “TECIO.h”
#include “MASTER.h” /* for defintion of NULL */
#include <string.h>
113
TECZNEMAP142
INTEGER4 JMax = 2;
INTEGER4 KMax = 1;
double SolTime = 0;
INTEGER4 StrandID = 0; /* StaticZone */
INTEGER4 unused = 0; // ParentZone is no longer used
X1[0] = 0.125;
Y1[0] = 0.5;
P1[0] = 7.5;
X1[1] = 0.625;
Y1[1] = 0.5;
P1[1] = 10.0;
X1[2] = 0.125;
Y1[2] = 0.875;
P1[2] = 5.0;
X1[3] = 0.625;
Y1[3] = 0.875;
114
Examples
P1[3] = 7.5;
/* Open a new data file. note: the first file is still open
* because TecEnd was not called.
*/
I = TECINI142((char*)”Auxiliary Data”,
(char*)”X1 Y1 P1”,
(char*)”multiplefiles-file2.plt”,
(char*)”.”,
&fileFormat,
&FileType,
&Debug,
&VIsDouble);
/* Create a second zone, using many of the values from the first
* zone, and write it to the second data file.
*/
I = TECZNE142((char*)”Ordered Zone2”,
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&unused,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConn,
NULL,
NULL,
NULL,
&ShrConn);
/* set the variable values for the second zone */
float X2[4];
float Y2[4];
float P2[4];
X2[0] = 0.375;
Y2[0] = 0.125;
P2[0] = 5;
115
TECZNEMAP142
X2[1] = 0.875;
Y2[1] = 0.125;
P2[1] = 7.5;
X2[2] = 0.375;
Y2[2] = 0.5;
P2[2] = 10;
Y2[3] = 0.5;
X2[3] = 0.875;
P2[3] = 7.5;
I = TECAUXSTR142((char*)”DeformationValue”,
DeformationValue);
/* Close the first file */
I = TECEND142();
return 0;
}
#include “TECIO.h”
#include <string.h>
INTEGER4 FileType = 0;
INTEGER4 I = 0; /* used to check the return value */
I = TECINI142((char*)”Text”,
(char*)”X Y P”,
(char*)”text.plt”,
116
Examples
(char*)”.”,
&fileFormat,
&FileType,
&Debug,
&VIsDouble);
char Text[60];
char MFC[24];
strcpy(Text, “Sample Text”);
strcpy(MFC, “My Macro”);
I = TECTXT142(&XPos,
&YPos,
117
TECZNEMAP142
&ZPos,
&PosCoordMode,
&AttachToZone,
&Zone,
&Font,
&FontHeightUnits,
&FontHeight,
&BoxType,
&BoxMargin,
&BoxLineThickness,
&BoxColor,
&BoxFillColor,
&Angle,
&Anchor,
&LineSpacing,
&TextColor,
&Scope,
&Clipping,
Text,
MFC);
I = TECEND142();
return 0;
}
118
4
ASCII Data
Files exported into Tecplot’s data format may be either ASCII or binary. However, we strongly recommend
using Tecplot’s binary file format (*.plt). The ASCII file format is provided to illustrate how data is
structured in Tecplot. ASCII data format is useful only for very small data files. Reading an ASCII data file
into Tecplot 360 can be much slower than reading a binary data file, as binary data files are structured for
more efficient data access, and Tecplot 360 must convert from ASCII to binary prior to loading the data.
Refer to Chapter 3: “Binary Data” for information on creating files in Tecplot’s binary format.
119
ASCII Data
• Character Strings - Double quotes must be used to enclose character strings with embedded
blank spaces or other special characters.
• Multiple Lines - Any line may be continued onto one or more following lines (except for text
enclosed in double quotes ["]).
• Escape Characters - A backslash (\) may be used to remove the significance of (or escape) the
next character (that is, \ʺ produces a single double-quote).
• Comments - Any line beginning with an # is treated as a comment and ignored.
The following simple example of a Tecplot 360 ASCII data file has one small zone and a single line of text:
TITLE="Simple Data File"
VARIABLES="X" "Y"
ZONE I=4 DATAPACKING=POINT
1 1
2 1
2 2
1 2
TEXT X=10 Y=90 T="Simple Text"
120
ASCII File Structure
Component Notes
ZONE The keyword “ZONE” is required at the start of every zone record
Zone Header The Zone Header is used to specify the type of data in the zone, the
structure of the data, the names of the variables in the zone, and
more. Refer to “Zone Header” on page 123 for details.
121
ASCII Data
Data The data section follows the zone header. The arrangement of the
data is dependent upon the values of DATA PACKING and VAR
LOCATION (specified in the Zone Header). Refer to “Data” on
page 125 for details.
Zone Footer The contents required for the Zone Footer depend upon the
ZONETYPE (specified in the Zone Header).
For ordered zones, the Zone Footer contains the Face Neighbor
Connections List information (if any).
122
ASCII File Structure
Zone Header
Keyword Syntax Required Default Notes
(Y/N)
ZONE Y Keyword required to start a zone record
T = <string> N Zone Title. This may be any text string up to 128
characters in length. If you supply a longer text string, it
is automatically truncated to the first 128 characters.
The titles of zones appear in the Zone Style and other
dialogs, and, optionally, in the XY- plot legend.
ZONETYPE = <zonetype> N ORDERE The zone data are of the type specified by the
D ZONETYPE parameter in the control line. There are two
basic types of zones: ordered and finite element.
ORDERED is presumed if the ZONETYPE parameter is
omitted. See Section 4 - 4 “Ordered Data” for more
information on ordered zones, and Section 4 - 5 “Finite
Element Data” for details on finite element data.
GLOBALONETO
MANY]
FACENEIGHB = <integer> Y, if For ordered or cell-based finite element zones only.
ORCONNECTI FACENEIG Used to indicate the total number of connections for all
ONS HBORMOD elements in the zone. For example, if you have two cells
E,is in use. with three connections each, the number of face
neighbor connections is equal to six. When this token is
used, both the FACENEIGHBORMODE token and the
FaceNeighbor Connections List are required. Refer to
Section “Face Neighbor Connections List” on page 128
for details.
123
ASCII Data
124
ASCII File Structure
Data
Tecplot 360 supports the following six data types:
• DOUBLE (eight-byte floating point values).
• SINGLE (four-byte floating point values).
• LONGINT (four-byte integer values).
• SHORTINT (two-byte integer values).
• BYTE (one-byte integer values, from zero to 255).
• BIT
The arrangement of ASCII data depends upon the combination of datapacking (BLOCK or POINT),
variable location (NODAL or CELL-CENTERED). The zone type also plays a role in that not all forms of
datapacking and variable locations are supported by all zone types. In BLOCK data, the data is arranged
by variable, while in POINT data the data is arranged by point (node or data point, depending upon the
zone type). In NODAL data the variable values are defined at every node (FE data) or point (ORDERED
data). In CELLCENTERED data, the variable values are defined at the center of every cell (ORDERED
data) or element (FE data).
The available combinations of datapacking and variable location parameters are:
• Block - Nodal
• Block - Cell-centered
• Point - Nodal
The combination of POINT and CELLCENTERED is not available.
BLOCK - NODAL
In block data with nodal values, the data is arranged by variable and each variable is defined at the nodes.
The data arrangement is as follows:
A11 A12 ... A1P
A21 A22 ... A2P
.
.
.
AV1 AV2 ... AVP
where:
V = total number of nonpassive, nonshared variables
P = I * J * K (ordered zones) orNODES(FE zones)
125
ASCII Data
BLOCK - CELLCENTERED
In block data with cell-centered values, the data is arranged by variable and each variable is defined at the
center of each cell (ORDERED data) or element (FE data). The data arrangement is as follows:
A11 A12 ... A1P
A21 A22 ... A2P
.
.
.
AV1 AV2 ... AVP
where:
V = total number of nonpassive, nonshared variables
P = (I -1) * (J - 1) * (K -1) (ordered zones1)
or
P = ELEMENTS (FE zones)
POINT - NODAL
In point data, the values for all variables are given for the first point, then the second point and so on. The
variable location is always NODAL.
A11 A12 ... A1V
A21 A22 ... A2V
.
.
.
AP1 AP2 ... APV
where:
V = total number of nonpassive, nonshared variables
P = I * J * K (ordered zones)
or
P = ELEMENTS (FE zones)
Variable Sharing
Frequently, some variables are exactly the same for a set of zones. For example, a series of zones may
contain measurement or simulation data at the same XYZ-locations, but different times. In this case,
1. For all I, J and K greater than one. When I, J or K is equal to one, a value of one is used instead of subtract-
ing one.
126
ASCII File Structure
Tecplot 360’s memory usage may be dramatically reduced by sharing the coordinate variables between the
zones. The zones that variables are shared from are specified in the VARSHARELIST in the control line of the
current zone. The format is:
VARSHARELIST=([set-of-vars]=zzz, [set-of-vars]=zzz)
where set-of-vars is the set of variables that are shared and zzz is the zone they are shared from. If zzz is
omitted, the variables are shared from the previous zone.
For example:
VARSHARELIST=([4-6,11]=3, [20-23]=1, [13,15])
specifies that variables four, five, six and 11 are shared from zone three, variables 20, 21, 22, and 23 are
shared from zone one, and variables 13 and 15 are shared from the previous zone. For variable sharing,
ordered zones may only share with ordered zones having the same dimensions. Finite element zones may
share with any zone having the same number of nodes (for nodal variables) or the same number of cells
(for cell-centered data).
Zone Footer
The contents required for the Zone Footer depend upon the ZONETYPE (specified in the Zone Header).
• Ordered zones - the Zone Footer contains the Face Neighbor Connections List (if any).
• Cell-based finite element zones (FETRIANGLE, FEQUADILATERAL, FETETRAHEDRAL
and FEBRICK) - the Zone Footer contains Connectivity information, followed by Face
Neighbor Connections List (if any).
• Face-based finite element zones (FEPOLYHEDRAL, FEPOLYGON) - the Zone Footer
contains Facemap Data, followed by Boundary Map Data.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Connectivity
For cell-based finite element zones (FETRIANGLE, FEQUADILATERAL, FETETRAHEDRAL, and
FEBRICK), the nodal data is followed by the connectivity information. The connectivity list is not
preceded by a token or keyword. It is simply a list of numbers.
The connectivity list details the node numbers of all of the nodes included in each element. When
providing the connectivity list, please keep in mind the following guidelines:
• Each row in the connectivity list corresponds to an element, where the first row corresponds to
the first element, and so forth.
• The node numbers must be provided in order, either clockwise or counter-clockwise.
• You must provide the same number of nodes as are included in an element. For example, you
must provide eight numbers for BRICK elements and three numbers for TRIANGLE elements.
If you are using repeated nodes, provide the node number of the repeated node multiple times.
See also: “Connectivity Sharing” on page 130.
The connectivity for face-based zones (FEPOLYGON and FEPOLYHEDRAL) is defined by the Facemap
Data (refer to “Facemap Data” on page 129 for details).
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
127
ASCII Data
LOCALONETOMANY nz+4 cz, fz, oz, nz, nc1, nc2, ..., ncn
In this table,
• cz -the cell number in the current zone
• fz - the number of the cell face in the current zone
• nc -the cell number of the neighbor cell in the current zone
• oz - face obscuration flag (zero for face partially obscured, one for face entirely obscured)
• nz - the number of neighboring cells for the ONETOMANY options
• ncn - the number of the nth local zone neighboring cell in the list
• zr - the remote zone number
• cr - the cell number of the neighboring cell in the remote zone
• zrn - the zone number of the nth neighboring cell in the GLOBALONETOMANY list
• crn - the cell number in the remote zone of the nth neighboring cell in the GLOBALONETOMANY list.
128
ASCII File Structure
The cz, fz combinations must be unique; multiple entries are not allowed. The face numbers for cells in the
various zone types are defined in Figure 4-1.
A B C
Figure 4-1. A: Example of node and face neighbors for an FE-brick cell or IJK-ordered cell. B: Example of node and
face numbering for an IJ-ordered/ FE-quadrilateral cell. C: Example of tetrahedron face neighbors.
A connection must be specified for two matching cell faces to be effective. The nature of the Face
Neighbor Connections list depends upon its FACENEIGHBORMODE.
For example, for data with a FACENEIGHBORMODE of GLOBALONETOONE, if cell six, face two in zone nine should be
connected to cell one, face four in zone 10, the connections for zone nine must include the line:
6 2 10 1 (cell#, face#, connecting zone#, connecting cell#)
And the connections for zone 10 must include this line:
1 4 9 6 (cell#, face#, connecting zone#, connecting cell#)
Global face neighbors are useful for telling Tecplot 360 about the connections between zones. This could be
used, for example, to smooth out the crease in Gouraud surface shading at zone boundaries. For cell-
centered data, they can make contours and streamtraces more continuous at zone boundaries.
Facemap Data
For face-based finite element zones (FEPOLYGON and FEPOLYHEDRAL), the data section is followed by
the Facemap Data section. If boundary faces are used, the Facemap Data section is followed by the
Boundary Map Data data section. Otherwise, the facemap data section marks the end of the zone record.
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
The face map data (in four major groupings) is defined by the following list:
Like the Data section of the zone record, the data region of the Face Map section does
not include tokens. It includes a list of data. The descriptors TotalNodesInFace,
WhichNodesInFace, LeftNeighborForFace and RightNeighborForFace should not be
included in your data file.
129
ASCII Data
The face map may be shared between zones in the same file by specifying the zone
number of the sharing zone in place of the CONNECTIVITYSHAREZONE value.
The left element and right element are determined by the left-hand versus right-hand winding rule.
The left and right neighboring elements represent elements within the current zone, and they are
always ʺone-to-oneʺ. That is, each face represents a complete interface between two elements. A nega-
tive value (-t) in either of the neighboring faces lists indicates that the neighboring element(s) are
defined in the boundary face section at the tth boundary face. Refer to Section “Boundary Map Data”
for details.
Any face that has no neighboring element for either its right or left adjacent element, will use a value
of zero for the element value.
The boundary map data section need only be used for global or one-to-many connections. Local, one-
to-one connections should be defined as left/right elements.
The number of adjacent elements is listed for each of the boundary faces. Then each boundary face
lists the element number for each of its adjacent elements. Then each boundary face lists the zone
number for each of its adjacent elements (0 can be used to refer to the current zone). The number of the
face is not specified but is implicit (first face listed is 1 and corresponds to -1 in the left/right neighbor
list, the second is 2 and corresponds to -2, etc.).
Connectivity Sharing
The connectivity list and face neighbor connections (for cell-based finite element zones) or the facemap
data (for face-based finite element zones) may be shared between zones by using the
CONNECTIVITYSHAREZONE parameter in the control line of the current zone. The format is:
130
ASCII File Structure
CONNECTIVITYSHAREZONE=nnn
where nnn is the number of the zone that the connectivity is shared from. To use connectivity sharing, the
zone must have the same number of points and elements, and be the same zone type.
131
ASCII Data
132
ASCII File Structure
133
ASCII Data
geometry is specified by the total number of polylines, up to a maximum of 50 polylines, where each
polyline can have up to 32,000 points. Each polyline is defined by a number of points and a series of XY- or
XYZ- coordinate points between which the line segments are drawn. In POINT format, the XY- or XYZ-
coordinates are given together for each point. In BLOCK format, all the X-values are listed, then all the Y-
values, and (for LINE3D geometries) all the Z-values. All coordinates are relative to the X, Y, and Z specified
on the control line. You can specify points in either single or double precision by setting the DT (datatype)
parameter to either SINGLE or DOUBLE.
Origin positions
Geometry types are selected with the T (geomtype) parameter. The available geometry types are listed
below:
• SQUARE - A square with lower left corner at X, Y.
• RECTANGLE - A rectangle with lower left corner at X, Y.
• CIRCLE - A circle centered at X, Y.
• ELLIPSE - An ellipse centered at X, Y.
• LINE - A set of 2D polylines (referred to as multi-polylines) anchored at X, Y.
• LINE3D - A set of 3D polylines (referred to as multi-polylines) anchored at X, Y, Z.
134
ASCII File Structure
You must include a data set in order to use custom labels. You cannot use custom labels
in files that contain only text and/or geometries.
135
ASCII Data
Auxiliary data may be used in text, macros, equations (if it is numeric), and accessed from add-ons. It may
also be viewed directly in the AuxData page of the Data Set Information dialog.
Table 4:
<arrowheadstyle> PLAIN, HOLLOW, FILLED
<color> BLACK, RED, GREEN, BLUE, CYAN, YELLOW, PURPLE, WHITE, CUST1, ...,
CUST8
136
Ordered Data
Table 4:
<draworder> AFTERDATA,BEFOREDATA
a. LONGINT, SHORTINT, BYTE, AND BIT are only available for Zone Records.
137
ASCII Data
The I-index varies the fastest. That is, when you write programs to print IJ-ordered data, the I-index is the
inner loop and the J-index is the outer loop. Note the similarity between I-ordered data and IJ-ordered
data with JMax=1.
138
Ordered Data
FORTRAN Code
The following sample FORTRAN code shows how to create I-ordered data in BLOCK format:
INTEGER VAR
.
.
.
WRITE (*,*) ´ZONE DATAPACKING=BLOCK, I=´, IMAX
DO 1 VAR=1,NUMVAR
DO 1 I=1,IMAX
WRITE (*,*) ARRAY(VAR,I)
1 CONTINUE
FORTRAN Code
The following sample FORTRAN code shows how to create IJ-ordered data in BLOCK format:
139
ASCII Data
INTEGER VAR
.
.
.
WRITE (*,*) ´ZONE DATAPACKING=BLOCK, I=´, IMAX, ´, J=´, JMAX
DO 1 VAR=1,NUMVAR
DO 1 J=1,JMAX
DO 1 I=1,IMAX
WRITE (*,*) ARRAY(VAR,I,J)
1 CONTINUE
FORTRAN Code
The following sample FORTRAN code shows how to create an IJK-ordered zone in BLOCK format:
INTEGER VAR
.
.
.
.
WRITE (*,*) ´ZONE DATAPACKING=BLOCK, I=´, IMAX, ´, J=´, JMAX, ´, K=´, KMAX
DO 1 VAR=1,NUMVAR
DO 1 K=1,KMAX
140
Ordered Data
DO 1 J=1,JMAX
DO 1 I=1,IMAX
WRITE (*,*) ARRAY(VAR,I,J,K)
1 CONTINUE
For this case, we want to set up two zones in the data file, one for each time value. Each zone has three
variables (Position, Temperature, and Pressure) and four data points (one for each location). This means
that IMax=4 for each zone. We include a text record (discussed in Section 4 - 3.3 “Text Record”) to add a
title to the plot. The plot shown in Figure 4-6 can be produced from this file.
141
ASCII Data
Cell-Centered Data
An example of IJ-ordered data with cell-centered variables might include four variables (X, Y,
Temperature, Pressure), nine data points, and four cells where Temperature and Pressure are cell-centered.
142
Finite Element Data
The nodal variables of X and Y are specified at all nine nodes, and the values of cell-centered variables are
specified at the four cells [(IMax-1)*(JMax-1)]. Zones with cell-centered data must have DATAPACKING=BLOCK.
143
ASCII Data
If you need to mix quadrilateral and triangle elements, either use the polygonal zone
type or use the quadrilateral element type with node numbers repeated to form
triangles.
144
Finite Element Data
“Connectivity” on page 127 for details. You may also define Face Neighbors following the connectivity
list. Refer to Section “Face Neighbor Connections List” on page 128 for details.
For face-based zone type (FEPOLYGON and FEPOLYHEDRAL), the data section ( “Data”) is followed by the zone
footer and facemap data sections. Refer to “Facemap Data” for details.
X Y P1 P2 P3
For this case, we want to set up three zones in the data file, one for each time measurement. Each zone has
three variables: X, Y, and P. The zones are of the triangle element type, meaning that three nodes must be
used to define each element. One way to set up this data file would be to list the complete set of values for
X, Y, and P for each zone. Since the XY-coordinates are exactly the same for all three zones, a more compact
data file can be made by using the VARSHARELIST. In the data file given below, the second and third zones
have variable sharing lists that share the values of the X- and Y-variables and the connectivity list from the
first zone. As a result, the only values listed for the second and third zones are the pressure variable
values. Note that the data could easily have been organized in a single zone with five variables. Since
145
ASCII Data
blank lines are ignored in the data file, you can embed them to improve readability. A plot of the data is
shown in Figure 4-9.
1 2 4
2 5 4
3 5 2
5 6 4
ZONE T="P_2", DATAPACKING=POINT, NODES=6, ELEMENTS=4, ZONETYPE=FETRIANGLE, VARSHARELIST = ([1,
2]=1), CONNECTIVITYSHAREZONE = 1
110 135 160 165 185 200
146
Finite Element Data
Node X Y P T
A 0.0 1.0 100.0 1.6
147
ASCII Data
The connectivity list is the same for both POINT and BLOCK formats.
You can change the connectivity list to obtain a different mesh for the same data points. In the above
example, substituting the following connectivity list yields the five-element mesh shown in Figure 4-11.
(You must also change the ELEMENTS parameter in the zone control line to specify five elements.)
Figure 4-11. Finite element data of Figure 4-10 with a different connectivity list
1 2 4 4
4 2 3 5
5 3 6 6
6 7 3 3
3 2 8 8
148
Finite Element Data
149
ASCII Data
FORTRAN Code
This FORTRAN code creates triangle element type finite element data in BLOCK format:
INTEGER VAR
.
.
WRITE (*,*) ´ZONE DATAPACKING=BLOCK, ZONETYPE=FETRIANGLE,NODES=´,NNODES,
&´ ,ELEMENTS=´,NELEM
DO 1 VAR=1,NUMVAR
DO 1 NODES=1,NNODES
WRITE(*,*) VARRAY(VAR,NODES)
1 CONTINUE
DO 2 M=1,NELEM
DO 2 L=1,3
WRITE (*,*) NDCNCT(M,L)
2 CONTINUE
150
Finite Element Data
FE surface data
Finite element surface data specify node locations in three dimensions. Consider the data in Table 4 - 2.
Locations are listed for eleven nodes, each having only the three spatial variables X, Y, and Z. We would
like to create an finite element surface zone with this data set, where some of the elements are triangles
and some are quadrilaterals. All the elements could be organized into one zone of element type
Quadrilateral. However, as an illustration of creating 3D surface data, create three zones: one triangular,
one quadrilateral, and one a mixture (using quadrilaterals with repeated nodes for the triangles).
X Y Z
0.0 0.0 1.0
151
ASCII Data
X Y Z
-1.0 -1.0 0.0
152
Finite Element Data
X Y Z Temperature
0.0 0.0 0.0 9.5
153
ASCII Data
X Y Z Temperature
2.0 1.0 2.0 17.5
154
Finite Element Data
Figure 4-15 shows the resulting mesh plot from the data set listed in this section.
X Y Z C U V W
0 0 -95 -1 1 0 8
0 85 -42 0 -5 -3 9
81 26 -42 2 -22 80 8
50 -69 -42 -6 72 52 9
0 0 0 1 -2 -5 10
50 69 43 14 -68 48 11
81 -26 43 20 31 82 11
0 -85 43 0 84 -3 10
0 0 96 1 0 -1 12
Table 4 - 4: Finite Element Volume - Tetrahedral data set with 13 nodes and seven variables.
The data file in POINT format for the data in Table 4 - 4 is shown below, and plotted in Figure 4-16:
TITLE = "Example: FE-Volume Tetrahedral Data"
VARIABLES = "X", "Y", "Z", "C", "U", "V", "W"
ZONE NODES=13, ELEMENTS=20, DATAPACKING=POINT, ZONETYPE=FETETRAHEDRON
0 0 -95 -1 1 0 8
0 85 -42 0 -85 -3 9
81 26 -42 2 -22 80 8
155
ASCII Data
50 -69 -42 -6 72 52 9
-50 -69 -42 14 67 -48 9
-81 26 -42 20 -30 -82 9
0 0 0 1 -2 -5 10
50 69 43 14 -68 48 11
81 -26 43 20 31 82 11
0 -85 43 0 84 3 10
-81 -26 43 2 21 -80 11
-50 69 43 -6 -71 -51 11
0 0 96 1 0 -1 12
1 2 3 7
1 3 4 7
1 4 5 7
1 5 6 7
1 6 2 7
2 8 3 7
3 9 4 7
4 10 5 7
5 11 6 7
6 12 2 7
12 2 8 7
8 3 9 7
9 4 10 7
10 5 11 7
11 6 12 7
12 8 13 7
8 9 13 7
9 10 13 7
10 11 13 7
11 12 13 7
156
Finite Element Data
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
Zone
ZoneType=FEPolygon
Nodes=3
Faces=3
Elements=1
NumConnectedBoundaryFaces=2
TotalNumBoundaryConnections=1
…variable values in block format…
#face nodes
1 2
2 3
3 1
#left elements
1 1 1
#right elements (negative indicates boundary connections)
0 -1 0
#boundary connection counts
1
#boundary connection elements
1
#boundary connection zones
2
Remember that Tecplot Focus cannot load face-based (polygonal or polyhedral) data.
157
ASCII Data
TotalNumBoundaryConnections=3
…variable values in block format…
158
ASCII Data File Conversion to Binary
If Preplot encounters an error, you may want to set the debug option to get more information about the
events leading up to the error:
preplot dset.dat -d
You can set the flag to -d2, or -d3, or -d4, and so forth, to obtain more detailed information.
In the following Preplot command line, the number of points that are written to the binary data file
dset.plt is less than the number of points in the input file dset.dat:
preplot dset.dat -iset 3,6,34,2 -jset 3,1,21,1 -iset 4,4,44,5
For zone three, Preplot outputs data points with I-index starting at six and ending at 34, skipping every
other one, and J-index starting at one and ending at 21. For zone four, Preplot outputs data points with the
I-index starting at four, ending at 44, and skipping by five.
In the following Preplot command line, every other point in the I-, J-, and K-directions is written to the
binary data file:
preplot dset.dat -iset ,,,2 -jset ,,,2 -kset ,,,2
The zone, start, and end parameters are not specified, so all zones are used, starting with index one, and
ending with the maximum index. The overall effect is to reduce the number of data points by a factor of
about eight.
159
5
In addition to writing .plt and .szplt files, TecIO includes an API that allows your application to read .szplt
files, Tecplot’s new high-performance subzone format. As we make improvements to the file format, we
will update the TecIO library accordingly. The TecIO library does not support reading Tecplot ASCII (.dat)
or binary (.plt) files.
TecIO’s SZL reading capability is provided solely to provide compatibility with this new Tecplot file
format. The performance improvement achieved by strategically reading partial zones (or subzones) is
considered proprietary to Tecplot products and is not available to third-party developers.
As the SZL format evolves, we will strive to make each new version of the TecIO library a drop-in
replacement for the previous version, so that you need only distribute the new version of the library to
your users, or at most recompile your application. However, this may not always be feasible. We currently
consider it unlikely that we will need to significantly change the SZL reading API in the future, but it is not
impossible.
Tecplot is interested in your experiences with this API. Please contact [email protected] with your
questions or feedback.
160
Getting Started with the API
an arrowhead), one to get its size, and one to get its style. These functions all have names beginning with
tecGeomArrowhead, so it is easy to find them when you want to obtain arrowhead details. But if you are not
interested in arrowheads, you can ignore them entirely.
You may want to develop an object-oriented layer on top of the TecIO API to better interface with your
application. Since each application’s needs are different, we leave this to you. If you come up with
something generally useful, we encourage you to make it available to others.
5 - 1.3 Errors
With only two exceptions, return values in the API are used exclusively to indicate success or failure.
Functions return zero on success and non-zero on failure.
Errors are often caused by asking for a data element that does not exist (for example, zone 10 in a file that
contains only nine zones). This may be avoided by using the provided GetNum functions (such as
tecDataSetGetNumZones) to determine how many items (in this case, zones) exist before attempting to
retrieve them.
Another potential error is calling a function to get attributes of a geometry object when that geometry is
not of the proper type (for example, trying to get the radius of a square). Be sure to check the geometry’s
type before getting its attributes.
Errors may also indicate a corrupted or truncated file due to a file transfer error, insufficient available
memory, or a programming error such as an invalid pointer.
Once a file has been opened successfully, and reading is underway, it is generally best to advise users of an
error condition, but offer to continue trying to read additional items from the file if this is at all possible.
161
Reading SZL Data Files
tecDataSetAuxDataGetItem File Handle, Auxiliary Data Item Index Name and Value of specified Data
Set Auxiliary Data Item
5 - 2.2 Geometries
These functions read geometries (that is, shapes) from the data file. See “Reading Geometry and Text” on
page 172 for details.
162
API Overview
Line Segments
The following functions are used with line segments (polylines) and the arrowheads optionally attached
to them.
tecGeomLineSegmentGetPointCount File Handle, Geometry Index, Line Count of Points in Line Segment
Segment Index
163
Reading SZL Data Files
Other Shapes
The following functions are used with other shapes.
tecGeomSquareGetSize File Handle, Geometry Index Size (i.e., Width/Height are same)
5 - 2.3 Text
The following functions read text objects and their attributes from a data set. See “Reading Geometry and
Text” on page 172 for details.
164
API Overview
Text Box
The following functions read attributes of text boxes, which provide backgrounds and borders around text
objects. Each text box is associated with one text item.
tecCustomLabelsGetSet File Handle, Custom Label Set Index Custom Label Seta
a. A single string containing quoted labels separated by spaces or commas
5 - 2.5 Strings
Strings are UTF-8 encoded and null-terminated. When a string is passed back to your application by the a
SZL reader function, the memory in which it resides is owned by the TecIO library and should be freed
when you are done with it. See “Dealing with Strings” on page 169 for details.
tecDataSetAuxDataGetItem File Handle, Auxiliary Data Item Index Name and Value of specified Data
Set Auxiliary Data Item
165
Reading SZL Data Files
tecVarAuxDataGetItem File Handle, Variable Index, Auxiliary Name and Value of specified
Data Item Index Variable Auxiliary Data Item
tecZoneAuxDataGetItem File Handle, Zone Index, Auxiliary Name and Value of specified Zone
Data Item Index Auxiliary Data Item
5 - 2.7 Variables
Variables are named collections of values with a data type and value location. The following functions
retrieve information about variables. See “Reading Data” on page 169 for details.
tecZoneVarGetSharedZone File Handle, Zone Index, Variable Index Shared Zone Index (0 if none)
tecVarAuxDataGetItem File Handle, Variable Index, Auxiliary Name and Value of specified
Data Item Index Variable Auxiliary Data Item
5 - 2.8 Zones
Zones are used to organize data spatially, chronologically, or by some other characteristic. These functions
get information about zones. See “Reading Data” on page 169 for details.
166
API Overview
tecZoneVarGetSharedZone File Handle, Zone Index, Variable Index Shared Zone Index (0 if none)
tecZoneConnectivityGetSharedZone File Handle, Zone Index, Variable Index Shared Zone Index (0 if none)
tecZoneAuxDataGetItem File Handle, Zone Index, Auxiliary Data Name and Value of specified
Item Index Zone Auxiliary Data Item
5 - 2.9 Connectivity
Connectivity refers to how the nodes and cells in finite element zones are connected and encompasses the
node map and face neighbors. See “Reading Connectivity Data” on page 170 for details.
Node Map
The following functions are used to read the node map from finite element zones. The node map indicates
which nodes are part of which elements.
tecZoneNodeMapGetNumValues File Handle, Zone Index, Number of Count of Node Map Values for the
Cells specified Number of Cells
Face Neighbors
The following functions read face neighbor data, which indicates which elements are adjacent.
167
Reading SZL Data Files
The connectivity functions below are not currently implemented because they apply to face-based
(polygonal/polyhedral) zones, which SZL files cannot currently contain. They are provided so that the
interface does not need to be changed when this capability is implemented.
• tecZonePolyGetBoundaryConnectionCounts
• tecZonePolyGetBoundaryConnections
• tecZonePolyGetFaceElems
• tecZonePolyGetFaceNodeCounts
• tecZonePolyGetFaceNodes
• tecZonePolyGetNumConnectedBoundaryFaces
• tecZonePolyGetTotalNumFaceNodes
• tecZonePolyGetTotalNumBoundaryConnections
tecZoneVarGetDoubleValues File Handle, Zone Index, Variable Index, Array of Data Values
Start Index, Number of Values
tecZoneVarGetFloatValues File Handle, Zone Index, Variable Index, Array of Data Values
Start Index, Number of Values
tecZoneVarGetInt16Values File Handle, Zone Index, Variable Index, Array of Data Values
Start Index, Number of Values
tecZoneVarGetInt32Values File Handle, Zone Index, Variable Index, Array of Data Values
Start Index, Number of Values
tecZoneVarGetUint8Values File Handle, Zone Index, Variable Index, Array of Data Values
Start Index, Number of Values
168
Dealing with Strings
again after closing the file. (This is necessary because file handles are guaranteed unique only as long as
the file is open. Two files open at different times might end up with the same handle.)
After opening the file, you can get useful basic information about the dataset within it using the following
informational functions:
• tecDataSetGetTitle - title of data set
• tecDataSetGetNumVars - number of variables
• tecDataSetGetNumZones - number of zones
• tecFileGetType - whether the file contains a grid, a solution, or both
i = tecDataSetGetTitle(fileHandle, stringCPtr)
call copyCharArrayToString(stringCPtr, tecStringLength(stringCPtr), dataSetTitle)
! Do something with dataSetTitle ...
call tecStringFree(stringCPtr)
There are no functions in the API that accept strings as inputs aside from tecStringFree.
1. The TecIO SZL reading API includes stubs for the functions necessary to read face-based zones, so that if
and when the feature is supported in the future, we do not need to change the API. However, you will find no
reason to call them at this point.
169
Reading SZL Data Files
• The indexes of the zone(s) and variable(s) you are interested in, if you do not want all
variables. There are no API functions to locate a zone or variable by name; instead, iterate over
all zones and variables, get the name of each, see if it’s one you want, and remember its index
(e.g. in a vector) if so. API: tecZoneGetTitle, tecVarGetName
For each zone and variable to be read, you will want to find out:
• The dimensions of the zone. You use one function, tecZoneGetIJK, to retrieve this information
regardless of the zone type. For IJK-ordered zones, this call provides the maximum value of
the I, J, and K indices (some of these will be 1 if the zone has fewer than three dimensions). For
classic (cell-based) FE zones, it provides the number of points as I and the number of elements
as J; K is not used and will receive 0.
• Information about the zone: type, solution time, parent zone, time strand, and whether it is
enabled or disabled. Your application may not need all of this information, so you may skip
some of these calls. API: tecZoneGetType, tecZoneGetSolutionTime, tecZoneGetStrandID,
tecZoneIsEnabled
• Information about the variable: whether it is enabled or not, its type, value location (nodal or
cell-centered), whether it is shared, and whether it is passive. Much of this information is with
respect to a specific zone. Again, you may skip any calls for information your application does
not need. API: tecVarIsEnabled, tecZoneVarGetType, tecZoneVarGetValueLocation,
tecZoneVarGetSharedZone, tecZoneVarIsPassive.
Note that the variable may be shared from another zone, in which case you should prepare to
read the variable from that zone if it is not already in memory, or copy or store a reference to its
data if it has already been loaded.
Variables that are not used in a particular zone may be marked as passive. In this case, no data
is stored in the file for the variable, and zero will be returned for every location.
• The number of values. This will tell you how many elements you need to allocate to read the
entire variable into memory. (The type of the variable implies how many bytes you need per
element.) API: tecZoneVarGetNumValues
After determining the dimensions and type, you can allocate memory for the data and read the values
using one of the tecZoneVarGetValues functions: tecZoneVarGetDoubleValues, tecZoneVarGetFloatValues,
tecZoneVarGetInt16Values, tecZoneVarGetInt32Values, or tecZoneVarGetUint8Values, depending on the type
of the variable.
The TecIO library does not require that you read all the values in a zone’s variable at once—or for that
matter, at all. All of the tecZoneVarGetValues functions include two parameters, startIndex and numValues,
that let you indicate where to start and how many values you want to receive. (Like all indexes in the
TecIO library, startIndex is 1-based: the first element is index 1.) You may read a zone in chunks by
varying these parameters from call to call.
Even though the actual zone may have 1, 2, or 3 dimensions, the values array is one-dimensional. It is up
to your application to find the index of the desired node or cell. More on this in 5 - 5.2 “Accessing Data
Values”.
170
Reading Data
be detected in this way can be specified separately in the file, so you should also be prepared to read this
data if needed.
Connectivity data is stored per zone and so does not need to be re-read for every variable in the zone. Like
variables, connectivity can be, and often is, shared among zones. Call tecZoneConnectivityGetSharedZone to
find out which zone holds the connectivity data for the zone of interest; this will be zero if the zone has its
own connectivity information. If the zone uses another zone’s connectivity data, you will want to read it
from that zone if it is not already in memory, or use a pointer or a copy of the data if it has already been
loaded. You will need to keep the node map on hand in order to find the nodes of each cell.
Most applications will need to read the nodemap. To do this:
• Call tecZoneNodeMapIs64Bit to find out if the node map entries are 64-bit or 32-bit.
• Call tecZoneNodeMapGetNumValues to find out how many entries are in the node map.
• Using the information from these two calls, allocate the memory to read the node map.
• Finally, call either tecZoneNodeMapGet or tecZoneNodeMapGet64 depending on the result of
TecZoneNodeMapIs64Bit to actually read the nodemap.
Your application may not need the face neighbor data. If you need it, the process is similar:
• Call tecZoneFaceNbrsAre64Bit to find out if the face neighbor entries are 64-bit or 32-bit.
• Call tecZoneFaceNbrGetMode to get the face neighbor mode for the zone. This will determine
how many entries in the face neighbor array there are for each cell (see the output function
TECFACE142 for a discussion).
• Call tecZoneFaceNbrGetNumValues to get the total number of face neighbor entries.
• Use this information to calculate how much memory is needed to load the face neighbor data
and allocate it.
• Finally, call tecZoneFaceNbrGetConnections or tecZoneFaceNbrGetConnections64 to read the face
neighbors.
171
Reading SZL Data Files
172
Example Code
The first label in a label set corresponds to a value of one on the axis, the next to a value of two, the next to
a value of three, and so forth. You can get the number of custom label sets using tecCustomLabelsGetNumSets
and retrieve each set with tecCustomLabelsGetSet. Each set is passed back as a single string containing the
labels enclosed in double quote marks. The quoted labels may be separated by spaces or commas.
173
6
Tecplot 360 EX and Tecplot Focus 2017 R2 introduce a new TecIO API for writing SZL (.szplt) data. This
new API has a more flexible calling order, making it easier to write your data as you have it, instead of
having to hold on to it and deliver it all at once to the library. Additionally, the new API brings:
• 64-bit indexing for support of zones with more than two billion nodes.
• Support for integer data types of various sizes in addition to floating-point types.
• The ability to open any number of files for writing simultaneously.
The new API does not currently support writing Tecplot .plt files, although we are considering adding this
capability in the future. For now, .plt files can written using the classic API (see Chapter 3: “Binary Data”),
which will continue to be available indefinitely, and the classic API will also continue to be able to output
.szplt files if your application already uses it for this purpose.
However, for new development, we encourage you to use the new API. This API is where Tecplot will be
focusing TecIO development efforts going forward, and we plan several important improvements in
upcoming releases.
Tecplot is keenly interested in your experiences with this API. Please contact [email protected] with
your questions or feedback.
174
API Overview
175
Writing SZL Data Files (New API)
Function Arguments
tecFileWriterOpen a b
Filename, Data Set Title, List of Variables , File Format , File Type, Default
Data Typec, Grid File Handle,d File Handlee
Function Arguments
tecDataSetAddAuxData File Handle, Name, Value
The TecIO API includes functions for writing face-based or “poly” (polygonal/polyhedral)
zones. Currently, SZL files cannot contain such zones, so they are not implemented and
are not documented here.
176
API Overview
Function Arguments
tecZoneCreateIJKa File Handle, Zone Title, I Max, J Max, K, Max, Variable Data Types,b Variable
Sharing Source Zones, Value Locations, Passive Variables, Face Neighbor
Sharing Source Zone, Number of Face Connections, Face Neighbor Mode,
c
Zone Index
tecZoneCreateFEd File Handle, Zone Title, Zone Type, Number of Nodes, Number of Cells,
Variable Data Types,e Variable Sharing Source Zones, Value Locations,
Passive Variables, Connectivity Sharing Source Zone, Number of Face
f
Connections, Face Neighbor Mode, Zone Index
tecZoneCreateFEMixed File Handle, Zone Title, Number of Nodes, Number of Sections, Cell Shape
per Section, Grid Order per Section, Basis Function per Section, Number of
Elements per Section, Variable Data Types, Variable Sharing Source Zones,
Value Locations, Passive Variables, Connectivity Sharing Source Zone,
Number of Face Neighbor Connections, Face Neighbor Mode, Zone Index
tecZoneMapPartitionsToMPIRanksg File Handle, Zone Index, Number of Partitions, Ranks for Partitions
tecZoneVarWriteDoubleValuesh File Handle, Zone Index, Variable Index, Partition Index, Number of Values,
tecZoneVarWriteFloatValues Array of Values
tecZoneVarWriteInt32Values
tecZoneVarWriteInt16Values
TecZoneVarWriteUint8Values
a. Variable Data Types, Variable Sharing Source Zones, Value Locations, and Passive Variables are integer
arrays holding an element for each variable, containing the specified argument value for the
corresponding variable index.
b. Pass null for this parameter to use the default data type for all variables in the zone.
c. Output parameter that receives the index of the new zone.
d. See footnote a.
e. See footnote b.
f. See footnote c.
g. TecIO-MPI only.
h. These functions work the same; the only difference is the data type of the value array.
Function Arguments
tecZoneMapPartitionsToMPIRanksb File Handle, Zone Index, Number of Partitions, Ranks for Partitions
tecFEPartitionCreate32
c
File Handle, Zone Index, Partition Index, Number of Nodes, Number of
tecFEPartitionCreate64 Cells, Number of Ghost Nodes, Array of Ghost Node Indexes, Array of
Neighbor Partition Indexes, Array of Neighbor Partition Node Indexes,
Number of Ghost Cells, Array of Ghost Cell Indexes
177
Writing SZL Data Files (New API)
Function Arguments
tecFEMixedPartitionCreate32d File Handle, Zone Index, Partition Index, Number of Nodes, Number of
tecFEMixedPartitionCreate64 Cells per Section, Number of Ghost Nodes, Array of Ghost Node Indexes,
Array of Neighbor Partition Indexes, Array of Neighbor Partition Node
Indexes, Number of Ghost Cells per Section, Array of Ghost Cell Indexes
tecIJKPartitionCreate File Handle, Zone Index, Partition Index, I Min, J Min, K Min, I Max, J Max,
K Max
a. TecIO-MPI only.
b. TecIO-MPI only.
c. These functions work the same way; the only difference is the size of the indexes.
d. These functions work the same way; the only difference is the size of the indexes.
6 - 2.5 Connectivity
Connectivity refers to how the nodes and cells in finite element zones are connected and encompasses the
node map and face neighbors. See “Connectivity” on page 178 for details.
The TecIO API includes functions for writing connectivity information for face-based or
“poly” (polygonal/polyhedral) zones. Currently, SZL files cannot contain such zones, so
these functions are not implemented and are not documented here.
Function Input
tecZoneNodeMapWrite32a File Handle, Zone Index, Partition Index, One-Based Node Flag (Boolean),
tecZoneNodeMapWrite64 Node Count, Array of Nodes
tecZoneFaceNbrWriteConnections64
a. These functions work the same way; the only difference is the size of the node indexes.
b. These functions work the same way; the only difference is the size of the face neighbor indexes.
178
Working With Partitions
a null pointer in this variable to help make sure you do not try to use the file handle again after closing the
file. (This is necessary because file handles are guaranteed unique only as long as a file is open. Two files
opened at different times might end up with the same handle.)
TecIO-MPI is required only for multi-processing applications. Partitioned zones may still
be written with the non-MPI TecIO variant, but they must be written by a single
application process. TecIO is not thread-safe, so writing must always be done by a single
thread—either the main thread, or a separate writing thread.
To use MPI with a given file, you must call tecMPIInitialize after opening the file but before writing to it .
This function tells TecIO which MPI communicator to use when writing the file, and which process
(“rank,” in MPI terms) is the main one. The main process is the only one that can write auxiliary data, text,
geometries, and custom labels.
1. On Windows, TeciO-MPI is compiled against Microsoft MPI 4.2.4400.0. On Mac and Linux, it is compiled
against OpenMPI 1.10.0.
179
Writing SZL Data Files (New API)
When writing data, you specify the partition index of each zone you are writing. If you have not called any
of the functions to create partitions, always pass 0 for this argument.
When writing an unpartitioned zone with TecIO-MPI, specify a single process in the
tecZoneMapPartitionsToMPIRanks call. The zone will then be a non-partitioned zone written
entirely by that process.
180
Writing Auxiliary Data
The difference between these two functions is the size of the index, which is specified for
the variable when you create the zone. If your variable contain more than about 2 billion
values, you must use 64-bit indexing. If it will be smaller, using 32-bit indexing requires
only half the space for the node map.
The number of entries per face neighbor (in the face neighbors array passed to TecIO) is determined by the
Face Neighbor Mode passed when creating the zone. See TECFACE142 in the classic API documentation
for a discussion of how many entries are required for each mode.
181
Writing SZL Data Files (New API)
Auxiliary data names should be unique for the object they are attached to—that is, you should not have
two auxiliary data records named LIFT on a single zone; having LIFT on two different zones, or on a zone
and the dataset (etc.), is fine.
Auxiliary data values must be strings. If you wish to represent numeric quantities or, for example, a
comma-separated list of values or other record-style data, you must convert this to a string before writing.
6-8 Example
The rewriteszl example is a simple program that reads a SZL data file using the TecIO SZL reading API (see
Chapter 5: “Reading SZL Data Files”) and writes it to a new SZL file using the new writing API. The
resulting file is functionally equivalent to the original, though it may not be identical at the binary level.
As such, the code illustrates writing every kind of data that can be stored in a SZL file. It also prints
information about each data object as it is read, which may make it helpful as a diagnostic tool. This
example is provided in both C++ (.cpp) and FORTRAN (.F, .f90) versions. Visual Studio solution files are
also provided.
6-9 SZCOMBINE
szcombine (szcombine.exe on Windows) is a command-line utility to combine into a .szplt file the six
temporary files produced by calls to TECFLUSH142 (or tecFileWriterFlush in the new API). It is installed
in Tecplot 360 EXʹs bin folder, and is also built when the Tecio library is built from the source package
available from the tecplot.com website. Its syntax is as follows:
szcombine infileBaseName [--cleanup] [--outfile outFileName]
infileBaseName is the file name passed into the FName parameter of TECINI142, to which was added six
suffixes to form the temporary file names. With no optional parameters, the temporary files are combined
to produce a .szplt file whose name is infileBaseName, and temporary files are left in place. The --cleanup
option causes the temporary files to be deleted. The --outfile option causes the .szplt file to be written to a
different filename. For example, given the following temporary files that were produced by passing
myfile.szplt into TECINI142:
myfile.szplt.szhdr myfile.szplt.szdat myfile.szplt.szaux myfile.szplt.sztxt
myfile.szplt.szgeo myfile.szplt.szlab
Then executing the command
szcombine myfile.szplt
would create myfile.szplt and leave the six temporary files in place. Note that if the program that
produced the temporary files (AKA solver) is still running and calls TECEND142, this file will be
overwritten by a new myfile.szplt that contains all data written by the solver.
Executing instead the command
182
SZCOMBINE
183
A
Refer to this section only if you wish to write your own code that writes Tecplot binary-format (.plt) files
without utilizing the TecIO library. Otherwise, refer to Section 3 - 1 “Getting Started” for instructions for
linking with this library, which is provided at no cost by Tecplot, Inc.
Remember that polygonal zones are not available for Tecplot Focus. Refer to Section 1 -
2 “Creating Data Files for Tecplot 360 EX and Focus” for details.
The subzone file format (.szplt) is not currently documented because we anticipate the need for changes to
the file format in the near future. Furthermore, the format is sufficiently complex that we do not expect
application developers finding it worthwhile to undertake writing their own code to output in .szplt
format. If you want your application to write subzone files and find the TecIO library insufficient, please
contact us.
/*
BINARY FILE FORMAT:
-----------------------------------------------------------------------
Two binary data file formats are detailed below: v112 and v191. The differences
are minor. Preplot produces v112 which was introduced with Tecplot 11.2 in 2009.
v191 was introduced with Tecplot 2019r1. v191 supports more than 2 billion
faces and face-nodes for poly data, but is the same for all other types of data.
Binary data files have two main sections. A header section and a data
section.
+----------------+
| HEADER SECTION |
+----------------+
+---------+
| FLOAT32 | EOHMARKER, value=357.0
+---------+
+----------------+
| DATA SECTION |
+----------------+
184
I. HEADER SECTION
The header section contains: the version number of the file, a title
of the file, the names of the variables to be plotted, the
descriptions of all zones to be read in and all text and geometry
definitions.
185
Binary Data File Format
6=FEPOLYGON, 7=FEPOLYHEDRON
+-----------+
| INT32 | Specify Var Location.
+-----------+ 0 = Don’t specify, all data is located
at the nodes.
1 = Specify
if “specify var location” == 1
+-----------+
| INT32*NV | Variable Location (only specify if above is 1).
+-----------+ 0 = Node, 1 = Cell Centered (See note 5.)
+-----------+
| INT32 | Are raw local 1-to-1 face neighbors supplied?
+-----------+ (0=FALSE 1=TRUE). These raw values are a
compact form of the local 1-to-1 face neighbors.
If supplied, Tecplot assumes that the face
neighbors are fully specified. As such, it
will not perform auto face neighbor assignment.
This improves Tecplot’s time to first plot.
See the data section below for format details.
ORDERED and FELINESEG zones must specify 0 for
this value because raw face neighbors are not
defined for these zone types. FEPOLYGON and
FEPOLYHEDRON zones must specify 0 for this value
since face neighbors are defined in the face map
for these zone types.
+-----------+
| INT32 | Number of miscellaneous user-defined face
+-----------+ neighbor connections (value >= 0). This value
is in addition to the face neighbors supplied
in the raw section. FEPOLYGON and FEPOLYHEDRON
zones must specify 0.
if FE Zone:
+-----------+
| INT32 | NumPts
+-----------+
if ZoneType is FEPOLYGON or FEPOLYHEDRON:
+-----------+
| INT32/64 | NumFaces: For v112 zone headers, this is an INT32.
+-----------+ For v191 zone headers, this is an INT64.
+-----------+
| INT32/64 | Total number of face nodes. For v112 zone headers
+-----------+ this is an INT32. For v191 zone headers, this is an INT64.
(For FEPOLYGON zones, this is NumFaces*2.)
+-----------+
| INT32 | Total number of boundary faces. If any
+-----------+ boundary faces exist, include one to represent
no neighboring element.
186
+-----------+
| INT32 | Total number of boundary connections.
+-----------+
+-----------+
| INT32 | NumElements
+-----------+
+-----------+
| INT32*3 | ICellDim,JCellDim,
+-----------+ KCellDim (for future use; set to zero)
For all zone types (repeat for each Auxiliary data name/value pair):
+-----------+
| INT32 | 1=Auxiliary name/value pair to follow
+-----------+ 0=No more Auxiliary name/value pairs.
+-----------+
| INT32*N | Value string (See note 1.)
+-----------+
v. Geometries
+-----------+
| FLOAT32 | Geometry marker. Value = 399.0
+-----------+
+-----------+
| INT32 | Position CoordSys 0=Grid, 1=Frame,
+-----------+ 2=FrameOffset(not used),
3= OldWindow(not used),
4=Grid3D
+-----------+
| INT32 | Scope 0=Global 1=Local
+-----------+
+-----------+
| INT32 | DrawOrder 0=After, 1=Before
+-----------+
+-----------+
| FLOAT64*3 | (X or Theta),(Y or R),(Z or dummy)
+-----------+ i.e. the starting location
+-----------+
| INT32 | Zone (0=all)
+-----------+
+-----------+
| INT32 | Color
+-----------+
+-----------+
| INT32 | FillColor
+-----------+
+-----------+
| INT32 | IsFilled (0=no 1=yes)
+-----------+
+-----------+
| INT32 | GeomType 0=Line, 1=Rectangle 2=Square,
+-----------+ 3=Circle, 4=ellipse
+-----------+
| INT32 | LinePattern 0=Solid 1=Dashed 2=DashDot
+-----------+ 3=DashDotDot 4=Dotted
5=LongDash
+-----------+
| FLOAT64 | Pattern Length
+-----------+
+-----------+
| FLOAT64 | Line Thickness
+-----------+
187
Binary Data File Format
+-----------+
| INT32 | NumEllipsePts
+-----------+
+-----------+
| INT32 | Arrowhead Style 0=Plain, 1=Filled, 2=Hollow
+-----------+
+-----------+
| INT32 | Arrowhead Attachment 0=None, 1=Beg, 2=End, 3=Both
+-----------+
+-----------+
| FLOAT64 | Arrowhead Size
+-----------+
+-----------+
| FLOAT64 | Arrowhead Angle
+-----------+
+-----------+
| IN32*N | Macro Function Command (string: N = Length+1)
+-----------+
+-----------+
| INT32 | Polyline Field Data Type
+-----------+ 1=Float, 2=Double (GTYPE)
+-----------+
| INT32 | Clipping (0=ClipToAxes, 1=ClipToViewport,
+-----------+ 2=ClipToFrame)
vi. Text
+-----------+
| FLOAT32 | Text marker. Value=499.0
+-----------+
+-----------+
188
| INT32 | Position CoordSys 0=Grid, 1=Frame,
+-----------+ 2=FrameOffset(not used),
3= OldWindow(not used),
4=Grid3D(New to V10)
+-----------+
| INT32 | Scope 0=Global 1=Local
+-----------+
+-----------+
| FLOAT64*3 | (X or Theta),(Y or R),(Z or dummy)
+-----------+ Starting Location
+-----------+
| INT32 | FontType
+-----------+
+-----------+
| INT32 | Character Height Units 0=Grid, 1=Frame, 2=Point
+-----------+
+-----------+
| FLOAT64 | Height of characters
+-----------+
+-----------+
| INT32 | Text Box type 0=NoBox 1=Hollow 2=Filled
+-----------+
+-----------+
| FLOAT64 | Text Box Margin
+-----------+
+-----------+
| FLOAT64 | Text Box Margin Linewidth
+-----------+
+-----------+
| INT32 | Text Box Outline Color
+-----------+
+-----------+
| INT32 | Text Box Fill Color
+-----------+
+-----------+
| FLOAT64 | Angle
+-----------+
+-----------+
| FLOAT64 | Line Spacing
+-----------+
+-----------+
| INT32 | Text Anchor. 0=left, 1=center,
+-----------+ 2=right, 3=midleft
4=midcenter 5=midright,
6=headleft 7=headcenter
8=headright
+-----------+
| INT32 | Zone (0=all)
+-----------+
+-----------+
| INT32 | Color
+-----------+
+-----------+
| INT32*N | MacroFunctionCommand (string: N = Length + 1)
+-----------+
+-----------+
| INT32 | Clipping (0=ClipToAxes,
+-----------+ 1=ClipToViewport, 2=ClipToFrame)
+-----------+
| INT32*N | Text. N=Text Length+1
+-----------+
vii.CustomLabel
+-----------+
| FLOAT32 | CustomLabel Marker; F=599
+-----------+
+-----------+
| INT32 | Number of labels
+-----------+
+-----------+
| INT32*N | Text for label 1. (N=length of label + 1)
+-----------+ See note 1.
189
Binary Data File Format
+-----------+
| INT32*N | Text for label 2. (N=length of label + 1)
+-----------+ See note 1.
.
.
.
+-----------+
| INT32*N | Text for label NumLabels.
+-----------+ (N=length of label + 1) See note 1.
viii.UserRec
+-----------+
| FLOAT32 | UserRec Marker; F=699
+-----------+
+-----------+
| INT32*N | Text for UserRec. See note 1.
+-----------+
II. DATA SECTION (don’t forget to separate the header from the data
with an EOHMARKER). The data section contains all of the data
associated with the zone definitions in the header.
190
+-----------+
| INT32*NV | Zero based zone number to share variable with
+-----------+ (relative to this datafile). (-1 = no sharing).
(Omit entirely if “Has variable sharing” is 0).
+-----------+
| INT32 | Zero based zone number to share connectivity
+-----------+ list with (-1 = no sharing). FEPOLYGON and
FEPOLYHEDRON zones use this zone number to
share face map data.
+-----------+
| INT32*FN | Face nodes array containing the node numbers
+-----------+ for all nodes in all faces.
191
Binary Data File Format
+-----------+
| INT32*F | Elements on the left side of all faces.
+-----------+ Boundary faces use a negative value which is
the negated offset into the face boundary
connection offsets array. A value of “-1”
indicates there is no left element.
F = NumFaces.
+-----------+
| INT32*F | Elements on the right side of all faces. See
+-----------+ description of left elements above for more
details. F = NumFaces.
+-----------+
| INT32*NBI | Boundary face connection elements. A value of
+-----------+ “-1” indicates there is no element on part of
the face.
NBI = total number of boundary connections.
+-----------+
| INT32*NBI | Boundary face connection zones. A value of
+-----------+ “-1” indicates the current zone.
NBI = total number of boundary connections.
NOTES:
Example: The letter “A” has an ASCII value of 65. The WORD
written to the data file for the letter “A” is then
65. In fortran this could be done by doing the following:
Integer*32 I
.
.
I = ICHAR(‘A’);
WRITE(10) I
2. This represents JMax sets of adjacency zero based indices where each
set contains L values and L is
2 for LINESEGS
3 for TRIANGLES
4 for QUADRILATERALS
4 for TETRAHEDRONS
8 for BRICKS
192
3. The raw face neighbor array is dimensioned by (number of elements for
the zone) times (the number of faces per element), where each member
of the array holds the zero-based element neighbor of that face. A
boundary face is one that has no neighboring element and is
represented by a -1. Faces should only be neighbors if they logically
share nodes and they should be reciprocal.
Where:
cz = cell in current zone (zero based)
fz = face of cell in current zone (zero based)
oz = face obscuration flag (only applies to one-to-many):
0 = face partially obscured
1 = face entirely obscured
nz = number of cell or zone/cell associations
(only applies to one-to-many)
ZZ = remote Zone (zero based)
CZ = cell in remote zone (zero based)
So if the zone was dimensioned 2x3x2 its cell centered variable would be
represented as follows:
1.5 0.0 12.5 0.0 0.0 0.0
If the zone was dimensioned 3x2x2 its cell centered variable would be
represented as follows:
1.5 12.5 0.0 0.0 0.0 0.0
and if the zone was dimensioned 2x2x3 its cell centered variable would be
represented as follows:
1.5 0.0 0.0 0.0 12.5 0.0 0.0 0.0
193
B
Tthe TecIO library often uses integers with special meanings, for example for colors, fonts, and zone types.
The same values are used both for writing (TECXXXX142 functions) and for SZL reading (tecXxxXxx
functions). The table below documents the meaning of these values. Where available, the equivalent
keywords used in Tecplot ASCII files are also included.
194
Category Legal Values ASCII Keyword API Functions
195
Meaningful Integer Values
See the following chapters for more information on how these values are used:
• Chapter 3: “Binary Data”
• Chapter 4: “ASCII Data”
• Chapter 5: “Reading SZL Data Files”
• Chapter 6: “Writing SZL Data Files (New API)”
196
C
Glossary
The following terms are used throughout the Data Format Guide and are included here for your reference.
2D Plotting in two dimensions. Line plots of one or more variables (XY and Polar Line plots)
are not considered 2D.
2D Cartesian Plot A plot of some variable by location on a single plane using two axes.
3D Cartesian Plot A plot displaying a 3D scattering of points, surfaces, or volumes using three orthogonal
axes.
3D Surface Three-dimensional plotting confined to a surface. For example, the surface of a wing.
3D Volume Three-dimensional plotting of data that includes interior data points of a volume, as well
as those on the surface. For example, the vector field around a wing.
Active Zone A zone that is displayed in the current plot, as determined in the Zone Style dialog.
ASCII Data File A data file composed of human-readable statements and numbers using ASCII characters.
Binary Data File A data file composed of machine-readable data. This type of file is created by converting
ASCII data files with Preplot, or by directly creating them from an application.
Block A data file format in which the data is listed by variable. All the point values of the first
variable are listed first, then all the point values of the second variable, and so forth.
Boundary Cell A set of un-blanked cell faces in a 3D volume zone which have only one neighboring
Faces volume cell. In contrast, interior cell faces have two neighboring volume cells, one on
either side, which share the face. For an IJK-ordered zone the boundary cell faces are on
the exterior of the zone. That is, the first and last I-planes, the first and last J-planes, and
the first and last K-planes. For a finite element 3D volume zone, boundary cell faces are on
the exterior of the zone and the surface of any voids within the zone.
197
Glossary
Brick An element type of finite element volume data composed of eight node points arranged in
a hexahedron-like format. This element type is used in 3D volume plotting.
Cell Either an element of finite element data, or the space contained by one increment of each
index of IJ- or IJK-ordered data.
Cell-Centered Val-
Values located at the center of the cell (assumed to be the centroid).
ues
Connectivity List The portion of a finite element data file which defines the elements or cells by listing the
relationships between points. The number of points per cell is determined by the element
type.
Custom Labels Text strings contained within a data file or text geometry file which define labels for your
axes or contour table. You may select Custom Labels anywhere you can choose a number
format, the result is the text strings in place of numbers. The maximum length of a custom
label is 1024 characters.
Data File A file that contains data used for plotting in Tecplot.
Data Format The type of zone data as specified by the format parameter in a Tecplot data file, such as:
BLOCK or POINT.
Data Loader A Tecplot add-on which allows you to read non-Tecplot data files.
Data Set A set of one or more zones. A data set may be plotted in one or more frames. However, a
single frame may only plot one data set. A data set may be created by loading one or more
data files.
Element Type The form of individual elements in a finite element zone. There are four types of cell-based
finite element zones: Triangle and Quadrilateral (finite element surface types), and
Tetrahedron and Brick (finite element volume types). For cell-based finite elements, the
element type of a zone determines the number of nodes per element and their orientation
within an element.
There are two types of face-based finite element zones: polygonal (2D) and polyhedral
(3D). For face-based elements, the number of nodes per element is variable. Tecplot Focus
cannot load face-based zones.
FE An abbreviation for finite element, a common means of arranging data for calculations.
(Often referred to as “unordered” or “unstructured”.)
FE Surface A finite element zone of the element type Triangle, Quadrilateral, Polygon. These zones are
used for 2D and 3D surface plots.
FE Volume A finite element zone of the element type Tetrahedron, Brick, Polyhedron. These zones are
used for 3D volume plots.
Field Map A collection of zones for 2D and 3D field plots. A common style can be easily applied to all
zones in the selection.
Field Plot Includes 2D Cartesian and 3D Cartesian plot types. Generally used to display the spacial
relationship of data. Mesh, Contour, Vector, Scatter and Shade are all considered field
plots. XY and Polar Line plots and the Sketch plot type are not field plots.
198
Finite Element A type of data point ordering. Data is arranged by listing the data points (called nodes),
and then listing their relationships (called elements). The element type of the zone
determines the number of nodes which are contained in each element, as well as the exact
relationship of nodes within an element. There are several different element types
supported by Tecplot: Triangle,Quadrilateral,Tetrahedron, Brick, Polygonal and
Polyhedral. See also: Connectivity List and Node
I-Ordered A type of data point ordering where each point is listed one at a time (that is, by one
index). Used mainly in XY-plots. In 2D or 3D, this type of data point ordering is sometimes
called irregular, and is only useful for scatter plots, or for interpolating into 2D, 3D surface,
or 3D volume zones. (This type of data can also be used for 2D or 3D vector plots if
streamtraces are not required.)
IJ-Ordered A type of data point ordering where the points are arranged in a 2D array used for 2D and
3D surface plotting.
IJK-Blanking A feature to include or exclude portions of an IJK-ordered zone based on index ranges.
IJK-Ordered A type of data ordering where the points are arranged in a 3D array. Used for 3D volume
plotting as well as 2D and 3D surface plotting.
I-Plane In an ordered zone, the connected surface of all points with a constant I-index. In reality, I-
planes may be cylinders, spheres, or any other shape.
Irregular Data Points which have no order, or at least no order which can be easily converted to IJ- or IJK-
ordering.
J-Plane In an ordered zone, the connected surface of all points with a constant J-index. In reality, J-
planes may be cylinders, spheres, or any other shape.
K-Plane In an IJK-ordered zone, the connected surface of all points with a constant K-index. In
reality, K-planes may be cylinders, spheres, or any other shape.
Macro A file containing a list of instructions, called macro commands, which can duplicate
virtually any action performed in Tecplot.
Macro Command An instruction given to Tecplot in a macro file. Macro commands always start with a dollar
sign and then an exclamation mark. For example, $!Redraw refreshes a plot view.
Macro File A file which contains a series of macro commands. Macro files are run from the command
line, or through the Play option of the Macro sub-menu of the File menu.
Macro Variable A holding place for numeric values in a macro file. There are two types of macro variables:
user-defined (you set and retrieve the value), or internal (Tecplot sets the value and you
may retrieve it).
No Neighboring In polyhedral/polygonal fe data sets, the term “no neighboring element” refers to a face
Element that does not have a neighboring element on either its right or left side.
Number Format The style of numbers to display for a data or axis label; exponent, integer, float, and so
forth.
Ordered Data A type of data point organization which consists of a parameterized series of points. There
are seven types of ordered data: I-, J-, K-, IJ-, JK-, IK-, and IJK-ordered. I-, IJ-, and IJK-
ordered are the most common.
199
Glossary
Polygonal A 2D, face-based finite element type. The number of nodes per element is variable. That is,
a single polygonal zone may contain triangular, quadrilateral, hexagonal, ..., etc. elements.
Tecplot Focus cannot load this type of zone.
Polyhedral A 3D, face-based finite element type. The number of nodes per element is variable. That is,
a single polyhedral zone may contain tetrahedral and brick (and others) elements. Tecplot
Focus cannot load this type of zone.
Point A data file format for an I-, IJ-, or IJK-ordered zone in which the data is listed by point. All
of the variable values for the first data point are listed first, then all the variable values for
the second data point, and so forth.
Quadrilateral An element type of finite element surface data which is composed of four node points
arranged in a quadrilateral. Used in 2D and 3D surface plotting.
Sharing Variable sharing allows a single storage location to be used by more than one party. For
example, if the X-variable is shared between zones five and seven only one storage
location is created. The storage is not freed by Tecplot until the number of parties accessing
the data is reduced to zero. Variables and connectivity information may be shared.
Subzone A portion of a zone,. Also refers to a file format (.szplt) introduced in Tecplot 360 EX that
allows subzones to be loaded as needed for plots and other operations. In typical use cases,
this significantly improves interactive performance and reduces memory footprint
compared to .plt files.
Tetrahedron An element type of finite element volume data which is composed of four node points
arranged in a tetrahedron. (Used in 3D volume plotting.)
Triangle An element type of finite element surface data which is composed of three node points
arranged in a triangle. (Used in 2D and 3D surface plotting.)
Unordered or
(See Irregular Data.)
Unorganized Data
Zone A subset of a data set which is assigned certain plot types. Zones may be activated
(plotted) or deactivated (not plotted). Each zone has one type of data ordering: I-, IJ-, IJK-,
or finite element. Zones are typically used to distinguish different portions of the data. For
example, different calculations, experimental versus theoretical results, different time
steps, or different types of objects, such as a wing surface versus a vector field around a
wing.
Zone Layers One way of displaying a 2D or 3D plot’s data set. The plot is the sum of the active zone
layers, which may include mesh, contour, vector, shade, scatter and edge.
200
INDEX
201
Full file 45
H Q
Header Quadrilateral cells 144
file header 120
zone header 59 R
Right-hand rule
I face neighbors 69
Irregular data 137
S
L Scatter Plots 137
Labels, custom Shared grid 45
binary data 45 Solution file 45
Legend text 45 Syntax
Line Segments 143 ASCII format 119
Local one-to-many 128 TecIO functions 29–63
Local one-to-one 128
T
M TECAUXSTR 29
Metadata, see Auxiliary Data TECDAT 30
TECEND 32
N TECFACE 32
Neighboring elements 130 TECFIL 37
Nodal 19 TECFOREIGN 39
Nodal Data 31, 125 TECGEO 39
Nodal data 19 TecIO functions 29–63
Nodes TecIO library 23
finite element zone types to specify 123 deprecated functions 25
function calling sequence 26
O function reference 29–63
Ordered Data 137–143 linking with 28
Example (binary) 110 TECLAB 45
Examples TECNOD 47
2D Field Plot 143 TECNODE 48
3D Field Plot 143 TECPOLYBCONN 50
IJK-ordered 140 TECPOLYFACE 49
IJ-ordered 139 TECPOLYZNE 51
I-ordered 138 TECTXT 54
Examples (ASCII) 138–143 TECUSR 57
IJK-ordered data 138 TECVAUXSTR 57
202
INDEX
TECZAUXSTR 58
TECZNE 59
Tetrahedral cells 144
Text Anchor 132
Text Record
ASCII data 131–132
Binary Data 54
example 116
Text Anchor positions 132
Tick mark Labels 45
Triangular Cells 144
Triangulation 137
U
Unstructured Data 137
User record
binary data 57
V
Variable auxiliary data 57
Variable Location 124, 125–126
Variable location 19
Variable Sharing 124, 126, 145
Variables
location 19
X
XY Plot
example 141
XY Plots 137
Z
Zone auxiliary data 58
Zone Footer 127
Zone header 59
Zone Record 121–131
Zone Type
finite-element zones 143
Zone Types 123, 137
FEBRICK 144
FELINESEG 143
FEPOLYGON 144
FEPOLYHEDRAL 144
FEQUADRILATERAL 144
FETETRAHEDRON 144
FETRIANGLE 144
203