mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
foamToVTK: Default to ASCII format when WM_LABEL_SIZE=64
Based on patch provided by Alexey Matveichev Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1975
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -324,18 +324,19 @@ int main(int argc, char *argv[])
|
|||||||
const bool doWriteInternal = !args.optionFound("noInternal");
|
const bool doWriteInternal = !args.optionFound("noInternal");
|
||||||
const bool doFaceZones = !args.optionFound("noFaceZones");
|
const bool doFaceZones = !args.optionFound("noFaceZones");
|
||||||
const bool doLinks = !args.optionFound("noLinks");
|
const bool doLinks = !args.optionFound("noLinks");
|
||||||
const bool binary = !args.optionFound("ascii");
|
bool binary = !args.optionFound("ascii");
|
||||||
const bool useTimeName = args.optionFound("useTimeName");
|
const bool useTimeName = args.optionFound("useTimeName");
|
||||||
|
|
||||||
// decomposition of polyhedral cells into tets/pyramids cells
|
// Decomposition of polyhedral cells into tets/pyramids cells
|
||||||
vtkTopo::decomposePoly = !args.optionFound("poly");
|
vtkTopo::decomposePoly = !args.optionFound("poly");
|
||||||
|
|
||||||
if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4))
|
if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4))
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
WarningInFunction
|
||||||
<< "floatScalar and/or label are not 4 bytes in size" << nl
|
<< "Using ASCII rather than binary VTK format because "
|
||||||
<< "Hence cannot use binary VTK format. Please use -ascii"
|
"floatScalar and/or label are not 4 bytes in size."
|
||||||
<< exit(FatalError);
|
<< nl << endl;
|
||||||
|
binary = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool nearCellValue = args.optionFound("nearCellValue");
|
const bool nearCellValue = args.optionFound("nearCellValue");
|
||||||
@ -429,7 +430,7 @@ int main(int argc, char *argv[])
|
|||||||
mkDir(fvPath);
|
mkDir(fvPath);
|
||||||
|
|
||||||
|
|
||||||
// mesh wrapper; does subsetting and decomposition
|
// Mesh wrapper; does subsetting and decomposition
|
||||||
vtkMesh vMesh(mesh, cellSetName);
|
vtkMesh vMesh(mesh, cellSetName);
|
||||||
|
|
||||||
|
|
||||||
@ -680,9 +681,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (doWriteInternal)
|
if (doWriteInternal)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Create file and write header
|
// Create file and write header
|
||||||
//
|
|
||||||
fileName vtkFileName
|
fileName vtkFileName
|
||||||
(
|
(
|
||||||
fvPath/vtkName
|
fvPath/vtkName
|
||||||
|
|||||||
Reference in New Issue
Block a user