Add scaling field input
Description
The new parameterization (#86 (closed)) can be inserted. Now support for small scale heterogeneities has to be reenabled.
We came up with the following proposal: FlowParameters
stores three scaling factors for every (level 0) grid cell.

scale_head
,\xi_h
: applies to matric head 
scale_cond
,\xi_K
: applies to conductivity 
scale_por
,\xi_\theta
: is added to porosity (saturated water content)
These parameters can be set through special setter functions that support multiple scaling schemes:
 Miller scaling:
\xi_h = \xi_K
,\xi_\theta = 0
 Warrick scaling:
\xi_h = \xi_K
Proposal
Scaling field
The only input for scaling fields will be H5 datasets. Their values will be interpreted as point values and fed into an interpolator. The interpolator then yields the field values based on global coodinates and will be evaluated for storing the scaling values per cell. Choices will be nearestneighbor interpolator and linear interpolator. Fields will have extensions and offsets the user can choose.
Several interpolators can be merged into a ScaleAdapter, which evaluates them for yielding the actual set of scaling values. Initially, there will be a MillerScaleAdapter
and a DummyScaleAdapter
(which always yields \xi = 1
).
FlowParameters
then stores several of these along with the usual grid element mapping.
The RangeField
of interpolators is Traits::RF
(i.e, double
), whereas the ScaleAdapter
returns a 3 dimensional vector with scaling factors. FlowParameters
inserts these values into the Scaling
struct.
Input through parameter file
The parameter file must support addition of scaling fields. This initial version will only support one field covering the entire domain.
volumes:
sand:
index: 0
type: MvG
parameters:
# ..
silt:
index: 1
type: MvG
parameters:
# ..
scaling:
type: Miller
data:
scale_miller:
file: miller.h5
dataset: global/dataset
offset: [0, 0]
extensions: [1, 1]
interpolation: linear
Interpolators
Build new interpolators in 2D and 3D based on the current implementation and [Wikipedia] (https://en.wikipedia.org/wiki/Bilinear_interpolation).
Maybe compile these into a separate object file.
How to test the implementation?
 Unit test: Interpolator. Load values and verify for certain positions.
 Unit test: Scaling adapter. Load scaling config and verify values for certain positions.
 Unit test: Scaled parameterization. Load parameterization config and very that scaled values coincide with unscaled values plus scaling.
Related issues
Metaissue #63