problems with particle ostream and ILList
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:
 Expected a ')' or a '}' while reading ILList<LListBase, T>, found on line 0 an error
 file: IOstream at line 0.
 From function Istream::readEndList(const char*)
 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!
Implement binary IO as well. Look at e.g. solidParticle.
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
I have an exactly the same problem. How did you fix yours?
Waiting to be enlightened .
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.
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 09:28.|