template<class GridView, class Scalar>
class Dumux::GstatRandomField< GridView, Scalar >
Creating random fields using gstat.
gstat is an open source software tool which can (among other things) generate geostatistical random fields (see http://www.gstat.org or [52]).
To use this class, execute the installexternal.sh from your DuMuX root directory or donwload, unpack and install the tarball from the gstat-website. Then rerun cmake (in the second case set GSTAT_ROOT in your input file to the path where gstat is installed).
|
| GstatRandomField (const GridView &gridView, const ElementMapper &elementMapper) |
| Constructor. More...
|
|
void | create (const std::string &gstatControlFile, const std::string &gstatInputFile="gstatInput.txt", const std::string &gstatOutputFile="permeab.dat", FieldType fieldType=FieldType::scalar, bool createNew=true) |
| Creates a new field with random variables, if desired. Otherwise creates a data field from already available data. For the random field generation three files are necessary. More...
|
|
Scalar | data (const Element &e) const |
| Return an entry of the data vector. More...
|
|
const DataVector & | data () const |
| Return the data vector for analysis or external vtk output. More...
|
|
void | writeVtk (const std::string &vtkName, const std::string &dataName="data") const |
| Write the data to a vtk file. More...
|
|
template<class GridView , class Scalar >
void Dumux::GstatRandomField< GridView, Scalar >::create |
( |
const std::string & |
gstatControlFile, |
|
|
const std::string & |
gstatInputFile = "gstatInput.txt" , |
|
|
const std::string & |
gstatOutputFile = "permeab.dat" , |
|
|
FieldType |
fieldType = FieldType::scalar , |
|
|
bool |
createNew = true |
|
) |
| |
|
inline |
Creates a new field with random variables, if desired. Otherwise creates a data field from already available data. For the random field generation three files are necessary.
A gstatControlFile in which all commands and in/output files for gstat are specified. A gstatInputFile contains all coordinates (cell centers) of the grid, so that gstat can perform its random realization. The filename must be same as in the gstatControlFile. A gstatOutputFile in which gstat writes the random values to this file. The filename must be the same as in the gstatControlFile.
- Parameters
-
fieldType | |
gstatControlFile | name of control file for gstat |
gstatInputFile | name of input file for gstat |
gstatOutputFile | name of the gstat output file |
createNew | set true to create a new field |