[Dune] Parallel CG Solver
Markus Blatt
Markus.Blatt at ipvs.uni-stuttgart.de
Mon Nov 24 14:33:35 CET 2008
On Mon, Nov 24, 2008 at 12:51:07PM +0100, Arne Rekdal wrote:
> I am using this constructor already.
>
> The file is attached (it depends on dune-grid, dune-istl, and
> dune-disc). Now it uses the UniversalGlobalMapper, and prints the
> output as in the previous post. If I instead change it to use the
> grid.globalIdSet().id it produces MPI errors.
>
In the loop at line 359:
Are you aware that there are FrontEntities, too? Apparently you
neglecting them. You have to assign them to owner on one and copy on
all other processors
loop line 388:
GlobalUniversalMapper maps your identities onto array indices (see the
documentation of the map function.
You have to use the globalIdSet of the grid to get the global index:
globaliD=grid.globalIdSet().id(*it);
BTW:
As you are using dune-disc anyway. Why not use the already provided
functionality from dune-disc?
Dune::LeafP1Function<GridType,NumberType> u(grid,true);
typedef typename
Dune::LeafP1Function<GridType,NumberType>::P1IndexInfoFromGrid
P1IndexInfoFromGrid;
IndexInfoFromGrid indexinfo;
u.fillIndexInfoFromGrid(indexinfo);
typedef Dune::OwnerOverlapCopyCommunication<GlobalId,int> CommunicationType;
CommunicationType oocc(indexinfo,grid.comm());
You might also want to take a look at the LeafP1OperatorAssembler from
dune-disc.
Regards,
Markus
More information about the Dune
mailing list