[Dune] Working with buffer in CommDataHandleIF ?
    Benedikt Oswald 
    benedikt.oswald at psi.ch
       
    Wed May 12 12:32:45 CEST 2010
    
    
  
Dear Dune, I have a question related to the CommDataHandleIF:
If I use the MessageBuffer like a vector, i.e. like this:
		MessageBuffer& buff
		for(unsigned int dof=0;dof<ndof;++dof)
		{
			DataType x = v_[dofmapper_.template  
global<CODIM>(indexset_.index(entity),dof)];
			buff.write(x);
		}
I also read it on the receiving side like this:
		for(unsigned int dof=0;dof<ndof;++dof)
		{
			DataType x;
			buff.read(x);
			v_[dofmapper_.template global<CODIM>(indexset_.index(entity),dof)]  
+= x;
		}
is that the right thing to do ?
Thanks for some clarification and have a good day! Benedikt
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch,  
Computational Accelerator Scientist, http://amas.web.psi.ch
Paul Scherrer  Institute (PSI), CH-5232 Villigen, Suisse, benedikt.oswald at psi.ch 
, +41(0)56 310 32 12
"Passion is required for any great work, and for the revolution  
passion and audacity are required in big doses.",
  Ernesto 'Che' Guevara, Letter to his parents.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100512/6fd486f1/attachment.htm>
    
    
More information about the Dune
mailing list