I think there's a lot of merit to the concept of using numpy views of the local vectors and require apply calls to communicate.
Martin 28. nov. 2014 15:04 skrev "Garth N. Wells" <[email protected]>: > > On Thu, 27 Nov, 2014 at 7:38 PM, Johan Hake <[email protected]> wrote: > >> Hello! >> >> In some code I have I uses the indices interface to set local dofs in a >> vector. It turns out that v[indices] = some_values uses the >> GenericVector::set function instead of GenericVector::set_local. This means >> that one need to pass global indices. >> >> I typically use the slicing together with some combination of indices I >> got from the vertex_to_dofs functionality. However, now that returns local >> dofs and it then makes more sense to switch the behavior of v[indices] to >> use local dofs. >> >> Any objections against switching to local indices in v[indices]? >> > > I don't have any objections, but I also don't have a clear view of how we > should interact with distributed vectors from Python re the NumPy wrapping. > It's a bigger job, but it would be nice to think this through for a > consistent interaction between distributed DOLFIN vectors and wrapping as > NumPy objects. > > Garth > > > Johan >> >> >> >> >> > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
