escript  Revision_
Random.h
Go to the documentation of this file.
1 /*****************************************************************************
2 *
3 * Copyright (c) 2013-2016 by The University of Queensland
4 * http://www.uq.edu.au
5 *
6 * Primary Business: Queensland, Australia
7 * Licensed under the Apache License, version 2.0
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11 * Development 2012-2013 by School of Earth Sciences
12 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
13 *
14 *****************************************************************************/
15 
16 #ifndef __ESCRIPT_RANDOM_H__
17 #define __ESCRIPT_RANDOM_H__
18 
19 namespace escript
20 {
21 /* \brief put n random doubles (from [0.0, 1.0]) in array (uses OpenMP).
22  If using this on Data, then be sure to CHECK_EX_WRITE first
23 */
24 void randomFillArray(long seed, double* array, size_t n);
25 
26 
27 void patternFillArray2D(size_t x, size_t y, double* array, size_t spacing,
28  size_t basex, size_t basey, size_t numpoints);
29 
30 // Intended for debugging use only
31 void patternFillArray(int pattern, size_t x, size_t y, size_t z, double* array,
32  size_t spacing, size_t basex, size_t basey, size_t basez,
33  size_t numpoints);
34 
35 }
36 
37 #endif // __ESCRIPT_RANDOM_H__
38 
void randomFillArray(long seed, double *array, size_t n)
Definition: Random.cpp:74
Definition: AbstractContinuousDomain.cpp:22
void patternFillArray(int pattern, size_t x, size_t y, size_t z, double *array, size_t spacing, size_t basex, size_t basey, size_t basez, size_t numpoints)
Definition: Random.cpp:158
void patternFillArray2D(size_t x, size_t y, double *array, size_t spacing, size_t basex, size_t basey, size_t numpoints)
Definition: Random.cpp:128