COMP: tecio : move out of thirdparty

This commit is contained in:
mattijs
2011-02-16 13:44:26 +00:00
parent d9ef40762b
commit de564957bc
108 changed files with 40069 additions and 2 deletions

View File

@ -0,0 +1,11 @@
# Set to appropriate C++ compiler
CPP=g++
CPPFLAGS=-I../../tecsrc ../../tecio.a
EXECUTABLE=simtest
FILES=$(EXECUTABLE).c
build:
$(CPP) $(FILES) $(CPPFLAGS) -o $(EXECUTABLE)
clean:
rm -f $(EXECUTABLE)

View File

@ -0,0 +1,100 @@
/*
* Simple example c program to write a
* binary datafile for tecplot. This example
* does the following:
*
* 1. Open a datafile called "t.plt"
* 2. Assign values for X,Y, and P
* 3. Write out a zone dimensioned 4x5
* 4. Close the datafile.
*/
#include "TECIO.h"
#ifndef NULL
#define NULL 0
#endif
enum FileType { FULL = 0, GRID = 1, SOLUTION = 2 };
int main(void)
{
float X[5][4], Y[5][4], P[5][4];
double SolTime;
INTEGER4 Debug, I, J, III, DIsDouble, VIsDouble, IMax, JMax, KMax, ZoneType, StrandID, ParentZn, IsBlock;
INTEGER4 ICellMax, JCellMax, KCellMax, NFConns, FNMode, ShrConn, FileType;
Debug = 1;
VIsDouble = 0;
DIsDouble = 0;
IMax = 4;
JMax = 5;
KMax = 1;
ZoneType = 0; /* Ordered */
SolTime = 360.0;
StrandID = 0; /* StaticZone */
ParentZn = 0; /* No Parent */
IsBlock = 1; /* Block */
ICellMax = 0;
JCellMax = 0;
KCellMax = 0;
NFConns = 0;
FNMode = 0;
ShrConn = 0;
FileType = FULL;
/*
* Open the file and write the tecplot datafile
* header information
*/
I = TECINI112((char*)"SIMPLE DATASET",
(char*)"X Y P",
(char*)"t.plt",
(char*)".",
&FileType,
&Debug,
&VIsDouble);
for (J = 0; J < 5; J++)
for (I = 0; I < 4; I++)
{
X[J][I] = (float)(I + 1);
Y[J][I] = (float)(J + 1);
P[J][I] = (float)((I + 1) * (J + 1));
}
/*
* Write the zone header information.
*/
I = TECZNE112((char*)"Simple Zone",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
NULL, /* PassiveVarList */
NULL, /* ValueLocation = Nodal */
NULL, /* SharVarFromZone */
&ShrConn);
/*
* Write out the field data.
*/
III = IMax * JMax;
I = TECDAT112(&III, &X[0][0], &DIsDouble);
I = TECDAT112(&III, &Y[0][0], &DIsDouble);
I = TECDAT112(&III, &P[0][0], &DIsDouble);
I = TECEND112();
return 0;
}

View File

@ -0,0 +1,98 @@
C
C Simple example fortran program to write a
C binary datafile for tecplot. This example
C does the following:
C
C 1. Open a datafile called "t.plt"
C 2. Assign values for X,Y, and P
C 3. Write out a zone dimensioned 4x5
C 4. Close the datafile.
C
C
program test
INCLUDE 'tecio.inc'
character*1 NULLCHR
Integer*4 Debug,III,NPts,NElm
Dimension X(4,5), Y(4,5), P(4,5)
Real*8 SolTime
Integer*4 VIsDouble, FileType
Integer*4 ZoneType,StrandID,ParentZn,IsBlock
Integer*4 ICellMax,JCellMax,KCellMax,NFConns,FNMode,ShrConn
POINTER (NullPtr,Null)
Integer*4 Null(*)
NULLCHR = CHAR(0)
NullPtr = 0
Debug = 1
FileType = 0
VIsDouble = 0
IMax = 4
JMax = 5
KMax = 1
ZoneType = 0
SolTime = 360.0
StrandID = 0
ParentZn = 0
IsBlock = 1
ICellMax = 0
JCellMax = 0
KCellMax = 0
NFConns = 0
FNMode = 0
ShrConn = 0
C
C... Open the file and write the tecplot datafile
C... header information.
C
I = TecIni112('SIMPLE DATASET'//NULLCHR,
& 'X Y P'//NULLCHR,
& 't.plt'//NULLCHR,
& '.'//NULLCHR,
& FileType,
& Debug,
& VIsDouble)
Do 10 I = 1,4
Do 10 J = 1,5
X(I,J) = I
Y(I,J) = J
P(I,J) = I*J
10 Continue
C
C... Write the zone header information.
C
I = TecZne112('Simple Zone'//NULLCHR,
& ZoneType,
& IMax,
& JMax,
& KMax,
& ICellMax,
& JCellMax,
& KCellMax,
& SolTime,
& StrandID,
& ParentZn,
& IsBlock,
& NFConns,
& FNMode,
& 0,
& 0,
& 0,
& Null,
& Null,
& Null,
& ShrConn)
C
C... Write out the field data.
C
III = IMax*JMax
I = TecDat112(III,X,0)
I = TecDat112(III,Y,0)
I = TecDat112(III,P,0)
I = TecEnd112()
Stop
End

