#include <math.h>
#include <stdio.h>
#include <TECIO.h>
int main()
{
float dx;
float dy;
float *pbuff;
dx = 0.05;
dy = 0.05;
int Debug = 0;
int VIsDouble = 0;
int FileType = 0;
int I;
I = TECINI112( "Test DATASET",
"X Y T",
"test.plt",
".",
&FileType,
&Debug,
&VIsDouble );
int ZoneType = 0;
int IMax = 20;
int JMax = 40;
int KMax = 1;
double SolTime = 0;
int StrandID = 0;
int ParentZn = 0;
int ICellMax = 0;
int JCellMax = 0;
int KCellMax = 0;
int IsBlock = 1;
int NFConns = 0;
int FNMode = 0;
int TotalNumFaceNodes = 0;
int TotalNumBndryFaces = 0;
int TotalNumBndryConn = 0;
int ShrConn = 0;
I = TECZNE112( "Zone Main Volume",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConn,
0,
0,
0,
&ShrConn);
int DIsDouble = 0;
int III = IMax*JMax;
pbuff = new float[III];
int m0 = 0;
for(int jt=0;jt<JMax;jt++)
{
for(int it=0;it<IMax;it++)
{
pbuff[m0] = it*dx;
m0++;
}
}
I = TECDAT112(&III , pbuff , &DIsDouble);
m0 = 0;
for(int jt=0;jt<JMax;jt++)
{
for(int it=0;it<IMax;it++)
{
pbuff[m0] = jt*dy;
m0++;
}
}
I = TECDAT112(&III , pbuff , &DIsDouble);
m0 = 0;
for(int jt=0;jt<JMax;jt++)
{
for(int it=0;it<IMax;it++)
{
pbuff[m0] = 0.5 - it*dx;
m0++;
}
}
I = TECDAT112(&III , pbuff , &DIsDouble);
TECEND112();
delete [] pbuff;
return 0;
}