[Dune] [Dune-Commit] dune-grid r5010 - trunk/grid/test
Oliver Sander
sander at mi.fu-berlin.de
Thu Apr 2 14:01:35 CEST 2009
Shouldn't the old method use the new numbering as well?
Then the test would be okay as it is.
--
Oliver
Christian Engwer schrieb:
> On Thu, Apr 02, 2009 at 12:50:04PM +0200, Martin Nolte wrote:
>
>> Hi Oliver,
>>
>> I thought we agreed in Heidelberg that the subIndex / subId method with
>> variable codimension should use the generic subentity numbering instead of the
>> current DUNE numbering. If that is so, the test is wrong since the renumbering
>> should be taken into account.
>>
>> The AlbertaGrid implementation already switches the numbering accordingly and
>> hence the test fails.
>>
>> Maybe we should agree on the semantics before the weekend.
>>
>
> I think, Martin is right. All new methods should use the new
> numbering.
>
> Christian
>
>
>> Yours,
>>
>> Martin
>>
>> sander at dune-project.org wrote:
>>
>>> Author: sander
>>> Date: 2009-04-02 12:02:35 +0200 (Thu, 02 Apr 2009)
>>> New Revision: 5010
>>>
>>> Modified:
>>> trunk/grid/test/checkindexset.cc
>>> trunk/grid/test/gridcheck.cc
>>> Log:
>>> test whether subIndex methods with dynamic codimension return the same result as their old counterparts with static codim. Patch by Carsten Gr?\195?\164ser
>>>
>>> Modified: trunk/grid/test/checkindexset.cc
>>> ===================================================================
>>> --- trunk/grid/test/checkindexset.cc 2009-04-02 09:45:47 UTC (rev 5009)
>>> +++ trunk/grid/test/checkindexset.cc 2009-04-02 10:02:35 UTC (rev 5010)
>>> @@ -448,6 +448,9 @@
>>>
>>> // the subIndex and the index for subEntity must be the same
>>> assert( vxidx == lset.index( *vxp ));
>>> +
>>> + // static and dynamic method must yield the same result
>>> + assert( vxidx == lset.subIndex(*it,i,dim));
>>>
>>> // check whether the coordinates are the same
>>> assert(vertexCoordsMap.find(vxidx)!=vertexCoordsMap.end());
>>>
>>> Modified: trunk/grid/test/gridcheck.cc
>>> ===================================================================
>>> --- trunk/grid/test/gridcheck.cc 2009-04-02 09:45:47 UTC (rev 5009)
>>> +++ trunk/grid/test/gridcheck.cc 2009-04-02 10:02:35 UTC (rev 5010)
>>> @@ -578,6 +578,26 @@
>>> << " ... subIndex(e,i)=" << subid_e_i
>>> );
>>> }
>>> +
>>> + if( g.levelIndexSet(e.level()).subIndex(e,i,cd)
>>> + != g.levelIndexSet(e.level()).template subIndex<cd>(e,i) )
>>> + {
>>> + int id_e =
>>> + g.levelIndexSet(e.level()).index(e);
>>> + int subid_e_i =
>>> + g.levelIndexSet(e.level()).template subIndex<cd>(e,i);
>>> + int subid_e_i_cd =
>>> + g.levelIndexSet(e.level()).subIndex(e,i,cd);
>>> + DUNE_THROW(CheckError,
>>> + "g.levelIndexSet.subIndex(e,i,cd) "
>>> + << "== g.levelIndexSet.template subIndex<cd>(e,i) failed "
>>> + << "[with cd=" << cd << ", i=" << i << "]"
>>> + << " ... index(e)=" << id_e
>>> + << " ... subIndex<cd>(e,i)=" << subid_e_i
>>> + << " ... subIndex(e,i,cd)=" << subid_e_i_cd
>>> + );
>>> + }
>>> +
>>> }
>>> subIndexCheck<cd-1,Grid,Entity,
>>> Dune::Capabilities::hasEntity<Grid,cd-1>::v> sick(g,e);
>>>
>>>
>>> _______________________________________________
>>> Dune-Commit mailing list
>>> Dune-Commit at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune-commit
>>>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75348 *
* Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list