STYLE: use vtk::surfaceWriter instead of sampleSurface version

This commit is contained in:
Mark Olesen
2018-10-16 14:49:56 +02:00
parent c73dcc34f0
commit 0d29257a6d
11 changed files with 146 additions and 139 deletions

View File

@ -17,7 +17,6 @@ EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
@ -27,7 +26,6 @@ EXE_INC = \
LIB_LIBS = \
${CGAL_LIBS} \
-lmeshTools \
-lsampling \
-ldecompose \
-ldynamicMesh \
-lsnappyHexMesh

View File

@ -26,7 +26,7 @@ License
#include "automatic.H"
#include "addToRunTimeSelectionTable.H"
#include "triSurfaceMesh.H"
#include "vtkSurfaceWriter.H"
#include "foamVtkSurfaceWriter.H"
#include "primitivePatchInterpolation.H"
#include "Time.H"
@ -288,20 +288,23 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
faces[fI] = surface_.triSurface::operator[](fI);
}
vtkSurfaceWriter().write
vtk::surfaceWriter vtkWriter
(
surface_.searchableSurface::time().constant()/"triSurface",
surfaceName_.nameLessExt(),
meshedSurfRef
surface_.points(),
faces,
(
surface_.points(),
faces
),
"cellSize",
pointCellSize,
true,
true
surface_.searchableSurface::time().constant()
/ "triSurface"
/ surfaceName_.nameLessExt() + "_cellSize"
)
);
vtkWriter.writeGeometry();
vtkWriter.beginPointData(1);
vtkWriter.write("cellSize", pointCellSize);
}
return tPointCellSize;

View File

@ -14,7 +14,6 @@ EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I../vectorTools
@ -25,6 +24,5 @@ EXE_LIBS = \
-ldecompositionMethods /* -L$(FOAM_LIBBIN)/dummy -lscotchDecomp */ \
-ldecompose \
-lmeshTools \
-lsampling \
-ldynamicMesh \
-lfiniteVolume

View File

@ -41,7 +41,7 @@ Description
#include "cellShape.H"
#include "DynamicField.H"
#include "isoSurfaceCell.H"
#include "vtkSurfaceWriter.H"
#include "foamVtkSurfaceWriter.H"
#include "syncTools.H"
#include "decompositionModel.H"
@ -739,14 +739,18 @@ int main(int argc, char *argv[])
pointMergeMap
);
vtkSurfaceWriter writer;
writer.write
(
runTime.path(),
"iso",
mergedPoints,
mergedFaces
);
if (Pstream::master())
{
vtk::surfaceWriter writer
(
mergedPoints,
mergedFaces,
(runTime.path() / "iso"),
false // serial only
);
writer.writeGeometry();
}
Info<< "End\n" << endl;