[petsc-users] distribute and cells mapping.
Olivier Bonnefon
olivier.bonnefon at avignon.inra.fr
Fri Aug 23 09:35:13 CDT 2013
Hello,
Thanks for your answers, I'm now able to import and distribute a mesh:
if (!rank){
ierr =
DMPlexCreateFromCellList(comm,dim,obNbCells,obNbVertex,3,0,obCells,2,obVertex,dm);CHKERRQ(ierr);
for (i=0;i<obNbBound;i++){
ierr =DMPlexSetLabelValue(*dm, "marker",
obBoundary[i]+obNbCells, 1);CHKERRQ(ierr);
}
}else {
ierr =
DMPlexCreateFromCellList(comm,dim,0,0,3,0,obCells,2,obVertex,dm);CHKERRQ(ierr);
}
ierr = DMPlexDistribute(*dm, partitioner, 0,
&distributedMesh);CHKERRQ(ierr);
if (distributedMesh) {
ierr = DMDestroy(dm);CHKERRQ(ierr);
*dm = distributedMesh;
}
Is it possible to known the resulting partition ? ie, What is the
mapping between the initial cell number and the local cell (used in
DMPlexComputeResidualFEM)?
I need this to write an efficient implementation of the FEM struct
functions f0 and g0, space depending.
Regards,
Olivier B
--
Olivier Bonnefon
INRA PACA-Avignon, Unité BioSP
Tel: +33 (0)4 32 72 21 58
More information about the petsc-users
mailing list