On Tue, Oct 8, 2013 at 1:27 PM, Analabha Roy <[email protected]> wrote:
> > > > On Sun, Oct 6, 2013 at 7:29 AM, Barry Smith <[email protected]> wrote: > >> >> VecScatterCreate(). >> > > > What about > VecGetSubVector()<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html>? > Only works for local subsets. Matt > > >> >> If you wish the sub vector to live on a single process then create a >> sequential vector of the appropriate size on that one process and >> sequential vectors of size zero on all other processes and scatter into >> them. >> >> Barry >> >> On Oct 2, 2013, at 6:27 AM, Rui Emanuel Ferreira da Silva < >> [email protected]> wrote: >> >> > I am writing to you to ask some technical problems that I am dealing >> > with the use of PETSc. >> > >> > The problem that I am facing is the following: I have defined a vector >> in Petsc which was created with VecCreateMPI. After that, I read this >> vector from an external file with a PETSc viewer. >> > >> > So if the initial vector is V with size N, I want to obtain a smaller >> vector U with size M, where M<N. I have an array of integers that are the >> indexes of V that I want to pass to U. >> > >> > How can I do this? >> > >> > Regards >> > >> > ------------------- >> > Rui Silva >> > EMTCCM (European Master in Theoretical Chemistry and Computational >> Modelling) >> > UAM, Departamento de Química, Módulo 13 >> > CAMPUS >> http://www.uam.es/departamentos/ciencias/quimica/spline/index.html >> > ------------------- >> > >> >> > > > -- > --- > *Analabha Roy* > C.S.I.R <http://www.csir.res.in> Senior Research > Associate<http://csirhrdg.res.in/poolsra.htm> > Saha Institute of Nuclear Physics <http://www.saha.ac.in> > Section 1, Block AF > Bidhannagar, Calcutta 700064 > India > *Emails*: [email protected], [email protected] > *Webpage*: http://www.ph.utexas.edu/~daneel/ > -- 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
