#957 Remove grid dimension from BasicGeometry
Metadata
Property | Value |
---|---|
Reported by | Oliver Sander (oliver.sander@tu-dresden.de) |
Reported at | Oct 1, 2011 20:36 |
Type | Feature Request |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Last edited at | Jun 24, 2014 11:06 |
Closed by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Closed at | Jun 24, 2014 11:06 |
Closed in version | Unknown |
Resolution | Won't implement |
Comment | The BasicGeometry has been completely removed. |
Description
If I have understood correctly the BasicGeometry class is conceptually independent of a grid. It encapsulates the idea of a mapping from a reference element into a Euclidean world space.
However, in the implementation there are references to a grid. In particular, the class DefaultGeometryTraits (which parametrizes BasicGeometries), contains a member dimGrid. It is used by BasicGeometry to export an integer 'codimension'. The 'dimGrid' is also used to instantiate the Hybrid and Nonhybrid Mappings.
Are these things leftovers from former times, or am I not understanding the construction correctly? The attached patch removes dimGrid and codimension and uses the geometry dimension for the mappings. If applied, the GenericGeometry unit test still compile. test-geogrid fails however, with an error in topologytypes.hh. Since I don't understand the error I ask for help on it.
thanks, Oliver
sander@igel:~/dune/dune-grid/dune/grid/test$ make test-geogrid CXXFLAGS="-w"
g++ -std=c++0x -DHAVE_CONFIG_H -I. -I../../.. -I/home/sander/dune/dune-common -I../../.. -DDUNE_DEVEL_MODE -DDUNE_GRID_EXAMPLE_GRIDS_PATH="../../../doc/grids/" -I/home/sander/dune/dune-common -I/home/sander/dune/dune-common -DGRIDDIM=2 -DWORLDDIM=2 -DYASPGRID -I/usr/include/alberta -DALBERTA_DIM=2 -DENABLE_ALBERTA -I/usr/include/ug -DENABLE_UG -I/home/sander/libamiramesh/include -DHX_HAS_STDIOSTREAM -I/home/sander/libpsurface-1.2.0/include -I/home/sander/alugrid-1.23-inst/include -I/home/sander/alugrid-1.23-inst/include/serial -I/home/sander/alugrid-1.23-inst/include/duneinterface -DENABLE_ALUGRID -I/home/sander/alugrid-1.23-inst/include/parallel -I/usr/include -DENABLE_GMP=1 -DCOORDFUNCTION=IdenticalCoordFunction<double,2> -DCACHECOORDFUNCTION=0 -w -MT test_geogrid-test-geogrid.o -MD -MP -MF .deps/test_geogrid-test-geogrid.Tpo -c -o test_geogrid-test-geogrid.o test -f 'test-geogrid.cc' || echo './'
test-geogrid.cc
In file included from ../../../dune/grid/genericgeometry/subtopologies.hh:11:0,
from ../../../dune/grid/common/genericreferenceelements.hh:10,
from ../../../dune/grid/common/geometry.hh:13,
from ../../../dune/grid/common/grid.hh:1384,
from ../../../dune/grid/yaspgrid.hh:16,
from ../../../config.h:556,
from test-geogrid.cc:1:
../../../dune/grid/genericgeometry/topologytypes.hh: In instantiation of ‘Dune::GenericGeometry::Topology<3u, 0u>’:
../../../dune/grid/genericgeometry/geometry.hh:286:87: instantiated from ‘Dune::GenericGeometry::BasicGeometry<0, Dune::GenericGeometry::GlobalGeometryTraits<const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> > > >::NonHybrid’
../../../dune/grid/genericgeometry/geometry.hh:291:9: instantiated from ‘Dune::GenericGeometry::BasicGeometry<0, Dune::GenericGeometry::GlobalGeometryTraits<const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> > > >’
../../../dune/grid/genericgeometry/geometry.hh:535:11: instantiated from ‘Dune::GenericGeometry::Geometry<0, 2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> > >’
../../../dune/grid/common/geometry.hh:70:35: instantiated from ‘Dune::Geometry<0, 2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >, Dune::GenericGeometry::Geometry>’
../../../dune/grid/common/grid.hh:1374:10: instantiated from ‘Dune::MakeableInterfaceObject<Dune::Geometry<0, 2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >, Dune::GenericGeometry::Geometry> >’
../../../dune/grid/geometrygrid/entity.hh:133:61: [ skipping 3 instantiation contexts ]
../../../dune/grid/common/grid.hh:1374:10: instantiated from ‘Dune::MakeableInterfaceObject<Dune::Entity<2, 2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >, Dune::GeoGrid::Entity> >’
../../../dune/grid/geometrygrid/entitypointer.hh:117:59: instantiated from ‘Dune::GeoGrid::EntityPointer<Dune::GeoGrid::EntityPointerTraits<2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> > >, false>’
../../../dune/grid/common/entitypointer.hh:101:15: instantiated from ‘Dune::EntityPointer<const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >, Dune::GeoGrid::EntityPointer<Dune::GeoGrid::EntityPointerTraits<2, const Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> > >, false> >’
gridcheck.cc:863:7: instantiated from ‘void gridcheck(Grid&) [with Grid = Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >]’
test-geogrid.cc:68:3: instantiated from ‘void test(const string&) [with GeometryGridType = Dune::GeometryGrid<Dune::YaspGrid<2>, Dune::IdenticalCoordFunction<double, 2u> >, std::string = std::basic_string]’
test-geogrid.cc:109:30: instantiated from here
../../../dune/grid/genericgeometry/topologytypes.hh:205:7: error: static assertion failed: "id too large."