[petsc-users] Questions abt DM and DMDALocalToLocalBegin / End

Jed Brown jed at jedbrown.org
Sun Apr 6 09:54:54 CDT 2014


TAY wee-beng <zonexo at gmail.com> writes:

> Hi,
>
> I have questions abt DM and DMDALocalToLocalBegin / End.
>
> I have 3 dof for u,v,w using DMDACreate3d.
>
> Currently I'm using the topology of DM to help update the ghost values 
> on each processor.
>
> I found that to update the ghost values, I only need to use 
> DMDALocalToLocalBegin / End.

It is common for explicit methods to be implemented using only local
vectors.  I recommend using global vectors if you might want to use
implicit methods.

> Another thing is updating ghost values of only a single variable e.g. u.
>
> Is that possible if my DMDACreate3d has 3 dof u,v,w?
>
> Or must I create DMDACreate3d with only 1 dof u?

Just update all variables.  It is usually not very wasteful.  If
profiling and performance analysis shows that your method is limited by
network bandwidth (as opposed to latency or local compute and bandwidth)
then you can profile the same operations having extracted the single
variable.  It is usually not worth it and you're better off structuring
your code to work with all variables.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140406/2db1e223/attachment.pgp>


More information about the petsc-users mailing list