escript
Revision_
|
00001 /***************************************************************************** 00002 * 00003 * Copyright (c) 2013-2014 by University of Queensland 00004 * http://www.uq.edu.au 00005 * 00006 * Primary Business: Queensland, Australia 00007 * Licensed under the Open Software License version 3.0 00008 * http://www.opensource.org/licenses/osl-3.0.php 00009 * 00010 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00011 * Development 2012-2013 by School of Earth Sciences 00012 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00013 * 00014 *****************************************************************************/ 00015 00016 #ifndef ESYS_RANDOM_H 00017 #define ESYS_RANDOM_H 00018 namespace esysUtils 00019 { 00020 /* \brief put n random doubles in array (uses OpenMP). 00021 If using this on Data, then be sure to CHECK_EX_WRITE first 00022 */ 00023 void randomFillArray(long seed, double* array, size_t n); 00024 00025 00026 void patternFillArray2D(size_t x, size_t y, double* array, size_t spacing, size_t basex, size_t basey, size_t numpoints); 00027 00028 /* Intended for debugging use only */ 00029 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); 00030 00031 } 00032 #endif