From 2042b5dbf619c662033f3061020a40f18a76ec1c Mon Sep 17 00:00:00 2001 From: Lindley Graham Date: Fri, 15 May 2015 13:13:32 -0500 Subject: [PATCH] updated documentation to match examples --- doc/bet.loadBalance.rst | 30 ---------------------- doc/examples/fromADCIRCMap/Q_1D_serial.rst | 9 +++---- doc/examples/fromADCIRCMap/Q_2D.rst | 6 ++--- doc/examples/fromADCIRCMap/Q_3D.rst | 7 ++--- doc/index.rst | 1 + doc/overview.rst | 6 +---- 6 files changed, 13 insertions(+), 46 deletions(-) delete mode 100644 doc/bet.loadBalance.rst diff --git a/doc/bet.loadBalance.rst b/doc/bet.loadBalance.rst deleted file mode 100644 index 9d0888c6..00000000 --- a/doc/bet.loadBalance.rst +++ /dev/null @@ -1,30 +0,0 @@ -bet.loadBalance package -======================= - -Submodules ----------- - -bet.loadBalance.lb_PADCIRC module ---------------------------------- - -.. automodule:: bet.loadBalance.lb_PADCIRC - :members: - :undoc-members: - :show-inheritance: - -bet.loadBalance.load_balance module ------------------------------------ - -.. automodule:: bet.loadBalance.load_balance - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: bet.loadBalance - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/examples/fromADCIRCMap/Q_1D_serial.rst b/doc/examples/fromADCIRCMap/Q_1D_serial.rst index 79a212f1..1a3c4c25 100644 --- a/doc/examples/fromADCIRCMap/Q_1D_serial.rst +++ b/doc/examples/fromADCIRCMap/Q_1D_serial.rst @@ -91,7 +91,7 @@ Calculate :math:`\hat{\rho}_{\Lambda, j}` where :math:`\mathcal{V}_j` are the voronoi cells defined by :math:`\lambda_{emulate}`:: (P0, lem0, io_ptr0, emulate_ptr0) = calcP.prob_emulated(samples, data, - rho_D_M, d_distr_samples, lam_domain, lambda_emulate, d_Tree) + rho_D_M, d_distr_samples, lambda_emulate, d_Tree) mdict['P0'] = P0 mdict['lem0'] = lem0 mdict['io_ptr0'] = io_ptr0 @@ -101,13 +101,12 @@ Calculate :math:`\hat{\rho}_{\Lambda, j}` where :math:`\mathcal{V}_j` are the voronoi cells defined by :math:`\lambda_{samples}` assume that :math:`\lambda_{samples}` are uniformly distributed and therefore have approximately the same volume:: - (P1, lam_vol1, lem1, io_ptr1, emulate_ptr1) = calcP.prob(samples, data, - rho_D_M, d_distr_samples, lam_domain, d_Tree) + (P1, lam_vol1, lem1, io_ptr1) = calcP.prob(samples, data, + rho_D_M, d_distr_samples, d_Tree) mdict['P1'] = P1 mdict['lam_vol1'] = lam_vol1 mdict['lem1'] = lem1 mdict['io_ptr1'] = io_ptr1 - mdict['emulate_ptr1'] = emulate_ptr1 Calculate :math:`\hat{\rho}_{\Lambda, j}` where :math:`\mathcal{V}_j` are the voronoi cells defined by :math:`\lambda_{samples}` and we approximate the volume of @@ -115,7 +114,7 @@ voronoi cells defined by :math:`\lambda_{samples}` and we approximate the volume :math:`\lambda_{emulate}` to estimate the volume of :math:`\mathcal{V}_j` :: (P3, lam_vol3, lambda_emulate3, io_ptr3, emulate_ptr3) = calcP.prob_mc(samples, - data, rho_D_M, d_distr_samples, lam_domain, lambda_emulate, d_Tree) + data, rho_D_M, d_distr_samples, lambda_emulate, d_Tree) mdict['P3'] = P3 mdict['lam_vol3'] = lam_vol3 mdict['io_ptr3'] = io_ptr3 diff --git a/doc/examples/fromADCIRCMap/Q_2D.rst b/doc/examples/fromADCIRCMap/Q_2D.rst index fc219853..5f4ae1f5 100644 --- a/doc/examples/fromADCIRCMap/Q_2D.rst +++ b/doc/examples/fromADCIRCMap/Q_2D.rst @@ -15,8 +15,8 @@ This example demostrates three different methods to estimate These methods are distinguished primarily by the way :math:`\mathcal{V}_j` are defined and the approximation of the volume of :math:`\mathcal{V}_j`. See -:download:`Q_2D.py -<../../../examples/fromADCIRCMap/Q_2D.py>` for the example source code. Since +:download:`Q_2D_serial.py +<../../../examples/fromADCIRCMap/Q_2D_serial.py>` for the example source code. Since this example is essentially the same as :ref:`q1D` we will only highlight the differences between the two. @@ -44,7 +44,7 @@ Define the refernce solution. We define a region of interest, :math:`R_{ref} \su center_pts_per_edge=np.ones((data.shape[1],))) -Finally, we calculate :math:`\hat{\rho}_{\Lambda, j}` for three reference solutions and the QoI :math:( (q_1,q_2), (q_1, q_5), and (q_1, q_6)) :: +Finally, we calculate :math:`\hat{\rho}_{\Lambda, j}` for three reference solutions and the QoI :math:`( (q_1,q_2), (q_1, q_5)`, and :math:`(q_1, q_6))` :: ref_nums = [6, 11, 15] # 7, 12, 16 stations = [1, 4, 5] # 2, 5, 6 diff --git a/doc/examples/fromADCIRCMap/Q_3D.rst b/doc/examples/fromADCIRCMap/Q_3D.rst index 6d5c19df..2d15f65d 100644 --- a/doc/examples/fromADCIRCMap/Q_3D.rst +++ b/doc/examples/fromADCIRCMap/Q_3D.rst @@ -35,6 +35,8 @@ Also the ``postprocess(station_nums, ref_num)`` function in this case only uses Parallel Example ~~~~~~~~~~~~~~~~ +.. note:: The parallel version of this example has been moved to the development branch. + This example demostrates how to estimate :math:`\hat{\rho}_{\Lambda, j}` using :meth:`~bet.calculateP.calculateP.prob_mc` where @@ -71,11 +73,10 @@ Within the ``postprocess(station_nums, ref_num)`` function in this case we only need to use :meth:`~bet.postProcess.plotP.get_global_values` to concatenate the arrays spread out across the processors into a single array:: - mdict['lambda_emulate'] = util.get_global_values(lambda_emulate) mdict['num_l_emulate'] = mdict['lambda_emulate'].shape[1] mdict['P3'] = util.get_global_values(P3) - mdict['lam_vol3'] = util.get_global_values(lam_vol3) - mdict['io_ptr3'] = util.get_global_values(io_ptr3) + mdict['lam_vol3'] = lam_vol3 + mdict['io_ptr3'] = io_ptr3 Furthermore, we only want to write out the solution using a single processor:: diff --git a/doc/index.rst b/doc/index.rst index 3b852567..eb29ac0a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -18,6 +18,7 @@ Contents: examples/linearMap/* examples/fromFileMap/* examples/fromADCIRCMap/* + modules todo_list .. todo:: Flesh out documentation. diff --git a/doc/overview.rst b/doc/overview.rst index 26ea4e36..68c37e9f 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -43,7 +43,7 @@ Code Overview -------------- :mod:`calculateP` Package -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: bet.calculateP @@ -57,10 +57,6 @@ Code Overview .. automodule:: bet.postProcess -:mod:`loadBalance` Package -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: bet.loadBalance .. seealso:: :ref:`modindex` for detailed documentation of modules, classes, etc.