Skip to content

#849 YaspGrid creates entities of unsupported codimension in communicate()

Metadata

Property Value
Reported by Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de)
Reported at Dec 6, 2010 11:39
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Oliver Sander (oliver.sander@tu-dresden.de)
Last edited at Dec 6, 2010 14:49
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Dec 6, 2010 14:49
Closed in version Unknown
Resolution Fixed
Comment Patch applied in dune-grid 7218. Thanks.

Description

In YaspGrid, a TMP steps through all codimensions of the grid and repeatedly calls the method communicateCodim(), which is templated on the codimension. That method then checks whether or not that codimension is supported (vertices or cells) and either starts the data transfer or throws an exception. Unfortunately, the compiler is still forced to instantiate communicateCodim() for all codimensions, which is a waste of compile time. Moreover, and much more problematic, that method somehow constructs entity types of unsupported codimensions and passes them to the DataHandle. At that point I have a problem, because I need to wrap these entities in my meta grid before I can forward them to user code. Trying to do that (saving them in an EntityPointer) causes a compilation error (which is a good thing IMHO).

The attached patch fixes the problem by making sure that communicateCodim() only gets instantiated for codim == 0 and codim == dim.

Attachments