Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2011-03-07 12:59:14 +00:00
200 changed files with 1273 additions and 40668 deletions

View File

@ -240,6 +240,13 @@
+ =snappyHexMesh=:
+ extrude across multi-processor boundaries
+ preserve faceZones during layering
+ *Warning*:
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
90 to get same behaviour as 130 in 17x.
- nGrow did not work in 17x. Set to 0
to get same behaviour as 130 in 17x.
- new minTetQuality setting (see tracking). Disable for 17x
compatibility.
* Post-processing
+ =paraFoam=, =foamToVTK=: full support for polyhedral cell type in recent
Paraview versions.

View File

@ -27,7 +27,7 @@ PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
/* PDRFoamAutoRefine.C */
/*PDRFoamAutoRefine.C*/
PDRFoam.C
EXE = $(FOAM_APPBIN)/PDRFoam

View File

@ -9,13 +9,14 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \
-lengine \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
scalar StCoNum = 0.0;
@ -91,11 +91,10 @@ int main(int argc, char *argv[])
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "CourantNo.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "\n\nTime = " << runTime.timeName() << endl;
#include "rhoEqn.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
scalar StCoNum = 0.0;
@ -89,17 +89,15 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
bool hasChanged = false;
while (runTime.run())
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "CourantNo.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "\n\nTime = " << runTime.timeName() << endl;
// Indicators for refinement. Note: before runTime++
// only for postprocessing reasons.
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
@ -111,7 +109,10 @@ int main(int argc, char *argv[])
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
tmagGradP.clear();
bool meshChanged = false;
runTime++;
Info<< "\n\nTime = " << runTime.timeName() << endl;
{
// Make the fluxes absolute
fvc::makeAbsolute(phi, rho, U);
@ -134,29 +135,27 @@ int main(int argc, char *argv[])
}
}
//volScalarField pIndicator("pIndicator",
// p*(fvc::laplacian(p))
// / (
// magSqr(fvc::grad(p))
// + dimensionedScalar
// (
// "smallish",
// sqr(p.dimensions()/dimLength),
// 1E-6
// )
// ));
//pIndicator.writeOpt() = IOobject::AUTO_WRITE;
// Flux estimate for introduced faces.
volVectorField rhoU("rhoU", rho*U);
// Do any mesh changes
meshChanged = mesh.update();
bool meshChanged = mesh.update();
// if (mesh.moving() || meshChanged)
// {
// #include "correctPhi.H"
// }
if (meshChanged)
{
hasChanged = true;
}
if (runTime.write() && hasChanged)
{
betav.write();
Lobs.write();
CT.write();
drag->writeFields();
flameWrinkling->writeFields();
hasChanged = false;
}
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, rho, U);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,55 +50,12 @@ Foam::XiEqModels::basicSubGrid::basicSubGrid
:
XiEqModel(XiEqProperties, thermo, turbulence, Su),
N_
(
IOobject
(
"N",
Su.mesh().time().findInstance(polyMesh::meshSubDir, "N"),
polyMesh::meshSubDir,
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
Su.mesh()
),
ns_
(
IOobject
(
"ns",
Su.mesh().time().findInstance(polyMesh::meshSubDir, "ns"),
polyMesh::meshSubDir,
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
Su.mesh()
),
B_
(
IOobject
(
"B",
Su.mesh().time().findInstance(polyMesh::meshSubDir, "B"),
polyMesh::meshSubDir,
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
Su.mesh()
),
Lobs_
(
IOobject
(
"Lobs",
Su.mesh().time().findInstance(polyMesh::meshSubDir, "Lobs"),
polyMesh::meshSubDir,
Su.mesh().facesInstance(),
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -120,8 +77,12 @@ Foam::XiEqModels::basicSubGrid::~basicSubGrid()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
{
const objectRegistry& db = Su_.db();
const volVectorField& U = db.lookupObject<volVectorField>("U");
const fvMesh& mesh = Su_.mesh();
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
const volSymmTensorField& nsv =
mesh.lookupObject<volSymmTensorField>("nsv");
volScalarField magU(mag(U));
volVectorField Uhat
@ -129,20 +90,71 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
);
volScalarField n(max(N_ - (Uhat & ns_ & Uhat), scalar(1e-4)));
const scalarField Cw = pow(mesh.V(), 2.0/3.0);
volScalarField b((Uhat & B_ & Uhat)/n);
tmp<volScalarField> tN
(
new volScalarField
(
IOobject
(
"tN",
mesh.time().constant(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0.0),
zeroGradientFvPatchVectorField::typeName
)
);
volScalarField& N = tN();
N.internalField() = Nv.internalField()*Cw;
tmp<volSymmTensorField> tns
(
new volSymmTensorField
(
IOobject
(
"tns",
U.mesh().time().timeName(),
U.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
U.mesh(),
dimensionedSymmTensor
(
"zero",
nsv.dimensions(),
pTraits<symmTensor>::zero
),
zeroGradientFvPatchSymmTensorField::typeName
)
);
volSymmTensorField& ns = tns();
ns.internalField() = nsv.internalField()*Cw;
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
volScalarField XiSubEq
(
scalar(1)
+ max(2.2*sqrt(b), min(0.34*magU/up, scalar(1.6)))
*min(0.25*n, scalar(1))
+ max(2.2*sqrt(b), min(0.34*magU/up*sqrt(b), scalar(1.6)))
* min(n, scalar(1))
);
return XiSubEq*XiEqModel_->XiEq();
return (XiSubEq*XiEqModel_->XiEq());
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,18 +85,9 @@ class basicSubGrid
{
// Private data
//- Count
volScalarField N_;
//- Sub-count
volSymmTensorField ns_;
//- tblock
volSymmTensorField B_;
//- Typical obstacle diameters per cell
volScalarField Lobs_;
//- Equilibrium Xi model due to turbulence
autoPtr<XiEqModel> XiEqModel_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,8 +34,8 @@ namespace XiGModels
{
defineTypeNameAndDebug(basicSubGrid, 0);
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
}
}
};
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -66,12 +66,37 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
{
const objectRegistry& db = Su_.db();
const volVectorField& U = db.lookupObject<volVectorField>("U");
const volScalarField& N = db.lookupObject<volScalarField>("N");
const volScalarField& Nv = db.lookupObject<volScalarField>("Nv");
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
tmp<volScalarField> tGtot = XiGModel_->G();
volScalarField& Gtot = tGtot();
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
tmp<volScalarField> tN
(
new volScalarField
(
IOobject
(
"tN",
Su_.mesh().time().timeName(),
Su_.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
Su_.mesh(),
dimensionedScalar("zero", Nv.dimensions(), 0.0),
zeroGradientFvPatchVectorField::typeName
)
);
volScalarField& N = tN();
N.internalField() = Nv.internalField()*Cw;
forAll(N, celli)
{
if (N[celli] > 1e-3)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ namespace Foam
{
defineTypeNameAndDebug(PDRDragModel, 0);
defineRunTimeSelectionTable(PDRDragModel, dictionary);
}
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -162,6 +162,11 @@ public:
{
return true;
}
virtual void writeFields() const
{
notImplemented("PDRDragModel::write()");
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,34 +53,12 @@ Foam::PDRDragModels::basic::basic
Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
Aw2_
(
"Aw2",
sqr
(
volScalarField
(
IOobject
(
"Aw",
U_.mesh().time().findInstance(polyMesh::meshSubDir, "Aw"),
polyMesh::meshSubDir,
U_.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
U_.mesh()
)
)
),
CR_
Aw_
(
IOobject
(
"CR",
U_.mesh().time().findInstance(polyMesh::meshSubDir, "CR"),
polyMesh::meshSubDir,
"Aw",
U_.mesh().facesInstance(),
U_.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -88,13 +66,12 @@ Foam::PDRDragModels::basic::basic
U_.mesh()
),
CT_
CR_
(
IOobject
(
"CT",
U_.mesh().time().findInstance(polyMesh::meshSubDir, "CT"),
polyMesh::meshSubDir,
"CR",
U_.mesh().facesInstance(),
U_.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -114,19 +91,24 @@ Foam::PDRDragModels::basic::~basic()
Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
{
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
const volScalarField& betav =
U_.db().lookupObject<volScalarField>("betav");
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
}
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
{
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
const volScalarField& betav =
U_.db().lookupObject<volScalarField>("betav");
const volSymmTensorField& CT =
U_.db().lookupObject<volSymmTensorField>("CT");
return
(0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
+ Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
(0.5*rho_)*mag(U_)*(U_ & CT & U_)
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
}
@ -141,4 +123,10 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
}
void Foam::PDRDragModels::basic::writeFields() const
{
Aw_.write();
CR_.write();
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,9 +102,8 @@ class basic
dimensionedScalar Csu;
dimensionedScalar Csk;
volScalarField Aw2_;
volScalarField Aw_;
volSymmTensorField CR_;
volSymmTensorField CT_;
// Private Member Functions
@ -149,6 +148,9 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& PDRProperties);
//- Write fields
void writeFields() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,12 +55,42 @@ PDRkEpsilon::PDRkEpsilon
const word& modelName
)
:
kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName)
kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName),
C4_
(
dimensioned<scalar>::lookupOrAddToDict
(
"C4",
coeffDict_,
0.1
)
)
{}
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
PDRkEpsilon::~PDRkEpsilon()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool PDRkEpsilon::read()
{
if (RASModel::read())
{
C4_.readIfPresent(coeffDict_);
return true;
}
else
{
return false;
}
}
void PDRkEpsilon::correct()
{
if (!turbulence_)
@ -89,18 +119,25 @@ void PDRkEpsilon::correct()
volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
// Update epsilon and G at the wall
// Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs();
// Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations
const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
const volScalarField& betav =
U_.db().lookupObject<volScalarField>("betav");
const volScalarField& Lobs =
U_.db().lookupObject<volScalarField>("Lobs");
const PDRDragModel& drag =
U_.db().lookupObject<PDRDragModel>("PDRDragModel");
volScalarField GR(drag.Gk());
volScalarField LI =
C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL));
// Dissipation equation
tmp<fvScalarMatrix> epsEqn
(
@ -108,7 +145,8 @@ void PDRkEpsilon::correct()
+ fvm::div(phi_, epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_)
==
C1_*(betav*G + GR)*epsilon_/k_
C1_*betav*G*epsilon_/k_
+ 1.5*pow(Cmu_, 3.0/4.0)*GR*sqrt(k_)/LI
- fvm::SuSp(((2.0/3.0)*C1_)*betav*rho_*divU, epsilon_)
- fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_)
);
@ -138,7 +176,6 @@ void PDRkEpsilon::correct()
solve(kEqn);
bound(k_, kMin_);
// Re-calculate viscosity
mut_ = rho_*Cmu_*sqr(k_)/epsilon_;
mut_.correctBoundaryConditions();

View File

@ -25,23 +25,23 @@ Class
Foam::compressible::RASModels::PDRkEpsilon
Description
Standard k-epsilon turbulence model for compressible flow
with additional source terms
Standard k-epsilon turbulence model with additional source terms
corresponding to PDR basic drag model (\link basic.H \endlink)
The default model coefficients correspond to the following:
\verbatim
@verbatim
PDRkEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33; // only for compressible
C4 0.1;
sigmak 1.0; // only for compressible
sigmaEps 1.3;
Prt 1.0; // only for compressible
}
\endverbatim
@endverbatim
The turbulence source term \f$ G_{R} \f$ appears in the
\f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to
@ -60,7 +60,7 @@ SourceFiles
#ifndef compressiblePDRkEpsilon_H
#define compressiblePDRkEpsilon_H
#include "RASModel.H"
#include "kEpsilon.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -80,6 +80,11 @@ class PDRkEpsilon
:
public kEpsilon
{
// Private data
// Model coefficients
dimensionedScalar C4_;
public:
@ -102,15 +107,16 @@ public:
//- Destructor
virtual ~PDRkEpsilon()
{}
virtual ~PDRkEpsilon();
// Member Functions
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
void correct();
//- Read turbulenceProperties dictionary
bool read();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,7 +34,7 @@ Description
if (mesh.nInternalFaces())
{
scalarField sumPhi
scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().internalField()
/ rho.internalField()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,8 +49,9 @@ Foam::XiEqModels::Gulder::Gulder
)
:
XiEqModel(XiEqProperties, thermo, turbulence, Su),
XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
SuMin(0.01*Su.average())
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
SuMin_(0.01*Su.average()),
uPrimeCoef_(readScalar(XiEqModelCoeffs_.lookup("uPrimeCoef")))
{}
@ -66,19 +67,92 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
{
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
const fvMesh& mesh = Su_.mesh();
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
const volSymmTensorField& CT = mesh.lookupObject<volSymmTensorField>("CT");
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
const volSymmTensorField& nsv =
mesh.lookupObject<volSymmTensorField>("nsv");
tmp<volScalarField> tN
(
new volScalarField
(
IOobject
(
"tN",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0.0),
zeroGradientFvPatchVectorField::typeName
)
);
volScalarField& N = tN();
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
tmp<volSymmTensorField> tns
(
new volSymmTensorField
(
IOobject
(
"tns",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedSymmTensor
(
"zero",
nsv.dimensions(),
pTraits<symmTensor>::zero
)
)
);
volSymmTensorField& ns = tns();
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
const volVectorField Uhat
(
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
);
const volScalarField nr(sqrt(max(N - (Uhat & ns & Uhat), 1e-4)));
const scalarField cellWidth(pow(mesh.V(), 1.0/3.0));
const scalarField upLocal(uPrimeCoef_*sqrt((U & CT & U)*cellWidth));
const scalarField deltaUp(upLocal*(max(1.0, pow(nr, 0.5)) - 1.0));
up.internalField() += deltaUp;
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
volScalarField Reta
volScalarField Reta =
(
up
/ (
/
(
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
)
);
return 1.0 + XiEqCoef*sqrt(up/(Su_ + SuMin))*Reta;
return (1.0 + XiEqCoef_*sqrt(up/(Su_ + SuMin_))*Reta);
}
@ -86,7 +160,8 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
{
XiEqModel::read(XiEqProperties);
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef;
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
XiEqModelCoeffs_.lookup("uPrimeCoef") >> uPrimeCoef_;
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,8 +55,14 @@ class Gulder
{
// Private data
scalar XiEqCoef;
dimensionedScalar SuMin;
//- Model constant
scalar XiEqCoef_;
//- Minimum laminar burning velocity
const dimensionedScalar SuMin_;
//- Model constant
scalar uPrimeCoef_;
// Private Member Functions
@ -97,6 +103,7 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiEqProperties);
};

View File

@ -27,7 +27,7 @@ Class
Description
Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation
with a linear correction function to give a plausible profile for XiEq.
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE
See @link SCOPELaminarFlameSpeed.H @endlink for details on the SCOPE
laminar flame speed model.
SourceFiles
@ -105,6 +105,7 @@ public:
{
return true;
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,10 +49,10 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
)
:
XiEqModel(XiEqProperties, thermo, turbulence, Su),
XiEqCoef(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
XiEqExp(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
lCoef(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
SuMin(0.01*Su.average()),
XiEqCoef_(readScalar(XiEqModelCoeffs_.lookup("XiEqCoef"))),
XiEqExp_(readScalar(XiEqModelCoeffs_.lookup("XiEqExp"))),
lCoef_(readScalar(XiEqModelCoeffs_.lookup("lCoef"))),
SuMin_(0.01*Su.average()),
MaModel
(
IOdictionary
@ -62,7 +62,7 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
"combustionProperties",
Su.mesh().time().constant(),
Su.mesh(),
IOobject::MUST_READ_IF_MODIFIED
IOobject::MUST_READ
)
),
thermo
@ -84,10 +84,10 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
const volScalarField& epsilon = turbulence_.epsilon();
volScalarField up(sqrt((2.0/3.0)*k));
volScalarField l((lCoef*sqrt(3.0/2.0))*up*k/epsilon);
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu());
volScalarField upBySu(up/(Su_ + SuMin));
volScalarField upBySu(up/(Su_ + SuMin_));
volScalarField K(0.157*upBySu/sqrt(Rl));
volScalarField Ma(MaModel.Ma());
@ -114,7 +114,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
if (Ma[celli] > 0.01)
{
xieq[celli] =
XiEqCoef*pow(K[celli]*Ma[celli], -XiEqExp)*upBySu[celli];
XiEqCoef_*pow(K[celli]*Ma[celli], -XiEqExp_)*upBySu[celli];
}
}
@ -130,7 +130,8 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
if (Ma[facei] > 0.01)
{
xieqp[facei] =
XiEqCoef*pow(Kp[facei]*Map[facei], -XiEqExp)*upBySup[facei];
XiEqCoef_*pow(Kp[facei]*Map[facei], -XiEqExp_)
*upBySup[facei];
}
}
}
@ -143,9 +144,9 @@ bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
{
XiEqModel::read(XiEqProperties);
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef;
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp;
XiEqModelCoeffs_.lookup("lCoef") >> lCoef;
XiEqModelCoeffs_.lookup("XiEqCoef") >> XiEqCoef_;
XiEqModelCoeffs_.lookup("XiEqExp") >> XiEqExp_;
XiEqModelCoeffs_.lookup("lCoef") >> lCoef_;
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,10 +58,10 @@ class SCOPEXiEq
{
// Private data
scalar XiEqCoef;
scalar XiEqExp;
scalar lCoef;
dimensionedScalar SuMin;
scalar XiEqCoef_;
scalar XiEqExp_;
scalar lCoef_;
dimensionedScalar SuMin_;
//- The SCOPE laminar flame speed model used to obtain the
// Marstein number. Note: the laminar flame speed need not be
@ -107,6 +107,7 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiEqProperties);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,31 @@ Foam::XiEqModel::XiEqModel
),
thermo_(thermo),
turbulence_(turbulence),
Su_(Su)
Su_(Su),
Nv_
(
IOobject
(
"Nv",
Su.mesh().facesInstance(),
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
Su.mesh()
),
nsv_
(
IOobject
(
"nsv",
Su.mesh().facesInstance(),
Su.mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
Su.mesh()
)
{}
@ -73,4 +97,16 @@ bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
}
void Foam::XiEqModel::writeFields() const
{
Nv_.write();
nsv_.write();
if (Su_.mesh().foundObject<volSymmTensorField>("B"))
{
const volSymmTensorField& B =
Su_.mesh().lookupObject<volSymmTensorField>("B");
B.write();
}
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,6 +67,8 @@ protected:
const hhuCombustionThermo& thermo_;
const compressible::RASModel& turbulence_;
const volScalarField& Su_;
volScalarField Nv_;
volSymmTensorField nsv_;
private:
@ -146,6 +148,9 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiEqProperties) = 0;
//- Write fields
void writeFields() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ Foam::XiEqModels::instability::~instability()
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
{
volScalarField turbXiEq(XiEqModel_->XiEq());
volScalarField turbXiEq = XiEqModel_->XiEq();
return XiEqIn/turbXiEq + turbXiEq;
}

View File

@ -27,7 +27,7 @@ Class
Description
This is the equilibrium level of the flame wrinkling generated by
instability. It is a constant (default 2.5). It is used in
\link XiModel.H \endlink.
@link XiModel.H @endlink.
SourceFiles
instability.C
@ -101,6 +101,7 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiEqProperties);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ Foam::XiGModels::KTS::KTS
)
:
XiGModel(XiGProperties, thermo, turbulence, Su),
GEtaCoef(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
GEtaCoef_(readScalar(XiGModelCoeffs_.lookup("GEtaCoef")))
{}
@ -63,13 +63,12 @@ Foam::XiGModels::KTS::~KTS()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const
{
// volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
const volScalarField& epsilon = turbulence_.epsilon();
tmp<volScalarField> tauEta =
sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)));
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
return GEtaCoef/tauEta;
return (GEtaCoef_/tauEta);
}
@ -77,7 +76,7 @@ bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
{
XiGModel::read(XiGProperties);
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef;
XiGModelCoeffs_.lookup("GEtaCoef") >> GEtaCoef_;
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ class KTS
{
// Private data
scalar GEtaCoef;
scalar GEtaCoef_;
// Private Member Functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,8 +49,8 @@ Foam::XiGModels::instabilityG::instabilityG
)
:
XiGModel(XiGProperties, thermo, turbulence, Su),
GIn(XiGModelCoeffs_.lookup("GIn")),
lambdaIn(XiGModelCoeffs_.lookup("lambdaIn")),
GIn_(XiGModelCoeffs_.lookup("GIn")),
lambdaIn_(XiGModelCoeffs_.lookup("lambdaIn")),
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
{}
@ -66,7 +66,7 @@ Foam::XiGModels::instabilityG::~instabilityG()
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::G() const
{
volScalarField turbXiG(XiGModel_->G());
return GIn*GIn/(GIn + turbXiG) + turbXiG;
return (GIn_*GIn_/(GIn_ + turbXiG) + turbXiG);
}
@ -78,7 +78,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::Db() const
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
return XiGModel_->Db()
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn)/(mgb + 1.0/lambdaIn);
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_);
}
@ -86,8 +86,8 @@ bool Foam::XiGModels::instabilityG::read(const dictionary& XiGProperties)
{
XiGModel::read(XiGProperties);
XiGModelCoeffs_.lookup("GIn") >> GIn;
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn;
XiGModelCoeffs_.lookup("GIn") >> GIn_;
XiGModelCoeffs_.lookup("lambdaIn") >> lambdaIn_;
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,10 +58,10 @@ class instabilityG
// Private data
//- Flame instabilityG wrinling generation rate coefficient
dimensionedScalar GIn;
dimensionedScalar GIn_;
//- InstabilityG length-scale
dimensionedScalar lambdaIn;
dimensionedScalar lambdaIn_;
//- Xi generation rate model due to all other processes
autoPtr<XiGModel> XiGModel_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -237,6 +237,9 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiProperties) = 0;
//- Write fields related to Xi model
virtual void writeFields() = 0;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -109,6 +109,13 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiProperties);
//- Write fields of the XiEq model
virtual void writeFields()
{
XiEqModel_().writeFields();
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,6 +95,11 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiProperties);
//- Write fields of the XiEq model
virtual void writeFields()
{}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,6 +124,12 @@ public:
//- Update properties from given dictionary
virtual bool read(const dictionary& XiProperties);
//- Write fields of the XiEq model
virtual void writeFields()
{
XiEqModel_().writeFields();
}
};

View File

@ -30,7 +30,7 @@ if (ign.ignited())
// Calculate flame normal etc.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// volVectorField n(fvc::grad(b));
//volVectorField n(fvc::grad(b));
volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
volScalarField mgb("mgb", mag(n));

View File

@ -30,7 +30,6 @@
//const volScalarField& T = thermo->T();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
@ -94,8 +93,35 @@
IOobject
(
"betav",
runTime.findInstance(polyMesh::meshSubDir, "betav"),
polyMesh::meshSubDir,
mesh.facesInstance(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);
Info<< "Reading field Lobs\n" << endl;
volScalarField Lobs
(
IOobject
(
"Lobs",
mesh.facesInstance(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);
Info<< "Reading field CT\n" << endl;
volSymmTensorField CT
(
IOobject
(
"CT",
mesh.facesInstance(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,6 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "IFstream.H"
#include "SCOPELaminarFlameSpeed.H"
#include "addToRunTimeSelectionTable.H"
@ -68,7 +69,19 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
:
laminarFlameSpeed(dict, ct),
coeffsDict_(dict.subDict(typeName + "Coeffs").subDict(fuel_)),
coeffsDict_
(
dictionary
(
IFstream
(
fileName
(
dict.lookup("fuelFile")
)
)()
).subDict(typeName + "Coeffs")
),
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,7 +134,7 @@ class SCOPE
polynomial MaPolyU_;
// Private Member Functions
// Private member functions
//- Polynomial evaluated from the given equivalence ratio
// and polynomial coefficients

View File

@ -0,0 +1,3 @@
icoUncoupledKinematicParcelDyMFoam.C
EXE = $(FOAM_APPBIN)/icoUncoupledKinematicParcelDyMFoam

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I../icoUncoupledKinematicParcelFoam \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,7 +36,7 @@ Description
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulenceModel.H"
#include "basicKinematicCloud.H"
#include "basicKinematicCollidingCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,3 @@
icoUncoupledKinematicParcelFoam.C
EXE = $(FOAM_APPBIN)/icoUncoupledKinematicParcelFoam

View File

@ -75,7 +75,7 @@
args.optionReadIfPresent("cloudName", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCloud kinematicCloud
basicKinematicCollidingCloud kinematicCloud
(
kinematicCloudName,
rhoInf,
@ -89,30 +89,17 @@
"H",
runTime.timeName(),
mesh,
IOobject::NO_READ
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<volVectorField> HPtr_;
autoPtr<volVectorField> HPtr;
if (Hheader.headerOk())
{
Info<< "\nReading field H\n" << endl;
HPtr_.reset
(
new volVectorField
(
IOobject
(
"H",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
HPtr.reset(new volVectorField (Hheader, mesh));
}
IOobject HdotGradHheader
@ -120,28 +107,17 @@
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::NO_READ
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<volVectorField> HdotGradHPtr_;
autoPtr<volVectorField> HdotGradHPtr;
if (HdotGradHheader.headerOk())
{
Info<< "Reading field HdotGradH" << endl;
HdotGradHPtr_.reset
(
new volVectorField
(
IOobject
(
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
HdotGradHPtr.reset(new volVectorField(HdotGradHheader, mesh));
}
#include "createNonInertialFrameFields.H"

View File

@ -0,0 +1,88 @@
Info<< "Reading non-inertial frame fields" << endl;
IOobject linearAccelerationHeader
(
"linearAcceleration",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<uniformDimensionedVectorField> linearAccelerationPtr;
if (linearAccelerationHeader.headerOk())
{
Info<< " Reading " << linearAccelerationHeader.name() << endl;
linearAccelerationPtr.reset
(
new uniformDimensionedVectorField(linearAccelerationHeader)
);
}
IOobject angularVelocityHeader
(
"angularVelocity",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<uniformDimensionedVectorField> angularVelocityPtr;
if (angularVelocityHeader.headerOk())
{
Info<< " Reading " << angularVelocityHeader.name() << endl;
angularVelocityPtr.reset
(
new uniformDimensionedVectorField(angularVelocityHeader)
);
}
IOobject angularAccelerationHeader
(
"angularAcceleration",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<uniformDimensionedVectorField> angularAccelerationPtr;
if (angularAccelerationHeader.headerOk())
{
Info<< " Reading " << angularAccelerationHeader.name() << endl;
angularAccelerationPtr.reset
(
new uniformDimensionedVectorField(angularAccelerationHeader)
);
}
IOobject centreOfRotationHeader
(
"centreOfRotation",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
autoPtr<uniformDimensionedVectorField> centreOfRotationPtr;
if (centreOfRotationHeader.headerOk())
{
Info<< " Reading " << centreOfRotationHeader.name() << endl;
centreOfRotationPtr.reset
(
new uniformDimensionedVectorField(centreOfRotationHeader)
);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulenceModel.H"
#include "basicKinematicCloud.H"
#include "basicKinematicCollidingCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,3 +0,0 @@
incompressibleUncoupledKinematicParcelDyMFoam.C
EXE = $(FOAM_APPBIN)/incompressibleUncoupledKinematicParcelDyMFoam

View File

@ -1,147 +0,0 @@
Info<< "\nReading transportProperties\n" << endl;
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar rhoInfValue
(
transportProperties.lookup("rhoInf")
);
volScalarField rhoInf
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
rhoInfValue
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
Info<< "Creating turbulence model\n" << endl;
singlePhaseTransportModel laminarTransport(U, phi);
const volScalarField nu(laminarTransport.nu());
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
volScalarField mu
(
IOobject
(
"mu",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
nu*rhoInfValue
);
word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCloud kinematicCloud
(
kinematicCloudName,
rhoInf,
U,
mu,
g
);
IOobject Hheader
(
"H",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
autoPtr<volVectorField> HPtr_;
if (Hheader.headerOk())
{
Info<< "\nReading field H\n" << endl;
HPtr_.reset
(
new volVectorField
(
IOobject
(
"H",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
IOobject HdotGradHheader
(
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
autoPtr<volVectorField> HdotGradHPtr_;
if (HdotGradHheader.headerOk())
{
Info<< "Reading field HdotGradH" << endl;
HdotGradHPtr_.reset
(
new volVectorField
(
IOobject
(
"HdotGradH",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}

View File

@ -1,3 +0,0 @@
incompressibleUncoupledKinematicParcelFoam.C
EXE = $(FOAM_APPBIN)/incompressibleUncoupledKinematicParcelFoam

View File

@ -1,14 +0,0 @@
#!/bin/sh
#
# Build optional components (eg, may depend on third-party libraries)
# -----------------------------------------------------------------------------
cd ${0%/*} || exit 1 # run from this directory
set -x
# build tecio
wmake libso tecio/tecsrc
# build converter
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -1,5 +1,5 @@
EXE_INC = \
-Itecio/tecsrc/lnInclude \
-I$(WM_THIRD_PARTY_DIR)/tecio/tecsrc/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
@ -10,4 +10,4 @@ EXE_LIBS = \
-lfiniteVolume \
-lgenericPatchFields \
-lmeshTools \
-ltecio
-L$(FOAM_EXT_LIBBIN) -ltecio

View File

@ -1,277 +0,0 @@
#!/bin/sh
MAKEWHAT=
EXTRAFLAGS=
STRIPFLAG=-s
isrelease=n
skipcompile=n
if test $# -ge 1 ; then
Platname=$1
shift
while test $# -ge 1
do
if test "$1" = "-release" ; then
isrelease=y
elif test "$1" = "-skipcompile" ; then
skipcompile=y
elif test "$1" = "-tecio" ; then
MAKEWHAT=tecio.a
else
EXTRAFLAGS="$EXTRAFLAGS $1"
fi
shift
done
else
echo "Choose platform:"
echo " "
echo " macux.104"
echo " macix64.105"
echo " sgix.62"
echo " sgix3.62"
echo " sgix.65"
echo " sgix64.65"
echo " sgix2.65"
echo " sun4.57"
echo " sun464.57"
echo " sun86.54"
echo " ibmx.43"
echo " ibmx64.43"
echo " ibmx.51"
echo " ibmx64.51"
echo " ibmx64.53"
echo " decalpha.32"
echo " compaq.51"
echo " hp7xx.11"
echo " hp7xx64.11"
echo " hpi64.11"
echo " linux.24"
echo " linuxi64.24"
echo " linux.22"
echo " linuxa.22"
echo " linuxg248x64.26"
echo " linuxg27x64.26"
echo " crayc90"
echo "->\c"
read Platname
echo "Choose:"
echo " 1. Make tecio.a only"
echo " 2. Make tecio.a and pltview"
read choice
if test $choice -eq 1 ;then
MAKEWHAT=tecio.a
fi
fi
MAKECMD=make
LINKFLAGS=
LINKLIBS=
AR=ar
ARFLAGS=qv
DISTSUBDIR2=
case $Platname in
mac*) CCOMP=g++
FINALCFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64 -DDARWIN -DLONGIS64 -I/usr/X11R6/include"
STRIPFLAG=-Wl,-x
LINKFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64"
;;
sgix.65-64) CCOMP=CC
FINALCFLAGS="-DIRISX -DLONGIS64 -mips4 -64"
LINKFLAGS="-mips4 -64"
;;
sgix64.65) CCOMP=CC
FINALCFLAGS="-DIRISX -DLONGIS64 -mips4 -64"
LINKFLAGS="-mips4 -64"
;;
sgix.65) CCOMP=CC
FINALCFLAGS="-DIRISX -mips4 -n32"
LINKFLAGS="-mips4 -n32"
;;
sgix2.65) CCOMP=CC
FINALCFLAGS="-DIRISX -o32"
LINKFLAGS="-o32"
;;
sgix.62-64) CCOMP=CC
FINALCFLAGS="-DIRISX -DIRIX62 -DLONGIS64 -mips4 -64"
LINKFLAGS="-mips4 -64"
;;
sgix.62) CCOMP=CC
FINALCFLAGS="-DIRISX -DIRIX62 -mips4 -n32"
LINKFLAGS="-mips4 -n32"
;;
sgix1.62) CCOMP=CC
FINALCFLAGS="-DIRISX -DIRIX62 -mips1 -32"
LINKFLAGS="-mips1 -32"
;;
sgix3.62) CCOMP=CC
FINALCFLAGS="-DIRISX -DIRIX62 -mips3 -n32"
LINKFLAGS="-mips3 -n32"
;;
ibmx.*) CCOMP=xlC
FINALCFLAGS=-DIBMRS6000X
;;
ibmx64.*) CCOMP=xlC
FINALCFLAGS="-DIBMRS6000X -DLONGIS64 -q64"
ARFLAGS="-X64 qv"
;;
compaq.51) CCOMP=cxx
FINALCFLAGS="-DCOMPAQX -I/usr/include -ieee_with_inexact"
;;
decalpha.32)CCOMP=cc
FINALCFLAGS="-DDECALPHAX -I/usr/include -ieee_with_inexact"
;;
hp7xx.*-64) CCOMP=aCC
FINALCFLAGS="+DD64 +DS2.0 -AA -DHPX -DLONGIS64 -I/usr/include/X11R6 -I/usr/include/Motif2.1"
LINKFLAGS="+DA2.0W +DD64 +DS2.0W"
;;
hp7xx64.11) CCOMP=aCC
FINALCFLAGS="+DA2.0W +DD64 +DS2.0W -AA -DHPX -DLONGIS64 -I/usr/include/X11R6 -I/usr/include/Motif2.1"
LINKFLAGS="+DA2.0W +DD64 +DS2.0W"
;;
hpi64.11) CCOMP=aCC
FINALCFLAGS="+DD64 -AA -DHPX -DLONGIS64 -I/usr/include/X11R6 -I/usr/include/Motif2.1"
LINKFLAGS="+DD64"
;;
hp7xx.11) CCOMP=aCC
FINALCFLAGS="+DAportable -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1"
LINKFLAGS="+DAportable"
;;
crayc90) CCOMP=cc
FINALCFLAGS="-DCRAY -DUNIXX"
;;
linux*i64.*)CCOMP=g++
FINALCFLAGS="-fPIC -DLINUX -DLINUXI64"
;;
linux*64.*) CCOMP=g++
FINALCFLAGS="-fPIC -DLINUX -DLINUX64"
;;
linux*) CCOMP=g++
FINALCFLAGS="-fPIC -DLINUX"
;;
sun4.54) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun4.55) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun4.57) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun4.57-64) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUNSOLARISX -DLONGIS64 -KPIC -xarch=v9 -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-KPIC -xarch=v9 -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun464.57) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUNSOLARISX -DLONGIS64 -KPIC -xarch=v9 -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-KPIC -xarch=v9 -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun464.59) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUNSOLARISX -DLONGIS64 -KPIC -m64 -xarch=generic -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1"
LINKFLAGS="-KPIC -m64 -xarch=generic -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
sun86.54) CCOMP=/opt/SUNWspro/bin/CC
FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include"
MAKECMD=/usr/ccs/bin/make
AR=/opt/SUNWspro/bin/CC
ARFLAGS="-xar -o"
;;
*) echo "Err: Invalid platform"
exit
;;
esac
if test "$isrelease" = "y" ; then
EXTRAFLAGS="$EXTRAFLAGS -DNO_ASSERTS"
else
STRIPFLAG=
fi
if test "$skipcompile" = "n" ; then
rm -f *.o */*.o *.a > /dev/null 2>&1
fi
rm -f *.a > /dev/null 2>&1
FINALCFLAGS="$FINALCFLAGS $EXTRAFLAGS -DUSEENUM -DTHREED"
#
# NOTE: Used to use make here but had problems with using remsh to run
# make multiple times to get 64 bit and 32 bit versions of libraries....
#
# $MAKECMD $MAKEWHAT AR=$AR CC=$CCOMP LINKFLAGS="$LINKFLAGS" STRIPFLAG=$STRIPFLAG CFLAGS="$EXTRAFLAGS -DUSEENUM -DTHREED $FINALCFLAGS"
#
#
#
cd tecsrc
BASELIST=`/bin/ls -1 *.cpp`
OBJLIST=
for file in $BASELIST
do
OBJNAME=`echo $file | sed 's/\.cpp/.o/'`
OBJLIST="$OBJLIST tecsrc/$OBJNAME"
done
if test "$skipcompile" = "n" ; then
for file in $BASELIST
do
case $file in
tecxxx.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;;
arrlist.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;;
datautil.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;;
*) ARCHIVEFLAG= ;;
esac
echo "$CCOMP $FINALCFLAGS $ARCHIVEFLAG -c $file"
$CCOMP $FINALCFLAGS $ARCHIVEFLAG -c $file
done
fi
cd ..
pwd
echo "$AR $ARFLAGS tecio.a $OBJLIST"
$AR $ARFLAGS tecio.a $OBJLIST
if test -f /bin/ranlib ; then
/bin/ranlib tecio.a;
elif test -f /usr/bin/ranlib ; then
/usr/bin/ranlib tecio.a;
elif test -f /usr/ucb/ranlib ; then
/usr/ucb/ranlib tecio.a;
fi
echo "$CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp"
$CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp
echo "$CCOMP $FINALCFLAGS pltview.o tecio.a $LINKFLAGS $LINKLIBS $STRIPFLAG -lm -o pltview"
$CCOMP $FINALCFLAGS pltview.o tecio.a $LINKFLAGS $LINKLIBS $STRIPFLAG -lm -o pltview

View File

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

View File

@ -1,530 +0,0 @@
/* This example creates two simple polyhedral zones in the shape
* of a three-dimensional arrow. Obscured boundary faces are used.
*/
#include <stdio.h>
#include "TECIO.h"
int main()
{
/* DOCSTART:arrow_tecini.txt*/
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 1;
INTEGER4 FileType = 0;
INTEGER4 I;
/* Open the file and write the Tecplot datafile
* header information
*/
I = TECINI112((char*)"Multiple polyhedral zones", /* Name of the entire
* dataset.
*/
(char*)"X Y Z P", /* Defines the variables for the data
* file. Each zone must contain each of
* the variables listed here. The order
* of the variables in the list is used
* to define the variable number (e.g.
* X is Var 1).
*/
(char*)"Arrow.plt",
(char*)".", /* Scratch Directory */
&FileType,
&Debug,
&VIsDouble);
/* DOCEND */
/* After TECINI is called, call TECZNE to create one or more
* zones for your data file. In this example, Zone 1 contains a
* single rectangular solid created as a face-based finite-element
* (i.e. polyhedral zone). The zone has eight points (or nodes),
* six faces and one element.
*/
/* DOCSTART:arrow_teczne_rect.txt*/
/* TECZNE Parameters */
INTEGER4 ZoneType = 7; /* sets the zone type
* to polyhedral */
INTEGER4 NumPts_Rect = 8;
INTEGER4 NumElems_Rect = 1;
INTEGER4 NumFaces_Rect = 6;
INTEGER4 ICellMax = 0; /* not used */
INTEGER4 JCellMax = 0; /* not used */
INTEGER4 KCellMax = 0; /* not used */
double SolutionTime = 0.0;
INTEGER4 StrandID = 0;
INTEGER4 ParentZone = 0;
INTEGER4 IsBlock = 1;
INTEGER4 NumFaceConnections = 0; /* not used */
INTEGER4 FaceNeighborMode = 1; /* not used */
INTEGER4 SharConn = 0;
/* In a rectangular solid, each face is composed of four nodes.
* As such, the total number of face nodes is twenty-four (four
* nodes for each of the six faces).
*/
INTEGER4 TotalNumFaceNodes_Rect = 24;
/* There is one connected boundary face in this zone (the face on
* the rectangle adjacent to the arrowhead). Refer to the Data
* Format Guide for additional information. */
INTEGER4 NumConnBndryFaces_Rect = 1;
/* The connected boundary face has one connection, the face on
* the bottom of the arrowhead. A connection is an element-zone
* tuple that indicates a neighboring element (and its zone) when
* the neighboring element is in a different zone. Generally,
* there will be one boundary connection for each boundary face.
*/
INTEGER4 TotalNumBndryConns_Rect = 1;
/* For illustrative purposes, the grid variables (X, Y, and Z)
* are nodal variables (i.e. ValueLocation = 1), and the pressure
* variable (P) is a cell-centered variable (i.e.
* ValueLocation = 0).
*/
INTEGER4 ValueLocation[4] = { 1, 1, 1, 0 };
I = TECZNE112((char*)"Zone 1: Rectangular Solid",
&ZoneType,
&NumPts_Rect,
&NumElems_Rect,
&NumFaces_Rect,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
&TotalNumFaceNodes_Rect,
&NumConnBndryFaces_Rect,
&TotalNumBndryConns_Rect,
NULL,
ValueLocation,
NULL,
&SharConn);
/* DOCEND */
/* DOCSTART:arrow_tecdat_rect.txt*/
//set variable values (X_Rect, Y_Rect, Z_Rect & P_Rect)
double *X_Rect = new double[NumPts_Rect];
double *Y_Rect = new double[NumPts_Rect];
double *Z_Rect = new double[NumPts_Rect];
double *P_Rect = new double[NumElems_Rect];
for (INTEGER4 ii = 0; ii <= NumPts_Rect / 2; ii += 4)
{
X_Rect[ii] = 0;
X_Rect[ii+1] = 3;
X_Rect[ii+2] = 3;
X_Rect[ii+3] = 0;
Y_Rect[ii] = 3;
Y_Rect[ii+1] = 3;
Y_Rect[ii+2] = 1;
Y_Rect[ii+3] = 1;
}
for (INTEGER4 ii = 0; ii < 4; ii++)
Z_Rect[ii] = 0;
for (INTEGER4 ii = 4; ii < NumPts_Rect; ii++)
Z_Rect[ii] = -2;
P_Rect[0] = 10;
INTEGER4 IsDouble = 1;
I = TECDAT112(&NumPts_Rect, X_Rect, &IsDouble);
I = TECDAT112(&NumPts_Rect, Y_Rect, &IsDouble);
I = TECDAT112(&NumPts_Rect, Z_Rect, &IsDouble);
I = TECDAT112(&NumElems_Rect, P_Rect, &IsDouble);
/* DOCEND */
/* DOCSTART:arrow_facenodes_rect.txt*/
/* The FaceNodeCounts array is used to describe the number of
* nodes in each face of the zone. The first value in the array
* is the number of nodes in Face 1, the second value is the
* number of nodes in Face 2 and so forth. In this example, each
* face of the zone has four nodes.
*/
INTEGER4 *FaceNodeCounts_Rect = new INTEGER4[NumFaces_Rect];
//For this particular zone, each face has the 4 nodes
for (INTEGER4 ii = 0; ii < NumFaces_Rect; ii++)
FaceNodeCounts_Rect[ii] = 4;
/* The FaceNodes array is used to specify the nodes that compose
* each face. For each face (n of N), the number of nodes used
* to define the face is specified by the nth value in the
* FaceNodeCounts array. For example, if the first value in the
* FaceNodeCounts array is 4 (indicating Face 1 is composed of
* four nodes), the first four values in the FaceNodes array are
* the node numbers of the nodes in Face 1.
*
* ------------
* WARNING
* 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.
* ------------
*/
INTEGER4 *FaceNodes_Rect = new INTEGER4[TotalNumFaceNodes_Rect];
//Nodes for Face 1
FaceNodes_Rect[0] = 1;
FaceNodes_Rect[1] = 2;
FaceNodes_Rect[2] = 3;
FaceNodes_Rect[3] = 4;
//Nodes for Face 2
FaceNodes_Rect[4] = 1;
FaceNodes_Rect[5] = 4;
FaceNodes_Rect[6] = 8;
FaceNodes_Rect[7] = 5;
//Nodes for Face 3
FaceNodes_Rect[8] = 5;
FaceNodes_Rect[9] = 8;
FaceNodes_Rect[10] = 7;
FaceNodes_Rect[11] = 6;
//Nodes for Face 4
FaceNodes_Rect[12] = 2;
FaceNodes_Rect[13] = 6;
FaceNodes_Rect[14] = 7;
FaceNodes_Rect[15] = 3;
//Nodes for Face 5
FaceNodes_Rect[16] = 6;
FaceNodes_Rect[17] = 2;
FaceNodes_Rect[18] = 1;
FaceNodes_Rect[19] = 5;
//Nodes for Face 6
FaceNodes_Rect[20] = 3;
FaceNodes_Rect[21] = 7;
FaceNodes_Rect[22] = 8;
FaceNodes_Rect[23] = 4;
/* DOCEND */
/* DOCSTART:arrow_neighbors_rect.txt*/
INTEGER4 *FaceLeftElems_Rect = new INTEGER4[NumFaces_Rect];
INTEGER4 *FaceRightElems_Rect = new INTEGER4[NumFaces_Rect];
/* 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;
FaceLeftElems_Rect[ii] = 0;
}
/* The negative value in the FaceLeftElems array indicates that
* the face is connected to an element in another zone. In this
* case, Face 4 is connected to a face in Zone 2 (to be defined
* later in the example). The FaceBoundaryConnectionElems array
* lists all of the element numbers in other zones that the
* current zone shares boundary connections with. Similarly, the
* FaceBoundaryConnectionZones array lists all of the zone numbers
* with which the current zone shares boundaries. A negative
* value in the FaceLeftElems or FaceRightElems array indicates
* the position within these arrays that defines the neighboring
* element and zone for a face.
*
* For example, if the FaceBoundaryConnectionElems array is:
* [1 8 2] and the FaceBoundaryConnectionZones array is: [2 5 3],
* a FaceLeftElems or FaceRightElems value of -2 indicates that
* the face in question has a boundary connection with Element 8
* in Zone 5.
*/
FaceLeftElems_Rect[3] = -1;
/* DOCEND */
/* DOCSTART:arrow_tecpoly_rect.txt*/
/* The FaceBndryConnectionCounts array is used to define the
* number of boundary connections for each face that has a
* boundary connection. For example, if a zone has three boundary
* connections in total (NumConnectedBoundaryFaces), two of those
* boundary connections are in one face, and the remaining
* boundary connection is in a second face, the
* FaceBndryConnectionCounts array would be: [2 1].
* In this example, the total number of connected boundary faces
* (specified via TECZNE) is equal to one, so the
* FaceBoundaryConnectionCounts array contains a single value (1).
*/
INTEGER4 *FaceBndryConnCounts_Rect = new INTEGER4[NumConnBndryFaces_Rect];
FaceBndryConnCounts_Rect[0] = 1;
/* The value(s) in the FaceBndryConnectionElems and
* FaceBndryConnectionZones arrays specify the element number and
* zone number, respectively, that a given boundary connection is
* connected to. In this case, the boundary connection face is
* connected to Element 1 in Zone 2.
*/
INTEGER4 *FaceBndryConnElems_Rect = new INTEGER4[TotalNumBndryConns_Rect];
INTEGER4 *FaceBndryConnZones_Rect = new INTEGER4[TotalNumBndryConns_Rect];
FaceBndryConnElems_Rect[0] = 1;
FaceBndryConnZones_Rect[0] = 2;
I = TECPOLY112(FaceNodeCounts_Rect,
FaceNodes_Rect,
FaceLeftElems_Rect,
FaceRightElems_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;
/* DOCEND */
/* The data for Zone 1 has been written to the data file, so we
* are ready to create Zone 2. For simplicity, we will reuse many
* of the variables created for the rectangular zone that are not
* relevant to this tutorial. */
/* Zone 2 (the arrowhead or prism) has a single element composed
* of six nodes and five faces.
*/
/* DOCSTART:arrow_teczne_prism.txt*/
//TECZNE Parameters
INTEGER4 NumPts_Prism = 6;
INTEGER4 NumElems_Prism = 1;
INTEGER4 NumFaces_Prism = 5;
/* The prism is composed of two triangular faces and three
* rectangular faces. The total number of face nodes is the sum
* of the nodes in each triangular face (2 times 3) and the nodes
* in each rectangular face (3 times 4).
*/
INTEGER4 TotalNumFaceNodes_Prism = 18;
/* As with Zone 1, Zone 2 has one connected boundary face, the
* face that is connected to Zone 1.
*/
INTEGER4 NumConnBndryFaces_Prism = 1;
/* In this case, we have set the total number of boundary
* connections for the connected face to two. The first boundary
* connection is the connection to Zone 1. The second boundary
* connection is used to indicate that the face is only partially
* obscured by the face from Zone 1. If we omitted the second
* boundary connection, the connected face of the prism would
* disappear if the rectangular zone was deactivated.
*/
INTEGER4 TotalNumBndryConns_Prism = 2;
I = TECZNE112((char*)"Zone 2: Prism",
&ZoneType,
&NumPts_Prism,
&NumElems_Prism,
&NumFaces_Prism,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
&TotalNumFaceNodes_Prism,
&NumConnBndryFaces_Prism,
&TotalNumBndryConns_Prism,
NULL,
ValueLocation,
NULL,
&SharConn);
/* DOCEND */
/* DOCSTART:arrow_tecdat_prism.txt*/
double *X_Prism = new double[NumPts_Prism];
double *Y_Prism = new double[NumPts_Prism];
double *Z_Prism = new double[NumPts_Prism];
/* Set the X and Y variable values, one z-plane at a time */
double ZVal = 0;
for (INTEGER4 ii = 0; ii < 2; ii++)
{
// triangle in Z=ZVal plane
X_Prism[3*ii] = 3;
Y_Prism[3*ii] = 4;
Z_Prism[3*ii] = ZVal;
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;
ZVal = ZVal - 2;
}
/* When we called TecZne, we specified that the variable 4
* (pressure) is cell-centered. As such, only NumElements number
* of values needs to be written to the data file for the pressure
* variable.
*/
double *P_Prism = new double[NumElems_Prism];
P_Prism[0] = 20;
I = TECDAT112(&NumPts_Prism, X_Prism, &IsDouble);
I = TECDAT112(&NumPts_Prism, Y_Prism, &IsDouble);
I = TECDAT112(&NumPts_Prism, Z_Prism, &IsDouble);
I = TECDAT112(&NumElems_Prism, P_Prism, &IsDouble);
/* DOCEND */
/* DOCSTART:arrow_facemap_prism.txt*/
INTEGER4 *FaceNodeCounts_Prism = new INTEGER4[NumFaces_Prism];
INTEGER4 *FaceNodes_Prism = new INTEGER4[TotalNumFaceNodes_Prism];
/* Because of the way we chose to number our faces, the first
* three faces are rectangular and the last two are triangular.
* The numbering of the faces is arbitrary, but the faces must
* be referred to consistently.
*/
for (INTEGER4 ii = 0; ii < 3; ii++)
FaceNodeCounts_Prism[ii] = 4;
for (INTEGER4 ii = 3; ii < NumFaces_Prism; ii++)
FaceNodeCounts_Prism[ii] = 3;
//Nodes for Face 1
FaceNodes_Prism[0] = 1;
FaceNodes_Prism[1] = 3;
FaceNodes_Prism[2] = 6;
FaceNodes_Prism[3] = 4;
//Nodes for Face 2
FaceNodes_Prism[4] = 1;
FaceNodes_Prism[5] = 4;
FaceNodes_Prism[6] = 5;
FaceNodes_Prism[7] = 2;
//Nodes for Face 3
FaceNodes_Prism[8] = 3;
FaceNodes_Prism[9] = 2;
FaceNodes_Prism[10] = 5;
FaceNodes_Prism[11] = 6;
//Nodes for Face 4
FaceNodes_Prism[12] = 5;
FaceNodes_Prism[13] = 4;
FaceNodes_Prism[14] = 6;
//Nodes for Face 5
FaceNodes_Prism[15] = 1;
FaceNodes_Prism[16] = 2;
FaceNodes_Prism[17] = 3;
/* DOCEND */
/* DOCSTART:arrow_neighbors_prism.txt*/
/* 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];
for (INTEGER4 ii = 0; ii < NumFaces_Prism; ii++)
{
FaceRightElems_Prism[ii] = 1;
FaceLeftElems_Prism[ii] = 0;
}
/* The negative value in the FaceLeftElems array indicates that
* the face is connected to an element in another zone. In this
* case, Face 1 is connected to a face in Zone 1 (as indicated in
* Line 6). The FaceBoundaryConnectionElems array lists all of
* the element numbers in other zones that the current zone shares
* boundary connections with. Similarly, the
* FaceBoundaryConnectionZones array lists all of the zone numbers
* with which the current zone shares boundaries. A negative
* value in the FaceLeftElems or FaceRightElems array indicates
* the position within these arrays that defines the neighboring
* element and zone for a face.
*/
FaceLeftElems_Prism[0] = -1;
/* DOCEND */
/* DOCSTART:arrow_tecpoly_prism.txt*/
INTEGER4 *FaceBndryConnCounts_Prism = new INTEGER4[NumConnBndryFaces_Prism];
FaceBndryConnCounts_Prism[0] = 2;
INTEGER4 *FaceBndryConnElems_Prism = new INTEGER4[TotalNumBndryConns_Prism];
INTEGER4 *FaceBndryConnZones_Prism = new INTEGER4[TotalNumBndryConns_Prism];
/* As previously mentioned, a connected boundary face is a face
* that has either multiple neighboring faces or neighbor(s) that
* belong to another zone. Those cases are sufficient when the
* combination of all of the face<63>s neighbors completely cover the
* face. However, there are some cases (such as the bottom of the
* arrowhead) where the face is not completely covered by its
* neighbors. In those cases the face is referred to as <20>partially
* obscured<65>. A partially obscured face is indicated by
* incrementing the value in TotalNumConnectedBoundaryFaces and
* entering a value of 0 in both the FaceBndryConnectionElems and
* FaceBoundaryConnectionZones arrays for the boundary connection
* for the partially obscured face.
*/
FaceBndryConnElems_Prism[0] = 0;
FaceBndryConnZones_Prism[0] = 0;
/* Indicates that Face 1 is connected to Element 1 in Zone 1. */
FaceBndryConnElems_Prism[1] = 1;
FaceBndryConnZones_Prism[1] = 1;
I = TECPOLY112(FaceNodeCounts_Prism,
FaceNodes_Prism,
FaceLeftElems_Prism,
FaceRightElems_Prism,
FaceBndryConnCounts_Prism,
FaceBndryConnElems_Prism,
FaceBndryConnZones_Prism);
/* cleanup */
delete X_Prism;
delete Y_Prism;
delete Z_Prism;
delete P_Prism;
delete FaceNodeCounts_Prism;
delete FaceNodes_Prism;
delete FaceLeftElems_Prism;
delete FaceRightElems_Prism;
delete FaceBndryConnCounts_Prism;
delete FaceBndryConnElems_Prism;
delete FaceBndryConnZones_Prism;
/* DOCEND */
/* DOCSTART:arrow_tecend.txt*/
I = TECEND112();
/* DOCEND */
return 0;
}

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="arrow"
ProjectGUID="{3C1105D7-5690-48E0-9402-111CBDC84B42}"
RootNamespace="arrow"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\arrow.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,492 +0,0 @@
/*
* Complex example C program to write a
* binary data file for Tecplot. This example
* does the following:
*
* 1. Open a data file called "field.plt."
* 2. Open a data file called "line.plt."
* 3. Assign values for X, Y and P. These will be used
* in both the ordered and finite-element data files.
* 4. Write out an ordered zone dimensioned 4 x 5 to "field.plt."
* 5. Assign values for XL and YL arrays.
* 6. Write out data for line plot to "line.plt." Make the data
* use double precision.
* 7. Write out a finite-element zone to "field.plt."
* 8. Write out a text record to "field.plt."
* 9. Write out a geometry (circle) record to "field.plt."
* 10. Close file 1.
* 11. Close file 2.
*/
#include <stdio.h>
#include <math.h>
#include "TECIO.h"
int main(void)
{
float X[5][4], Y[5][4], P[5][4];
double XL[50], YL[50];
double SolTime;
INTEGER4 Debug, I, J, K, L, III, NPts, NElm, DIsDouble, VIsDouble, IMax, JMax, KMax;
INTEGER4 ICellMax, JCellMax, KCellMax, ZoneType, Clipping;
INTEGER4 StrandID, ParentZn, FieldFileType, LineFileType;
INTEGER4 SharingZone[3] = {0, 0, 0};
INTEGER4 IsBlock, NumFaceConnections, FaceNeighborMode, ShareConnectivityFromZone;
INTEGER4 NM[12][4];
double XP, YP, ZP, FH, LineSpacing, PatternLength;
double BoxMargin, BoxLineThickness, TextAngle;
INTEGER4 AttachToZone, Zone, Scope, PositionCoordSys, FontType, HeightUnits;
INTEGER4 IsFilled, GeomType, LinePattern, NumEllipsePts;
INTEGER4 Anchor, BoxType, BoxColor, BoxFillColor, TextColor, Color, FillColor;
INTEGER4 ArrowheadStyle, ArrowheadAttachment, NumSegments, NumSegPts[1];
double LineThickness, ArrowheadSize, ArrowheadAngle;
float XGeomData[1], YGeomData[1], ZGeomData[1];
enum FileType { FULL = 0, GRID = 1, SOLUTION = 2 };
Debug = 2;
VIsDouble = 0;
DIsDouble = 0;
FieldFileType = FULL;
LineFileType = FULL;
/*
* Open order.plt and write the header information.
*/
I = TECINI112((char*)"DATASET WITH ONE ORDERED ZONE AND ONE FE-QUAD ZONE OVER 2 TIME STEPS",
(char*)"X Y P",
(char*)"field.plt",
(char*)".",
&FieldFileType,
&Debug,
&VIsDouble);
/*
* Open line.plt and write the header information.
*/
VIsDouble = 1;
I = TECINI112((char*)"DATASET WITH ONE I-ORDERED ZONE",
(char*)"X Y",
(char*)"line.plt",
(char*)".",
&LineFileType,
&Debug,
&VIsDouble);
/*
* Calculate values for the field variables.
*/
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));
}
/*
* Make sure writing to file #1.
*/
III = 1;
I = TECFIL112(&III);
/*
* Write the zone header information for the ordered zone.
*/
IMax = 4;
JMax = 5;
KMax = 1;
ICellMax = 0;
JCellMax = 0;
KCellMax = 0;
ZoneType = 0;
SolTime = 10.0;
StrandID = 1;
ParentZn = 0;
IsBlock = 1;
NumFaceConnections = 0;
FaceNeighborMode = 0;
ShareConnectivityFromZone = 0;
I = TECZNE112((char*)"Ordered Zone 1",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
NULL, /* PassiveVarList */
NULL, /* ValueLocation */
NULL, /* ShareVarFromZone */
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
&ShareConnectivityFromZone);
/*
* Write out the field data for the ordered zone.
*/
III = IMax * JMax;
I = TECDAT112(&III, &X[0][0], &DIsDouble);
I = TECDAT112(&III, &Y[0][0], &DIsDouble);
I = TECDAT112(&III, &P[0][0], &DIsDouble);
/*
* Calculate values for the I-ordered zone.
*/
for (I = 0; I < 50; I++)
{
XL[I] = I + 1;
YL[I] = sin((double)(I + 1) / 20.0);
}
/*
* Switch to the "line.plt" file (file number 2)
* and write out the line plot data.
*/
III = 2;
I = TECFIL112(&III);
/*
* Write the zone header information for the XY-data.
*/
IMax = 50;
JMax = 1;
KMax = 1;
SolTime = 0.0;
StrandID = 0; /* StaticZone */
I = TECZNE112((char*)"XY Line plot",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
NULL, /* PassiveVarList */
NULL, /* ValueLocation */
NULL, /* ShareVarFromZone */
&ShareConnectivityFromZone);
/*
* Write out the line plot.
*/
DIsDouble = 1;
III = IMax;
I = TECDAT112(&III, (float *) & XL[0], &DIsDouble);
I = TECDAT112(&III, (float *) & YL[0], &DIsDouble);
/*
* Switch back to the field plot file and write out
* the finite-element zone.
*/
III = 1;
I = TECFIL112(&III);
/*
* Move the coordinates so this zone's not on top of the other
*/
for (J = 0; J < 5; J++)
for (I = 0; I < 4; I++)
{
X[J][I] = (float)(I + 6);
Y[J][I] = (float)(J + 1);
P[J][I] = (float)((I + 1) * (J + 1));
}
/*
* Write the zone header information for the finite-element zone.
*/
ZoneType = 3; /* FEQuad */
NPts = 20; /* Number of points */
NElm = 12; /* Number of elements */
KMax = 0; /* Unused */
SolTime = 10.0;
StrandID = 2;
I = TECZNE112((char*)"Finite Zone 1",
&ZoneType,
&NPts,
&NElm,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
NULL, /* PassiveVarList */
NULL, /* ValueLocation */
NULL, /* ShareVarFromZone */
&ShareConnectivityFromZone);
/*
* Write out the field data for the finite-element zone.
*/
IMax = 4;
JMax = 5;
III = IMax * JMax;
DIsDouble = 0;
I = TECDAT112(&III, &X[0][0], &DIsDouble);
I = TECDAT112(&III, &Y[0][0], &DIsDouble);
I = TECDAT112(&III, &P[0][0], &DIsDouble);
/*
* Calculate and then write out the connectivity list.
* Note: The NM array references cells starting with
* offset of 1.
*/
for (I = 1; I < IMax; I++)
for (J = 1; J < JMax; J++)
{
K = I + (J - 1) * (IMax - 1);
L = I + (J - 1) * IMax;
NM[K-1][0] = L;
NM[K-1][1] = L + 1;
NM[K-1][2] = L + IMax + 1;
NM[K-1][3] = L + IMax;
}
I = TECNOD112((INTEGER4 *)NM);
/*
* Calculate values for the new solution variable.
*/
for (J = 0; J < 5; J++)
for (I = 0; I < 4; I++)
{
P[J][I] = (float)(2.0 * (I + 1) * (J + 1));
}
/*
* Write the zone header information for time step 2
*/
ZoneType = 0;
IMax = 4;
JMax = 5;
KMax = 1;
SolTime = 20.0;
StrandID = 1;
SharingZone[0] = 1;
SharingZone[1] = 1;
SharingZone[2] = 0; /* solution variable is not shared */
ShareConnectivityFromZone = 0;
I = TECZNE112((char*)"Ordered Zone 2",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
NULL,
NULL,
SharingZone,
&ShareConnectivityFromZone);
/*
* Write out the solution variable the grid variables are shared.
*/
IMax = 4;
JMax = 5;
III = IMax * JMax;
DIsDouble = 0;
I = TECDAT112(&III, &P[0][0], &DIsDouble);
/*
* Calculate values for the new solution variable.
*/
for (J = 0; J < 5; J++)
for (I = 0; I < 4; I++)
{
P[J][I] = (float)(3.0 * (I + 1) * (J + 1));
}
/*
* Write another time step for the FEZone and share from the first
*/
ZoneType = 3;
SolTime = 20.0;
StrandID = 2;
KMax = 0;
SharingZone[0] = 2;
SharingZone[1] = 2;
SharingZone[2] = 0; /* solution variable is not shared */
ShareConnectivityFromZone = 2;
I = TECZNE112((char*)"Finite Zone 2",
&ZoneType,
&NPts,
&NElm,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
0, /* TotalNumFaceNodes */
0, /* NumConnectedBoundaryFaces */
0, /* TotalNumBoundaryConnections */
NULL, /* PassiveVarList */
NULL, /* ValueLocation */
SharingZone,
&ShareConnectivityFromZone);
/*
* Write out the solution variable the grid variables are shared.
*/
IMax = 4;
JMax = 5;
III = IMax * JMax;
DIsDouble = 0;
I = TECDAT112(&III, &P[0][0], &DIsDouble);
/*
* Prepare to write out text record. Text is positioned
* at 0.5, 0.5 in frame units and has a height
* of 0.05 frame units.
*/
XP = 50.0;
YP = 50.0;
ZP = 0.0;
FH = 5.0;
Scope = 1; /* Local */
Clipping = 1; /* Clip to frame */
PositionCoordSys = 1; /* Frame */
FontType = 1; /* Helv Bold */
HeightUnits = 1; /* Frame */
AttachToZone = 0;
Zone = 0;
BoxType = 0; /* None */
BoxMargin = 5.0;
BoxLineThickness = 0.5;
BoxColor = 3;
BoxFillColor = 7;
TextAngle = 0.0;
Anchor = 0; /* Left */
LineSpacing = 1.0;
TextColor = 0; /* Black */
III = TECTXT112(&XP,
&YP,
&ZP,
&PositionCoordSys,
&AttachToZone,
&Zone,
&FontType,
&HeightUnits,
&FH,
&BoxType,
&BoxMargin,
&BoxLineThickness,
&BoxColor,
&BoxFillColor,
&TextAngle,
&Anchor,
&LineSpacing,
&TextColor,
&Scope,
&Clipping,
(char*)"Hi Mom",
(char*)"");
/*
* Prepare to write out geometry record (circle). Circle is
* positioned at 25, 25 (in frame units) and has a radius of
* 20 percent. Circle is drawn using a dashed line.
*/
XP = 25.0;
YP = 25.0;
ZP = 0.0;
IsFilled = 0;
Color = 0;
FillColor = 7;
GeomType = 3; /* Circle */
LinePattern = 1; /* Dashed */
LineThickness = 0.3;
PatternLength = 1.5;
NumEllipsePts = 72;
ArrowheadStyle = 0;
ArrowheadAttachment = 0;
ArrowheadSize = 0.1;
ArrowheadAngle = 15.0;
NumSegments = 1;
NumSegPts[0] = 1;
XGeomData[0] = 20.0;
YGeomData[0] = 0.0;
ZGeomData[0] = 0.0;
III = TECGEO112(&XP,
&YP,
&ZP,
&PositionCoordSys,
&AttachToZone,
&Zone,
&Color,
&FillColor,
&IsFilled,
&GeomType,
&LinePattern,
&PatternLength,
&LineThickness,
&NumEllipsePts,
&ArrowheadStyle,
&ArrowheadAttachment,
&ArrowheadSize,
&ArrowheadAngle,
&Scope,
&Clipping,
&NumSegments,
NumSegPts,
&XGeomData[0],
&YGeomData[0],
&ZGeomData[0],
(char*)"");
/*
* Close out file 1.
*/
I = TECEND112();
/*
* Close out file 2.
*/
III = 2;
I = TECFIL112(&III);
I = TECEND112();
return 0;
}

View File

@ -1,467 +0,0 @@
C
C Complex example FORTRAN program to write a
C binary data file for Tecplot. This example
C does the following:
C
C 1. Open a data file called "field.plt."
C 2. Open a data file called "line.plt."
C 3. Assign values for X, Y and P. These will be used
C in both the ordered and FE data files.
C 4. Write out an ordered zone dimensioned 4 x 5 to "field.plt."
C 5. Assign values for XL and YL arrays.
C 6. Write out data for line plot to "line.plt." Make the data
C use double precision.
C 7. Write out a finite element zone to "field.plt."
C 8. Write out a text record to "field.plt."
C 9. Write out a geometry (circle) record to "field.plt."
C 10. Close file 1.
C 11. Close file 2.
C
Program ComplexTest
Include "tecio.inc"
REAL*4 X(4,5), Y(4,5), P(4,5)
REAL*8 XL(50), YL(50)
REAL*4 XLDummy(1), YLDummy(1)
EQUIVALENCE (XLDummy(1), XL(1))
EQUIVALENCE (YLDummy(1), YL(1))
REAL*8 SolTime
INTEGER*4 Debug,I,J,K,L,III,NPts,NElm,DIsDouble,VIsDouble
INTEGER*4 IMax,JMax,KMax,NM(4,12),FileType
INTEGER*4 StrandID,ParentZn
INTEGER*4 SharingZone(3)
REAL*8 XP, YP, ZP, FH, LineSpacing, PatternLength
REAL*8 BoxMargin, BoxLineThickness, TextAngle
INTEGER*4 AttachToZone, Zone, Scope, PositionCoordSys
INTEGER*4 Clipping
INTEGER*4 FontType, HeightUnits, Anchor, BoxType
INTEGER*4 IsFilled, GeomType, LinePattern, NumEllipsePts
INTEGER*4 BoxColor, BoxFillColor, TextColor, Color, FillColor
INTEGER*4 ArrowheadStyle, ArrowheadAttachment, NumSegments
INTEGER*4 NumSegPts(1)
REAL*8 LineThickness, ArrowheadSize, ArrowheadAngle
REAL*4 XGeomData(1), YGeomData(1), ZGeomData(1)
CHARACTER*1 NULCHAR
INTEGER*4 Zero
POINTER (NullPtr,Null)
INTEGER*4 Null(*)
Debug = 2
VIsDouble = 0
FileType = 0
DIsDouble = 0
NULCHAR = CHAR(0)
Zero = 0
NullPtr = 0
C
C Open field.plt and write the header information.
C
I = TECINI112('DATASET WITH 1 ORDERED ZONE, '//
& '1 QUAD ZONE OVER 2 TIME STEPS'//NULCHAR,
& 'X Y P'//NULCHAR,
& 'field.plt'//NULCHAR,
& '.'//NULCHAR,
& FileType,
& Debug,
& VIsDouble)
C
C Open line.plt and write the header information.
C
VIsDouble = 1
I = TECINI112('DATASET WITH ONE I-ORDERED ZONE'//NULCHAR,
& 'X Y'//NULCHAR,
& 'line.plt'//NULCHAR,
& '.'//NULCHAR,
& FileType,
& Debug,
& VIsDouble)
C
C Calculate values for the field variables.
C
Do 10 J = 1,5
Do 10 I = 1,4
X(I,J) = I
Y(I,J) = J
P(I,J) = I*J
10 Continue
C
C Make sure writing to file #1.
C
III = 1
I = TECFIL112(III)
C
C Write the zone header information for the ordered zone.
C
IMax = 4
JMax = 5
KMax = 1
SolTime = 10.0
StrandID = 1
ParentZn = 0
I = TECZNE112('Ordered Zone 1'//NULCHAR,
& 0, ! ZONETYPE
& IMax,
& JMax,
& KMax,
& 0,
& 0,
& 0,
& SolTime,
& StrandID,
& ParentZn,
& 1, ! ISBLOCK
& 0, ! NumFaceConnections
& 0, ! FaceNeighborMode
& 0, ! TotalNumFaceNodes
& 0, ! NumConnectedBoundaryFaces
& 0, ! TotalNumBoundaryConnections
& Null, ! PassiveVarList
& Null, ! ValueLocation
& Null, ! ShareVarFromZone
& 0) ! ShareConnectivityFromZone)
C
C Write out the field data for the ordered zone.
C
III = IMax*JMax
I = TECDAT112(III,X,DIsDouble)
I = TECDAT112(III,Y,DIsDouble)
I = TECDAT112(III,P,DIsDouble)
C
C Calculate values for the I-ordered zone.
C
Do 20 I = 1,50
XL(I) = I
YL(I) = sin(I/20.0)
20 Continue
C
C Switch to the 'line.plt' file (file number 2)
C and write out the line plot data.
C
III = 2
I = TECFIL112(III)
C
C Write the zone header information for the XY-data.
C
IMax = 50
JMax = 1
KMax = 1
SolTime = 0.0
StrandID = 0
I = TECZNE112('XY Line plot'//NULCHAR,
& 0,
& IMax,
& JMax,
& KMax,
& 0,
& 0,
& 0,
& SolTime,
& StrandID,
& ParentZn,
& 1,
& 0,
& 0,
& 0,
& 0,
& 0,
& Null,
& Null,
& Null,
& 0)
C
C Write out the line plot.
C
DIsDouble = 1
III = IMax
I = TECDAT112(III,XLDummy,DIsDouble)
I = TECDAT112(III,YLDummy,DIsDouble)
C
C Switch back to the field plot file and write out
C the finite-element zone.
C
III = 1
I = TECFIL112(III)
C
C Move the coordinates so this zone's not on top of the other
C
Do 30 J = 1,5
Do 30 I = 1,4
X(I,J) = I+5
Y(I,J) = J
P(I,J) = I*J
30 Continue
C
C Write the zone header information for the finite-element zone.
C
NPts = 20
NElm = 12
KMax = 1
SolTime = 10.0
StrandID = 2
I = TECZNE112('Finite Zone 1'//NULCHAR,
& 3, ! FEQUADRILATERAL
& NPts,
& NElm,
& KMax,
& 0,
& 0,
& 0,
& SolTime,
& StrandID,
& ParentZn,
& 1,
& 0,
& 0,
& 0,
& 0,
& 0,
& Null,
& Null,
& Null,
& 0)
C
C Write out the field data for the finite-element zone.
C
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,X,DIsDouble)
I = TECDAT112(III,Y,DIsDouble)
I = TECDAT112(III,P,DIsDouble)
C
C Calculate and then write out the connectivity list.
C Note: The NM array references cells starting with
C offset of 1.
C
Do 40 I = 1,IMax-1
Do 40 J = 1,JMax-1
K = I+(J-1)*(IMax-1)
L = I+(J-1)*IMax
NM(1,K) = L
NM(2,K) = L+1
NM(3,K) = L+IMax+1
NM(4,K) = L+IMax
40 Continue
I = TECNOD112(NM)
C
C Calculate vlues for the new solution variable.
C
Do 50 J = 1,5
Do 50 I = 1,4
P(I,J) = 2*I*J
50 Continue
C
C Write the zone header information for time step 2
C
IMax = 4
JMax = 5
KMax = 1
SolTime = 20.0
StrandID = 1
SharingZone(1) = 1
SharingZone(2) = 1
SharingZone(3) = 0
I = TECZNE112('Ordered Zone 2'//NULCHAR,
& 0, ! ORDERED
& IMax,
& JMax,
& KMax,
& 0,
& 0,
& 0,
& SolTime,
& StrandID,
& ParentZn,
& 1,
& 0,
& 0,
& 0,
& 0,
& 0,
& Null,
& Null,
& SharingZone,
& 0)
C
C Write out the solution variable the grid variables are shared.
C
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,P,DIsDouble)
C
C Calculate values for the new solution variable.
C
Do 60 J = 1,5
Do 60 I = 1,4
P(I,J) = 3*I*J
60 Continue
C
C Write another time step for the FEZone and share from the first
C
SolTime = 20.0
StrandID = 2
KMax = 0
SharingZone(1) = 2
SharingZone(2) = 2
SharingZone(3) = 0
I = TECZNE112('Finite Zone 2'//NULCHAR,
& 3, ! FEQUADRILATERAL
& NPts,
& NElm,
& KMax,
& 0,
& 0,
& 0,
& SolTime,
& StrandID,
& ParentZn,
& 1,
& 0,
& 0,
& 0,
& 0,
& 0,
& Null,
& Null,
& SharingZone,
& 2)
C
C Write out the solution variable the grid variables are shared.
C
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,P,DIsDouble)
C
C Prepare to write out text record. Text is positioned
C at 50, 50 in frame units and has a height 5 frame units.
C
XP = 50
YP = 50
FH = 5
Scope = 1
Clipping = 0
PositionCoordSys = 1
FontType = 1
HeightUnits = 1
AttachToZone = 0
Zone = 0
BoxType = 0
BoxMargin = 5.0
BoxLineThickness = 0.5
BoxColor = 3
BoxFillColor = 7
TextAngle = 0.0
Anchor = 0
LineSpacing = 1.5
TextColor = 0
III = TECTXT112(XP,
& YP,
& 0.0d0,
& PositionCoordSys,
& AttachToZone,
& Zone,
& FontType,
& HeightUnits,
& FH,
& BoxType,
& BoxMargin,
& BoxLineThickness,
& BoxColor,
& BoxFillColor,
& TextAngle,
& Anchor,
& LineSpacing,
& TextColor,
& Scope,
& Clipping,
& 'Hi Mom'//NULCHAR,
& NULCHAR)
C
C Prepare to write out geometry record (circle). Circle is
C positioned at 25, 25 in frame units and has a radius of 30.
C Circle is drawn using a dashed line pattern.
C
XP = 25
YP = 25
ZP = 0.0
IsFilled = 0
Color = 0
FillColor = 7
GeomType = 2
LinePattern = 1
LineThickness = 0.3
PatternLength = 1
NumEllipsePts = 72
ArrowheadStyle = 0
ArrowheadAttachment = 0
ArrowheadSize = 0.0
ArrowheadAngle = 15.0
NumSegments = 1
NumSegPts(1) = 1
XGeomData(1) = 30
YGeomData(1) = 0.0
ZGeomData(1) = 0.0
III = TECGEO112(XP,
& YP,
& ZP,
& PositionCoordSys,
& AttachToZone,
& Zone,
& Color,
& FillColor,
& IsFilled,
& GeomType,
& LinePattern,
& PatternLength,
& LineThickness,
& NumEllipsePts,
& ArrowheadStyle,
& ArrowheadAttachment,
& ArrowheadSize,
& ArrowheadAngle,
& Scope,
& Clipping,
& NumSegments,
& NumSegPts,
& XGeomData,
& YGeomData,
& ZGeomData,
& NULCHAR)
C
C Close out file 1.
C
I = TECEND112()
C
C Close out file 2.
C
III = 2
I = TECFIL112(III)
I = TECEND112()
STOP
END

View File

@ -1,467 +0,0 @@
!
! Complex example FORTRAN program to write a
! binary data file for Tecplot. This example
! does the following:
!
! 1. Open a data file called "field.plt."
! 2. Open a data file called "line.plt."
! 3. Assign values for X, Y and P. These will be used
! in both the ordered and FE data files.
! 4. Write out an ordered zone dimensioned 4 x 5 to "field.plt."
! 5. Assign values for XL and YL arrays.
! 6. Write out data for line plot to "line.plt." Make the data
! use double precision.
! 7. Write out a finite element zone to "field.plt."
! 8. Write out a text record to "field.plt."
! 9. Write out a geometry (circle) record to "field.plt."
! 10. Close file 1.
! 11. Close file 2.
!
Program ComplexTest
Include "tecio.f90"
REAL*4 X(4,5), Y(4,5), P(4,5)
REAL*8 XL(50), YL(50)
REAL*4 XLDummy(1), YLDummy(1)
EQUIVALENCE (XLDummy(1), XL(1))
EQUIVALENCE (YLDummy(1), YL(1))
REAL*8 SolTime
INTEGER*4 Debug,I,J,K,L,III,NPts,NElm,DIsDouble,VIsDouble,FileType
INTEGER*4 IMax,JMax,KMax,NM(4,12)
INTEGER*4 StrandID,ParentZn
INTEGER*4 SharingZone(3)
REAL*8 XP, YP, ZP, FH, LineSpacing, PatternLength
REAL*8 BoxMargin, BoxLineThickness, TextAngle
INTEGER*4 AttachToZone, Zone, Scope, PositionCoordSys
INTEGER*4 Clipping
INTEGER*4 FontType, HeightUnits, Anchor, BoxType
INTEGER*4 IsFilled, GeomType, LinePattern, NumEllipsePts
INTEGER*4 BoxColor, BoxFillColor, TextColor, Color, FillColor
INTEGER*4 ArrowheadStyle, ArrowheadAttachment, NumSegments
INTEGER*4 NumSegPts(1)
REAL*8 LineThickness, ArrowheadSize, ArrowheadAngle
REAL*4 XGeomData(1), YGeomData(1), ZGeomData(1)
CHARACTER*1 NULCHAR
INTEGER*4 Zero
POINTER (NullPtr,Null)
INTEGER*4 Null(*)
Debug = 2
VIsDouble = 0
FileType = 0
DIsDouble = 0
NULCHAR = CHAR(0)
Zero = 0
NullPtr = 0
!
! Open field.plt and write the header information.
!
I = TECINI112('DATASET WITH 1 ORDERED ZONE, '// &
'1 QUAD ZONE OVER 2 TIME STEPS'//NULCHAR, &
'X Y P'//NULCHAR, &
'field.plt'//NULCHAR, &
'.'//NULCHAR, &
FileType, &
Debug, &
VIsDouble)
!
! Open line.plt and write the header information.
!
VIsDouble = 1
I = TECINI112('DATASET WITH ONE I-ORDERED ZONE'//NULCHAR, &
'X Y'//NULCHAR, &
'line.plt'//NULCHAR, &
'.'//NULCHAR, &
FileType, &
Debug, &
VIsDouble)
!
! Calculate values for the field variables.
!
Do 10 J = 1,5
Do 10 I = 1,4
X(I,J) = I
Y(I,J) = J
P(I,J) = I*J
10 Continue
!
! Make sure writing to file #1.
!
III = 1
I = TECFIL112(III)
!
! Write the zone header information for the ordered zone.
!
IMax = 4
JMax = 5
KMax = 1
SolTime = 10.0
StrandID = 1
ParentZn = 0
I = TECZNE112('Ordered Zone 1'//NULCHAR, &
0, & ! ZONETYPE
IMax, &
JMax, &
KMax, &
0, &
0, &
0, &
SolTime, &
StrandID, &
ParentZn, &
1, & ! ISBLOCK
0, & ! NumFaceConnections
0, & ! FaceNeighborMode
0, & ! TotalNumFaceNodes
0, & ! NumConnectedBoundaryFaces
0, & ! TotalNumBoundaryConnections
Null, & ! PassiveVarList
Null, & ! ValueLocation
Null, & ! ShareVarFromZone
0) ! ShareConnectivityFromZone)
!
! Write out the field data for the ordered zone.
!
III = IMax*JMax
I = TECDAT112(III,X,DIsDouble)
I = TECDAT112(III,Y,DIsDouble)
I = TECDAT112(III,P,DIsDouble)
!
! Calculate values for the I-ordered zone.
!
Do 20 I = 1,50
XL(I) = I
YL(I) = sin(I/20.0)
20 Continue
!
! Switch to the 'line.plt' file (file number 2)
! and write out the line plot data.
!
III = 2
I = TECFIL112(III)
!
! Write the zone header information for the XY-data.
!
IMax = 50
JMax = 1
KMax = 1
SolTime = 0.0
StrandID = 0
I = TECZNE112('XY Line plot'//NULCHAR, &
0, &
IMax, &
JMax, &
KMax, &
0, &
0, &
0, &
SolTime, &
StrandID, &
ParentZn, &
1, &
0, &
0, &
0, &
0, &
0, &
Null, &
Null, &
Null, &
0)
!
! Write out the line plot.
!
DIsDouble = 1
III = IMax
I = TECDAT112(III,XLDummy,DIsDouble)
I = TECDAT112(III,YLDummy,DIsDouble)
!
! Switch back to the field plot file and write out
! the finite-element zone.
!
III = 1
I = TECFIL112(III)
!
! Move the coordinates so this zone's not on top of the other
!
Do 30 J = 1,5
Do 30 I = 1,4
X(I,J) = I+5
Y(I,J) = J
P(I,J) = I*J
30 Continue
!
! Write the zone header information for the finite-element zone.
!
NPts = 20
NElm = 12
KMax = 1
SolTime = 10.0
StrandID = 2
I = TECZNE112('Finite Zone 1'//NULCHAR, &
3, & ! FEQUADRILATERAL
NPts, &
NElm, &
KMax, &
0, &
0, &
0, &
SolTime, &
StrandID, &
ParentZn, &
1, &
0, &
0, &
0, &
0, &
0, &
Null, &
Null, &
Null, &
0)
!
! Write out the field data for the finite-element zone.
!
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,X,DIsDouble)
I = TECDAT112(III,Y,DIsDouble)
I = TECDAT112(III,P,DIsDouble)
!
! Calculate and then write out the connectivity list.
! Note: The NM array references cells starting with
! offset of 1.
!
Do 40 I = 1,IMax-1
Do 40 J = 1,JMax-1
K = I+(J-1)*(IMax-1)
L = I+(J-1)*IMax
NM(1,K) = L
NM(2,K) = L+1
NM(3,K) = L+IMax+1
NM(4,K) = L+IMax
40 Continue
I = TECNOD112(NM)
!
! Calculate vlues for the new solution variable.
!
Do 50 J = 1,5
Do 50 I = 1,4
P(I,J) = 2*I*J
50 Continue
!
! Write the zone header information for time step 2
!
IMax = 4
JMax = 5
KMax = 1
SolTime = 20.0
StrandID = 1
SharingZone(1) = 1
SharingZone(2) = 1
SharingZone(3) = 0
I = TECZNE112('Ordered Zone 2'//NULCHAR, &
0, & ! ORDERED
IMax, &
JMax, &
KMax, &
0, &
0, &
0, &
SolTime, &
StrandID, &
ParentZn, &
1, &
0, &
0, &
0, &
0, &
0, &
Null, &
Null, &
SharingZone, &
0)
!
! Write out the solution variable the grid variables are shared.
!
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,P,DIsDouble)
!
! Calculate values for the new solution variable.
!
Do 60 J = 1,5
Do 60 I = 1,4
P(I,J) = 3*I*J
60 Continue
!
! Write another time step for the FEZone and share from the first
!
SolTime = 20.0
StrandID = 2
KMax = 0
SharingZone(1) = 2
SharingZone(2) = 2
SharingZone(3) = 0
I = TECZNE112('Finite Zone 2'//NULCHAR, &
3, & ! FEQUADRILATERAL
NPts, &
NElm, &
KMax, &
0, &
0, &
0, &
SolTime, &
StrandID, &
ParentZn, &
1, &
0, &
0, &
0, &
0, &
0, &
Null, &
Null, &
SharingZone, &
2)
!
! Write out the solution variable the grid variables are shared.
!
IMax = 4
JMax = 5
III = IMax*JMax
DIsDouble = 0
I = TECDAT112(III,P,DIsDouble)
!
! Prepare to write out text record. Text is positioned
! at 50, 50 in frame units and has a height 5 frame units.
!
XP = 50
YP = 50
FH = 5
Scope = 1
Clipping = 0
PositionCoordSys = 1
FontType = 1
HeightUnits = 1
AttachToZone = 0
Zone = 0
BoxType = 0
BoxMargin = 5.0
BoxLineThickness = 0.5
BoxColor = 3
BoxFillColor = 7
TextAngle = 0.0
Anchor = 0
LineSpacing = 1.5
TextColor = 0
III = TECTXT112(XP, &
YP, &
0.0d0, &
PositionCoordSys, &
AttachToZone, &
Zone, &
FontType, &
HeightUnits, &
FH, &
BoxType, &
BoxMargin, &
BoxLineThickness, &
BoxColor, &
BoxFillColor, &
TextAngle, &
Anchor, &
LineSpacing, &
TextColor, &
Scope, &
Clipping, &
'Hi Mom'//NULCHAR, &
NULCHAR)
!
! Prepare to write out geometry record (circle). Circle is
! positioned at 25, 25 in frame units and has a radius of 30.
! Circle is drawn using a dashed line pattern.
!
XP = 25
YP = 25
ZP = 0.0
IsFilled = 0
Color = 0
FillColor = 7
GeomType = 2
LinePattern = 1
LineThickness = 0.3
PatternLength = 1
NumEllipsePts = 72
ArrowheadStyle = 0
ArrowheadAttachment = 0
ArrowheadSize = 0.0
ArrowheadAngle = 15.0
NumSegments = 1
NumSegPts(1) = 1
XGeomData(1) = 30
YGeomData(1) = 0.0
ZGeomData(1) = 0.0
III = TECGEO112(XP, &
YP, &
ZP, &
PositionCoordSys, &
AttachToZone, &
Zone, &
Color, &
FillColor, &
IsFilled, &
GeomType, &
LinePattern, &
PatternLength, &
LineThickness, &
NumEllipsePts, &
ArrowheadStyle, &
ArrowheadAttachment, &
ArrowheadSize, &
ArrowheadAngle, &
Scope, &
Clipping, &
NumSegments, &
NumSegPts, &
XGeomData, &
YGeomData, &
ZGeomData, &
NULCHAR)
!
! Close out file 1.
!
I = TECEND112()
!
! Close out file 2.
!
III = 2
I = TECFIL112(III)
I = TECEND112()
STOP
END

View File

@ -1,346 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="comtestc"
ProjectGUID="{723FBFD1-5AF2-4154-B77A-CE3849EAFCA2}"
RootNamespace="comtestc"
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=".\comtest.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,26 +0,0 @@
<?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="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="VFPostBuildEventTool"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFLinkerTool" OutputFile="$(OUTDIR)/comtestf.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(TEC_360_2009)/Bin" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/comtestf.pdb" SubSystem="subSystemConsole" AdditionalDependencies="tecio.lib"/>
<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)/$(InputName).res"/>
<Tool Name="VFPreLinkEventTool"/></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)" MustRebuild="true">
<Tool Name="VFMidlTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFFortranCompilerTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" AdditionalIncludeDirectories="$(TEC_360_2009)/Include" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreaded" CompileOnly="true"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFLinkerTool" SwitchesHaveChanged="true" MustRebuild="true" OutputFile="$(OUTDIR)/comtestf.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(TEC_360_2009)/Bin" SubSystem="subSystemConsole" AdditionalDependencies="tecio.lib"/>
<Tool Name="VFResourceCompilerTool" SwitchesHaveChanged="true" ResourceOutputFileName="$(IntDir)/$(InputName).res"/>
<Tool Name="VFPreLinkEventTool"/></Configuration></Configurations>
<Files>
<File RelativePath="comtest.f90"/></Files>
<Globals/></VisualStudioProject>

View File

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

View File

@ -1,354 +0,0 @@
/* This example illustrates how to create two simple
* FE-quadilateral zones and create a face neighbor
* connection between the two zones. In order to keep the
* example as simple as possible, error checking is not included.
*/
#include "TECIO.h"
#include "MASTER.h"
int main()
{
/* Initialize the Data File using TECINI. TECINI is required
* for all data files. It is used to: open the data file and
* initialize the file header information (name the data file,
* the variables for the data file, and the file type).
*/
/* DOCSTART:faceneighbors_tecini.txt*/
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 I = 0; /* Used to track return codes */
I = TECINI112((char*)"Face Neighbors Example", /* Specifies the name
* of the entire
* dataset
*/
(char*)"X Y P", /* Defines the
* variables for the
* data file. Each
* zone must contain
* each of the vars
* listed. The order
* of the variables in
* the list is used to
* define the variable
* number (e.g. X is
* Var 1.)
*/
(char*)"FaceNeighbors.plt", /* Specifies the
* file name.
*/
(char*)".",
&FileType, /* The FileType is set to
* zero, indicating it is
* a full file (containing
* both grid and solution
* data).
*/
&Debug,
&VIsDouble);
/* DOCEND */
/* After TECINI is called, call TECZNE to create one or
* more zones for your data file.
*/
/* DOCSTART:faceneighbors_teczne1.txt*/
INTEGER4 ZoneType = 3; /* set the zone type to
* FEQuadrilateral
*/
INTEGER4 NumPts = 6;
INTEGER4 NumElems = 2;
INTEGER4 NumFaces = 8;
INTEGER4 ICellMax = 0; /* not used */
INTEGER4 JCellMax = 0; /* not used */
INTEGER4 KCellMax = 0; /* not used */
double SolTime = 360.0;
INTEGER4 StrandID = 0; /* StaticZone */
INTEGER4 ParentZn = 0;
INTEGER4 IsBlock = 1; /* Block */
INTEGER4 NFConns = 1; /* Specify the number of Face
* Neighbor Connections in the
* Zone. When this value is
* greater than zero, TECFACE must
* be called prior to creating the
* next zone or ending the file.
*/
/* Specify the Face Neighbor Mode.
* A value of 2 indicated that the face neighbor mode is global
* one-to-one. The scope of the face neighbors (local or
* global) is with respect to the zones. A value of global
* indicates that the face neighbor(s) is/are shared aross zones;
* a value of local indicates that the face neighbor(s) are
* shared within the current zone. The terms one-to-one and
* one-to-many are used to indicate whether the face in question
* is shared with one cell or several cells.
* For example, if your data is arranged as follows:
-----------------------
| | | |
| 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;
INTEGER4 TotalNumFaceNodes = 1; /* Not used for
* FEQuad zones*/
INTEGER4 NumConnectedBoundaryFaces = 1; /* Not used for
* FEQuad zones*/
INTEGER4 TotalNumBoundaryConnections = 1; /* Not used for
* FEQuad zones*/
INTEGER4 ShrConn = 0;
INTEGER4 ValueLocation[3] = {1, 1, 1}; /* Specify the variable
* values at the nodes.
* NOTE: Because all of
* the variables are
* defined at the nodes,
* we can just pass
* NULL for this array.
* We are providing the
* array for illustration
* purposes.
*/
I = TECZNE112((char*)"Zone 1",
&ZoneType,
&NumPts,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&NumConnectedBoundaryFaces,
&TotalNumBoundaryConnections,
NULL,
ValueLocation,
NULL,
&ShrConn);
/* DOCEND */
/* Set up the variable values. The variable values will be
* written to the file using TECDAT. Because we are specifying
* nodal variables (as specified via the ValueLocation
* parameter in TECZNE, each variable is dimensioned by the
* number of points (NumPts) in the Zone. You have the option
* to specify some variables with nodal values and some with
* cell-centered values. Refer to the Binary Function
* Reference for details.
*/
/* DOCSTART:faceneighbors_tecdat1.txt*/
float *X = new float[NumPts];
float *Y = new float[NumPts];
float *P = new float[NumPts];
/* For this example, we will create 2 rectangular cells in Zone
* 1. 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 = 0 and Y = 0. As such, the first value supplied for X
* (i.e. X[0]) is 0. 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.
*/
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;
for (INTEGER4 ii = 0; ii < NumPts; ii++)
P[ii] = (float)(NumPts - ii);
INTEGER4 DIsDouble = 0; /* Set DIsDouble to zero to use
* variables in float format.
*/
/* Call TECDAT once for each variable */
I = TECDAT112(&NumPts, &X[0], &DIsDouble);
I = TECDAT112(&NumPts, &Y[0], &DIsDouble);
I = TECDAT112(&NumPts, &P[0], &DIsDouble);
/* DOCEND */
/* Define the face neighbors connections.
* The Connectivity List is used to specify the nodes that
* compose each element. When working with nodal variables, the
* numbering of the nodes is implicitly defined when the
* variables are declared. The first value of each variable is
* for node one, the second value for node two, and so on.
*
* Because this zone contains two quadilateral elements, we must
* supply 8 values in the connectivity list. The first four
* values define the nodes that form element 1. Similarly, the
* second four values define the nodes that form element 2.
*/
/* DOCSTART:faceneighbors_tecnod1.txt*/
INTEGER4 ConnList[8] = {1, 3, 4, 2,
3, 5, 6, 4
};
I = TECNOD112(ConnList);
/* DOCEND */
/* TIP! It is important to provide the node list in either a
* clockwise or counter-clockwise order. Otherwise, your
* elements will be misformed. For example, if the first two
* numbers in the above connectivity list, the zone would
* appear as follows:
*/
/* Now that TECNOD has been called, the creation of Zone 1
* is complete. However, in this example, we will define a
* face neighbor between Zone 1 and Zone 2 (to be created
* later in the example). Face Neighbor connections are used
* to define connections that are not created via the
* connectivity list. For example, local face neighbors may
* need to be defined when a zone wraps itself and global face
* neighbors may need to be defined to smooth edges across
* zones. Face Neighbors are used when deriving variables and
* drawing contours.
*
* In this example, we are creating a face neighbor connection
* between cell 2 in Zone 1 and cell 1 in Zone 2. The
* information required when specifying face neighbors
* depends upon the type of connection.
*
* In this case, we must supply (in this order):
* - the cell number in the current zone that contains the
* - the number of the face in that cell that contains the
* face neighbor
* - the number of the other zone to which the face is
* connected
* - the number of the cell in the other zone to which the
* face is connected
* The face numbering for cell-based finite elements is
* defined using the picture displayed in the Data Format
* Guide. In this example, face 2 in cell 2 in the current
* zone is connected to cell 1 in zone 2.
*/
/* DOCSTART:faceneighbors_tecface1.txt*/
INTEGER4 FaceConn[4] = {2, 2, 2, 1};
I = TECFACE112(FaceConn);
/* DOCEND */
/* The creation of Zone 1 is complete. We are ready to create
* Zone 2. For simplicity, Zone 2 is a copy of Zone 1 shifted
* along the X-axis. As such, many of the variables used to
* create Zone 1 are re-used here.
*/
/* DOCSTART:faceneighbors_teczne2.txt*/
/* Call TECZNE to create Zone 2 */
I = TECZNE112((char*)"Zone 2",
&ZoneType,
&NumPts,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&NumConnectedBoundaryFaces,
&TotalNumBoundaryConnections,
NULL,
ValueLocation,
NULL,
&ShrConn);
/* DOCEND */
/* Define the variables for Zone 2. Because Zone 2 is a copy
* of Zone 1, shifted along the X-axis, we can share the Y
* variable definition used to Zone. We will also create a
* second pressure variable for Zone 2 (P2).
*/
/* DOCSTART:faceneighbors_tecdat2.txt*/
float *X2 = new float[NumPts];
float *P2 = new float[NumPts];
for (INTEGER4 ii = 0; ii < NumPts; ii++)
{
X2[ii] = X[ii] + 2;
P2[ii] = 2 * (float)ii;
}
I = TECDAT112(&NumPts, &X2[0], &DIsDouble);
I = TECDAT112(&NumPts, &Y[0], &DIsDouble);
I = TECDAT112(&NumPts, &P2[0], &DIsDouble);
delete X;
delete Y;
delete P;
delete X2;
delete P2;
/* DOCEND */
/* As with Zone 1, we must define the connectivity list for
* Zone 2. Because, the node numbering restarts at one for each
* new zone and the nodal arrangement is identical between the
* two zones, we may reuse the connectivity list from Zone 1.
*/
/* DOCSTART:faceneighbors_tecnod2.txt*/
I = TECNOD112(ConnList);
/* DOCEND */
/* We will now specify the face neighbor connection with
* respect to our new current zone of Zone 2.
*/
/* DOCSTART:faceneighbors_tecface2.txt*/
INTEGER4 FaceConn2[4] = {1, 4, 1, 2}; /* cell 1, face 4 in
* current zone is a
* neighbor to cell 2 in
* zone 1.
*/
I = TECFACE112(FaceConn2);
/* DOCEND */
/* Call TECEND to close the file */
/* DOCSTART:faceneighbors_tecend.txt*/
I = TECEND112();
/* DOCEND */
return 0;
}

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="faceneighbors"
ProjectGUID="{1074FD63-4831-4D1B-8A27-94A3AC33A509}"
RootNamespace="faceneighbors"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\faceneighbors.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,376 +0,0 @@
/* This example illustrates using separate grid
* and solution files.
*/
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
int main()
{
/* DOCSTART:gridsolution_grid_tecini.txt*/
INTEGER4 I; /* use to check return values */
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 1; /* 1 = grid file. */
I = TECINI112((char*)"Example: Separate grid and solution files",
(char*)"X Y Z", /* 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 the
* variable by its number.
*/
(char*)"grid.plt",
(char*)".", /* scratch directory */
&FileType,
&Debug,
&VIsDouble);
/* DOCEND */
/* DOCSTART:gridsolution_grid_teczne.txt*/
/* TECZNE Parameters */
INTEGER4 ZoneType = 7; /* FE Polyhedron */
INTEGER4 NumPts = 20; /* the number of unique
* nodes in the zone.
*/
INTEGER4 NumElems = 1;
INTEGER4 NumFaces = 12; /* the number of unique
* faces in the zone.
*/
INTEGER4 ICellMax = 0; /* not used */
INTEGER4 JCellMax = 0; /* not used */
INTEGER4 KCellMax = 0; /* not used */
double SolutionTime = 0.0;
INTEGER4 StrandID = 1; /* time strand for
* unsteady solution.
*/
INTEGER4 ParentZone = 0;
INTEGER4 IsBlock = 1;
INTEGER4 NumFaceConnections = 0;
INTEGER4 FaceNeighborMode = 1;
INTEGER4 SharConn = 0;
/* For this zone, the total number of face nodes is
* five times number of faces, because each face
* is a pentagon.
*/
INTEGER4 TotalNumFaceNodes = 5 * NumFaces;
/* This zone has no connected boundary faces.
*/
INTEGER4 TotalNumBndryFaces = 0;
INTEGER4 TotalNumBndryConns = 0;
I = TECZNE112((char*)"Dodecahedron", /* Name of the zone. */
&ZoneType,
&NumPts,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConns,
NULL,
NULL, /* All nodal variables */
NULL,
&SharConn);
/* DOCEND */
/* DOCSTART:gridsolution_grid_tecdat.txt*/
/* TECDAT Parameters */
double Phi = 0.5 * (1.0 + sqrt(5.0));
double Pi = 3.141592653578;
double *X = new double[NumPts];
double *Y = new double[NumPts];
double *Z = new double[NumPts];
int Count = 0;
for(int J = 0; J <= 4; J++)
{
X[Count] = 2.0 * cos(2.0 / 5.0 * Pi * J);
Y[Count] = 2.0 * sin(2.0 / 5.0 * Pi * J);
Z[Count] = Phi + 1.0;
Count++;
X[Count] = -X[Count - 1];
Y[Count] = -Y[Count - 1];
Z[Count] = -Z[Count - 1];
Count++;
X[Count] = 2.0 * Phi * cos(2.0 / 5.0 * Pi * J);
Y[Count] = 2.0 * Phi * sin(2.0 / 5.0 * Pi * J);
Z[Count] = Phi - 1.0;
Count++;
X[Count] = -X[Count - 1];
Y[Count] = -Y[Count - 1];
Z[Count] = -Z[Count - 1];
Count++;
}
INTEGER4 IsDouble = 1;
I = TECDAT112(&NumPts, X, &IsDouble);
I = TECDAT112(&NumPts, Y, &IsDouble);
I = TECDAT112(&NumPts, Z, &IsDouble);
delete X;
delete Y;
delete Z;
/* DOCEND */
/* DOCSTART:gridsolution_grid_facenodes.txt*/
/* TecPoly Parameters */
/* Create a FaceNodes array, dimensioned by the total number
* of face nodes in the zone.
*/
INTEGER4 *FaceNodes = new INTEGER4[TotalNumFaceNodes];
int n = 0;
/* Face Nodes for face 1 of the dodecahedron */
FaceNodes[n++] = 2;
FaceNodes[n++] = 6;
FaceNodes[n++] = 10;
FaceNodes[n++] = 14;
FaceNodes[n++] = 18;
/* Face Nodes for face 2 */
FaceNodes[n++] = 6;
FaceNodes[n++] = 8;
FaceNodes[n++] = 19;
FaceNodes[n++] = 12;
FaceNodes[n++] = 10;
/* Face Nodes for face 3 */
FaceNodes[n++] = 3;
FaceNodes[n++] = 12;
FaceNodes[n++] = 10;
FaceNodes[n++] = 14;
FaceNodes[n++] = 16;
/* Face Nodes for face 4 */
FaceNodes[n++] = 7;
FaceNodes[n++] = 16;
FaceNodes[n++] = 14;
FaceNodes[n++] = 18;
FaceNodes[n++] = 20;
/* Face Nodes for face 5 */
FaceNodes[n++] = 2;
FaceNodes[n++] = 4;
FaceNodes[n++] = 11;
FaceNodes[n++] = 20;
FaceNodes[n++] = 18;
/* Face Nodes for face 6 */
FaceNodes[n++] = 2;
FaceNodes[n++] = 4;
FaceNodes[n++] = 15;
FaceNodes[n++] = 8;
FaceNodes[n++] = 6;
/* Face Nodes for face 7 */
FaceNodes[n++] = 1;
FaceNodes[n++] = 3;
FaceNodes[n++] = 12;
FaceNodes[n++] = 19;
FaceNodes[n++] = 17;
/* Face Nodes for face 8 */
FaceNodes[n++] = 1;
FaceNodes[n++] = 3;
FaceNodes[n++] = 16;
FaceNodes[n++] = 7;
FaceNodes[n++] = 5;
/* Face Nodes for face 9 */
FaceNodes[n++] = 5;
FaceNodes[n++] = 7;
FaceNodes[n++] = 20;
FaceNodes[n++] = 11;
FaceNodes[n++] = 9;
/* Face Nodes for face 10 */
FaceNodes[n++] = 4;
FaceNodes[n++] = 11;
FaceNodes[n++] = 9;
FaceNodes[n++] = 13;
FaceNodes[n++] = 15;
/* Face Nodes for face 11 */
FaceNodes[n++] = 8;
FaceNodes[n++] = 15;
FaceNodes[n++] = 13;
FaceNodes[n++] = 17;
FaceNodes[n++] = 19;
/* Face Nodes for face 12 */
FaceNodes[n++] = 1;
FaceNodes[n++] = 5;
FaceNodes[n++] = 9;
FaceNodes[n++] = 13;
FaceNodes[n++] = 17;
/* DOCEND */
/* Specify the number of nodes for each face, and the right and
* left neighboring elements. The neighboring elements can be
* determined using the right-hand rule. For each face, curl
* the fingers of your right hand in the direction of
* incrementing node numbers (i.e. from Node 1 to Node 2 and
* so on). Your thumb will point toward the right element.
* A value of zero indicates that there is no
* neighboring element on that side. A negative value
* indicates that the neighboring element is in another zone.
* In that case, the number is a pointer into the
* FaceBndryConnectionElems and FaceBndryConnectionZones arrays.
*/
/* DOCSTART:gridsolution_grid_tecpoly.txt*/
INTEGER4 *FaceNodeCounts = new INTEGER4[NumFaces];
INTEGER4 *FaceLeftElems = new INTEGER4[NumFaces];
INTEGER4 *FaceRightElems = new INTEGER4[NumFaces];
/* For this particular zone, each face has the 5 nodes. */
for(int J = 0; J < NumFaces; J++)
FaceNodeCounts[J] = 5;
/* Set the right and left elements for each face. */
FaceRightElems[0] = 1;
FaceRightElems[1] = 1;
FaceRightElems[2] = 0;
FaceRightElems[3] = 0;
FaceRightElems[4] = 0;
FaceRightElems[5] = 1;
FaceRightElems[6] = 1;
FaceRightElems[7] = 0;
FaceRightElems[8] = 0;
FaceRightElems[9] = 1;
FaceRightElems[10] = 1;
FaceRightElems[11] = 0;
FaceLeftElems[0] = 0;
FaceLeftElems[1] = 0;
FaceLeftElems[2] = 1;
FaceLeftElems[3] = 1;
FaceLeftElems[4] = 1;
FaceLeftElems[5] = 0;
FaceLeftElems[6] = 0;
FaceLeftElems[7] = 1;
FaceLeftElems[8] = 1;
FaceLeftElems[9] = 0;
FaceLeftElems[10] = 0;
FaceLeftElems[11] = 1;
I = TECPOLY112(FaceNodeCounts,
FaceNodes,
FaceLeftElems,
FaceRightElems,
NULL, /* No boundary connections. */
NULL,
NULL);
delete FaceNodes;
delete FaceLeftElems;
delete FaceRightElems;
/* DOCEND */
/* DOCSTART:gridsolution_grid_tecend.txt*/
I = TECEND112();
/* DOCEND */
/* DOCSTART:gridsolution_solution_tecini.txt*/
for(int J = 0; J < 5; J++)
{
char SolutionFileName[128];
sprintf(SolutionFileName, "solution%d.plt", J);
/* DOCSTART:gridsolution_solution_tecini.txt*/
FileType = 2; /* 1 = solution file. */
I = TECINI112((char*)"Example: Separate grid and solution files",
(char*)"P T", /* Defines the variables for the solution file.
* Note that these are different variables from
* the grid file.
*/
SolutionFileName,
(char*)".", /* scratch directory */
&FileType,
&Debug,
&VIsDouble);
/* DOCEND */
/* DOCSTART:gridsolution_solution_teczne.txt*/
/* TECZNE Parameters are mostly unchanged from creation of the grid file. */
TotalNumFaceNodes = 0;
SolutionTime = J;
char ZoneName[128];
sprintf(ZoneName, "Dodecahedron Time=%g", SolutionTime);
I = TECZNE112(ZoneName,
&ZoneType,
&NumPts,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConns,
NULL,
NULL, /* All nodal variables */
NULL,
&SharConn);
/* DOCEND */
/* DOCSTART:gridsolution_solution_tecdat.txt*/
/* TECDAT Parameters */
double *P = new double[NumPts];
double *T = new double[NumPts];
for(int K = 0; K < NumPts; K++)
{
P[K] = (double)(K + J);
T[K] = 1.0 + K + K;
}
I = TECDAT112(&NumPts, P, &IsDouble);
I = TECDAT112(&NumPts, T, &IsDouble);
delete P;
delete T;
/* DOCEND */
/* DOCSTART:gridsolution_solution_tecend.txt*/
I = TECEND112();
/* DOCEND */
}
return 0;
}

View File

@ -1,321 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="gridsolution"
ProjectGUID="{D2747EA6-7807-42E1-984D-C946B3D97D95}"
RootNamespace="mulitplepolygons"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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=".\gridsolution.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,149 +0,0 @@
/* This example creates a simple set of IJ-ordered zones */
/* DOCSTART:ij_ordered.txt*/
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
int main()
{
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 I = 0; /* Used to track return codes */
/*
* Open the file and write the tecplot datafile
* header information
*/
I = TECINI112((char*)"IJ Ordered Zones", /* Name of the entire
* dataset.
*/
(char*)"X Y P", /* Defines the variables for the data
* file. Each zone must contain each of
* the variables listed here. The order
* of the variables in the list is used
* to define the variable number (e.g.
* X is Var 1).
*/
(char*)"ij_ordered.plt",
(char*)".", /* Scratch Directory */
&FileType,
&Debug,
&VIsDouble);
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 ParentZn = 0;
INTEGER4 IsBlock = 1; /* Block */
INTEGER4 NFConns = 0;
INTEGER4 FNMode = 0;
INTEGER4 TotalNumFaceNodes = 1;
INTEGER4 TotalNumBndryFaces = 1;
INTEGER4 TotalNumBndryConnections = 1;
INTEGER4 ShrConn = 0;
/*Ordered Zone Parameters*/
INTEGER4 IMax = 2;
INTEGER4 JMax = 2;
INTEGER4 KMax = 1;
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;
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 = TECZNE112((char*)"Ordered Zone",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConnections,
NULL,
NULL,
NULL,
&ShrConn);
INTEGER4 III = IMax * JMax * KMax;
I = TECDAT112(&III, X1, &DIsDouble);
I = TECDAT112(&III, Y1, &DIsDouble);
I = TECDAT112(&III, P1, &DIsDouble);
I = TECZNE112((char*)"Ordered Zone2",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConnections,
NULL,
NULL,
NULL,
&ShrConn);
I = TECDAT112(&III, X2, &DIsDouble);
I = TECDAT112(&III, Y2, &DIsDouble);
I = TECDAT112(&III, P2, &DIsDouble);
I = TECEND112();
return 0;
}
/* DOCEND */

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ij_ordered"
ProjectGUID="{47556A00-C441-4B9A-8920-91CA63AC1595}"
RootNamespace="ij_ordered"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\ij_ordered.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,214 +0,0 @@
/* This example illustrates working with TecFil to create multiple
* plt files simultaneously.
*/
#if defined _MSC_VER
#pragma warning (disable: 4996) /* Windows strcpy warning off */
#endif
/* DOCSTART:mulitplefiles.txt */
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
#include <string.h>
int main()
{
/*
* Open the file and write the tecplot datafile
* header information
*/
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 I = 0; /* Used to check the return value */
I = TECINI112((char*)"SIMPLE DATASET", /* Name of the entire dataset.*/
(char*)"X1 Y1 P1", /* Defines the variables for the data
* file. Each zone must contain each of
* the variables listed here. The order
* of the variables in the list is used
* to define the variable number (e.g.
* X1 is Var 1).
*/
(char*)"file1.plt",
(char*)".", /* Scratch Directory */
&FileType,
&Debug,
&VIsDouble);
/* Set the parameters for TecZne */
INTEGER4 ZoneType = 0; /* sets the zone type to
* ordered
*/
INTEGER4 IMax = 2; /* Create an IJ-ordered zone,
* by using IMax and JMax
* values that are greater
* than one, and setting KMax
* to one.
*/
INTEGER4 JMax = 2;
INTEGER4 KMax = 1;
double SolTime = 0;
INTEGER4 StrandID = 0; /* StaticZone */
INTEGER4 ParentZn = 0; /* used for surface streams */
INTEGER4 ICellMax = 0; /* not used */
INTEGER4 JCellMax = 0; /* not used */
INTEGER4 KCellMax = 0; /* not used */
INTEGER4 IsBlock = 1; /* Block */
INTEGER4 NFConns = 0; /* this example does not use
* face neighbors */
INTEGER4 FNMode = 0;
INTEGER4 TotalNumFaceNodes = 1;
INTEGER4 TotalNumBndryFaces = 1;
INTEGER4 TotalNumBndryConn = 1;
INTEGER4 ShrConn = 0;
/* Create an Ordered Zone */
I = TECZNE112((char*)"Ordered Zone",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&TotalNumFaceNodes,
&TotalNumBndryFaces,
&TotalNumBndryConn,
NULL,
NULL,
NULL,
&ShrConn);
/* Set the variable values for the ordered zone. */
float X1[4];
float Y1[4];
float P1[4];
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;
P1[3] = 7.5;
INTEGER4 DIsDouble = 0; /* set DIsDouble to 0, for float
* values.
*/
INTEGER4 III = IMax * JMax * KMax;
I = TECDAT112(&III, X1, &DIsDouble);
I = TECDAT112(&III, Y1, &DIsDouble);
I = TECDAT112(&III, P1, &DIsDouble);
/* Open a new data file. note: the first file is still open
* because TecEnd was not called.
*/
I = TECINI112((char*)"Auxiliary Data",
(char*)"X1 Y1 P1",
(char*)"file2.plt",
(char*)".",
&FileType,
&Debug,
&VIsDouble);
/* Switch the active file to the newly created data file
* (file2.plt) which is the second file opened with TECINI112
* so we use 2.
*/
INTEGER4 WhichFile = 2;
I = TECFIL112(&WhichFile);
/* Create a second zone, using many of the values from the first
* zone, and write it to the second data file.
*/
I = TECZNE112((char*)"Ordered Zone2",
&ZoneType,
&IMax,
&JMax,
&KMax,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&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;
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;
III = IMax * JMax * KMax;
I = TECDAT112(&III, X2, &DIsDouble);
I = TECDAT112(&III, Y2, &DIsDouble);
I = TECDAT112(&III, P2, &DIsDouble);
/* Switch to the first file. */
WhichFile = 1;
I = TECFIL112(&WhichFile);
/* Create an auxiliary data value and write it to the file */
char DeformationValue[128];
strcpy(DeformationValue, "0.98");
I = TECAUXSTR112((char*)"DeformationValue",
DeformationValue);
/* Close the first file */
I = TECEND112();
/* The remaining file will become the active file. As such,
* TecFil does not need to be called again to close the second
* file.
*/
I = TECEND112();
return 0;
}
/* DOCEND */

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="multiplefiles"
ProjectGUID="{93CB23B2-530F-4D6F-900F-893815299C7F}"
RootNamespace="multiplefiles"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\multiplefiles.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,569 +0,0 @@
/* This example illustrates using TecPoly to create two polygonal
* zones. The first zone contains six hexagons, and the second
* zone contains a hexagon and an octagon. Refer to the Data
* Format Guide for a picture of the configuration, including node
* and face numbers.
*/
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
int main()
{
/* DOCSTART:hexagons_tecini.txt*/
INTEGER4 I; /* use to check return values */
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
I = TECINI112((char*)"Example: Multiple polygonal zones",
(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 the
* variable by its number.
*/
(char*)"HexagonsAndOctagon.plt",
(char*)".", /* scratch directory */
&FileType,
&Debug,
&VIsDouble);
/* DOCEND */
/* DOCSTART:hexagons_zone1_teczne.txt*/
/* TECZNE Parameters */
INTEGER4 ZoneType = 6; /* FE Polygon */
INTEGER4 NumPts_Z1 = 13; /* the number of unique
* nodes in the zone.
*/
INTEGER4 NumElems_Z1 = 3;
INTEGER4 NumFaces_Z1 = 15; /* the number of unique
* faces in the zone.
*/
INTEGER4 ICellMax = 0; /* not used */
INTEGER4 JCellMax = 0; /* not used */
INTEGER4 KCellMax = 0; /* not used */
double SolutionTime = 0.0;
INTEGER4 StrandID = 0;
INTEGER4 ParentZone = 0;
INTEGER4 IsBlock = 1;
INTEGER4 NumFaceConnections = 0;
INTEGER4 FaceNeighborMode = 1;
INTEGER4 SharConn = 0;
INTEGER4 ValueLocation[3] = { 1, 1, 0 };
/* For a polygonal zone, the total number of face nodes is
* twice the total number of faces. This is because each face
* is composed of exactly two nodes.
*/
INTEGER4 TotalNumFaceNodes_Z1 = 2 * NumFaces_Z1;
/* A boundary face is a face that is neighbored by an element
* or elements in another zone or zone(s). In Zone 1, Face 9,
* Face 10 and Face 12 have a neighbor in Zone 2. Therefore,
* the total number of boundary faces is <20>3<EFBFBD>.
*/
INTEGER4 TotalNumBndryFaces_Z1 = 3;
/* Each boundary face has one or more boundary connections. A
* boundary connection is defined as another element in another
* zone. Face 9 has a boundary connection with Element 1 in
* Zone 2. In this example, each boundary face is connected to
* one other element, so the total number of boundary
* connections is equivalent to the total number of boundary
* faces (3).
*/
INTEGER4 TotalNumBndryConns_Z1 = 3;
I = TECZNE112((char*)"Zone 1: 3 Hexagons", /* Specifies the name of
* the entire dataset. When
* the file is loaded into
* Tecplot, the value is
* available via the Data
* Set Info dialog.
*/
&ZoneType,
&NumPts_Z1,
&NumElems_Z1,
&NumFaces_Z1,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections,
&FaceNeighborMode,
&TotalNumFaceNodes_Z1,
&TotalNumBndryFaces_Z1,
&TotalNumBndryConns_Z1,
NULL,
ValueLocation,
NULL,
&SharConn);
/* DOCEND */
/* DOCSTART:hexagons_zone1_tecdat.txt*/
/* 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;
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;
double *P_Z1 = new double[NumElems_Z1];
P_Z1[0] = 2;
P_Z1[1] = 4;
P_Z1[2] = 5;
INTEGER4 IsDouble = 1;
I = TECDAT112(&NumPts_Z1, X_Z1, &IsDouble);
I = TECDAT112(&NumPts_Z1, Y_Z1, &IsDouble);
I = TECDAT112(&NumElems_Z1, P_Z1, &IsDouble);
delete X_Z1;
delete Y_Z1;
delete P_Z1;
/* DOCEND */
/* DOCSTART:hexagons_zone1_facenodes.txt*/
/* TecPoly Parameters */
/* Create a FaceNodes array, dimensioned by the total number
* of face nodes in the zone.
*/
INTEGER4 *FaceNodes_Z1 = new INTEGER4[TotalNumFaceNodes_Z1];
/* Face Nodes for Element 1 */
FaceNodes_Z1[0] = 1;
FaceNodes_Z1[1] = 2;
FaceNodes_Z1[2] = 2;
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;
/* Face Nodes for Element 2 */
FaceNodes_Z1[12] = 3;
FaceNodes_Z1[13] = 7;
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;
/* Face Nodes for Element 3 */
FaceNodes_Z1[22] = 10;
FaceNodes_Z1[23] = 11;
FaceNodes_Z1[24] = 11;
FaceNodes_Z1[25] = 12;
FaceNodes_Z1[26] = 12;
FaceNodes_Z1[27] = 13;
FaceNodes_Z1[28] = 13;
FaceNodes_Z1[29] = 5;
/* DOCEND */
/* Specify the right and left neighboring elements.
* The neighboring elements can be determined using the
* right-hand rule. For each face, place your right-hand along
* the face with your fingers pointing the direction of
* incrementing node numbers (i.e. from Node 1 to Node 2). The
* right side of your hand will indicate the right element,
* and the left side of your hand will indicate the left
* element. A value of zero indicates that there is no
* neighboring element on that side. A negative value
* indicates that the neighboring element is in another zone.
* The number is a pointer into the FaceBndryConnectionElems
* and FaceBndryConnectionZones arrays.
*/
/* DOCSTART:hexagons_zone1_neighbors.txt*/
INTEGER4 *FaceLeftElems_Z1 = new INTEGER4[NumFaces_Z1];
INTEGER4 *FaceRightElems_Z1 = new INTEGER4[NumFaces_Z1];
/* Left Face Elems for Element 1 */
FaceLeftElems_Z1[0] = 0;
FaceLeftElems_Z1[1] = 0;
FaceLeftElems_Z1[2] = 2;
FaceLeftElems_Z1[3] = 3;
FaceLeftElems_Z1[4] = 0;
/* Left Face Elems for Element 2 */
FaceLeftElems_Z1[5] = 0;
FaceLeftElems_Z1[6] = 0;
FaceLeftElems_Z1[7] = 0;
FaceLeftElems_Z1[8] = -1;
FaceLeftElems_Z1[9] = -2;
FaceLeftElems_Z1[10] = 2;
/* Left Face Elems for Element 3 */
FaceLeftElems_Z1[11] = -3;
FaceLeftElems_Z1[12] = 0;
FaceLeftElems_Z1[13] = 0;
FaceLeftElems_Z1[14] = 0;
/* Set Right Face Elems. Because of the way we numbered the
* nodes and faces, the right element for every face is the
* element itself.
*/
for (INTEGER4 ii = 0; ii < 6; ii++)
FaceRightElems_Z1[ii] = 1;
for (INTEGER4 ii = 6; ii < 10; ii++)
FaceRightElems_Z1[ii] = 2;
for (INTEGER4 ii = 10; ii <= 14; ii++)
FaceRightElems_Z1[ii] = 3;
/* DOCEND */
/* DOCSTART:hexagons_zone1_tecpoly.txt */
/* The FaceBndryConnectionCounts array is used to define the
* number of boundary connections for each face that has a
* boundary connection. For example, if a zone has three
* boundary connections in total (NumConnectedBoundaryFaces),
* two of those boundary connections are in one face, and the
* remaining boundary connection is in a second face, the
* FaceBndryConnectionCounts array would be: [2 1].
*
* In this example, the total number of connected boundary
* faces (specified via TECZNE) is equal to three. Each
* boundary face is connected to only one other element,
* so the FaceBoundaryConnectionCounts array is (1, 1, 1).
*/
INTEGER4 FaceBndryConnectionCounts_Z1[3] = {1, 1, 1};
/* The value(s) in the FaceBndryConnectionElems and
* FaceBndryConnectionZones arrays specifies the element number
* and zone number, respectively, that a given boundary
* connection is connected to. In this case, the first
* boundary connection face is connected to Element 1 in Zone 2
* and the remaining connection is to Element 2 in Zone 2.
*/
INTEGER4 FaceBndryConnectionElems_Z1[3] = {1, 2, 2};
INTEGER4 FaceBndryConnectionZones_Z1[3] = {2, 2, 2};
I = TECPOLY112(NULL, /* Not used for polygon zones */
FaceNodes_Z1,
FaceLeftElems_Z1,
FaceRightElems_Z1,
FaceBndryConnectionCounts_Z1,
FaceBndryConnectionElems_Z1,
FaceBndryConnectionZones_Z1);
delete FaceNodes_Z1;
delete FaceLeftElems_Z1;
delete FaceRightElems_Z1;
/* DOCEND */
/* Define Zone 2. Zone 2 contains an octagon and a hexagon. */
/* TECZNE Parameters */
/* DOCSTART:hexagons_zone2_teczne.txt*/
INTEGER4 NumPts_Z2 = 12; /* number of unique
* nodes in the zone
*/
INTEGER4 NumElems_Z2 = 2;
INTEGER4 NumFaces_Z2 = 13; /* number of unique
* faces in the zone
*/
INTEGER4 NumFaceConnections_Z2 = 0;
/* In polygonal zones, each face has exactly two nodes */
INTEGER4 TotalNumFaceNodes_Z2 = NumFaces_Z2 * 2;
/* A boundary face is a face that is neighbored by an element or
* elements from another zone or zone(s). In Zone 2, Face 6,
* Face 7 and Face 13 have a neighbor in Zone 1. Therefore, the
* total number of boundary faces is <20>3<EFBFBD>.
*/
INTEGER4 TotalNumBndryFaces_Z2 = 3;
/* Each boundary face has one or more boundary connections. In
* this example, each boundary face is connected to one other
* element (i.e. the number of boundary faces and the number of
* boundary connections is one-to-one).
*/
INTEGER4 TotalNumBndryConns_Z2 = 3;
I = TECZNE112((char*)"Zone 2: 1 Hexagon and 1 Octagon",
&ZoneType,
&NumPts_Z2,
&NumElems_Z2,
&NumFaces_Z2,
&ICellMax,
&JCellMax,
&KCellMax,
&SolutionTime,
&StrandID,
&ParentZone,
&IsBlock,
&NumFaceConnections_Z2,
&FaceNeighborMode,
&TotalNumFaceNodes_Z2,
&TotalNumBndryFaces_Z2,
&TotalNumBndryConns_Z2,
NULL,
ValueLocation,
NULL,
&SharConn);
/* DOCEND */
/* TECDAT Parameters */
/* DOCSTART:hexagons_zone2_tecdat.txt*/
double *X_Z2 = new double[NumPts_Z2];
double *Y_Z2 = new double[NumPts_Z2];
X_Z2[0] = 5;
Y_Z2[0] = 4;
X_Z2[1] = 6;
Y_Z2[1] = 4;
X_Z2[2] = 7;
Y_Z2[2] = 3;
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;
/* In the call to TecZne, P was set to a cell centered variable.
* As such, only two values need to be defined.
*/
double *P_Z2 = new double[NumPts_Z2];
P_Z2[0] = 8;
P_Z2[1] = 6;
I = TECDAT112(&NumPts_Z2, X_Z2, &IsDouble);
I = TECDAT112(&NumPts_Z2, Y_Z2, &IsDouble);
I = TECDAT112(&NumElems_Z2, P_Z2, &IsDouble);
delete X_Z2;
delete Y_Z2;
delete P_Z2;
/* DOCEND */
/* TecPoly Parameters */
/* DOCSTART:hexagons_zone2_facemap.txt*/
INTEGER4 *FaceNodes_Z2;
FaceNodes_Z2 = new INTEGER4[TotalNumFaceNodes_Z2];
/* Face Nodes for Element 1 */
FaceNodes_Z2[0] = 1;
FaceNodes_Z2[1] = 2;
FaceNodes_Z2[2] = 2;
FaceNodes_Z2[3] = 3;
FaceNodes_Z2[4] = 3;
FaceNodes_Z2[5] = 4;
FaceNodes_Z2[6] = 4;
FaceNodes_Z2[7] = 5;
FaceNodes_Z2[8] = 5;
FaceNodes_Z2[9] = 6;
FaceNodes_Z2[10] = 6;
FaceNodes_Z2[11] = 1;
/* Face Nodes for Element 2 */
FaceNodes_Z2[12] = 7;
FaceNodes_Z2[13] = 6;
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;
/* DOCEND */
/* DOCSTART:hexagons_zone2_tecpoly.txt*/
/* Specify the right and left neighboring elements.
* The neighboring elements can be determined using the
* right-hand rule. For each face, place your right-hand along
* the face with your fingers pointing the direction of
* incrementing node numbers (i.e. from Node 1 to Node 2). The
* right side of your hand will indicate the right element,
* and the left side of your hand will indicate the left
* element. A value of zero indicates that there is no
* neighboring element on that side. A negative value
* indicates that the neighboring element is in another zone.
* The number is a pointer into the FaceBndryConnectionElems
* and FaceBndryConnectionZones arrays.
*/
INTEGER4 *FaceLeftElems_Z2 = new INTEGER4[NumFaces_Z2];
INTEGER4 *FaceRightElems_Z2 = new INTEGER4[NumFaces_Z2];
/* Left Face Elems for Element 1 */
FaceLeftElems_Z2[0] = 0;
FaceLeftElems_Z2[1] = 0;
FaceLeftElems_Z2[2] = 0;
FaceLeftElems_Z2[3] = 0;
FaceLeftElems_Z2[4] = 2;
FaceLeftElems_Z2[5] = -1;
/* Left Face Elems for Element 2 */
FaceLeftElems_Z2[6] = -2;
FaceLeftElems_Z2[7] = 0;
FaceLeftElems_Z2[8] = 0;
FaceLeftElems_Z2[9] = 0;
FaceLeftElems_Z2[10] = 0;
FaceLeftElems_Z2[11] = 0;
FaceLeftElems_Z2[12] = -3;
/* Set Right Face Elems. Because of the way we numbered the
* nodes and faces, the right element for every face is the
* element itself. */
for (INTEGER4 ii = 0; ii < 6; ii++)
FaceRightElems_Z2[ii] = 1;
for (INTEGER4 ii = 6; ii < 13; ii++)
FaceRightElems_Z2[ii] = 2;
/* DOCEND */
/* DOCSTART:hexagons_zone2_tecpoly.txt*/
/* The FaceBndryConnectionCounts array is used to define the
* number of boundary connections for each face that has a
* boundary connection. In this example, the total number of
* connected boundary faces (specified via TECZNE) is equal to
* three. Each boundary face is connected to only one other
* element, so the FaceBoundaryConnectionCounts array is
* (1, 1, 1).
*/
INTEGER4 FaceBndryConnectionCounts_Z2[3] = {1, 1, 1};
/* The value(s) in the FaceBndryConnectionElems and
* FaceBndryConnectionZones arrays specifies that element
* number and zone number, respectively, that a given boundary
* connection is connected to. In this case, the first boundary
* connection face is connected to Element 2 in Zone 1 and the
* remaining connections are Element 3 in Zone 1.
*/
INTEGER4 FaceBndryConnectionElems_Z2[3] = {2, 3, 3};
INTEGER4 FaceBndryConnectionZones_Z2[3] = {1, 1, 1};
I = TECPOLY112(NULL,
FaceNodes_Z2,
FaceLeftElems_Z2,
FaceRightElems_Z2,
FaceBndryConnectionCounts_Z2,
FaceBndryConnectionElems_Z2,
FaceBndryConnectionZones_Z2);
delete FaceNodes_Z2;
delete FaceLeftElems_Z2;
delete FaceRightElems_Z2;
/* DOCEND */
/* DOCSTART:hexagons_tecend.txt*/
I = TECEND112();
/* DOCEND */
return 0;
}

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="multiplepolygons"
ProjectGUID="{D2747EA6-7807-42E1-984D-C946B3D97D95}"
RootNamespace="mulitplepolygons"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\multiplepolygons.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,248 +0,0 @@
/* This example illustrates how to create a zone with a single
* polygonal cell. Please refer to the Data Format Guide for
* additional information, including figures that display node
* numbering.
*/
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
int main()
{
/* DOCSTART:octagon_tecini.txt*/
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 I; /* used to check return codes */
/*
* Open the file and write the Tecplot datafile
* header information
*/
I = TECINI112((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 */
&FileType,
&Debug,
&VIsDouble);
/* DOCEND */
/* Declare TECZNE variables */
/* DOCSTART:octagon_teczne.txt*/
/* In this example, we will create a single octagonal cell in
* Tecplot 360's polyhedral file format.
*/
INTEGER4 ZoneType = 6; /* FEPolygon */
INTEGER4 NumNodes = 8; /* Number of nodes in the octagon.*/
INTEGER4 NumElems = 1; /* Number of octagonal elements. */
INTEGER4 NumFaces = 8; /* Number of faces in the octagon.*/
INTEGER4 ICellMax = 0; /* Not Used */
INTEGER4 JCellMax = 0; /* Not Used */
INTEGER4 KCellMax = 0; /* Not Used */
double SolTime = 360.0;
INTEGER4 StrandID = 0; /* Static Zone */
INTEGER4 ParentZn = 0; /* No Parent Zone */
INTEGER4 IsBlock = 1; /* Block */
INTEGER4 NFConns = 0;
INTEGER4 FNMode = 0;
/* For polygonal zones, the total number of face nodes is equal
* to twice the number of nodes. This is because, each face
* has exactly two nodes.
*/
INTEGER4 NumFaceNodes = 2 * NumNodes;
/* Boundary Faces and Boundary Connections are not used in this
* example.
*/
INTEGER4 NumBFaces = 0;
INTEGER4 NumBConnections = 0;
INTEGER4 ShrConn = 0;
I = TECZNE112((char*)"Octagonal Zone",
&ZoneType,
&NumNodes,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZn,
&IsBlock,
&NFConns,
&FNMode,
&NumFaceNodes,
&NumBFaces,
&NumBConnections,
NULL,
NULL, /* When Value Location is not specified,
* Tecplot will treat all variables as
* nodal variables.
*/
NULL,
&ShrConn);
/* DOCEND */
/* Establish numbering.
* For this example, we will 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 = 0 and Y = 0. As such, the first value supplied for X
* (i.e. X[0]) is 0. 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.
*/
/* TECDAT Variables */
/* Set up the variable values. The variable values will be
* written to the file using TECDAT. Because we are specifying
* nodal variables (as specified via the ValueLocation
* parameter in TECZNE, each variable is dimensioned by the
* number of points (NumPts) in the Zone. You have the option
* to specify some variables with nodal values and some with
* cell-centered values. Refer to the Binary Function Reference
* for details.
*/
/* DOCSTART:octagon_tecdat.txt*/
float *X = new float[NumNodes];
float *Y = new float[NumNodes];
float *P = new float[NumNodes];
//Define the grid values.
X[0] = 0.25;
Y[0] = 0.0;
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;
for (INTEGER4 ii = 0; ii < 8; ii++)
P[ii] = .5;
/* Write out the field data using TECDAT */
INTEGER4 DIsDouble = 0; /* set IsDouble to 0 to use float
* variables. */
I = TECDAT112(&NumNodes, X, &DIsDouble);
I = TECDAT112(&NumNodes, Y, &DIsDouble);
I = TECDAT112(&NumNodes, P, &DIsDouble);
delete X;
delete Y;
delete P;
/* DOCEND */
/* Define the Face Nodes.
* The FaceNodes array is used to indicate which nodes define
* which face. As mentioned earlier, the number of the nodes is
* implicitly defined by the order in which the nodal data is
* provided. The first value of each nodal variable describes
* node 1, the second value describes node 2, and so on.
*
* The face numbering is implicitly defined. Because there are
* two nodes in each face, the first two nodes provided define
* face 1, the next two define face 2 and so on. If there was
* a variable number of nodes used to define the faces, the
* array would be more complicated.
*/
/* DOCSTART:octagon_facenodes.txt*/
INTEGER4 *FaceNodes = new INTEGER4[NumFaceNodes];
/*
* 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;
/* DOCEND */
/* Define the right and left elements of each face.
* The last step for writing out the polyhedral data is to
* define the right and left neighboring elements for each
* face. The neighboring elements can be determined using the
* right-hand rule. For each face, place your right-hand along
* the face which your fingers pointing the direction of
* incrementing node numbers (i.e. from node 1 to node 2).
* Your right thumb will point towards the right element; the
* element on the other side of your hand is the left element.
*
* The number zero is used to indicate that there isn't an
* element on that side of the face.
*
* Because of the way we numbered the nodes and faces, the
* right element for every face is the element itself
* (element 1) and the left element is "no-neighboring element"
* (element 0).
*/
/* DOCSTART:octagon_rightleft.txt*/
INTEGER4 *FaceLeftElems = new INTEGER4[NumFaces];
INTEGER4 *FaceRightElems = new INTEGER4[NumFaces];
for (INTEGER4 ii = 0; ii < NumFaces; ii++)
{
FaceLeftElems[ii] = 0;
FaceRightElems[ii] = 1;
}
/* DOCEND */
/* Write the polyhedral data to the file. */
/* DOCSTART:octagon_tecpoly.txt*/
I = TECPOLY112(NULL,
FaceNodes,
FaceLeftElems,
FaceRightElems,
NULL,
NULL,
NULL);
delete FaceNodes;
delete FaceLeftElems;
delete FaceRightElems;
/* DOCEND */
/* DOCSTART:octagon_tecend.txt*/
I = TECEND112();
/* DOCEND */
return 0;
}

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="octagon"
ProjectGUID="{C4BEE7D4-6449-468F-81CC-3BEFDA554F31}"
RootNamespace="octagon"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\octagon.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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

View File

@ -1,222 +0,0 @@
/* This example creates a zone with a single polyhedral cell. */
/* DOCSTART:pyramid.txt*/
#include "TECIO.h"
#include "MASTER.h" /* for defintion of NULL */
int main()
{
/* Call TECINI112 */
INTEGER4 FileType = 0; /* 0 for full file */
INTEGER4 Debug = 0;
INTEGER4 VIsDouble = 1;
INTEGER4 I = 0; /* use to check return codes */
I = TECINI112((char*)"Pyramid", /* Data Set Title */
(char*)"X Y Z", /* Variable List */
(char*)"pyramid.plt", /* File Name */
(char*)".", /* Scratch Directory */
&(FileType),
&(Debug),
&(VIsDouble));
/* Call TECZNE112 */
INTEGER4 ZoneType = 7; /* 7 for FEPolyhedron */
INTEGER4 NumNodes = 5; /* number of unique nodes */
INTEGER4 NumElems = 1; /* number of elements */
INTEGER4 NumFaces = 5; /* number of unique faces */
INTEGER4 ICellMax = 0; /* Not Used, set to zero */
INTEGER4 JCellMax = 0; /* Not Used, set to zero */
INTEGER4 KCellMax = 0; /* Not Used, set to zero */
double SolTime = 12.65; /* solution time */
INTEGER4 StrandID = 0; /* static zone */
INTEGER4 ParentZone = 0; /* no parent zone */
INTEGER4 IsBlock = 1; /* block format */
INTEGER4 NFConns = 0; /* not used for FEPolyhedron
* zones
*/
INTEGER4 FNMode = 0; /* not used for FEPolyhedron
* zones
*/
INTEGER4 *PassiveVarArray = NULL;
INTEGER4 *ValueLocArray = NULL;
INTEGER4 *VarShareArray = NULL;
INTEGER4 ShrConn = 0;
/* The number of face nodes in the zone. This example creates
* a zone with a single pyramidal cell. This cell has four
* triangular faces and one rectangular face, yielding a total
* of 16 face nodes.
*/
INTEGER4 NumFaceNodes = 16;
INTEGER4 NumBConns = 0; /* No Boundary Connections */
INTEGER4 NumBItems = 0; /* No Boundary Items */
I = TECZNE112((char*)"Polyhedral Zone (Octahedron)",
&ZoneType,
&NumNodes,
&NumElems,
&NumFaces,
&ICellMax,
&JCellMax,
&KCellMax,
&SolTime,
&StrandID,
&ParentZone,
&IsBlock,
&NFConns,
&FNMode,
&NumFaceNodes,
&NumBConns,
&NumBItems,
PassiveVarArray,
ValueLocArray,
VarShareArray,
&ShrConn);
/* Initialize arrays of nodal data */
double *X = new double[NumNodes];
double *Y = new double[NumNodes];
double *Z = new double[NumNodes];
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;
/* Write the data (using TECDAT112) */
INTEGER4 DIsDouble = 1; /* One for double precision */
I = TECDAT112(&NumNodes, X, &DIsDouble);
I = TECDAT112(&NumNodes, Y, &DIsDouble);
I = TECDAT112(&NumNodes, Z, &DIsDouble);
delete X;
delete Y;
delete Z;
/* Define the Face Nodes.
* The FaceNodes array is used to indicate which nodes define
* which face. As mentioned earlier, the number of the nodes is
* implicitly defined by the order in which the nodal data is
* provided. The first value of each nodal variable describes
* node 1, the second value describes node 2, and so on.
*
* The face numbering is implicitly defined. Because there are
* two nodes in each face, the first two nodes provided define
* face 1, the next two define face 2 and so on. If there was
* a variable number of nodes used to define the faces, the
* array would be more complicated.
*/
INTEGER4 *FaceNodeCounts = new INTEGER4[NumFaces];
/* The first four faces are triangular, i.e. have three nodes.
* The fifth face is rectangular, i.e. has four nodes. */
FaceNodeCounts[0] = 3;
FaceNodeCounts[1] = 3;
FaceNodeCounts[2] = 3;
FaceNodeCounts[3] = 3;
FaceNodeCounts[4] = 4;
INTEGER4 *FaceNodes = new INTEGER4[NumFaceNodes];
/* Face Nodes for Face 1 */
FaceNodes[0] = 1;
FaceNodes[1] = 2;
FaceNodes[2] = 3;
/* Face Nodes for Face 2 */
FaceNodes[3] = 3;
FaceNodes[4] = 2;
FaceNodes[5] = 4;
/* Face Nodes for Face 3 */
FaceNodes[6] = 5;
FaceNodes[7] = 2;
FaceNodes[8] = 4;
/* Face Nodes for Face 4 */
FaceNodes[9] = 1;
FaceNodes[10] = 2;
FaceNodes[11] = 5;
/* Face Nodes for Face 5 */
FaceNodes[12] = 1;
FaceNodes[13] = 5;
FaceNodes[14] = 4;
FaceNodes[15] = 3;
/* Define the right and left elements of each face.
*
* The last step for writing out the polyhedral data is to
* define the right and left neighboring elements for each
* face. The neighboring elements can be determined using the
* right-hand rule. For each face, place your right-hand along
* the face which your fingers pointing the direction of
* incrementing node numbers (i.e. from node 1 to node 2).
* Your right thumb will point towards the right element; the
* element on the other side of your hand is the left element.
*
* The number zero is used to indicate that there isn't an
* element on that side of the face.
*
* Because of the way we numbered the nodes and faces, the
* right element for every face is the element itself
* (element 1) and the left element is "no-neighboring element"
* (element 0).
*/
INTEGER4 *FaceLeftElems = new INTEGER4[NumFaces];
FaceLeftElems[0] = 1;
FaceLeftElems[1] = 1;
FaceLeftElems[2] = 0;
FaceLeftElems[3] = 0;
FaceLeftElems[4] = 0;
INTEGER4 *FaceRightElems = new INTEGER4[NumFaces];
FaceRightElems[0] = 0;
FaceRightElems[1] = 0;
FaceRightElems[2] = 1;
FaceRightElems[3] = 1;
FaceRightElems[4] = 1;
/* Write the face map (created above) using TECPOLY112. */
I = TECPOLY112(FaceNodeCounts, /* The face node counts array */
FaceNodes, /* The face nodes array */
FaceLeftElems, /* The left elements array */
FaceRightElems, /* The right elements array */
NULL, /* No boundary connection counts */
NULL, /* No boundary connection elements */
NULL); /* No boundary connection zones */
delete FaceNodeCounts;
delete FaceNodes;
delete FaceLeftElems;
delete FaceRightElems;
I = TECEND112();
return 0;
}
/* DOCEND */

View File

@ -1,172 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="pyramid"
ProjectGUID="{CFED06AE-48C6-491C-AE5F-E1B7882A44E9}"
RootNamespace="pyramid"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="..\TecIO_Examples.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
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>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\pyramid.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,11 +0,0 @@
# 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

@ -1,100 +0,0 @@
/*
* 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

@ -1,98 +0,0 @@
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

@ -1,98 +0,0 @@
!
! 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

@ -1,346 +0,0 @@
<?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

@ -1,26 +0,0 @@
<?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>

View File

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

View File

@ -1,124 +0,0 @@
/* This example creates a group of square geometries, each with a
* different fill color */
#if defined _MSC_VER
#pragma warning (disable: 4996) /* Windows strcpy warning off */
#endif
/* DOCSTART:tecgeo.txt*/
#include "TECIO.h"
#include <string.h>
int main()
{
INTEGER4 Debug = 1;
INTEGER4 VIsDouble = 0;
INTEGER4 FileType = 0;
INTEGER4 I = 0; /* use to check return values */
/* Open the file and write the tecplot datafile
* header information
*/
I = TECINI112((char*)"Square Geometries",
(char*)"X Y P",
(char*)"squares.plt",
(char*)".",
&FileType,
&Debug,
&VIsDouble);
double ZPos = 0.0; /* N/A for squares */
double XPos;
double YPos;
INTEGER4 PosCoordMode = 0; /* use grid coordinates */
/* opt not to attach the text to a given zone. When text is
* attached to a given zone, it is displayed only when the zone
* is displayed.
*/
INTEGER4 AttachToZone = 0;
INTEGER4 Zone = 1;
/* Set the Geometry Style Values */
INTEGER4 Color = 0; /* set the outline color to
* black
*/
INTEGER4 IsFilled = 1;
INTEGER4 GeomType = 2; /* set the geometry type to
* square
*/
INTEGER4 LinePattern = 5; /* set the line pattern to
* DashDotDot
*/
double PatternLength = .1;
double LineThick = .2;
/* N/A for square geometries */
INTEGER4 NumPts = 100;
INTEGER4 ArrowStyle = 1;
INTEGER4 ArrowAttach = 0;
double ArrowSize = 1;
double ArrowAngle = 30;
INTEGER4 NumSegments = 15;
INTEGER4 NumSegPts = 25;
INTEGER4 Scope = 1; /* set the text to "local", i.e.
* available in the current frame
* only.
*/
INTEGER4 Clipping = 1;
/* Specify the length of a side of the square. The units used
* are those defined with PosCoordMode.
*/
float XGeomData = 2.5;
float YGeomData = 0; /* N/A for square geometries */
float ZGeomData = 0; /* N/A for square geometries */
char * MFC = new char[128];
strcpy(MFC, "SQUARE");
for (INTEGER4 ii = 0; ii <= 7; ii++)
{
INTEGER4 FillColor = ii;
XPos = (double) ii;
YPos = (double) ii;
I = TECGEO112(&XPos,
&YPos,
&ZPos,
&PosCoordMode,
&AttachToZone,
&Zone,
&Color,
&FillColor,
&IsFilled,
&GeomType,
&LinePattern,
&PatternLength,
&LineThick,
&NumPts,
&ArrowStyle,
&ArrowAttach,
&ArrowSize,
&ArrowAngle,
&Scope,
&Clipping,
&NumSegments,
&NumSegPts,
&XGeomData,
&YGeomData,
&ZGeomData,
MFC);
}
I = TECEND112();
delete MFC;
return 0;
}
/* DOCEND */

Some files were not shown because too many files have changed in this diff Show More