[dune-fem] Mapping between 1D and 2D grid

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Fri Aug 31 14:20:06 CEST 2012


Hi Ali.

You should send this to the general dune mailing list since its not directly
dune-fem related and you might get more suggestions.
I have 2:
1) use the map as you indicated. There is the concept of an EntitySeed which you can
    use to store and then recreate entities. Do you need the map in both directions or for example
    only from the 1d to the 2d grid? You could have for example a structure of the form:
    std::vector<Grid2D::EntitySeed> map( Grid1D::IndexSet.size() );
    (I hope you get the idea...)
2) There is a dune-grid-glue module developed by Oliver Sander and Christian Engwer.
     It allows to couple multiple grids also of different dimension in a much more (perhaps too)
    general fashion. I do not really know how well it is maintained at the moment but it might
    be worth a look.
But there might be more possibilities...
Best
Andreas
________________________________________
From: dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Alasdair James McLeay [a.mcleay at sussex.ac.uk]
Sent: 31 August 2012 13:04
To: dune-fem at dune-project.org
Subject: [dune-fem] Mapping between 1D and 2D grid

Hi,

I have a 2D grid, for which I am using Dune::ALUConformGrid. I also have a 1D grid (in a way, the 1D grid represents one of the boundaries of the 2D grid, but I am solving a different problem on this boundary - I have a 1D problem that requires me to perform an integral over the 2D grid on the right hand side). For the 1D grid I am using Dune::OneDGrid.

I am discretising my 2D grid so that each triangle projects onto a single section of the 1D grid. I am doing this manually by ensuring refining 1D and 2D grids to the appropriate level.

I want to map between any triangle in my 2D grid and the equivalent section of my 1D grid. I was thinking I could create a map that stores this reference, as I will need to use it frequently.

Does this make sense? Perhaps there is a much better way to do all of this already provided by Dune? Unfortunately I can't find anything to read on the subject - although I see on:
http://users.dune-project.org/projects/main-wiki/wiki/Grid-Manager_Features

...that some grid managers offer 'communicate()' features. Perhaps this is what I'm after? Is there anything I can read on the subject?

Thanks,
Ali
_______________________________________________
dune-fem mailing list
dune-fem at dune-project.org
http://lists.dune-project.org/mailman/listinfo/dune-fem






More information about the dune-fem mailing list