mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: handle manifold cells in VTK, Ensight output (#2396)
- also disables PointData if manifold cells are detected. This is a partial workaround for volPointInterpolation problems with handling manifold cells.
This commit is contained in:
@ -98,7 +98,6 @@ Description
|
||||
directory | The output directory name | no | postProcessing/NAME
|
||||
overwrite | Remove existing directory | no | false
|
||||
consecutive | Consecutive output numbering | no | false
|
||||
nodeValues | Write values at nodes | no | false
|
||||
\endtable
|
||||
|
||||
\heading Output Selection
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -347,15 +347,18 @@ bool Foam::functionObjects::vtkWrite::write()
|
||||
|
||||
if (doInternal_)
|
||||
{
|
||||
if (interpolate_)
|
||||
{
|
||||
pInterp.reset(new volPointInterpolation(meshProxy.mesh()));
|
||||
}
|
||||
|
||||
if (vtuMeshCells.empty())
|
||||
{
|
||||
// Use the appropriate mesh (baseMesh or subMesh)
|
||||
vtuMeshCells.reset(meshProxy.mesh());
|
||||
|
||||
if (interpolate_ && vtuMeshCells.manifold())
|
||||
{
|
||||
interpolate_ = false;
|
||||
WarningInFunction
|
||||
<< "Manifold cells detected - disabling PointData"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
internalWriter = autoPtr<vtk::internalWriter>::New
|
||||
@ -385,6 +388,11 @@ bool Foam::functionObjects::vtkWrite::write()
|
||||
|
||||
internalWriter->writeTimeValue(timeValue);
|
||||
internalWriter->writeGeometry();
|
||||
|
||||
if (interpolate_)
|
||||
{
|
||||
pInterp.reset(new volPointInterpolation(meshProxy.mesh()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user