CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   problems with particle ostream and ILList (http://www.cfd-online.com/Forums/openfoam-solving/63720-problems-particle-ostream-illist.html)

stephan April 17, 2009 04:27

problems with particle ostream and ILList
 
Hi all,

i have a strange problem running my own lagrangian solver in parallel.
once particles moves from one processor to the other foam complains like this:
[0] Expected a ')' or a '}' while reading ILList<LListBase, T>, found on line 0 an error
[0]
[0] file: IOstream at line 0.
[0]
[0] From function Istream::readEndList(const char*)
[0] in file db/IOstreams/IOstreams/Istream.C at line 159.
so it seems that something is wrong with the stream but i have no clue what exactly went wrong and why.
Writing data /reading data and restarting runs works fine so i guess i something to do with the routine
Foam::Ostream& Foam::operator<<(Ostream& os, const parcel& p).
(which is declared friend to the parcel class and still a member of the parcel class (what is strange for me too))
I hope somebody might help me.
Any help would be really appreciated.

Thanks in advance!
Regards
Stephan

mattijs April 20, 2009 05:05

Implement binary IO as well. Look at e.g. solidParticle.

stephan April 22, 2009 07:56

Hi Mattijs,

thanks for the hint - i used dieselFoam as the base version but still having the mentioned problems. actually i can write/read/restart in binary formats too and as shown in dieselFoam i implemented binary io too - but still it failes.
does anybody has an idea how to efficiently debug this problem.
still thanks to mattijs
regards
stephan

Edison_Ge November 5, 2010 02:08

Hi, stephan
I have an exactly the same problem. How did you fix yours?
Waiting to be enlightened .

Edison

Edison_Ge November 7, 2010 20:23

I fixed my bug it turns out that after I introduced new private member to my particle class I forgot to put them also in the Ostream operator<<. I left it here hopefully it will help anyone who has the same problem.

RDanks September 30, 2011 12:04

Thanks Edison_Ge!

I made the exact same mistake! I would have stuggled all day if I didn't catch your post.


All times are GMT -4. The time now is 02:28.