[dune-pdelab] Transform Gridfunctions between levelviews

schauer schauer at mechbau.uni-stuttgart.de
Fri Nov 18 15:24:10 CET 2011


Dear PDELabers,

I try to transform gridfunctions between different levels of the same
grid. First I tried to use the GridFunctionToFunctionAdapter(line 208 in
the appended code, commented out in the moment) but somehow it did not
even compile with error message:

/home/schauer/Programme/Dune21_par/dune-pdelab/dune/pdelab/common/typetree/pairtraversal.hh:32:11: error: no type named ‘NodeTag’ in ‘const class std::remove_reference<const Dune::PDELab::GridFunctionToFunctionAdapter<Dune::PDELab::DiscreteGridFunction<Dune::PDELab::GridFunctionSpace<Dune::GridView<Dune::DefaultLevelGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::Pk3DLocalFiniteElementMap<Dune::GridView<Dune::DefaultLevelGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, (Dune::PartitionIteratorType)4u> >, double, double, 2u>, Dune::PDELab::NonoverlappingConformingDirichletConstraints, Dune::PDELab::ISTLVectorBackend<1> >, Dune::PDELab::ISTLBlockVectorContainer<Dune::PDELab::GridFunctionSpace<Dune::GridView<Dune::DefaultLevelGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, (Dune::PartitionIteratorType)4u> >, Dune::PDELab::Pk3DLocalFiniteElementMap<Dune::GridView<Dune::DefaultLevelGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, (Dune::PartitionIteratorType)4u> >, double, double, 2u>, Dune::PDELab::NonoverlappingConformingDirichletConstraints, Dune::PDELab::ISTLVectorBackend<1> >, double, 1> > >&>::type’



Then I tried to use the interpolate function which at least compiles
fine but when running there seems to be a problem with the index sets,
as I received the error message



dune_interpolate: /home/schauer/Programme/Dune21_par/dune-grid/dune/grid/alugrid/common/defaultindexsets.hh:383: Dune::DefaultIndexSet::IndexType Dune::DefaultIndexSet<GridImp, IteratorImp>::subIndex(const typename std::remove_const<_Tp>::type::Traits::Codim<cc>::Entity&, int, unsigned int) const [with int cc = 0, GridImp = Dune::ALU3dGrid<(Dune::ALU3dGridElementType)4u>, IteratorImp = Dune::EntityIterator<0, const Dune::ALU3dGrid<(Dune::ALU3dGridElementType)4u>, Dune::ALU3dGridLevelIterator<0, (Dune::PartitionIteratorType)4u, const Dune::ALU3dGrid<(Dune::ALU3dGridElementType)4u> > >, Dune::DefaultIndexSet::IndexType = unsigned int, typename std::remove_const<_Tp>::type::Traits::Codim<cc>::Entity = Dune::Entity<0, 3, const Dune::ALU3dGrid<(Dune::ALU3dGridElementType)4u>, Dune::ALU3dGridEntity>]: Assertion `indexContainer( codim )( e, i ).index() >= 0' failed.
[heisenberg:13329] *** Process received signal ***
[heisenberg:13329] Signal: Aborted (6)
[heisenberg:13329] Signal code:  (-6)
[heisenberg:13329] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60)
[0x7fd87763ec60]
[heisenberg:13329] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)
[0x7fd8772ced05]
[heisenberg:13329] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x186)
[0x7fd8772d2ab6]
[heisenberg:13329] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__assert_fail
+0xf5) [0x7fd8772c77c5]
[heisenberg:13329]
[ 4] ./dune_interpolate(_ZNK4Dune15DefaultIndexSetINS_9ALU3dGridILNS_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS_14EntityIteratorILi0EKS5_NS_22ALU3dGridLevelIteratorILi0ELNS_21PartitionIteratorTypeE4ES7_EEEEE8subIndexILi0EEEjRKNS_15ALU3dGridFamilyILS2_4ES4_E6Traits5CodimIXT_EE6EntityEij+0xa1) [0x9af639]
[heisenberg:13329]
[ 5] ./dune_interpolate(_ZNK4Dune8IndexSetINS_9ALU3dGridILNS_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS_15DefaultIndexSetIS5_NS_14EntityIteratorILi0EKS5_NS_22ALU3dGridLevelIteratorILi0ELNS_21PartitionIteratorTypeE4ES8_EEEEEEjE8subIndexINS_6EntityILi0ELi3ES8_NS_15ALU3dGridEntityEEEEEjRKT_ij+0x34) [0x9a3d86]
.
.
.

so interpolation is maybe only possible from a grid function living on
the same grid ?

What is now the right way to perform this transformation ?

Thanks a lot for your answers

Volker


-- 

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Volker Schauer (Dipl.Phys)

Institute of Applied Mechanics (Civil Engineering), Chair 1
University of Stuttgart
Pfaffenwaldring 7
D-70569 Stuttgart
GERMANY

Phone ++49 (0)711-68560044
email: schauer at mechbau.uni-stuttgart.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GV1toGV2transformation.tar.gz
Type: application/x-compressed-tar
Size: 3796 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20111118/71408b8e/attachment.bin>


More information about the dune-pdelab mailing list