Skip to content

Commit

Permalink
updated documentation to match examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgraham committed May 15, 2015
1 parent 0502cb1 commit 2042b5d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 46 deletions.
30 changes: 0 additions & 30 deletions doc/bet.loadBalance.rst

This file was deleted.

9 changes: 4 additions & 5 deletions doc/examples/fromADCIRCMap/Q_1D_serial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -101,21 +101,20 @@ 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
:math:`\mathcal{V}_j` using Monte Carlo integration. We use
: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
Expand Down
6 changes: 3 additions & 3 deletions doc/examples/fromADCIRCMap/Q_2D.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions doc/examples/fromADCIRCMap/Q_3D.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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::

Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Contents:
examples/linearMap/*
examples/fromFileMap/*
examples/fromADCIRCMap/*
modules
todo_list

.. todo:: Flesh out documentation.
Expand Down
6 changes: 1 addition & 5 deletions doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Code Overview
--------------

:mod:`calculateP` Package
~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: bet.calculateP

Expand All @@ -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.

Expand Down

0 comments on commit 2042b5d

Please sign in to comment.