Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include getCutout, new functions, new dataset demo etc
Create develop branch: include getCutout, new functions, new dataset demo etc
- Loading branch information
Showing
27 changed files
with
1,866 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
% | ||
% Turbmat - a Matlab library for the JHU Turbulence Database Cluster | ||
% | ||
% Get*.m, part of Turbmat | ||
% | ||
|
||
% | ||
% Written by: | ||
% | ||
% Zhao Wu | ||
% The Johns Hopkins University | ||
% Department of Mechanical Engineering | ||
% zhao.wu@jhu.edu | ||
% | ||
|
||
% | ||
% This file is part of Turbmat. | ||
% | ||
% Turbmat is free software: you can redistribute it and/or modify it under | ||
% the terms of the GNU General Public License as published by the Free | ||
% Software Foundation, either version 3 of the License, or (at your option) | ||
% any later version. | ||
% | ||
% Turbmat is distributed in the hope that it will be useful, but WITHOUT | ||
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
% more details. | ||
% | ||
% You should have received a copy of the GNU General Public License along | ||
% with Turbmat. If not, see <http://www.gnu.org/licenses/>. | ||
% | ||
|
||
function GetAnyCutoutWebResult = GetAnyCutoutWeb(obj, authToken, dataset, field, T,... | ||
x_start, y_start, z_start,... | ||
x_end, y_end, z_end, x_step, y_step, z_step, filter_width) | ||
%GetAnyCutoutWeb(obj, authToken, dataset, field, T,... | ||
% x_start, y_start, z_start,... | ||
% x_end, y_end, z_end, x_step, y_step, z_step, filter_width) | ||
% | ||
% Retrieve the raw data. | ||
% | ||
% Input: | ||
% authToken = (string) | ||
% dataset = (string) | ||
% field = (string) | ||
% T = (int) | ||
% x_start = (int) | ||
% y_start = (int) | ||
% z_start = (int) | ||
% x_end = (int) | ||
% x_end = (int) | ||
% x_end = (int) | ||
% x_step = (int) | ||
% x_step = (int) | ||
% x_step = (int) | ||
% filter_width = (int) | ||
% | ||
% Output: | ||
% GetThresholdResult = (base64Binary) | ||
|
||
% Build up the argument lists. | ||
data.val.authToken.name = 'authToken'; | ||
data.val.authToken.val = authToken; | ||
data.val.authToken.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.dataset.name = 'dataset'; | ||
data.val.dataset.val = dataset; | ||
data.val.dataset.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.field.name = 'field'; | ||
data.val.field.val = field; | ||
data.val.field.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.T.name = 'T'; | ||
data.val.T.val = T; | ||
data.val.T.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.x_start.name = 'x_start'; | ||
data.val.x_start.val = x_start; | ||
data.val.x_start.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.y_start.name = 'y_start'; | ||
data.val.y_start.val = y_start; | ||
data.val.y_start.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.z_start.name = 'z_start'; | ||
data.val.z_start.val = z_start; | ||
data.val.z_start.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.x_end.name = 'x_end'; | ||
data.val.x_end.val = x_end; | ||
data.val.x_end.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.y_end.name = 'y_end'; | ||
data.val.y_end.val = y_end; | ||
data.val.y_end.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.z_end.name = 'z_end'; | ||
data.val.z_end.val = z_end; | ||
data.val.z_end.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.x_step.name = 'x_step'; | ||
data.val.x_step.val = x_step; | ||
data.val.x_step.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.y_step.name = 'y_step'; | ||
data.val.y_step.val = y_step; | ||
data.val.y_step.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.z_step.name = 'z_step'; | ||
data.val.z_step.val = z_step; | ||
data.val.z_step.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.filter_width.name = 'filter_width'; | ||
data.val.filter_width.val = filter_width; | ||
data.val.filter_width.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
|
||
% Create the message, make the call, and convert the response into a variable. | ||
soapMessage = createSoapMessage( ... | ||
'http://turbulence.pha.jhu.edu/', ... | ||
'GetAnyCutoutWeb', ... | ||
data,'document'); | ||
response = callSoapService( ... | ||
obj.endpoint, ... | ||
'http://turbulence.pha.jhu.edu/GetAnyCutoutWeb', ... | ||
soapMessage); | ||
GetAnyCutoutWebResult = parseSoapResponse(response); | ||
|
||
% Fault message handling | ||
if isfield(GetAnyCutoutWebResult, 'faultstring') | ||
error('faultcode: %s\nfaultstring: %s\n', ... | ||
GetAnyCutoutWebResult.faultcode, ... | ||
GetAnyCutoutWebResult.faultstring); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
% | ||
% Turbmat - a Matlab library for the JHU Turbulence Database Cluster | ||
% | ||
% Get*.m, part of Turbmat | ||
% | ||
|
||
% | ||
% Written by: | ||
% | ||
% Zhao Wu | ||
% The Johns Hopkins University | ||
% Department of Mechanical Engineering | ||
% zhao.wu@jhu.edu | ||
% | ||
|
||
% | ||
% This file is part of Turbmat. | ||
% | ||
% Turbmat is free software: you can redistribute it and/or modify it under | ||
% the terms of the GNU General Public License as published by the Free | ||
% Software Foundation, either version 3 of the License, or (at your option) | ||
% any later version. | ||
% | ||
% Turbmat is distributed in the hope that it will be useful, but WITHOUT | ||
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
% more details. | ||
% | ||
% You should have received a copy of the GNU General Public License along | ||
% with Turbmat. If not, see <http://www.gnu.org/licenses/>. | ||
% | ||
|
||
|
||
function GetInvariantResult = GetInvariant(obj,authToken,dataset,time,spatialInterpolation,temporalInterpolation,points) | ||
%GetPressureGradient(obj,authToken,dataset,time,spatialInterpolation,temporalInterpolation,points) | ||
% | ||
% Retrieve the pressure gradient at a fixed location | ||
% | ||
% Input: | ||
% authToken = (string) | ||
% dataset = (string) | ||
% time = (float) | ||
% spatialInterpolation = (SpatialInterpolation) | ||
% temporalInterpolation = (TemporalInterpolation) | ||
% points = (ArrayOfPoint3) | ||
% | ||
% Output: | ||
% GetPressureGradientResult = (ArrayOfVector3) | ||
|
||
% Build up the argument lists. | ||
data.val.authToken.name = 'authToken'; | ||
data.val.authToken.val = authToken; | ||
data.val.authToken.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.dataset.name = 'dataset'; | ||
data.val.dataset.val = dataset; | ||
data.val.dataset.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.time.name = 'time'; | ||
data.val.time.val = time; | ||
data.val.time.type = '{http://www.w3.org/2001/XMLSchema}float'; | ||
data.val.spatialInterpolation.name = 'spatialInterpolation'; | ||
data.val.spatialInterpolation.val = spatialInterpolation; | ||
data.val.spatialInterpolation.type = '{http://turbulence.pha.jhu.edu/}SpatialInterpolation'; | ||
data.val.temporalInterpolation.name = 'temporalInterpolation'; | ||
data.val.temporalInterpolation.val = temporalInterpolation; | ||
data.val.temporalInterpolation.type = '{http://turbulence.pha.jhu.edu/}TemporalInterpolation'; | ||
data.val.points.name = 'points'; | ||
data.val.points.wrap = 'Point3'; | ||
data.val.points.parallel = 1; | ||
data.val.points.val.x.name = 'x'; | ||
data.val.points.val.x.val = points(1,:); | ||
data.val.points.val.y.name = 'y'; | ||
data.val.points.val.y.val = points(2,:); | ||
data.val.points.val.z.name = 'z'; | ||
data.val.points.val.z.val = points(3,:); | ||
|
||
% Create the message, make the call, and convert the response into a variable. | ||
soapMessage = createSoapMessage( ... | ||
'http://turbulence.pha.jhu.edu/', ... | ||
'GetInvariant', ... | ||
data,'document'); | ||
response = callSoapService( ... | ||
obj.endpoint, ... | ||
'http://turbulence.pha.jhu.edu/GetInvariant', ... | ||
soapMessage); | ||
GetInvariantResult = parseSoapResponse(response); | ||
|
||
% Fault message handling | ||
if isfield(GetInvariantResult, 'faultstring') | ||
error('faultcode: %s\nfaultstring: %s\n', ... | ||
GetInvariantResult.faultcode, ... | ||
GetInvariantResult.faultstring); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,94 @@ | ||
% | ||
% Turbmat - a Matlab library for the JHU Turbulence Database Cluster | ||
% | ||
% Get*.m, part of Turbmat | ||
% | ||
|
||
% | ||
% Written by: | ||
% | ||
% Zhao Wu | ||
% The Johns Hopkins University | ||
% Department of Mechanical Engineering | ||
% zhao.wu@jhu.edu | ||
% | ||
|
||
% | ||
% This file is part of Turbmat. | ||
% | ||
% Turbmat is free software: you can redistribute it and/or modify it under | ||
% the terms of the GNU General Public License as published by the Free | ||
% Software Foundation, either version 3 of the License, or (at your option) | ||
% any later version. | ||
% | ||
% Turbmat is distributed in the hope that it will be useful, but WITHOUT | ||
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
% more details. | ||
% | ||
% You should have received a copy of the GNU General Public License along | ||
% with Turbmat. If not, see <http://www.gnu.org/licenses/>. | ||
% | ||
|
||
function GetRawVelocityResult = GetRawVelocity(obj,authToken,dataset,time,X,Y,Z,Xwidth,Ywidth,Zwidth) | ||
%GetRawVelocity(obj,authToken,dataset,time,X,Y,Z,Xwidth,Ywidth,Zwidth) | ||
%GetPressure(obj,authToken,dataset,time,spatialInterpolation,temporalInterpolation,points) | ||
% | ||
% Get a cube of the raw velocity data with the given width cornered at the specified coordinates for the given time. | ||
% Spatially interpolate the pressure field at a number of points for a given time. | ||
% | ||
% Input: | ||
% authToken = (string) | ||
% dataset = (string) | ||
% time = (float) | ||
% X = (int) | ||
% Y = (int) | ||
% Z = (int) | ||
% Xwidth = (int) | ||
% Ywidth = (int) | ||
% Zwidth = (int) | ||
% spatialInterpolation = (SpatialInterpolation) | ||
% temporalInterpolation = (TemporalInterpolation) | ||
% points = (ArrayOfPoint3) | ||
% | ||
% Output: | ||
% GetRawVelocityResult = (base64Binary) | ||
% GetPressureResult = (ArrayOfPressure) | ||
|
||
% Build up the argument lists. | ||
values = { ... | ||
authToken, ... | ||
dataset, ... | ||
time, ... | ||
X, ... | ||
Y, ... | ||
Z, ... | ||
Xwidth, ... | ||
Ywidth, ... | ||
Zwidth, ... | ||
}; | ||
names = { ... | ||
'authToken', ... | ||
'dataset', ... | ||
'time', ... | ||
'X', ... | ||
'Y', ... | ||
'Z', ... | ||
'Xwidth', ... | ||
'Ywidth', ... | ||
'Zwidth', ... | ||
}; | ||
types = { ... | ||
'{http://www.w3.org/2001/XMLSchema}string', ... | ||
'{http://www.w3.org/2001/XMLSchema}string', ... | ||
'{http://www.w3.org/2001/XMLSchema}float', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
'{http://www.w3.org/2001/XMLSchema}int', ... | ||
}; | ||
data.val.authToken.name = 'authToken'; | ||
data.val.authToken.val = authToken; | ||
data.val.authToken.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.dataset.name = 'dataset'; | ||
data.val.dataset.val = dataset; | ||
data.val.dataset.type = '{http://www.w3.org/2001/XMLSchema}string'; | ||
data.val.time.name = 'time'; | ||
data.val.time.val = time; | ||
data.val.time.type = '{http://www.w3.org/2001/XMLSchema}float'; | ||
data.val.X.name = 'X'; | ||
data.val.X.val = X; | ||
data.val.X.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.Y.name = 'Y'; | ||
data.val.Y.val = Y; | ||
data.val.Y.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.Z.name = 'Z'; | ||
data.val.Z.val = Z; | ||
data.val.Z.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.Xwidth.name = 'Xwidth'; | ||
data.val.Xwidth.val = Xwidth; | ||
data.val.Xwidth.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.Ywidth.name = 'Ywidth'; | ||
data.val.Ywidth.val = Ywidth; | ||
data.val.Ywidth.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
data.val.Zwidth.name = 'Zwidth'; | ||
data.val.Zwidth.val = Zwidth; | ||
data.val.Zwidth.type = '{http://www.w3.org/2001/XMLSchema}int'; | ||
|
||
% Create the message, make the call, and convert the response into a variable. | ||
soapMessage = createSoapMessage( ... | ||
'http://turbulence.pha.jhu.edu/', ... | ||
'GetRawVelocity', ... | ||
values,names,types,'document'); | ||
data,'document'); | ||
response = callSoapService( ... | ||
obj.endpoint, ... | ||
'http://turbulence.pha.jhu.edu/GetRawVelocity', ... | ||
soapMessage); | ||
GetRawVelocityResult = parseSoapResponse(response); | ||
|
||
% Fault message handling | ||
if isfield(GetRawVelocityResult, 'faultstring') | ||
error('faultcode: %s\nfaultstring: %s\n', ... | ||
GetRawVelocityResult.faultcode, ... | ||
GetRawVelocityResult.faultstring); | ||
end |
Oops, something went wrong.