CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Dictionaryclear does not work as expected (http://www.cfd-online.com/Forums/openfoam-bugs/62538-dictionaryclear-does-not-work-expected.html)

gschaider October 18, 2007 14:21

Description: dictionary.clear(
 
Description: dictionary.clear() does not work as expected because it defaults to ILList.clear()
Version: 1.4.1 (but propably any)

When trying to run this little program http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif dictionaryClear.C it produces this output:

Before
{
nix 23;
}

After
{
}

--> FOAM Warning :
From function dictionary::add(entry* ePtr)
in file db/dictionary/dictionary.C at line 51
Reading ""
attempt to add an entry already in dictionary ""
Final
{
}

although the expected output (in my opinion) would be:

Before
{
nix 23;
}

After
{
}

Final
{
nix 24;
}


Possible resolution would be this patch:
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif dictionary.clear.patch

henry October 18, 2007 14:49

Yes your fix is correct, I wil
 
Yes your fix is correct, I will include it in the next release.


All times are GMT -4. The time now is 21:00.