RandomFields (version 3.0.5)

RMdivfree: Divfree Covariance Model

Description

RMdivfree is a multivariate covariance model which depends on a univariate stationary covariance model where the covariance function phi(h) is twice differentiable. The corresponding matrix-valued covariance function C of the model only depends on the difference $h$ between two points and it is given by $$C(h)=( - \Delta E + \nabla \nabla^T ) C_0(h)$$

Usage

RMdivfree(phi, var, scale, Aniso, proj)

Arguments

phi
a univariate stationary covariance model (in 2 or 3 dimensions).
var,scale,Aniso,proj
optional parameters; same meaning for any RMmodel. If not passed, the above covariance function remains unmodified.

Value

Details

The model returns the potential field in the first component, the corresponding divfree field and the field of curl strength in the last component.

See also the models RMcurlfree and RMvector.

References

  • Scheuerer, M. and Schlather, M. (2012) Covariance Models for Divergence-Free and Curl-Free Random Vector Fields.Stochastic Models28:3.

See Also

RMcurlfree, RMvector, RMmodel, RFsimulate, RFfit.

Examples

Run this code
set.seed(0)

model <- RMdivfree(RMgauss(), scale=4)
x.seq <- y.seq <- seq(-10, 10, if (interactive()) 0.2 else 5)
simulated <- RFsimulate(model=model, x=x.seq, y=y.seq, grid=TRUE)

plot(simulated)
plot(simulated, select.variables=1)
plot(simulated, select.variables=2:3)
plot(simulated, select.variables=list(2:3))
plot(simulated, select.variables=list(1, 2:3, 4))
plot(simulated, select.variables=list(1, c(1, 2:3), 4))

Run the code above in your browser using DataLab