From 4b7323b8f510c5463c05eb9eb9a1462a73af6219 Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Thu, 27 Feb 2014 13:34:13 -0800 Subject: [PATCH] setup.py --- docs/api_Richards.rst | 50 +------------------------------------------ setup.py | 12 ++++++----- 2 files changed, 8 insertions(+), 54 deletions(-) diff --git a/docs/api_Richards.rst b/docs/api_Richards.rst index d2442188..ecaf8c83 100644 --- a/docs/api_Richards.rst +++ b/docs/api_Richards.rst @@ -33,55 +33,7 @@ However, it can be shown that this does not conserve mass in the discrete formul Here we reproduce the results from Ceilia et al. (1990): -.. plot:: - - from SimPEG import * - from simpegFLOW import Richards - import matplotlib.pyplot as plt - - M = Mesh.TensorMesh([np.ones(40)]) - M.setCellGradBC('dirichlet') - params = Richards.Empirical.HaverkampParams().celia1990 - model = Richards.Empirical.Haverkamp(M, **params) - - bc = np.array([-61.5,-20.7]) - h = np.zeros(M.nC) + bc[0] - - - def getFields(timeStep,method): - prob = Richards.RichardsProblem(M,model, timeStep=timeStep, timeEnd=360, - boundaryConditions=bc, initialConditions=h, - doNewton=False, method=method) - return prob.fields(params['Ks']) - - Hs_M10 = getFields(10., 'mixed') - Hs_M30 = getFields(30., 'mixed') - Hs_M120= getFields(120.,'mixed') - Hs_H10 = getFields(10., 'head') - Hs_H30 = getFields(30., 'head') - Hs_H120= getFields(120.,'head') - - plt.figure(figsize=(13,5)) - plt.subplot(121) - plt.plot(40-M.gridCC, Hs_M10[-1],'b-') - plt.plot(40-M.gridCC, Hs_M30[-1],'r-') - plt.plot(40-M.gridCC, Hs_M120[-1],'k-') - plt.ylim([-70,-10]) - plt.title('Mixed Method') - plt.xlabel('Depth, cm') - plt.ylabel('Pressure Head, cm') - plt.legend(('$\Delta t$ = 10 sec','$\Delta t$ = 30 sec','$\Delta t$ = 120 sec')) - plt.subplot(122) - plt.plot(40-M.gridCC, Hs_H10[-1],'b-') - plt.plot(40-M.gridCC, Hs_H30[-1],'r-') - plt.plot(40-M.gridCC, Hs_H120[-1],'k-') - plt.ylim([-70,-10]) - plt.title('Head-Based Method') - plt.xlabel('Depth, cm') - plt.ylabel('Pressure Head, cm') - plt.legend(('$\Delta t$ = 10 sec','$\Delta t$ = 30 sec','$\Delta t$ = 120 sec')) - plt.show() - +.. plot:: examples/richards_comparisonToCeiliaEtAl1990.py Richards ======== diff --git a/setup.py b/setup.py index a48ca0ee..0485bd51 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,10 @@ try: import SimPEG except ImportError, e: os.system('git clone https://github.com/simpeg/simpeg.git') - os.system('mv simpeg/SimPEG temp') - os.system('rm -rf simpeg') - os.system('mv temp SimPEG') - os.system('mkdir docs/examples/SimPEG') - os.system('cp -r SimPEG simpegflow/docs/examples/SimPEG') + os.system('python simpeg/setup.py install') + + # os.system('mv simpeg/SimPEG temp') + # os.system('rm -rf simpeg') + # os.system('mv temp SimPEG') + # os.system('mkdir docs/examples/SimPEG') + # os.system('cp -r SimPEG simpegflow/docs/examples/SimPEG')