Functions | |
| Boolean_t | TecUtilDataValueSetByZoneVar (EntIndex_t Zone, EntIndex_t Var, LgIndex_t PointIndex, double Value) |
| Assign a value to a field variable at a specific position. | |
| void | TecUtilDataValueShare (EntIndex_t SourceZone, EntIndex_t DestZone, EntIndex_t Var) |
| Sets the properties of the variable so that it is shared between source and destination zones (using the source for values). | |
| void | TecUtilDataValueCopy (EntIndex_t SourceZone, EntIndex_t DestZone, EntIndex_t Var) |
| Copies the data from the source zone's variable to the destination zone. | |
| Boolean_t | TecUtilDataValueAlloc (EntIndex_t Zone, EntIndex_t Var) |
| Allocates the space needed for the variable. | |
| Boolean_t | TecUtilDataValueAutoLOD (EntIndex_t Zone, EntIndex_t Var, DataValueStructure_e DataValueStructure, const char *FileName, FileOffset_t Offset, Int64_t Stride, Boolean_t IsDataNativeByteOrder) |
| Specifies where in the data file the data for the specified variable resides. | |
| ArbParam_t | TecUtilDataValueGetClientData (FieldData_pa FieldData) |
| Return the custom load-on-demand client data from a field data handle. | |
| Boolean_t | TecUtilDataValueCustomLOD (EntIndex_t Zone, EntIndex_t Var, LoadOnDemandVarLoad_pf VariableLoad, LoadOnDemandVarUnload_pf VariableUnload, LoadOnDemandVarCleanup_pf VariableCleanup, FieldValueGetFunction_pf GetValueFunction, FieldValueSetFunction_pf SetValueFunction, ArbParam_t ClientData) |
| Registers with Tecplot the load-on-demand callbacks and client data for a specific variable. | |
| Boolean_t | TecUtilDataValueUnload (EntIndex_t Zone, EntIndex_t Var) |
| Instructs Tecplot to unload the variable. | |
| Boolean_t | TecUtilDataValueBranchShared (EntIndex_t Zone, EntIndex_t Var) |
| Branch off a shared variable. | |
| void | TecUtilDataValueArraySetByRef (FieldData_pa DestFieldData, LgIndex_t DestOffset, LgIndex_t DestCount, void *SourceValueArray) |
| Copies the specified number of values from the base of the source value array to the destination field data starting at the specified offset. | |
| void | TecUtilDataValueSetByRef (FieldData_pa FD, LgIndex_t PointIndex, double Value) |
| Assign a value to a field variable at a specific position. | |
| void | TecUtilDataValueSetMinMaxByRef (FieldData_pa FieldData, double MinValue, double MaxValue) |
| Set the minimum and maximum values for a tecplot variable using a field data reference. | |
| void | TecUtilDataValueSetMinMaxByZoneVar (EntIndex_t Zone, EntIndex_t Var, double MinValue, double MaxValue) |
| Set the minimum and maximum values for a tecplot variable using a zone and variable number. | |
| void | TecUtilDataValueGetReadableRawPtr (EntIndex_t Zone, EntIndex_t Var, void **DataPtr, FieldDataType_e *FieldDataType) |
| Get a read-only handle to the raw field data in the data set attached to the current frame. | |
| void | TecUtilDataValueGetWritableRawPtr (EntIndex_t Zone, EntIndex_t Var, void **DataPtr, FieldDataType_e *FieldDataType) |
| Get a read/write handle to the raw field data in the data set attached to the current frame. | |
| LgIndex_t | TecUtilDataValueGetCountByRef (FieldData_pa FieldData) |
| Gets the number of values associated with the field data reference. | |
| double | TecUtilDataValueGetByZoneVar (EntIndex_t Zone, EntIndex_t Var, LgIndex_t PointIndex) |
| Get a field data value. | |
| FieldData_pa | TecUtilDataValueGetReadableNativeRef (EntIndex_t Zone, EntIndex_t Var) |
| Get a read-only handle to the native data for the specified zone and variable in the data set attached to the current frame. | |
| FieldData_pa | TecUtilDataValueGetReadableDerivedRef (EntIndex_t Zone, EntIndex_t Var) |
| Get a read-only handle to the derived data for the specified zone and variable in the data set attached to the current frame. | |
| FieldData_pa | TecUtilDataValueGetReadableNLRef (EntIndex_t Zone, EntIndex_t Var) |
| Get a read-only handle to the node located data for the specified zone and variable in the data set attached to the current frame. | |
| FieldData_pa | TecUtilDataValueGetReadableCCRef (EntIndex_t Zone, EntIndex_t Var) |
| Get a read-only handle to the cell centered data for the specified zone and variable in the data set attached to the current frame. | |
| FieldData_pa | TecUtilDataValueGetWritableNativeRef (EntIndex_t Zone, EntIndex_t Var) |
| Get a native read/write handle to the data for the specified zone and variable in the data set attached to the current frame. | |
| FieldValueGetFunction_pf | TecUtilDataValueRefGetGetFunc (FieldData_pa FD) |
| Get the low-level "get value" function associated with a field data handle. | |
| FieldValueSetFunction_pf | TecUtilDataValueRefGetSetFunc (FieldData_pa FD) |
| Get the low-level "set value" function associated with a field data handle. | |
| Boolean_t | TecUtilDataValueGetZoneVarByRef (FieldData_pa FD, EntIndex_t *Zone, EntIndex_t *Var) |
| Get a candidate zone and variable associated with the given field data reference. | |
| FieldDataType_e | TecUtilDataValueGetRefType (FieldData_pa FieldData) |
| Get the field data type of a field data handle. | |
| FieldDataType_e | TecUtilDataValueGetType (EntIndex_t Zone, EntIndex_t Var) |
| Queries for the data type of the variable. | |
| ValueLocation_e | TecUtilDataValueGetLocation (EntIndex_t Zone, EntIndex_t Var) |
| Queries for the location of the variable. | |
| ValueLocation_e | TecUtilDataValueGetLocationByRef (FieldData_pa FieldData) |
| Queries for the location of the data values associated with the field data reference. | |
| void | TecUtilDataValueArrayGetByRef (FieldData_pa SourceFieldData, LgIndex_t SourceOffset, LgIndex_t SourceCount, void *DestValueArray) |
| Fetch an Array of values by reference. | |
| double | TecUtilDataValueGetByRef (FieldData_pa FieldData, LgIndex_t PointIndex) |
| Get a field data value. | |
| Boolean_t | TecUtilDataValueGetMinMaxByZoneVar (EntIndex_t Zone, EntIndex_t Var, double *Min, double *Max) |
| Get the minimum and maximum values for a tecplot variable using a zone and variable number. | |
| void | TecUtilDataValueGetMinMaxByRef (FieldData_pa FieldData, double *Min, double *Max) |
| Get the minimum and maximum values for a tecplot variable using the field data reference. | |
| Boolean_t | TecUtilDataValueIsSharingOk (EntIndex_t SourceZone, EntIndex_t DestZone, EntIndex_t Var) |
| Determine if it is ok to share a variable between zones. | |
| Set_pa | TecUtilDataValueGetShareZoneSet (EntIndex_t Zone, EntIndex_t Var) |
| Gets the set of zones that share the variable with the specified zone. | |
| EntIndex_t | TecUtilDataValueGetShareCount (EntIndex_t Zone, EntIndex_t Var) |
| Get a count for the number of times a particular variable is shared. | |
| Boolean_t | TecUtilDataValueIsPassive (EntIndex_t Zone, EntIndex_t Var) |
| Determine if a variable is passive for a particular zone. | |
| Boolean_t TecUtilDataValueAlloc | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Allocates the space needed for the variable.
This function is used in conjunction with deferred variable creation. See the SV_DEFERVARCREATION option for TecUtilDataSetAddZoneX() and TecUtilDataSetAddVarX() for details.
| Zone | The zone needing the variable allocated. | |
| Var | The variable to be allocated. |
INTEGER*4 FUNCTION TecUtilDataValueAlloc( & Zone, & Var) INTEGER*4 Zone INTEGER*4 Var
Python Syntax:
Results = TecUtil.DataValueAlloc(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal boolean
Allocate the first variable of zone 3. Note that this example is only valid if the zone was added with the deferred variable creation option set to true.
IsOk = TecUtilDataValueAlloc(3, 1);
| void TecUtilDataValueArrayGetByRef | ( | FieldData_pa | SourceFieldData, | |
| LgIndex_t | SourceOffset, | |||
| LgIndex_t | SourceCount, | |||
| void * | DestValueArray | |||
| ) |
Fetch an Array of values by reference.
This function fetches the specified number of values from the source field data starting at the specified source item offset and copies them to the base of the destination value array. The destination value array must be of the same data type as the source field data. In addition, data of type FieldDataType_Bit is currently not supported for array access. This function is Thread Safe.
| SourceFieldData | Field data containing the data to fetch. | |
| SourceOffset | Member offset in the source field data to begin fetching values. | |
| SourceCount | Number of values to fetch from the source field data. | |
| DestValueArray | Pre-allocated array large enough to hold the requested members. The first member is placed at the base of the array. The native type of the array must match that of the field data. |
This function is not supported in Python.
| void TecUtilDataValueArraySetByRef | ( | FieldData_pa | DestFieldData, | |
| LgIndex_t | DestOffset, | |||
| LgIndex_t | DestCount, | |||
| void * | SourceValueArray | |||
| ) |
Copies the specified number of values from the base of the source value array to the destination field data starting at the specified offset.
The source value array must be of the same data type as the destination field data. In addition, data of type FieldDataType_Bit is currently not supported for array access. This function is Thread Safe.
| DestFieldData | Field data to receive the source values. | |
| DestOffset | Member offset in the destination field data to begin assigning values. DestOffset >= 1 and DestOffset <= DestCount. | |
| DestCount | Number of values to assign to the destination field data. | |
| SourceValueArray | An array containing the members to copy. The first member is assumed to be at the base of the array. |
This function is not supported in Python.
| Boolean_t TecUtilDataValueAutoLOD | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var, | |||
| DataValueStructure_e | DataValueStructure, | |||
| const char * | FileName, | |||
| FileOffset_t | Offset, | |||
| Int64_t | Stride, | |||
| Boolean_t | IsDataNativeByteOrder | |||
| ) |
Specifies where in the data file the data for the specified variable resides.
The variable must be laid out in memory using the structure specified. Using this information Tecplot will automatically load and unload the variable when Tecplot deems it necessary. It is the responsibility of the add-on to ensure that the file remains present and unaltered while Tecplot maintains a reference to this file as Tecplot may unload and subsequently reload the variable at unspecified times.
This function is used in conjunction with deferred variable creation. See the SV_DEFERVARCREATION option for TecUtilDataSetAddZoneX() and TecUtilDataSetAddVarX() for details.
| Zone | The zone of the variable to have Tecplot automatically load on demand. | |
| Var | Variable to have Tecplot automatically load on demand. | |
| DataValueStructure | Specifies the structure type to which the data in the file conforms. | |
| FileName | Data file name containing the variable data laid out using Tecplot's binary block data format. | |
| Offset | Absolute offset to the start of the variable data in the file. | |
| Stride | The stride tells Tecplot how to skip through the file for nodal data. Only nodal data can specify a stride greater than one. A stride of one offers much higher load/unload performance than strides greater than one. | |
| IsDataNativeByteOrder | Indicates if the byte ordering of the data in the file matches the machine's native byte ordering. |
Results = TecUtil.DataValueAutoLOD(Zone, Var, DataValueStructure, FileName, Offset, Stride, IsDataNativeByteOrder)
Input:
Zone int
Var int
DataValueStructure DataValueStructure_e (defined in TecVals.py)
FileName string
Offset long
Stride long
IsDataNativeByteOrder boolean
Output:
Results[0] ReturnVal boolean
| Boolean_t TecUtilDataValueBranchShared | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
The specified variable of the specified zone is branched so it is no longer shared with anything.
| Zone | Zone in which the shared variable is located. | |
| Var | Variable that will be branched |
INTEGER*4 FUNCTION TecUtilDataValueBranchShared( & Zone, & Var) INTEGER*4 Zone INTEGER*4 Var
Python Syntax:
Results = TecUtil.DataValueBranchShared(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal boolean
Branch variable 2 in zone 1.
TecUtilDataValueBranchShared(1, 2);
| void TecUtilDataValueCopy | ( | EntIndex_t | SourceZone, | |
| EntIndex_t | DestZone, | |||
| EntIndex_t | Var | |||
| ) |
Copies the data from the source zone's variable to the destination zone.
The destination zone's variable must already be allocated or memory mapped and it may not be shared. Both zones must have the same structure (both Ordered with the same I,J, and K values; or both are finite-elements with the same element type and same number of nodes.
| SourceZone | The zone number where the data values are based. | |
| DestZone | The zone number where the data values will be copied from the source zone. | |
| Var | The variable to be copied. |
SUBROUTINE TecUtilDataValueCopy( & SourceZone, & DestZone, & Var) INTEGER*4 SourceZone INTEGER*4 DestZone INTEGER*4 Var
Python Syntax:
Results = TecUtil.DataValueCopy(SourceZone, DestZone, Var)
Input:
SourceZone int
DestZone int
Var int
Output:
Results[0] ReturnVal NONE
Copy the values from variable 1 of zone 2 to zone 3.
TecUtilDataValueCopy(2, 3, 1);
| Boolean_t TecUtilDataValueCustomLOD | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var, | |||
| LoadOnDemandVarLoad_pf | VariableLoad, | |||
| LoadOnDemandVarUnload_pf | VariableUnload, | |||
| LoadOnDemandVarCleanup_pf | VariableCleanup, | |||
| FieldValueGetFunction_pf | GetValueFunction, | |||
| FieldValueSetFunction_pf | SetValueFunction, | |||
| ArbParam_t | ClientData | |||
| ) |
Registers with Tecplot the load-on-demand callbacks and client data for a specific variable.
Tecplot will notify the add-on via the callbacks when the variable needs to be loaded, unloaded, and cleaned up or when a value needs to be fetched or submitted.
All callbacks must be written in a thread-safe manner so that Tecplot can make parallel requests to load (and/or unload) multiple variables. The easiest way to write thread-safe callbacks is to not use any shared state (i.e. global or static state) in order to perform the requested action but instead to use private client data to maintain all the information needed to perform the requested action.
It is important that GetValue and SetValue callbacks do NOT lock/unlock Tecplot or call TecUtil functions that require Tecplot to be locked as this will incur a performance penalty. GetValue and SetValue functions should be lightweight and fast.
Calls made back to Tecplot in response to a load, unload, or cleanup request should be limited to queries except in the case where data is being loaded into a variable. In addition, no state changes should be broadcast by the callbacks.
This function is used in conjunction with deferred variable creation. See the SV_DEFERVARCREATION option for TecUtilDataSetAddZoneX() and TecUtilDataSetAddVarX() for details.
Two methods for loading and accessing data are available for custom load-on-demand (see ADK Users Manual for details):
| Zone | Zone containing the variable that will now be custom load-on-demand. | |
| Var | Variable that will now be custom load-on-demand. | |
| VariableLoad | Tecplot calls this callback when the variable is to be loaded. The VariableLoad() callback may never get called if the variable is not needed or it may get called immediately if load-on-demand capabilities are not available. Depending on the load-on-demand method the callback has different responsibilities:
| |
| VariableUnload | Most add-ons will supply NULL for this callback. Supplying NULL instructs Tecplot to handled the unloading (and subsequent reloading) of the variable without the intervention of the add-on. If the add-on does supply this callback, Tecplot calls it when the variable is to be unloaded. This query provides the add-on an opportunity to allow or deny a variable to be unloaded by returning TRUE or FALSE respectively. Unless there is a compelling reason, such as very expensive load costs (in which case NULL should probably be supplied for this callback), the add-on should honor Tecplot's request to unload the variable (i.e. the VariableUnload() callback should return TRUE). An add-on may also cleanup any private resources that are not needed when the variable is unloaded, however the add-on must still maintain enough information to load the variable again if requested by Tecplot. The VariableUnload() callback may never get called if the variable does not need to be unloaded nor will the VariableUnload() callback necessarily be called before the VariableCleanup() callback. | |
| VariableCleanup | Tecplot calls this callback when the variable is to be cleaned up. This allows the add-on to cleanup any private resources that were used in conjunction with identifying or loading this variable. After a variable is cleaned up Tecplot will never again request it to be loaded. Tecplot may or may not call the VariableUnload() callback before calling the VariableCleanup() callback. Additionally, the VariableCleanup() callback will be called even if the variable was never loaded. | |
| GetValueFunction | Tecplot calls this callback to fetch the value from the field data at the specified index. This callback is only registered by add-ons that are using the "Custom Load Value on Demand" method, otherwise pass NULL. | |
| SetValueFunction | Tecplot calls this callback to submit a value to the field data at the specified index. This callback is only registered by add-ons that are using the "Custom Load Value on Demand" method, otherwise pass NULL. By providing a SetValueFunction() callback the add-on is signifying it will store any changes to the field data until the variable is cleaned up. Most "Custom Load Value on Demand" add-ons should pass NULL for this callback and allow Tecplot to store variable modifications. | |
| ClientData | Private client data needed by the custom load-on-demand callbacks to perform the duties of loading, unloading, and cleaning up the variable or to perform the get or set requests. Tecplot stores the client data in the field data structure and must be retrieved by the callbacks using TecUtilDataValueGetClientData(). The client data should ONLY be retrieved in response to a custom load, unload, cleanup, get-value, or set-value callback. At no other time is the request valid. |
double *ZeroVariableGetValue(const FieldData_pa FieldData, LgIndex_t PointIndex) { return 0.0; } . . . IsOk = TecUtilDataValueCustomLOD(3, 4, NULL, NULL, NULL, ZeroVariableGetValue, NULL, 0);
Following is an example of how to create a variable using the "Custom Load Variable on Demand" method by registering some simple load/unload/cleanup callbacks.
typedef struct { char *DataFileName; long SeekOffset; LgIndex_t NumValues; ... other information needed to load variable data } MyVariableClientData_s; Boolean_t MyVariableLoader(FieldData_pa FieldData) { REQUIRE(VALID_REF(FieldData)); MyVariableClientData_s *MyClientData = (MyVariableClientData_s *)TecUtilDataValueGetClientData(FieldData); // open the data file FILE *MyDataFile = fopen(MyClientData->DataFileName, "rb"); Boolean_t IsOk = (MyDataFile != NULL); // seek to the place in the file where the variable data is located IsOk = IsOk && (fseek(MyDataFile, MyClientData->SeekOffset, SEEK_SET) == 0); if (IsOk) { // load the data into the variable's field data IsOk = ReadMyDataInfoVariable(MyDataFile, MyClientData, FieldData); } // cleanup if (MyDataFile != NULL) fclose(MyDataFile); ENSURE(VALID_BOOLEAN(IsOk)); return IsOk; } Boolean_t MyVariableUnload(FieldData_pa FieldData) { REQUIRE(VALID_REF(FieldData)); // We don't have any private data to cleanup (i.e in addition to the // private client data which we don't cleanup here) so all we have to do // is return TRUE or FALSE letting Tecplot know that it can or can not // unload the variable. Boolean_t Result = TRUE; // ...tell Tecplot to go ahead and unload the variable ENSURE(VALID_BOOLEAN(Result)); return Result; } void MyVariableCleanup(FieldData_pa FieldData) { REQUIRE(VALID_REF(FieldData)); MyVariableClientData_s *MyClientData = (MyVariableClientData_s *)TecUtilDataValueGetClientData(FieldData); // cleanup privately allocated resources free(MyClientData->DataFileName); free(MyClientData); } . . . MyVariableClientData_s *MyClientData = (MyVariableClientData_s *)malloc(sizeof(MyVariableClientData_s)); const char *MyDataFileName = "MyDataFileName.dat"; MyClientData->MyDataFileName = (char *)malloc(strlen(MyDataFileName)+1); strcpy(MyClientData->MyDataFileName, MyDataFileName); MyClientData->SeekOffset = ... determined somewhere else MyClientData->NumValues = ... determined somewhere else ... initialize any other client data information needed to load variable data IsOk = TecUtilDataValueCustomLOD(3, 4, MyVariableLoader, MyVariableUnload, // most add-ons should pass NULL instead of MyVariableUnload MyVariableCleanup, NULL, // passing NULL for GetValue function signifies load-variable-on-demand NULL, (ArbParam_t)MyClientData);
Python Syntax:
This function is not supported in Python.
| double TecUtilDataValueGetByRef | ( | FieldData_pa | FieldData, | |
| LgIndex_t | PointIndex | |||
| ) |
To use this function you must have already obtained a handle to field data. This function is Thread Safe.
| FieldData | A field data reference usually obtained via a call to one of the following functions: TecUtilDataValueGetReadableNativeRef(), TecUtilDataValueGetReadableDerivedRef(), TecUtilDataValueGetReadableNLRef(), or TecUtilDataValueGetReadableCCRef(). | |
| PointIndex | Position in the array of field data values. Position starts at one. If FieldData came from an IJ- or IJK-ordered zone then the position is calculated by treating the two- or three-dimensional array as a one-dimensional array. |
REAL*8 FUNCTION TecUtilDataValueGetByRef( & FieldDataPtr, & PointIndex) POINTER (FieldDataPtr, FieldData) INTEGER*4 PointIndex
Python Syntax:
Results = TecUtil.DataValueGetByRef(FieldData, PointIndex)
Input:
FieldData opaque pointer
PointIndex int
Output:
Results[0] ReturnVal double
Get the first twenty data values for the second variable in zone 5:
FieldData_pa fd = TecUtilDataValueGetReadableNativeRef(5, 2); LgIndex_t numpts = TecUtilDataValueGetCountByRef(fd); if ( fd ) { int ii; for ( ii = 1; ii <= numpts; ii++ ) { double val = TecUtilDataValueGetByRef(fd, ii); // do something with val } }
| double TecUtilDataValueGetByZoneVar | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var, | |||
| LgIndex_t | PointIndex | |||
| ) |
This function does not require you to obtain the handle to the field data as does TecUtilDataValueGetByRef(), however, this function is not very efficient. Use TecUtilDataValueGetByRef() if you are getting multiple values from the same zone.
| Zone | The zone number | |
| Var | The variable number | |
| PointIndex | Position in the array of field data values. Position starts at one. If FieldData came from an IJ- or IJK-ordered zone then the position is calculated by treating the two- or three-dimensional array as a one-dimensional array |
REAL*8 FUNCTION TecUtilDataValueGetByZoneVar( & Zone, & Var, & PointIndex) INTEGER*4 Zone INTEGER*4 Var INTEGER*4 PointIndex
Python Syntax:
Results = TecUtil.DataValueGetByZoneVar(Zone, Var, PointIndex)
Input:
Zone int
Var int
PointIndex int
Output:
Results[0] ReturnVal double
Get the twenty-first value of the second variable of zone 5:
double dd = TecUtilDataValueGetByZoneVar(5, 2, 21); // Use val.
| ArbParam_t TecUtilDataValueGetClientData | ( | FieldData_pa | FieldData | ) |
Return the custom load-on-demand client data from a field data handle.
The client data should ONLY be retrieved in response to a custom load, unload, cleanup, get-value, or set-value callback. At no other time is the request valid. This function is Thread Safe.
| FieldData | Custom load-on-demand field data handle. |
This function is not supported in Python.
double MyGetValueFunction(const FieldData_pa FieldData, LgIndex_t PointIndex) { double Result; MyClientData_s *MyClientData = (MyClientData_s *)TecUtilDataValueGetClientData(FieldData); // calculate or extract the requested value from the client data . . . return Result; }
| LgIndex_t TecUtilDataValueGetCountByRef | ( | FieldData_pa | FieldData | ) |
Gets the number of values associated with the field data reference.
| FieldData | Handle to the field data. Use TecUtilDataValueGetReadableNativeRef(), TecUtilDataValueGetReadableDerivedRef(), TecUtilDataValueGetReadableNLRef(), TecUtilDataValueGetReadableCCRef(), or TecUtilDataValueGetWritableNativeRef() to get readable or writable handles to the field data. |
INTEGER*4 FUNCTION TecUtilDataValueGetCountByRef(FieldDataPtr) & FieldDataPtr) POINTER (FieldDataPtr, FieldData)
Python Syntax:
Results = TecUtil.DataValueGetCountByRef(FieldData)
Input:
FieldData opaque pointer
Output:
Results[0] ReturnVal int
Determine how many values are associated with the second variable of zone 5.
FieldData_pa FD = TecUtilDataValueGetReadableNativeRef(5, 2); LgIndex_t NumValues = TecUtilDataValueGetCountByRef(FD);
| ValueLocation_e TecUtilDataValueGetLocation | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Queries for the location of the variable.
This function is Thread Safe.
| Zone | The zone number. | |
| Var | The variable number |
INTEGER*4 FUNCTION TecUtilDataValueGetLocation( & Zone, & Var) INTEGER*4 Zone INTEGER*4 Var
Python Syntax:
Results = TecUtil.DataValueGetLocation(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal ValueLocation_e (defined in TecVals.py)
Get the value location of variable 2 in zone 5:
ValueLocation_e ValLoc = TecUtilDataValueGetLocation(5, 2);
| ValueLocation_e TecUtilDataValueGetLocationByRef | ( | FieldData_pa | FieldData | ) |
Queries for the location of the data values associated with the field data reference.
This function is Thread Safe.
| FieldData | Handle to the field data. Use TecUtilDataValueGetReadableNativeRef(), TecUtilDataValueGetReadableDerivedRef(), TecUtilDataValueGetReadableNLRef(), TecUtilDataValueGetReadableCCRef(), or TecUtilDataValueGetWritableNativeRef() to get readable or writable handles to the field data. |
INTEGER*4 FUNCTION TecUtilDataValueGetLocationByRef(FieldDataPtr) & FieldDataPtr) POINTER (FieldDataPtr, FieldData)
Python Syntax:
Results = TecUtil.DataValueGetLocationByRef(FieldData)
Input:
FieldData opaque pointer
Output:
Results[0] ReturnVal ValueLocation_e (defined in TecVals.py)
| void TecUtilDataValueGetMinMaxByRef | ( | FieldData_pa | FieldData, | |
| double * | Min, | |||
| double * | Max | |||
| ) |
Get the minimum and maximum values for a tecplot variable using the field data reference.
This function is Thread Safe.
| FieldData | A field data reference usually obtained via a call to one of the following functions: TecUtilDataValueGetReadableNativeRef(), TecUtilDataValueGetReadableDerivedRef(), TecUtilDataValueGetReadableNLRef(), or TecUtilDataValueGetReadableCCRef(). | |
| Min | Returned minimum value. | |
| Max | Returned maximum value. |
SUBROUTINE TecUtilDataValueGetMinMaxByRef( & FieldDataPtr, & Min, & Max) POINTER (FieldDataPtr, FieldData) REAL*8 Min REAL*8 Max
Python Syntax:
Results = TecUtil.DataValueGetMinMaxByRef(FieldData)
Input:
FieldData opaque pointer
Output:
Results[0] Min double
Results[1] Max double
Get the minimum and maximum values for the third variable in zone 2 in the current data set.
FieldData_pa FD; double Min; double Max; FD = TecUtilDataValueGetReadableNativeRef(2,3); TecUtilDataValueGetMinMaxByRef(FD,&Min,&Max);
| Boolean_t TecUtilDataValueGetMinMaxByZoneVar | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var, | |||
| double * | Min, | |||
| double * | Max | |||
| ) |
Get the minimum and maximum values for a tecplot variable using a zone and variable number.
| Zone | The zone number of the variable to be examinined for min/max values. | |
| Var | The variable number to be examinined for min/max values. | |
| Min | Returned minimum value. | |
| Max | Returned maximum value. |
SUBROUTINE TecUtilDataValueGetMinMaxByZoneVar( & Zone, & Var, & Min, & Max) INTEGER*4 Zone INTEGER*4 Var REAL*8 Min REAL*8 Max
Python Syntax:
Results = TecUtil.DataValueGetMinMaxByZoneVar(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal boolean
Results[1] Min double
Results[2] Max double
Get the minimum and maximum values for the third variable in zone 2 in the current data set.
double Min; double Max; TecUtilDataValueGetMinMaxByZoneVar(2,3,&Min,&Max);
| FieldData_pa TecUtilDataValueGetReadableCCRef | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Get a read-only handle to the cell centered data for the specified zone and variable in the data set attached to the current frame.
This function is Thread Safe.
| Zone | Number of the zone for which to get the field data | |
| Var | Number of the variable for which to get the field data |
SUBROUTINE TecUtilDataValueGetReadableCCRef( & Zone, & Var, & ResultPtr) INTEGER*4 Zone INTEGER*4 Var POINTER (ResultPtr, Result)
Python Syntax:
Results = TecUtil.DataValueGetReadableCCRef(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal opaque pointer
Function that loads the values of a field variable into a supplied double precision array. Assume the array is already dimensioned correctly and the dataset, zone, and variable exist.
static void ReadVals(double Var[], EntIndex_t ZoneNum, EntIndex_t VarNum) { FieldData_pa FieldData = TecUtilDataValueGetReadableCCRef(ZoneNum, VarNum); if (FieldData) { int i; LgIndex_t NumValues = TecUtilDataValueGetCountByRef(FieldData); // Remember that the GetByRef function is 1-based.... for (i = 0; i < NumPointsInZone; i++) Var[i] = TecUtilDataValueGetByRef(FieldData, i+1); } }
| FieldData_pa TecUtilDataValueGetReadableDerivedRef | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Get a read-only handle to the derived data for the specified zone and variable in the data set attached to the current frame.
This function is Thread Safe.
| Zone | Number of the zone for which to get the field data | |
| Var | Number of the variable for which to get the field data |
SUBROUTINE TecUtilDataValueGetReadableDerivedRef( & Zone, & Var, & ResultPtr) INTEGER*4 Zone INTEGER*4 Var POINTER (ResultPtr, Result)
Python Syntax:
Results = TecUtil.DataValueGetReadableDerivedRef(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal opaque pointer
Function that loads the values of a field variable into a supplied double precision array. Assume the array is already dimensioned correctly and the dataset, zone, and variable exist.
static void ReadVals(double Var[], EntIndex_t ZoneNum, EntIndex_t VarNum) { FieldData_pa FieldData = TecUtilDataValueGetReadableDerivedRef(ZoneNum, VarNum); if (FieldData) { int i; LgIndex_t NumValues = TecUtilDataValueGetCountByRef(FieldData); // Remember that the GetByRef function is 1-based.... for (i = 0; i < NumPointsInZone; i++) Var[i] = TecUtilDataValueGetByRef(FieldData, i+1); } }
| FieldData_pa TecUtilDataValueGetReadableNativeRef | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Get a read-only handle to the native data for the specified zone and variable in the data set attached to the current frame.
This function is Thread Safe.
| Zone | Number of the zone for which to get the field data | |
| Var | Number of the variable for which to get the field data |
SUBROUTINE TecUtilDataValueGetReadableNativeRef( & Zone, & Var, & ResultPtr) INTEGER*4 Zone INTEGER*4 Var POINTER (ResultPtr, Result)
Python Syntax:
Results = TecUtil.DataValueGetReadableNativeRef(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal opaque pointer
Function that loads the values of a field variable into a supplied double precision array. Assume the array is already dimensioned correctly and the dataset, zone, and variable exist.
static void ReadVals(double Var[], EntIndex_t ZoneNum, EntIndex_t VarNum) { FieldData_pa FieldData = TecUtilDataValueGetReadableNativeRef(ZoneNum, VarNum); if (FieldData) { int i; LgIndex_t NumValues = TecUtilDataValueGetCountByRef(FieldData); // Remember that the GetByRef function is 1-based.... for (i = 0; i < NumPointsInZone; i++) Var[i] = TecUtilDataValueGetByRef(FieldData, i+1); } }
| FieldData_pa TecUtilDataValueGetReadableNLRef | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var | |||
| ) |
Get a read-only handle to the node located data for the specified zone and variable in the data set attached to the current frame.
This function is Thread Safe.
| Zone | Number of the zone for which to get the field data | |
| Var | Number of the variable for which to get the field data |
SUBROUTINE TecUtilDataValueGetReadableNLRef( & Zone, & Var, & ResultPtr) INTEGER*4 Zone INTEGER*4 Var POINTER (ResultPtr, Result)
Python Syntax:
Results = TecUtil.DataValueGetReadableNLRef(Zone, Var)
Input:
Zone int
Var int
Output:
Results[0] ReturnVal opaque pointer
Function that loads the values of a field variable into a supplied double precision array. Assume the array is already dimensioned correctly and the dataset, zone, and variable exist.
static void ReadVals(double Var[], EntIndex_t ZoneNum, EntIndex_t VarNum) { FieldData_pa FieldData = TecUtilDataValueGetReadableNLRef(ZoneNum, VarNum); if (FieldData) { int i; LgIndex_t NumValues = TecUtilDataValueGetCountByRef(FieldData); // Remember that the GetByRef function is 1-based.... for (i = 0; i < NumPointsInZone; i++) Var[i] = TecUtilDataValueGetByRef(FieldData, i+1); } }
| void TecUtilDataValueGetReadableRawPtr | ( | EntIndex_t | Zone, | |
| EntIndex_t | Var, | |||
| void ** | DataPtr, | |||
| FieldDataType_e * | FieldDataType | |||
| ) |
Get a read-only handle to the raw field data in the data set attached to the current frame.
If possible this function provides direct access to a Tecplot variable's internal representation. If performance is not a concern consider using TecUtilDataValueGetByRef(), TecUtilDataValueSetByRef(). If high performance is essential then use TecUtilDataValueArrayGetByRef(), and TecUtilDataValueArraySetByRef() which provide nearly equivalent preformance to direct access. Alternatively for high performance consider using the field data's accessor functions by calling TecUtilDataValueRefGetGetFunc() and TecUtilDataValueRefGetSetFunc(). Note that these high performance functions are a very thin layer over a Tecplot variable's internal representation and unlike the raw field data pointer provided by this function, they are always available. This function is Thread Safe.
| Zone | Number of the zone for which to get the raw field data. | |
| Var | Number of the variable for which to get the raw field data. | |
| DataPtr | Receives the address of the raw field data. May return NULL if the type is too complex. If the type is too complex, you may use TecUtilDataValueRefGetGetFunc() and TecUtilDataValueRefGetSetFunc() to get functions that will deal with the data at a lower level than TecUtilDataValueGetByRef() and TecUtilDataValueSetByRef(). | |
| FieldDataType | Receives the data type of the raw field data. The following table shows the possible values for FieldDataType along with the corresponding data type that DataPtr references: |
FieldDataType DataPtr references
-------------------------------------------
FieldDataType_Float float *
FieldDataType_Double double *
FieldDataType_Int32 Int32_t *
FieldDataType_Int16 Int16_t *
FieldDataType_Byte char *
FieldDataType_Bit UInt32_t *
FieldDataType_Invalid too complex
Fortran Syntax:
SUBROUTINE TecUtilDataValueGetReadableRawPtr( & Zone, & Var, & DataPtr, & FieldDataType) INTEGER*4 Zone INTEGER*4 Var POINTER (DataPtrPtr, DataPtr) INTEGER*4 FieldDataType
Python Syntax:
This function is not supported in Python.
Get the first and second value v