[dune-fem] Dune::Fem::GeoGridPart vs. Dune::GeometryGrid

Sacconi, Andrea a.sacconi11 at imperial.ac.uk
Tue Nov 5 17:16:35 CET 2013


HI Tobias,

thanks for the tip. I have replicated your example, but I still get the same error from the compiler:

/dune/grid/common/intersectioniterator.hh:89:1: error: no type named ‘GridFamily’ in ‘const struct Dune::Fem::GeoGridPartFamily<Dune::Fem::AdaptiveDiscreteFunction<Dune::Fem::LagrangeDiscreteFunctionSpace<Dune::Fem::FunctionSpace<double, double, 3, 3>, Dune::Fem::AdaptiveLeafGridPart<Dune::AlbertaGrid<2, 3>, (Dune::PartitionIteratorType)4u, false>, 1, Dune::Fem::CachingStorage> > >’

Any idea?
__________________________________________________________

Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk

________________________________________
From: Tobias Malkmus [tomalk at mathematik.uni-freiburg.de]
Sent: 05 November 2013 15:33
To: Sacconi, Andrea
Cc: dune-fem at dune-project.org
Subject: Re: [dune-fem] Dune::Fem::GeoGridPart vs. Dune::GeometryGrid

Hi Andrea


On 11/05/2013 03:34 PM, Sacconi, Andrea wrote:
> Hi everyone,
>
> I would like to ask you a question about the difference between Dune::Fem::GeoGridPart and Dune::GeometryGrid.
>>From what I have understood so far, the former wraps only the leaf level, while the latter keeps track of the entire hierarchy of the grid over which you perform your numerical simulations.
>
> I am trying to modify my code to get a Dune::Fem::GeoGridPart working, but it doesn't. I mean, I am trying to use the same Dune::DiscreteCoordFunction I have already defined for using with Dune::GeometryGrid, but the compiler still complains.
> My idea was to use a Dune::DiscreteCoordFunction which stores the vertices (as a P1 Lagrange function), and to write a method that modifies the DoFs of that function appropriately. Is this a good idea?

To use a Dune::DiscreteCoordFunction for the Dune::Fem::GeoGridPart will
not work.

A code snippet for the definition and construction of a GeoGridPart
might look like this:

//-----------------------------------------------
typedef Dune::Fem::AdaptiveLeafGridPart< GridType > HostGridPartType;
typedef Dune::Fem::FunctionSpace< double, double, gridDim, geoGridDim >
CoordinateFunctionSpaceType;
typedef Dune::Fem::LagrangeDiscreteFunctionSpace< HostGridPartType,
CoordinateFunctionSpaceType, 1 > DiscreteCoordinateFunctionSpaceType;

typedef Dune::Fem::AdaptiveDiscreteFunction<
DiscreteCoordinateFunctionSpaceType > DiscreteCoordinateFunctionType;

typedef Dune::Fem::GeoGridPart< DiscreteCoordinateFunctionType >
GridPartType;

HostGridPartType hostGridPart( grid );
DiscreteCoordinateFunctionSpaceType coordSpace( hostGridPart );
DiscreteCoordinateFunctionType coordFunction("coord", coordSpace );

//( do something to set up the coordFunction, eg. interpolation )

GridPartType gridPart( coordFunction );

//-------------------------------------------------



> Which properties need to be satisfied by Dune::DiscreteCoordFunction ???
>
> By the way, using Dune::GeometryGrid I observed a huge slow down (50 times slower than the case without wrapper) in the assembling of the matrices; I guess it is due to the necessity of converting iterators and so on, internally done by the wrapper. Could Dune::Fem::GeoGridPart speed up the process? Has anyone observed such a tremendous overhead?


I'm also using the geoGridPart but i don't know the exact overhead to
Dune::GeoGrid.


Best Tobias

>
> Thank you very much!
> Andrea
> __________________________________________________________
>
> Andrea Sacconi
> PhD student, Applied Mathematics
> AMMP Section, Department of Mathematics, Imperial College London,
> London SW7 2AZ, UK
> a.sacconi11 at imperial.ac.uk
>
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
>
>


--
Tobias Malkmus                 <tomalk at mathematik.uni-freiburg.de>

Mathematisches Institut               Tel: +49 761 203 5627
Abt. für Angewandte Mathematik        Universität Freiburg
Hermann-Herder-Str. 10
79104 Freiburg





More information about the dune-fem mailing list