View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003409 | OpenFOAM | Bug | public | 2019-12-09 08:39 | 2019-12-13 08:18 |
Reporter | tniemi | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003409: Regression bug in Ensight part | ||||
Description | In commit (https://github.com/OpenFOAM/OpenFOAM-dev/commit/409548cbccac26e5c9632d2543505f659da58945) "os.writeKeyword" was replaced with "writeKeyword(os, ..)" and I assume this was made with search&replace with the assumption that os is a regular OStream. However, in some Ensight-related files os is "ensightGeoFile" or "ensightFile", which have their own specializations of writeKeyword (=write + add newline + some additional logic). The commit makes them use the regular writeKeyword which produces invalid files due to missing newline. I have attached a diff-file which simply reverses the changes in the affected files. | ||||
Tags | No tags attached. | ||||
|
patch.diff (3,592 bytes)
diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C index d079cb9..17b386c 100644 --- a/src/conversion/ensight/part/ensightPartCells.C +++ b/src/conversion/ensight/part/ensightPartCells.C @@ -307,7 +307,7 @@ void Foam::ensightPartCells::writeConnectivity const labelUList& pointMap ) const { - writeKeyword(os, key); + os.writeKeyword(key); os.write(idList.size()); os.newline(); diff --git a/src/conversion/ensight/part/ensightPartFaces.C b/src/conversion/ensight/part/ensightPartFaces.C index ed03f68..7423e5d 100644 --- a/src/conversion/ensight/part/ensightPartFaces.C +++ b/src/conversion/ensight/part/ensightPartFaces.C @@ -259,7 +259,7 @@ void Foam::ensightPartFaces::writeConnectivity const labelUList& pointMap ) const { - writeKeyword(os, key); + os.writeKeyword(key); os.write(idList.size()); os.newline(); diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C index e1e4b35..049a188 100644 --- a/src/conversion/ensight/part/ensightPartIO.C +++ b/src/conversion/ensight/part/ensightPartIO.C @@ -179,7 +179,7 @@ void Foam::ensightPart::writeGeometry writeHeader(os, true); // write points - writeKeyword(os, "coordinates"); + os.writeKeyword("coordinates"); os.write(ptList.nPoints); os.newline(); @@ -226,7 +226,7 @@ void Foam::ensightPart::writeScalarField if (perNode) { - writeKeyword(os, "coordinates"); + os.writeKeyword("coordinates"); writeFieldList(os, field, labelUList::null()); } else @@ -237,7 +237,7 @@ void Foam::ensightPart::writeScalarField if (idList.size()) { - writeKeyword(os, elementTypes()[elemI]); + os.writeKeyword(elementTypes()[elemI]); writeFieldList(os, field, idList); } } @@ -261,7 +261,7 @@ void Foam::ensightPart::writeVectorField if (perNode) { - writeKeyword(os, "coordinates"); + os.writeKeyword("coordinates"); writeFieldList(os, field0, labelUList::null()); writeFieldList(os, field1, labelUList::null()); writeFieldList(os, field2, labelUList::null()); @@ -274,7 +274,7 @@ void Foam::ensightPart::writeVectorField if (idList.size()) { - writeKeyword(os, elementTypes()[elemI]); + os.writeKeyword(elementTypes()[elemI]); writeFieldList(os, field0, idList); writeFieldList(os, field1, idList); writeFieldList(os, field2, idList); diff --git a/src/conversion/ensight/part/ensightPartTemplates.C b/src/conversion/ensight/part/ensightPartTemplates.C index e2a6200..7b094f4 100644 --- a/src/conversion/ensight/part/ensightPartTemplates.C +++ b/src/conversion/ensight/part/ensightPartTemplates.C @@ -44,7 +44,7 @@ void Foam::ensightPart::writeField if (perNode) { - writeKeyword(os, "coordinates"); + os.writeKeyword("coordinates"); for ( direction cmpt=0; @@ -63,7 +63,7 @@ void Foam::ensightPart::writeField if (idList.size()) { - writeKeyword(os, elementTypes()[elemI]); + os.writeKeyword(elementTypes()[elemI]); for ( |
|
Is the EnSight converter still needed? My understanding is that EnSight is now released with an OpenFOAM reader, can we now drop the reader and converter supplied with OpenFOAM? |
|
Well, I don't know about the EnSight software, but I have found the EnSight format to be better than VTK for sampled surfaces. ParaView can read EnSight and the format allows to store mesh in a separate file, which combined with binary writing can reduce disk space usage by a huge fraction compared to (legacy) VTK-files where each time step must have a copy of the surface mesh. |
|
resolved by commit 52255e53a7a983995aa2e27b64b8fcc3399d15b6 |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-09 08:39 | tniemi | New Issue | |
2019-12-09 08:39 | tniemi | File Added: patch.diff | |
2019-12-10 09:58 | henry | Note Added: 0010975 | |
2019-12-10 11:12 | tniemi | Note Added: 0010977 | |
2019-12-12 13:09 | henry | Assigned To | => henry |
2019-12-12 13:09 | henry | Status | new => resolved |
2019-12-12 13:09 | henry | Resolution | open => fixed |
2019-12-12 13:09 | henry | Fixed in Version | => dev |
2019-12-12 13:09 | henry | Note Added: 0010979 |