Hi all,
I started to use fenics recently for homogenization/multiscale experiments.
I have periodic function f, defined on CG1 elements in a small domain Y, for example on
eps = 0.1
domain = mshr.Rectangle(Point(0., 0.), Point(eps, eps))
mesh = mshr.generate_mesh(domain, 32)
V = FunctionSpace(mesh, "CG", 1)
f really is the solution of a PDE with periodic constraints on V, but let's take
ex = Expression("sin(x[0]*2*pi/L)*sin(x[1]*2*pi/L)", L=eps)
f = interpolate(ex, V)
Now there is a second domain, \Omega, e.g. the square (0,1)\times(0,1), which (in theory) consists of copies of the small periodic domain.
I need to repeat the function f over the whole domain \Omega, so that in the example I get one function f_\Omega that contains 10\times10 f-sines over the unit square.
Is there some way to do this efficiently with dolfin? Like interpolate only to a portion of a domain, or stack the Y meshs together somehow to build up \Omega..
Thanks, any help is much appreciated :)
Best, David