View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001880 | OpenFOAM | Bug | public | 2015-10-27 14:08 | 2015-10-27 16:31 |
Reporter | AndreasG | Assigned To | henry | ||
Priority | low | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.04 |
Product Version | dev | ||||
Summary | 0001880: Preserve time when reconstructing sets | ||||
Description | When reconstructing cell/face/pointSets, these seem to be written to constant time rather then to the time step they are reconstructed from. To resolve this, three lines in reconstructPar could be changed (see below). | ||||
Steps To Reproduce | diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index db2df9e..8eedb08 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -854,14 +854,17 @@ int main(int argc, char *argv[]) // Write sets forAll(cellSets, i) { + cellSets[i].instance() = runTime.timeName(); cellSets[i].write(); } forAll(faceSets, i) { + faceSets[i].instance() = runTime.timeName(); faceSets[i].write(); } forAll(pointSets, i) { + pointSets[i].instance() = runTime.timeName(); pointSets[i].write(); } } | ||||
Tags | No tags attached. | ||||
|
reconstructPar-write-reconstructed-topoSets-to-right.patch (1,375 bytes)
From 076f964d3c4cba4ed986ffbdf391fefa15ccaf72 Mon Sep 17 00:00:00 2001 From: Andreas <andreas.gross@uni-rostock.de> Date: Tue, 27 Oct 2015 15:03:23 +0100 Subject: [PATCH 834/834] reconstructPar: write reconstructed topoSets to right time --- .../utilities/parallelProcessing/reconstructPar/reconstructPar.C | 3 +++ 1 file changed, 3 insertions(+) diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index db2df9e..8eedb08 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -854,14 +854,17 @@ int main(int argc, char *argv[]) // Write sets forAll(cellSets, i) { + cellSets[i].instance() = runTime.timeName(); cellSets[i].write(); } forAll(faceSets, i) { + faceSets[i].instance() = runTime.timeName(); faceSets[i].write(); } forAll(pointSets, i) { + pointSets[i].instance() = runTime.timeName(); pointSets[i].write(); } } -- 1.9.1 |
|
What now happens for cases where the sets are independent of time and reside in the constant directory? Are they now written to the time directory? |
|
No, they are reconstructed only if one uses the -constant flag and runTime.timeName() returns constant in this case, so the sets will be written to constant as desired. At least a short test seems to confirm this. |
|
Thanks for the clarification. I think a better solution would be for the set constructors to take an IOobject argument which can be created from the IOobject of the source sets. This would be more consistent with the way all other mesh data types are constructed from or for file. In the interim I have pushed a fix based on your proposal but with the setting of the instance just after construction rather than just before write. Please reopen this report if there are any problems with this fix. Resolved by commit deb9df2051b1e6b0f1b2f73295b37ca78fa27565 |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-10-27 14:08 | AndreasG | New Issue | |
2015-10-27 14:08 | AndreasG | File Added: reconstructPar-write-reconstructed-topoSets-to-right.patch | |
2015-10-27 14:51 | henry | Note Added: 0005502 | |
2015-10-27 15:05 | AndreasG | Note Added: 0005503 | |
2015-10-27 16:31 | henry | Note Added: 0005507 | |
2015-10-27 16:31 | henry | Status | new => resolved |
2015-10-27 16:31 | henry | Resolution | open => fixed |
2015-10-27 16:31 | henry | Assigned To | => henry |