escript  Revision_Unversioneddirectory
EsysRandom.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 ESYS_RANDOM_H
17 #define ESYS_RANDOM_H
18 namespace esysUtils
19 {
20 /* \brief put n random doubles (from [0.0, 1.0]) in array (uses OpenMP).
21  If using this on Data, then be sure to CHECK_EX_WRITE first
22 */
23 void randomFillArray(long seed, double* array, size_t n);
24 
25 
26 void patternFillArray2D(size_t x, size_t y, double* array, size_t spacing, size_t basex, size_t basey, size_t numpoints);
27 
28 /* Intended for debugging use only */
29 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);
30 
31 }
32 #endif
void randomFillArray(long seed, double *array, size_t n)
Definition: EsysRandom.cpp:73
void patternFillArray2D(size_t x, size_t y, double *array, size_t spacing, size_t basex, size_t basey, size_t numpoints)
Definition: EsysRandom.cpp:128
Definition: Esys_MPI.cpp:32
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: EsysRandom.cpp:155