Hi everyone,
I’m currently working on a diffusion-reaction problem where I would like to use a Gaussian random field (GRF) as the initial condition. I’ve been using the GSTools package to generate GRFs quite easily in Python:
(GSTools Quickstart — GSTools 1.1.1 documentation).
I can generate a 2D grid that visualizes a GRF, and I’d like to interpolate this data so that the GRF can be used as an initial condition for my PDE system. But I’m not sure how to do this, as I don’t have access to a formula to do something like
u = fem.Function(V)
u.interpolate(lambda x: GRF(x)) //interpolate GRF here
Does anyone know how I can accomplish this? I tried to do some digging online and was little surprised at not being able to find examples of others using GRFs as initial conditions. Any help is greatly appreciated, thank you!