mturcios777 |
April 11, 2011 13:37 |
Using 1.6 to maintain compatibility with some external packages. So for the full namespace, that would be the Foam::IOobject etc. version of the call?
I figured out an alternative way, and that was to set WRITE_OPTIONS parameter to MUST_WRITE, in which case the dictionary gets updated every time runTime.write() gets called.
As a little background, I am logging the values of a few variables at locations on the boundary of a moving mesh. I want to specify approximate locations in a dictionary, after which I do a search for the faces whose centroid is closest to the points I've specified (at the start of the run). Since I may need to restart the solver at a later time, I need the dictionary to be updated periodically. So, in short, the new IOdictionary is declared:
Code:
IOdictionary updatedDict
(
IOobject
(
"updatedDict",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE,
true
)
);
Then in the runTime loop, I call updatedDict.set(key,value) to update the locations I've been logging, and once runTime.write() is called my dictionary is updated. This may be helpful to those who have been asking how to log locations on a moving boundary.
|