View File

@ -0,0 +1,98 @@
!
! Simple example fortran program to write a
! binary datafile for tecplot. This example
! does the following:
!
! 1. Open a datafile called "t.plt"
! 2. Assign values for X,Y, and P
! 3. Write out a zone dimensioned 4x5
! 4. Close the datafile.
!
!
program test
INCLUDE 'tecio.f90'
character*1 NULLCHR
Integer*4 Debug,III,NPts,NElm
Dimension X(4,5), Y(4,5), P(4,5)
Real*8 SolTime
Integer*4 VIsDouble, FileType
Integer*4 ZoneType,StrandID,ParentZn,IsBlock
Integer*4 ICellMax,JCellMax,KCellMax,NFConns,FNMode,ShrConn
POINTER (NullPtr,Null)
Integer*4 Null(*)
NULLCHR = CHAR(0)
NullPtr = 0
Debug = 1
FileType = 0
VIsDouble = 0
IMax = 4
JMax = 5
KMax = 1
ZoneType = 0
SolTime = 360.0
StrandID = 0
ParentZn = 0
IsBlock = 1
ICellMax = 0
JCellMax = 0
KCellMax = 0
NFConns = 0
FNMode = 0
ShrConn = 0
!
!... Open the file and write the tecplot datafile
!... header information.
!
I = TecIni112('SIMPLE DATASET'//NULLCHR, &
'X Y P'//NULLCHR, &
't.plt'//NULLCHR, &
'.'//NULLCHR, &
FileType, &
Debug, &
VIsDouble)
Do 10 I = 1,4
Do 10 J = 1,5
X(I,J) = I
Y(I,J) = J
P(I,J) = I*J
10 Continue
!
!... Write the zone header information.
!
I = TecZne112('Simple Zone'//NULLCHR, &
ZoneType, &
IMax, &
JMax, &
KMax, &
ICellMax, &
JCellMax, &
KCellMax, &
SolTime, &
StrandID, &
ParentZn, &
IsBlock, &
NFConns, &
FNMode, &
0, &
0, &
0, &
Null, &
Null, &
Null, &
ShrConn)
!
!... Write out the field data.
!
III = IMax*JMax
I = TecDat112(III,X,0)
I = TecDat112(III,Y,0)
I = TecDat112(III,P,0)
I = TecEnd112()
Stop
End

View File

@ -0,0 +1,346 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="simtestc"
ProjectGUID="{62FA6E8C-388E-4047-BC9D-574B470B94DE}"
RootNamespace="simtestc"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)"
IntermediateDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)"
IntermediateDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\simtest.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="9.10" ProjectIdGuid="{861BC05F-1E95-401A-A80E-7589ADD1C79E}">
<Platforms>
<Platform Name="Win32"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)" IntermediateDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
<Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="$(TEC_360_2009)/Include" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug" CompileOnly="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFLinkerTool" OutputFile="$(OUTDIR)/simtestf.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(TEC_360_2009)/Bin" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/simtestf.pdb" SubSystem="subSystemConsole" AdditionalDependencies="tecio.lib"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)/$(InputName).res"/></Configuration>
<Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)" IntermediateDirectory="$(SolutionDir)$(PlatformName)/$(ConfigurationName)" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
<Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="$(TEC_360_2009)/Include" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreaded" CompileOnly="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFLinkerTool" OutputFile="$(OUTDIR)/simtestf.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(TEC_360_2009)/Bin" SubSystem="subSystemConsole" AdditionalDependencies="tecio.lib"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)/$(InputName).res"/></Configuration></Configurations>
<Files>
<File RelativePath="simtest.f90"/></Files>
<Globals/></VisualStudioProject>