Skip to content
Snippets Groups Projects
Commit d5ec415a authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

add API chapter

at the moment, it generates stuff for the installed version of the
module.
parent baacb770
No related branches found
No related tags found
No related merge requests found
...@@ -32,8 +32,27 @@ def generate_data_3D( ...@@ -32,8 +32,27 @@ def generate_data_3D(
dtype = np.complex128, dtype = np.complex128,
p = 1.5, p = 1.5,
amplitude = 0.5): amplitude = 0.5):
""" """returns the Fourier representation of a Gaussian random field.
generate something that has the proper shape
The generated field is scalar (single component), in practice a
3D `numpy` complex-valued array.
The field will use the FFTW representation, with the slowest
direction corresponding to :math:`y`, the intermediate to :math:`z`
and the fastest direction to :math:`x`.
:param n0: number of :math:`z` nodes on real-space grid
:param n1: number of :math:`y` nodes on real-space grid
:param n2: number of :math:`x` nodes on real-space grid
:param dtype: data type to use, (default=numpy.complex128)
:param p: exponent for powerlaw to use in spectrum
:param amplitude: prefactor that field is multiplied with
:type n0: int
:type n1: int
:type n2: int
:type dtype: numpy.dtype
:type p: float
:type amplitude: float
""" """
assert(n0 % 2 == 0 and n1 % 2 == 0 and n2 % 2 == 0) assert(n0 % 2 == 0 and n1 % 2 == 0 and n2 % 2 == 0)
a = np.zeros((n1, n0, n2/2+1), dtype = dtype) a = np.zeros((n1, n0, n2/2+1), dtype = dtype)
......
API
===
bfps
----
.. automodule:: bfps
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
bfps.NavierStokes
-----------------
.. automodule:: bfps.NavierStokes
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
bfps.tools
----------
.. automodule:: bfps.tools
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
...@@ -13,6 +13,7 @@ Welcome to bfps's documentation! ...@@ -13,6 +13,7 @@ Welcome to bfps's documentation!
/_static/README /_static/README
/_static/overview /_static/overview
/_static/development /_static/development
/_static/api
Indices and tables Indices and tables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment