[dune-pdelab] [patch] Fix deprecation warnings

Christian Engwer christian.engwer at uni-muenster.de
Fri Mar 13 20:45:56 CET 2015


Thanks :-) patches applied...

On Fri, Mar 13, 2015 at 03:51:15PM +0100, Oliver Sander wrote:
> Dear pdelab team,
> please find attached two small patches that fix a number of deprecation warnings.
> Regards,
> Oliver

> From 281814691d9354c218272b319a199dfd45e64106 Mon Sep 17 00:00:00 2001
> From: Oliver Sander <sander at igpm.rwth-aachen.de>
> Date: Fri, 13 Mar 2015 15:47:25 +0100
> Subject: [PATCH 1/2] [cleanup] Do not dereference what used to by
>  EntityPointers
>
> Those EntityPointers are Entities now, and don't have to be dereferenced.
> This fixes a few warnings.
> ---
>  dune/pdelab/gridoperator/default/assembler.hh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/dune/pdelab/gridoperator/default/assembler.hh b/dune/pdelab/gridoperator/default/assembler.hh
> index 72f0d55..70b3202 100644
> --- a/dune/pdelab/gridoperator/default/assembler.hh
> +++ b/dune/pdelab/gridoperator/default/assembler.hh
> @@ -176,7 +176,7 @@ namespace Dune{
>                            {
>                              // compute unique id for neighbor
>
> -                            const typename GV::IndexSet::IndexType idn = cell_mapper.map(*(iit->outside()));
> +                            const typename GV::IndexSet::IndexType idn = cell_mapper.map(iit->outside());
>
>                              // Visit face if id is bigger
>                              bool visit_face = ids > idn || require_skeleton_two_sided;
> @@ -185,7 +185,7 @@ namespace Dune{
>                              if (visit_face)
>                                {
>                                  // Bind local test space to neighbor element
> -                                lfsvn.bind(*(iit->outside()));
> +                                lfsvn.bind(iit->outside());
>                                  lfsvn_cache.update();
>
>                                  // Notify assembler engine about binds
> @@ -197,7 +197,7 @@ namespace Dune{
>                                  if(require_uv_skeleton){
>
>                                    // Bind local trial space to neighbor element
> -                                  lfsun.bind(*(iit->outside()));
> +                                  lfsun.bind(iit->outside());
>                                    lfsun_cache.update();
>
>                                    // Notify assembler engine about binds
> --
> 2.1.4
>

> From e938d0f78a61ba322e4e71e79146fa0899200d34 Mon Sep 17 00:00:00 2001
> From: Oliver Sander <sander at igpm.rwth-aachen.de>
> Date: Fri, 13 Mar 2015 15:49:40 +0100
> Subject: [PATCH 2/2] [cleanup] Pass shared_ptr instead of raw pointer to the
>  VTKWriter
>
> ---
>  dune/pdelab/gridfunctionspace/vtk.hh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/dune/pdelab/gridfunctionspace/vtk.hh b/dune/pdelab/gridfunctionspace/vtk.hh
> index 59b06e4..10fa0db 100644
> --- a/dune/pdelab/gridfunctionspace/vtk.hh
> +++ b/dune/pdelab/gridfunctionspace/vtk.hh
> @@ -445,10 +445,10 @@ namespace Dune {
>            switch (dgf->dataSetType())
>              {
>              case DGF::Output::vertexData:
> -              vtk_writer.addVertexData(new VTKGridFunctionAdapter<DGF>(dgf,name.c_str()));
> +              vtk_writer.addVertexData(std::make_shared<VTKGridFunctionAdapter<DGF> >(dgf,name.c_str()));
>                break;
>              case DGF::Output::cellData:
> -              vtk_writer.addCellData(new VTKGridFunctionAdapter<DGF>(dgf,name.c_str()));
> +              vtk_writer.addCellData(std::make_shared<VTKGridFunctionAdapter<DGF> >(dgf,name.c_str()));
>                break;
>              default:
>                DUNE_THROW(NotImplemented,"Unsupported data set type");
> --
> 2.1.4
>




> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab


--
Prof. Dr. Christian Engwer
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the dune-pdelab mailing list