Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
d5ec415a
Commit
d5ec415a
authored
Jan 22, 2016
by
Cristian Lalescu
Browse files
add API chapter
at the moment, it generates stuff for the installed version of the module.
parent
baacb770
Changes
3
Hide whitespace changes
Inline
Side-by-side
bfps/tools.py
View file @
d5ec415a
...
...
@@ -32,8 +32,27 @@ def generate_data_3D(
dtype
=
np
.
complex128
,
p
=
1.5
,
amplitude
=
0.5
):
"""
generate something that has the proper shape
"""returns the Fourier representation of a Gaussian random field.
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
)
a
=
np
.
zeros
((
n1
,
n0
,
n2
/
2
+
1
),
dtype
=
dtype
)
...
...
documentation/_static/api.rst
0 → 100644
View file @
d5ec415a
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:
documentation/index.rst
View file @
d5ec415a
...
...
@@ -13,6 +13,7 @@ Welcome to bfps's documentation!
/_static/README
/_static/overview
/_static/development
/_static/api
Indices and tables
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment