Dear Roy, On Thu, 5 Feb 2009, Roy Stogner wrote:
> On Thu, 5 Feb 2009, Tim Kroeger wrote: > >> (3) It so happened that I looked at PetscVector<T>::operator=(const >> std::vector<T>& v) and noticed that in the ghosted case, it might be >> appropiate to set _is_closed to false. This is because for ghosted >> vectors, close() will also update the ghost values automatically. What do >> you think? > > Hmmm... we don't want to change _is_closed (requiring the user to > close() after operator= would be an API change, which I'd like to > avoid as much as possible), but it looks like we need to do > *something* within operator= itself - as is it won't be setting the > ghosted values at all. Well, what about calling this->close() inside operator=()? Or, if that seems too hard for you, copy the ghost-specific part of close() to operator=(). >> Might it be that this was just due to my item (2) above? > > Nope, ex14 gives the same problem even after your close() fix. Can you send me a minimal example for that problem? I'm not sure whether I can help you, but I could at least try. >> Actually, for ghosted vectors, I think localize() isn't required to >> be called at all, is it? > > Baby steps, baby steps. Sure, but what I mean is, wouldn't it make sense to do something like the following: template <typename T> void PetscVector<T>::localize (NumericVector<T>& v_local_in) const { if(this->type()==GHOSTED) { v_local_in = *this; v_local_in->close(); } else { // current code to be placed here. } } Best Regards, Tim -- Dr. Tim Kroeger tim.kroe...@mevis.fraunhofer.de Phone +49-421-218-7710 tim.kroe...@cevis.uni-bremen.de Fax +49-421-218-4236 Fraunhofer MEVIS, Institute for Medical Image Computing Universitaetsallee 29, 28359 Bremen, Germany ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel