Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iso8192dev #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions Turbulence/TestApp/TestProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class TestProgram
static Random random = new Random();
static double EPSILON = 0.00002;
public const bool DEVEL_MODE = false;
//public const string infodb_string = !DEVEL_MODE ? "turbinfo_conn" : "turbinfo_test_conn";
public const string infodb_string = !DEVEL_MODE ? "turbinfo_conn" : "turbinfo_test_conn";
public const string infodb_backup_string = !DEVEL_MODE ? "turbinfo_backup_conn" : "";
public const string infodb_string = "turbinfo_conn";
//public const string infodb_string = "turbinfo_test_conn";
public const string logdb_string = "turblog_conn";

// batch scheduler queue
Expand Down Expand Up @@ -72,7 +72,7 @@ public static void Main()
try
{
DateTime beginTime, stopTime;
int nx = 1, ny = 2;
int nx = 1, ny = 1;
int pointsize = nx * ny * 1;
Point3[] points = new Point3[pointsize];
turbulence.Point3[] points1 = new turbulence.Point3[pointsize];
Expand All @@ -86,16 +86,19 @@ public static void Main()
float time = 0f;
service.Timeout = -1;

points[0].x = 0.3f;// dd * 2048;
points[0].y = 0.4f;// dd * 2048;
points[0].z = 0.5f;// dd * 2048;
points[1].x = 4.0f;// dd * 2048;
points[1].y = 5.0f; ;// dd * 2048;
points[1].z = 6.0f;// dd * 2048;
points[0].x = 0.5f; //0.0f; //0.3f;// dd * 2048;
points[0].y = 0.5f; //0.0f; //0.4f;// dd * 2048;
points[0].z = 0.0f; //0.0f; //0.5f;// dd * 2048;
float dz = (float)(2 * Math.PI / 8192);
//points[1].x = 0.0215f; // 8*dz; //4.0f;// dd * 2048;
//points[1].y = 1.5752f; // 0.0f; //5.0f;// dd * 2048;
//points[1].z = 0.0215f; // 0.0f; //6.0f;// dd * 2048;
beginTime = DateTime.Now;
Console.WriteLine("Calling GetVelocity");
Vector3[] result = testp.GetVelocity(authToken, "isotropic1024coarse", time,
Vector3[] result = testp.GetVelocity(authToken, "isotropic8192", time,
TurbulenceOptions.SpatialInterpolation.None, TurbulenceOptions.TemporalInterpolation.None, points);
//VelocityGradient[] result = testp.GetVelocityGradient(authToken, "isotropic8192", time,
// TurbulenceOptions.SpatialInterpolation.M1Q4, TurbulenceOptions.TemporalInterpolation.None, points);
stopTime = DateTime.Now;
Console.WriteLine("Execution time: {0}", stopTime - beginTime);

Expand Down Expand Up @@ -222,6 +225,7 @@ public Vector3[] GetVelocity(string authToken, string dataset, float time,
case DataInfo.DataSets.isotropic1024coarse:
case DataInfo.DataSets.mixing:
case DataInfo.DataSets.isotropic4096: //check this
case DataInfo.DataSets.isotropic8192:
case DataInfo.DataSets.strat4096:
GetVectorData(auth, dataset, dataset_enum, DataInfo.TableNames.vel, worker,
time, spatialInterpolation, temporalInterpolation, points, result, ref rowid, addr);
Expand Down Expand Up @@ -686,7 +690,8 @@ private void GetVectorGradient(AuthInfo.AuthToken auth, string dataset, DataInfo
float time, TurbulenceOptions.SpatialInterpolation spatialInterpolation, TurbulenceOptions.TemporalInterpolation temporalInterpolation,
Point3[] points, VelocityGradient[] result, ref object rowid, string addr = null)
{
bool round = true;
//bool round = true;
bool round = TurbulenceOptions.SplinesOption(spatialInterpolation) ? false : true;
int kernelSize = -1;
int kernelSizeY = -1;

Expand Down
20 changes: 10 additions & 10 deletions Turbulence/TestApp/fileDB_iso4096_debugger.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ CREATE TABLE [dbo].[#temp_zw] (
[z] REAL NULL
);
INSERT INTO [dbo].[#temp_zw]
VALUES (0, 1626119, 0.3, 0.4, 0.5);
VALUES (0, 2147486586, 0.0215, 1.5719, 0.0215);

SELECT reqseq, zindex, x, y, z FROM #temp_zw

DECLARE @return_value Int

EXEC @return_value = [dbo].[ExecuteMHDWorker]
EXEC @return_value = [dbo].[ExecuteMHDFileDBWorker]
@serverName = N'dsp012',
@dbname = N'turbdb101',
@dbname = N'iso4096db117',
@codedb = N'turbdev_zw',
@turbinfodb = N'turbinfo',
@turbinfoserver = N'lumberjack',
@turbinfodb = N'turbinfo_test',
@turbinfoserver = N'sciserver02',
@dataset = N'vel',
@workerType = 56,
@workerType = 64,
@blobDim = 8,
@time = 0,
@spatialInterp = 0,
@spatialInterp = 104,
@temporalInterp = 0,
@arg = 0,
@inputSize = 1,
@tempTable = N'#temp_zw'
--@startz = 0,
--@endz = 536870911
@tempTable = N'#temp_zw',
@startz = 2147483648,
@endz = 2281701375
SELECT @return_value as 'Return Value'

GO
Expand Down
55 changes: 55 additions & 0 deletions Turbulence/TestInterface/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TestInterface")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestInterface")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
71 changes: 71 additions & 0 deletions Turbulence/TestInterface/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions Turbulence/TestInterface/Properties/Resources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
30 changes: 30 additions & 0 deletions Turbulence/TestInterface/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Turbulence/TestInterface/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
Loading