Creating random fields using gstat. More...
#include <dumux/material/gstatrandomfield.hh>
gstat is an open source software tool which can (among other things) generate geostatistical random fields (see http://www.gstat.org or [71]).
To use this class, execute the installexternal.py from your DuMuX root directory or download, 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).
Public Types | |
enum | FieldType { scalar , log10 } |
Public Member Functions | |
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... | |
enum Dumux::GstatRandomField::FieldType |
|
inline |
gridView | the used gridView |
elementMapper | Maps elements of the given grid view |
|
inline |
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.
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 |
|
inline |
|
inline |
|
inline |