In parallel, each process only stores a subset of the full vector, so you can't access all vector components on every processor. You need to check that the vector index is between NumericVector::first_local_index() and NumericVector::last_local_index() (these functions return a different result in each process). You can then broadcast the result to all processors later on if you want (see Parellel::broadcast).
David On 06/26/2012 11:00 AM, Daniel Vasconcelos wrote: > Hi! > > I have been trying to access the structure that stores the nodal solution > with the operator "()". > > For exemplo, let fem_sys be a transiente system. So I have been trying to > access its values as (*fem_sys.solution)(i) where i is the index. > > It works perfectly in a serial run but if I do a parallel run I receive an > error saying about ghosted vectors. > > How do I am supposed to access the solution vector in a parallel run? > > Best regards, > > Daniel. > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Libmesh-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
