CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

problems with particle ostream and ILList

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Edison_Ge

Reply
 
LinkBack Thread Tools Display Modes
Old   April 17, 2009, 04:27
Default problems with particle ostream and ILList
  #1
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 8
stephan is on a distinguished road
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:perator<<(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
stephan is offline   Reply With Quote

Old   April 20, 2009, 05:05
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Implement binary IO as well. Look at e.g. solidParticle.
mattijs is offline   Reply With Quote

Old   April 22, 2009, 07:56
Default
  #3
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 8
stephan is on a distinguished road
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
stephan is offline   Reply With Quote

Old   November 5, 2010, 02:08
Default
  #4
Member
 
edison
Join Date: May 2009
Location: Australia
Posts: 33
Rep Power: 8
Edison_Ge is on a distinguished road
Hi, stephan
I have an exactly the same problem. How did you fix yours?
Waiting to be enlightened .

Edison
Edison_Ge is offline   Reply With Quote

Old   November 7, 2010, 21:23
Default
  #5
Member
 
edison
Join Date: May 2009
Location: Australia
Posts: 33
Rep Power: 8
Edison_Ge is on a distinguished road
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 likes this.
Edison_Ge is offline   Reply With Quote

Old   September 30, 2011, 12:04
Default
  #6
New Member
 
Ryan Danks
Join Date: Jan 2011
Posts: 18
Rep Power: 6
RDanks is on a distinguished road
Thanks Edison_Ge!

I made the exact same mistake! I would have stuggled all day if I didn't catch your post.
RDanks is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:40.