diff --git a/bfps/tools.py b/bfps/tools.py index 91440be2a7b3e0ac1e305241c134ac4c6e554534..4b226427808fe116ee9c1a2b6ce9cd315ea0e136 100644 --- a/bfps/tools.py +++ b/bfps/tools.py @@ -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) diff --git a/documentation/_static/api.rst b/documentation/_static/api.rst new file mode 100644 index 0000000000000000000000000000000000000000..0ccc0a91d3456a33ee9997f178388be451451f59 --- /dev/null +++ b/documentation/_static/api.rst @@ -0,0 +1,30 @@ +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: + diff --git a/documentation/index.rst b/documentation/index.rst index dc9c5865f2f29f6b0dc8e63f3ea03dc0eb3697c5..d36fac35859d09432eb7db5203c3b78a3516b32a 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -13,6 +13,7 @@ Welcome to bfps's documentation! /_static/README /_static/overview /_static/development + /_static/api Indices and tables