[petsc-users] Points in a ball

Matthew Knepley knepley at gmail.com
Tue Oct 20 08:57:22 CDT 2015


On Tue, Oct 20, 2015 at 2:53 AM, Francesco Caimmi <
francesco.caimmi at polimi.it> wrote:

> Dear all,
>
>
>
> for an application I have in mind I have a domain divided in cells (more
> or less) and for each cell centroid, say ci, I need to know which cell
> centroids are inside a spherical neighbourhood of radius r centred at ci.
>
>
>
> Were the centroids placed on regular grid, a typical value for the ratio
> of r over the grid spacing would be something like 3 or 4.
>
>
>
> However, since the discrete domain is actually not structured, I am using
> a DMPlex object to manage the domain.
>
>
>
> It is not very clear to me *if* and *how* I can tell the DMPlex to add
> ghost points for all the points in such a spherical neighbourhood. If I
> were using DMDA object I think I could just set the stencil width, but I
> wasn't able to figure out a corresponding option/procedure for DMPlex (if
> it exists).
>
>
>
> Any hint would be really really appreciated.
>

The function that defines grid overlap is here:


https://bitbucket.org/petsc/petsc/src/fc309a34c451569cb3041ed38231443f9c022d73/src/dm/impls/plex/plexdistribute.c?at=master&fileviewer=file-view-default#plexdistribute.c-546

It calls a routine to define this overlap topologically


https://bitbucket.org/petsc/petsc/src/fc309a34c451569cb3041ed38231443f9c022d73/src/dm/impls/plex/plexdistribute.c?at=master&fileviewer=file-view-default#plexdistribute.c-612

You would have to modify this function to use a geometric criterion


https://bitbucket.org/petsc/petsc/src/fc309a34c451569cb3041ed38231443f9c022d73/src/dm/impls/plex/plexpartition.c?at=master&fileviewer=file-view-default#plexpartition.c-1470

If you do this, I can put it in as an option.

  Thanks,

    Matt


> Best Regards,
>
> --
>
> Francesco Caimmi
>
> Laboratorio di Ingegneria dei Polimeri
>
> http://www.chem.polimi.it/polyenglab/
>
>
>
> Politecnico di Milano - Dipartimento di Chimica,
>
> Materiali e Ingegneria Chimica “Giulio Natta”
>
>
>
> P.zza Leonardo da Vinci, 32
>
> I-20133 Milano
>
> Tel. +39.02.2399.4711
>
> Fax +39.02.7063.8173
>
>
>
> francesco.caimmi at polimi.it
>
> Skype: fmglcaimmi (please arrange meetings by e-mail)
>
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151020/1a625fd2/attachment.html>


More information about the petsc-users mailing list