[Dune] [#433] Error with GridViews (?) in ALUGrid (Attachment added)

Dune dune at dune-project.org
Thu Oct 2 11:18:17 CEST 2008


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Uli Sack (usack) 

Attached to Project - Dune
Summary - Error with GridViews (?) in ALUGrid
Task Type - Bug Report
Category - Alu3D
Status - Unconfirmed
Assigned To - 
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - SVN
Due in Version - Undecided
Due Date - Undecided
Details - A while ago I posted to the mailinglist a problem with the use of P1Functions as GridFuntions. The problem persists but I think I have tracked it to a source somewhere in ALUGrid as with UG the code compiles without problems. I think it could be connected to the GridViews, as in all the inheritance entanglement of the Dune::P1Function there is a happy back and forth between GridViews and Grids where I guess along the way something gets lost such that GridFunctionGlobalEvalDefault<> is no longer recognized as being a GridFunction<> (plug in the according template parameters.) The original post is:

[Hi Dune-community!

I have a method that takes a GridFunction as parameter. The compiler throws an error if I try to plug in a LeafP1Function or an object of a class I derived from GridFunctionGlobalEvalDefault. Also dynamic_casts of objects of either class to a GridFunction fail.
I hope that someone can explain these things to me. I am at a loss. The following gives the details of my problem.

I wrote a class ComposedFunction that implements the composition of two functions deriving from FunctionBase. Now if the inner function is a GridFunction I want to be able to use the composition as a GridFunction as well. Therefore I wrote ComposedGridFunction deriving from ComposedFunction AND GridFunction(Default). Its constructor takes a FunctionBase for the outer function and a GridFunction for the inner function and then calls the constructor of ComposedFunction with these two arguments in the initializer list. Now if I try to compose an arbitrary outer function (let's say TestFunction (see attachment)) with a LeafP1Function as a ComposedFunction it works as expected. But trying to create a ComposedGridFunction with the same two function-objects gives the compiler error:

test.cc:453: error: no matching function for call to ‘ComposedGridFunction<Dune::ALUSimplexGrid<2, 2>, double, double, 1, 1>::ComposedGridFunction(TestFunction<double, double, 1, 1>&, Dune::LeafP1Function<Dune::ALUSimplexGrid<2, 2>, double, 1>&)’
/home/cocktail/usack/entwicklung/dune/ag-common/dune/ag-common/composedgridfunction.hh:32: note: candidates are: ComposedGridFunction<GridType, BT, CT, Bdim, Cdim>::ComposedGridFunction(Dune::FunctionBase<BT, CT, Bdim, Cdim>&, Dune::GridFunction<GridType, BT, Bdim>&) [with GridType = Dune::ALUSimplexGrid<2, 2>, BT = double, CT = double, int Bdim = 1, int Cdim = 1]
/home/cocktail/usack/entwicklung/dune/ag-common/dune/ag-common/composedgridfunction.hh:21: note:                 ComposedGridFunction<Dune::ALUSimplexGrid<2, 2>, double, double, 1, 1>::ComposedGridFunction(const ComposedGridFunction<Dune::ALUSimplexGrid<2, 2>, double, double, 1, 1>&)

The same thing happens if I plug in a TestGridFunction2 object that derives from GridFunctionGlobalEvalDefault whereas it works well with a TestGridFunction that derives from GridFunctionDefault. ]

One or more files have been attached.

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=433

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list