mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: tecio : move out of thirdparty
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
# 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)
|
||||
@ -0,0 +1,124 @@
|
||||
/* 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 */
|
||||
Binary file not shown.
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="squares"
|
||||
ProjectGUID="{2E5EC0A5-5902-4A66-8A67-A61EC9EB0855}"
|
||||
RootNamespace="squares"
|
||||
>
|
||||
<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=".\squares.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
Reference in New Issue
Block a user