|
[Sponsors] |
November 15, 2011, 09:21 |
porousZone.C writeDict()
|
#1 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 16 |
Dear Foamers,
Can you help me understand which purpose this function serves? http://foam.sourceforge.net/docs/cpp...ce.html#l00394 Code:
00394 void Foam::porousZone::writeDict(Ostream& os, bool subDict) const 00395 { 00396 if (subDict) 00397 { 00398 os << indent << token::BEGIN_BLOCK << incrIndent << nl; 00399 os.writeKeyword("name") 00400 << zoneName() << token::END_STATEMENT << nl; 00401 } 00402 else 00403 { 00404 os << indent << zoneName() << nl 00405 << indent << token::BEGIN_BLOCK << incrIndent << nl; 00406 } 00407 00408 if (dict_.found("note")) 00409 { 00410 os.writeKeyword("note") 00411 << string(dict_.lookup("note")) << token::END_STATEMENT << nl; 00412 } 00413 00414 coordSys_.writeDict(os, true); 00415 00416 if (dict_.found("porosity")) 00417 { 00418 os.writeKeyword("porosity") 00419 << porosity() << token::END_STATEMENT << nl; 00420 } 00421 00422 if (dict_.found("intensity")) 00423 { 00424 os.writeKeyword("intensity") 00425 << intensity() << token::END_STATEMENT << nl; 00426 } 00427 00428 if (dict_.found("mixingLength")) 00429 { 00430 os.writeKeyword("mixingLength") 00431 << mixingLength() << token::END_STATEMENT << nl; 00432 } 00433 00434 // powerLaw coefficients 00435 if (const dictionary* dictPtr = dict_.subDictPtr("powerLaw")) 00436 { 00437 os << indent << "powerLaw"; 00438 dictPtr->write(os); 00439 } 00440 00441 // Darcy-Forchheimer coefficients 00442 if (const dictionary* dictPtr = dict_.subDictPtr("Darcy")) 00443 { 00444 os << indent << "Darcy"; 00445 dictPtr->write(os); 00446 } 00447 00448 // thermalModel 00449 if (const dictionary* dictPtr = dict_.subDictPtr("thermalModel")) 00450 { 00451 os << indent << "thermalModel"; 00452 dictPtr->write(os); 00453 } 00454 00455 os << decrIndent << indent << token::END_BLOCK << endl; 00456 } 00457 Hisham |
|
November 16, 2011, 05:33 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40 |
Quote:
|
||
November 16, 2011, 05:42 |
|
#3 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 16 |
Just that ...... Is it not then needed by any other class?????
I mean it is not called by OF for any reason than if the developer (i.e. I) calls it ?? |
|
November 16, 2011, 05:46 |
|
#4 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40 |
AFAIK it is just part of the IO for the class. The only place it might be used indirectly is if you need a SHA1 of the input dictionary.
|
|
November 16, 2011, 05:59 |
|
#5 |
Senior Member
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 16 |
Thanks a lot Olesen. The issue is that I'm developing a class based on the porousZone class and was wondering if I should invest time modifying this function .....
I guess I will save my time for now and leave it as is, until I have more concrete info or a related error! Best regards, Hisham |
|
Tags |
porouszone, writedict |
Thread Tools | Search this Thread |
Display Modes | |
|
|