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:
Mark Olesen
2022-02-15 15:36:50 +01:00
parent 2d7f2c26be
commit 6e509c10fc
12 changed files with 101 additions and 28 deletions

View File

@ -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

View File

@ -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()));
}
}