<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Carsten,<br>
      <br>
    </div>
    [snip]<br>
    <blockquote cite="mid:55FDD70D.6090601@mi.fu-berlin.de" type="cite">
      <pre wrap="">

Instead of this it will always interpolate into a vector
for the whole global basis using the original global indices.
So you would need a

  BlockVector<BlockVector<FieldVector<double,1>>>

to interpolate the indentity as a vector field, if this is
really what you want.</pre>
    </blockquote>
    Thanks for the explanation.  What you propose works as expected.<br>
    Can the code be changed to give an error message instead of the<br>
    segfault?<br>
    <br>
    <blockquote cite="mid:55FDD70D.6090601@mi.fu-berlin.de" type="cite">
      <pre wrap=""> But then you have the x- and y-coordinates
in the first and second velocity components. If you want the
Lagrange-points for all velocity dofs, you need the implicite
tensor construction, i.e.,

  BlockVector<BlockVector<FieldVector<double,dim>>></pre>
    </blockquote>
    This does not work for me.  It compiles and runs, but the
    interpolated values<br>
    are not correct (each FieldVector has the same value in all
    entries).  However,<br>
    this is not a problem to me.  BV<BV<FV<,dim>>>
    does not fit the multi-indices<br>
    of the TaylorHoodBasis, so it is not surprising that this doesn't
    work.<br>
    <br>
    Best,<br>
    Oliver<br>
    <br>
    <blockquote cite="mid:55FDD70D.6090601@mi.fu-berlin.de" type="cite">
      <pre wrap="">

Best,
Carsten



</pre>
      <blockquote type="cite">
        <pre wrap="">
Thanks,
Oliver

Konsole output
Konsole output
~/dune/dune-functions/build-cmake/examples(master)>valgrind
--db-attach=yes ./stokes-taylorhood       
==15716==  
==15716== Warning: --db-attach is a deprecated feature which will be
==15716==    removed in the next release. Use --vgdb-error=1 instead
==15716==  
==15716== Memcheck, a memory error detector
==15716== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==15716== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright
info
==15716== Command: ./stokes-taylorhood
==15716==  
==15716== Invalid write of size 8
==15716==    at 0x45EC02: leaf<const
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, 2, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsigned int, 0ul
</pre>
        <blockquote type="cite">
          <pre wrap="">, long unsigned int> >, Dune::TypeTree::DynamicTreePath>
</pre>
        </blockquote>
        <pre wrap="">(interpolate.hh:147)
==15716==    by 0x45EC02: apply<const
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, 2, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsigned int, 0u
l>, long unsigned int> >&,
Dune::Functions::Imp::LocalInterpolateVisitor<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHo
odNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, std::array<l
ong unsigned int, 2ul>, long unsigned int> >,
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<c
onst Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long
unsigned int, Dune::TypeTree::HybridTreePath<std::integral_constant<l
ong unsigned int, 0ul> > >,
Dune::Functions::DefaultNodeToRangeMap<Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::Defaul
tLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std
::integral_constant<long unsigned int, 0ul> > > >,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::FieldVector<double
, 2> > >&&,
Dune::Functions::LocalAnalyticGridViewFunction<Dune::FieldVector<double,
2>(Dune::FieldVector<double, 2>), Dune::GridView<
Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, main(int,
char**)::<lambda(Dune::FieldVec
tor<double, 2>)>,
Dune::Functions::LocalDerivativeTraits<Dune::Functions::GridViewEntitySet<Dune::GridView<Dune::DefaultLeafGridViewTr
aits<const Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 0>,
Dune::Functions::DefaultDerivativeTraits>::Traits>, Dune::Functi
ons::HierarchicVectorWrapper<const
Dune::Functions::Imp::AllTrueBitSetVector>&&>&,
Dune::TypeTree::MutableDynamicTreePath> (traversal.
hh:76)
==15716==    by 0x45EC02: apply<const
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dun
e::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsi
gned int, 0ul> > >&,
Dune::Functions::Imp::LocalInterpolateVisitor<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHoodNode
Factory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, std::array<long un
signed int, 2ul>, long unsigned int> >,
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
D
une::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long un
signed int, 0ul> > >,
Dune::Functions::DefaultNodeToRangeMap<Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafG
ridViewTraits<const Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u>
</pre>
        <blockquote type="cite">
          <pre wrap="">, long unsigned int, Dune::TypeTree::HybridTreePath<std::inte
</pre>
        </blockquote>
        <pre wrap="">gral_constant<long unsigned int, 0ul> > > >,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::FieldVector<double,
2> >
</pre>
        <blockquote type="cite">
          <pre wrap="">&&,
</pre>
        </blockquote>
        <pre wrap="">Dune::Functions::LocalAnalyticGridViewFunction<Dune::FieldVector<double,
2>(Dune::FieldVector<double, 2>), Dune::GridView<Dune::
DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, main(int,
char**)::<lambda(Dune::FieldVector<do
uble, 2>)>,
Dune::Functions::LocalDerivativeTraits<Dune::Functions::GridViewEntitySet<Dune::GridView<Dune::DefaultLeafGridViewTraits<c
onst Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 0>,
Dune::Functions::DefaultDerivativeTraits>::Traits>, Dune::Functions::H
ierarchicVectorWrapper<const
Dune::Functions::Imp::AllTrueBitSetVector>&&>&,
Dune::TypeTree::MutableDynamicTreePath> (traversal.hh:130
)
==15716==    by 0x45EC02: apply<const
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dun
e::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsi
gned int, 0ul> > >&,
Dune::Functions::Imp::LocalInterpolateVisitor<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHoodNode
Factory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, std::array<long un
signed int, 2ul>, long unsigned int> >,
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
D
une::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long un
signed int, 0ul> > >,
Dune::Functions::DefaultNodeToRangeMap<Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafG
ridViewTraits<const Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u>
</pre>
        <blockquote type="cite">
          <pre wrap="">, long unsigned int, Dune::TypeTree::HybridTreePath<std::inte
