[Dune] porting from 2.1.1 to 2.2.1
Marco Cisternino
marco.cisternino at optimad.it
Fri Apr 12 12:51:02 CEST 2013
Good morning,
I'm porting my code from dune 2.1.1 to dune 2.2.1.
I can compile my code but I get a lot of warnings.
First of all, the compiler tells me that boundaryId() method is
deprecated. I based my boundary conditions procedure on it and nothing
was in the release notes about boundaryId(). Should I stop using it? And
what's the alternative?
A more annoying warning is about geometry() method. I use it almost
everywhere in my code, but only 3 times I get a warning. I report the
smaller one:
/home/marco/workspace/ThalesAlenia/lib/dune/2.2.1/dune-grid-2.2.1/dune/grid/common/geometry.hh:
In constructor ‘Dune::Geometry<mydim, cdim, GridImp,
GeometryImp>::Geometry(const GeometryImp<mydim, cdim, GridImp>&) [with
int mydim = 3, int cdim = 3, GridImp = const
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u, ompi_communicator_t*>,
GeometryImp = Dune::ALU3dGridGeometry]’:
/home/marco/workspace/ThalesAlenia/lib/dune/2.2.1/dune-grid-2.2.1/dune/grid/alugrid/3d/entity_imp.cc:165:
instantiated from ‘typename Dune::ALU3dGridEntity<0, dim,
GridImp>::Geometry Dune::ALU3dGridEntity<0, dim, GridImp>::geometry()
const [with int dim = 3, GridImp = const
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u, ompi_communicator_t*>]’
/home/marco/workspace/ThalesAlenia/lib/dune/2.2.1/dune-grid-2.2.1/dune/grid/common/entity.hh:308:
instantiated from ‘typename GridImp::Codim<0>::Geometry Dune::Entity<0,
dim, GridImp, EntityImp>::geometry() const [with int dim = 3, GridImp =
const Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u,
ompi_communicator_t*>, EntityImp = Dune::ALU3dGridEntity]’
thales.cc:523: instantiated from here
/home/marco/workspace/ThalesAlenia/lib/dune/2.2.1/dune-grid-2.2.1/dune/grid/common/geometry.hh:293:
warning: ‘void Dune::Geometry<mydim, cdim, GridImp,
GeometryImp>::deprecationWarning(std::integral_constant<bool, true>)
[with int mydim = 3, int cdim = 3, GridImp = const
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u, ompi_communicator_t*>,
GeometryImp = Dune::ALU3dGridGeometry]’ is deprecated (declared at
/home/marco/workspace/ThalesAlenia/lib/dune/2.2.1/dune-grid-2.2.1/dune/grid/common/geometry.hh:301)
The code which generates it is:
typedef GridType::LeafGridView LeafGridView;
.....
typedef LeafGridView::Codim< 0
>::Partition<Dune::InteriorBorder_Partition>::Iterator LeafElementIterator;
typedef LeafElementIterator::Entity LeafEntity;
.....
for(LeafElementIterator eit =
leafGridView.begin<0,Dune::InteriorBorder_Partition>(); eit != eend; ++eit)
{
LeafEntity & e = *eit;
int indexi = elementMapper.map(e);
LeafEntity::Geometry::GlobalCoordinate center = e.geometry().center();
(LINE 523)
.....
I hope that someone can help, because even if the code works fine,
understand the compiler massage could be very boring.
Thanks a lot.
Marco
--
------------------------------------
Marco Cisternino, Ph.D.
OPTIMAD Engineering s.r.l.
Via Giacinto Collegno 18
10143 Torino - Italy
www.optimad.it
marco.cisternino at optimad.it
+39 011 19719782
------------------------------------
More information about the Dune
mailing list