%clear all, clc, clf, close all
function [] = CylinderRunScript(MC,order,Re)
if nargin < 3 || isempty(Re)
    Re = 100;
end
% if nargin < 2 || isempty(runref)
%     runref = true;
% end
%%
%Setup generics
d0=fileparts([pwd,filesep]);
d0=d0(1:strfind(d0,'trunk')+4);
sscript = 'CylinderSetup_num';
pscript = 'CylinderPlots';

%Create the app for the Reference solution
% sscriptref = 'LockExchangeSetup_numdet';
% pscriptref = 'GenericSaveScriptRho';
app.N = 21;
app.T = 40;
app.nu = 1/Re;
app.S = 10;
app.MC = MC;
app.var = 1;
app.PlotScript = pscript;
%Run the stochastic ase
if isfield(app,'saveimg')
    app = rmfield(app,'saveimg');
end
% app.ref = ['DOnumPap/Cylinder_RE',num2str(Re),'_MC',num2str(app.MC/100),'_'];
app.savemat = ['DOnumPap/Cylinder_RE',num2str(Re),'_MC',num2str(app.MC/100),...
    '_NX',num2str(app.N),'_O',num2str(order)];

if order == 1
    NavierStokesInc_DO_mx_1stYYt(app,sscript,pscript);
elseif order == 2
    NavierStokesInc_DO_mx_2ndYYt(app,sscript,pscript);
else
    NavierStokesInc_DO_mx(app,sscript,pscript);
end

    