</pre>
        </blockquote>
        <pre wrap="">gral_constant<long unsigned int, 0ul> > > >,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::FieldVector<double,
2> >
</pre>
        <blockquote type="cite">
          <pre wrap="">&&,
</pre>
        </blockquote>
        <pre wrap="">Dune::Functions::LocalAnalyticGridViewFunction<Dune::FieldVector<double,
2>(Dune::FieldVector<double, 2>), Dune::GridView<Dune::
DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, main(int,
char**)::<lambda(Dune::FieldVector<do
uble, 2>)>,
Dune::Functions::LocalDerivativeTraits<Dune::Functions::GridViewEntitySet<Dune::GridView<Dune::DefaultLeafGridViewTraits<c
onst Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 0>,
Dune::Functions::DefaultDerivativeTraits>::Traits>, Dune::Functions::H
ierarchicVectorWrapper<const
Dune::Functions::Imp::AllTrueBitSetVector>&&>&> (traversal.hh:41)
==15716==    by 0x45EC02: applyToTree<const
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<con
st Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long unsigned
int, Dune::TypeTree::HybridTreePath<std::integral_constant<lon
g unsigned int, 0ul> > >&,
Dune::Functions::Imp::LocalInterpolateVisitor<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHo
odNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, std::array<l
ong unsigned int, 2ul>, long unsigned int> >,
Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<c
onst Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, long
unsigned int, Dune::TypeTree::HybridTreePath<std::integral_constant<l
ong unsigned int, 0ul> > >,
Dune::Functions::DefaultNodeToRangeMap<Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::Defaul
tLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std
::integral_constant<long unsigned int, 0ul> > > >,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::FieldVector<double
, 2> > >&&,
Dune::Functions::LocalAnalyticGridViewFunction<Dune::FieldVector<double,
2>(Dune::FieldVector<double, 2>), Dune::GridView<
Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, main(int,
char**)::<lambda(Dune::FieldVec
tor<double, 2>)>,
Dune::Functions::LocalDerivativeTraits<Dune::Functions::GridViewEntitySet<Dune::GridView<Dune::DefaultLeafGridViewTr
aits<const Dune::YaspGrid<2>, (Dune::PartitionIteratorType)4u> >, 0>,
Dune::Functions::DefaultDerivativeTraits>::Traits>, Dune::Functi
ons::HierarchicVectorWrapper<const
Dune::Functions::Imp::AllTrueBitSetVector>&&>&> (traversal.hh:188)
==15716==    by 0x45EC02:
interpolateTreeSubset<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHoodNodeFactory<Dune::GridV
iew<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, std::array<long unsigned int, 2ul>, l
ong unsigned int> >,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsigned int,
0ul> >&, Dune::Functions::DefaultNodeToR
angeMap<Dune::Functions::TaylorHoodVelocityTree<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
Dune::YaspGrid<2>, (Dune::Partiti
onIteratorType)4u> >, long unsigned int,
Dune::TypeTree::HybridTreePath<std::integral_constant<long unsigned int,
0ul> > > >, Dune::Bl
ockVector<Dune::FieldVector<double, 2> >&, main(int,
char**)::<lambda(Dune::FieldVector<double, 2>)>&,
Dune::Functions::Imp::AllTrueBi
tSetVector> (interpolate.hh:226)
==15716==    by 0x45EC02:
interpolate<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHoodNodeFactory<Dune::GridView<Dune::
DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, std::array<long unsigned int, 2ul>,
long unsign
ed int> >, Dune::TypeTree::HybridTreePath<std::integral_constant<long
unsigned int, 0ul> >&, Dune::BlockVector<Dune::FieldVector<doubl
e, 2> >&, main(int, char**)::<lambda(Dune::FieldVector<double, 2>)>&,
Dune::Functions::Imp::AllTrueBitSetVector> (interpolate.hh:272)
==15716==    by 0x45EC02:
interpolate<Dune::Functions::DefaultGlobalBasis<Dune::Functions::TaylorHoodNodeFactory<Dune::GridView<Dune::
DefaultLeafGridViewTraits<const Dune::YaspGrid<2>,
(Dune::PartitionIteratorType)4u> >, std::array<long unsigned int, 2ul>,
long unsign
ed int> >, Dune::TypeTree::HybridTreePath<std::integral_constant<long
unsigned int, 0ul> >, Dune::BlockVector<Dune::FieldVector<double
, 2> >&, main(int, char**)::<lambda(Dune::FieldVector<double, 2>)> >
(interpolate.hh:317)
==15716==    by 0x45EC02: main (stokes-taylorhood.cc:277)
==15716==  Address 0x7771a30 is 32 bytes before a block of size 128 in
arena "client"
==15716==  
==15716==  
==15716== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ----




_______________________________________________
dune-functions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dune-functions@dune-project.org">dune-functions@dune-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.dune-project.org/mailman/listinfo/dune-functions">http://lists.dune-project.org/mailman/listinfo/dune-functions</a>

</pre>
      </blockquote>
      <pre wrap="">

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dune-functions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dune-functions@dune-project.org">dune-functions@dune-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.dune-project.org/mailman/listinfo/dune-functions">http://lists.dune-project.org/mailman/listinfo/dune-functions</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>