[dune-pdelab] localfunctionspace.hh -> globalIndex

Christian Kaltenecker christian_kalt at yahoo.de
Mon Sep 1 09:52:57 CEST 2014


Dear Dune,

I am trying to port the program dune-parsolve from the lecture 
"Parallele Lösung großer Gleichungssysteme" in order to run the program 
with the DUNE 2.3.1 modules.

The code is as follows:
     // interpolation weights are values of coarse grid basis functions 
at fine grid points
     for (typename LFS::Traits::SizeType i=0; i<lfsf.size(); i++)
       {
         typedef typename LFS::Traits::FiniteElementType::
           Traits::LocalBasisType::Traits::RangeType RangeType;
         std::vector<RangeType> phi(lfsc.size());
lfsc.finiteElement().localBasis().evaluateFunction(local_position_in_father[i],phi);
         for (typename LFS::Traits::SizeType j=0; j<lfsc.size(); j++)
           if (phi[j]>1E-6)
             (*this)[lfsf.globalIndex(i)][lfsc.globalIndex(j)] = phi[j];
       }

----------------------------------

Any other compiler error is fixed so far, so this one is the last one I 
have to fix.

What would you recommend to do in this case?

I can also send the whole file containing the code above.

Thanks in advance!

Regards,
Christian Kaltenecker

Am 29.08.2014 um 15:05 schrieb Christian Engwer:
> Dear Christian,
>
> On Fri, Aug 29, 2014 at 02:32:46PM +0200, Christian Kaltenecker wrote:
>> Hello Dune,
>>
>> Thanks for your help regarding my last E-Mail. It was very helpful.
>>
>> Now my next and last problem is concerning the removed globalIndex.
>> In Dune version 2.2 the globalIndex of the localfunctionspace was
>> accessed this way:
>> lfsf.globalIndex(i)
>> but now in the version 2.3.1 the globalIndex-method is missing.
>> I guess that it has something to do with the class DOFIndexContainer.
>>
>> Is there a way to get something like the global index?
> usually it should not be necessary to do so... it would help us to
> learn more about your particular use-case.
>
> The general idea is that we introduce different types of mappings:
>
> DOF -> multi index (this is what you get from the function space)
>      the multi index is a hierarchic index, which store things like
>      entity type, entity index, position in the function-space
>      tree. This hierarchy does not necessarily comply to the the
>      hierarchy induced by your GFS tree structure, but you can reorder
>      it using the ordering tags.
>
> The second component is a mapping
>
> multi index -> container index
>      this is computed by the ordering and is accessible via the
>      lfsindexcache. This class maps from the generic multi index to a
>      (multi) index type which is suitable for your particular container
>      backend. If you are using a flat container, this is only a
>      number. If you are using a blockmatrix this is really a
>      multi-index.
>
> I hope this helps already. For anything else, please explain a little
> bit more about what you need. Usually you should not have to access
> this information yourself.
>
> Ciao
> Christian
>





More information about the dune-pdelab mailing list