%clear all, clc, clf, close all
function [] = LockExchangeSymRunScript(Gr)
if nargin < 1 || isempty(Gr)
    Gr = 1.25e6;
end


%Setup generics
d0=fileparts([pwd,filesep]);
d0=d0(1:strfind(d0,'trunk')+4);
sscript = 'LockExchangeSetup_numSym';
pscript = 'DORhoAdaptGenericPlots';
pscriptref = 'GenericSaveScriptRho';

%Create the app for the Reference solution
app.Nx = 64;
app.Ny = 64;
app.dt = 1 / app.Nx / 4;
app.T = 5;
app.PlotIntrvl = 32*4;
app.Gr = Gr;
app.Sc = 1;
%app.saveimg = app.savemat;
app.var = 1 / 64;
app.S = 1;
app.MC = 10000;
app.drho = 1; %Actually results in a drho = 0.5!!

app.savemat = ['DOnumPap/LockStochSymTVD_',num2str(Gr),'_NX',num2str(app.Nx)]
NavierStokesInc_DO_rho(app,sscript,pscript);

app.savemat = ['DOnumPap/LockStochSymTVD1s_',num2str(Gr),'_NX',num2str(app.Nx)]
NavierStokesInc_DO_rho1(app,sscript,pscript);

app.savemat = ['DOnumPap/LockStochSymCDS_',num2str(Gr),'_NX',num2str(app.Nx)]
NavierStokesInc_DO_rho2(app,sscript,pscript);
% %% Run only 2 cases
% app.S = 1
% app.dref = app.dref([1,4]);
% app.drho = mean(drho([1 4]));
% NavierStokesInc_DO_rho(app,sscript,pscript);
% % NavierStokesInc_DO_rho1(app,sscript,pscript);

% app.k = app.PlotIntrvl * 8;
% sscript = 'LockExchangeSetup_num3';
% NavierStokesInc_DO_rho(app,sscript,pscript);
