Problem with multiple geometry grid view in python
Hi,
I am trying to work with a one dimensional grid embedded in two dimensions (think circle embedded in R^2
). My understanding is that there is no way to get this using one of the usual grid managers so I have tried to create something like this using a geometryGridView
:
from dune.grid import structuredGrid as base_grid
gridView_0 = base_grid([0.0], [1.0], [10], periodic=[True])
from dune.fem.space import lagrange as space
space_0 = space(gridView_0, dimRange=2, order=1)
from ufl import SpatialCoordinate
coord_0 = SpatialCoordinate(space_0)
from ufl import as_vector, cos, sin
from math import pi
map_1 = space_0.interpolate(as_vector([cos(2.0*pi*coord_0[0]), sin(2.0*pi*coord_0[0])]))
from dune.fem.view import geometryGridView
gridView_1 = geometryGridView(map_1)
This seems to work well. However, I want to create another grid parametrised over gridView_1
and a finite element space on this new grid:
space_1 = space(gridView_1, dimRange=2, order=1)
coord_1 = SpatialCoordinate(space_1)
map_2 = space_1.interpolate(as_vector([coord_1[0], coord_1[1]]))
gridView_2 = geometryGridView(map_2)
space_2 = space(gridView_2, dimRange=2, order=1)
The last line gives me a long error attached error.txt. My limited understanding of this seems to suggest that the wrong entity
type is being passed at some point which I don't really understand how!
Any pointers/suggestions welcome. This case is not so crucial for my work so not urgent but I thought I would flag in case anyone else seems this problem too.
This is running 2.8 release branches (plus a small patch) - I've attached the singularity def file used to build the container used. dune-2.8.def