[dune-pdelab] parallel L2-error norms and parallel volume integrals

Michael Wenske m_wens01 at wwu.de
Tue Dec 11 14:46:28 CET 2018


Hi Gregor,

I ran the following test for a yasp grid of 40x40 on two ranks with
overlap=1:

//do node- type report:
        uint interior_nodes = 0;
        uint border_nodes= 0;
        uint overlap_nodes= 0;
        uint front_nodes= 0;
        uint ghost_nodes= 0;

        for (typename GridViewType::template Codim<DIM>::Iterator vert =
(*gv_p).template begin<DIM>(); vert != (*gv_p).template end<DIM>();
++vert) {
            if (vert->partitionType() ==
Dune::PartitionType::OverlapEntity) overlap_nodes++;
            if (vert->partitionType() ==
Dune::PartitionType::InteriorEntity) interior_nodes++;
            if (vert->partitionType() ==
Dune::PartitionType::BorderEntity) border_nodes++;
            if (vert->partitionType() ==
Dune::PartitionType::FrontEntity) front_nodes++;
            if (vert->partitionType() ==
Dune::PartitionType::FrontEntity) ghost_nodes++;
        }

        std::cout <<"--- rank: " << rank << " VERTICES: interior: "<<
interior_nodes<<"; border: "<< border_nodes<<"; overlap: "
                <<overlap_nodes <<"; front: "<< front_nodes<<"; ghost:
"<<ghost_nodes<<std::endl;

        //do cell- type report:
        uint interior_cells = 0;
        uint  border_cells= 0;
        uint  overlap_cells= 0;
        uint  front_cells= 0;
        uint  ghost_cells= 0;

        for (typename GridViewType::template Codim<0>::Iterator cell =
(*gv_p).template begin<0>(); cell != (*gv_p).template end<0>(); ++cell) {
            if (cell->partitionType() ==
Dune::PartitionType::OverlapEntity) overlap_cells++;
            if (cell->partitionType() ==
Dune::PartitionType::InteriorEntity) interior_cells++;
            if (cell->partitionType() ==
Dune::PartitionType::BorderEntity) border_cells++;
            if (cell->partitionType() ==
Dune::PartitionType::FrontEntity) front_cells++;
            if (cell->partitionType() ==
Dune::PartitionType::FrontEntity) ghost_cells++;
        }
        std::cout <<"--- rank: " << rank << " CELLS: interior: "<<
interior_cells<<"; border: "<< border_cells<<"; overlap: "
                <<overlap_cells <<"; front: "<< front_cells<<"; ghost:
"<<ghost_cells<<std::endl;


The output was:

--- rank: 0 VERTICES: interior: 820; border: 41; overlap: 0; front: 41;
ghost: 41
--- rank: 1 VERTICES: interior: 820; border: 41; overlap: 0; front: 41;
ghost: 41

--- rank: 0 CELLS: interior: 800; border: 0; overlap: 40; front: 0; ghost: 0
--- rank: 1 CELLS: interior: 800; border: 0; overlap: 40; front: 0; ghost: 0

so yes, I think that should do it, at least if you iterate over cells.

lg,

Michael





On 11.12.18 14:33, Gregor Corbin wrote:
> Hi,
>
> i think that if the l2norm is modified with something like this in the
> element-loop it will prevent double integration of overlapping parts:
>
>     if (eit->partitionType() != Dune::InteriorEntity) {continue;}
>
> @Steffen: is this correct or am i overlooking aome subtleties in the
> partitioning?
>
> lg,
>
> Gregor
>
> Am 11.12.18 um 14:22 schrieb Michael Wenske:
>> The l2norm.hh iterates via a templated iterator over the gridview. You
>> said it is not correct, does that mean
>> that the PDELab iterators iterate over the overlap-entities doubly?
>>
>> lg,
>>
>> Michael
>
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune-pdelab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20181211/21ee5617/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20181211/21ee5617/attachment.sig>


More information about the dune-pdelab mailing list