From abb597359f71f3e997233e65d10df922a5be452f Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 22 Jun 2018 15:24:07 +0100 Subject: [PATCH] ENH: Updated the boundaryDataSurfaceWriter to use a plain list for the points file --- .../turbulentDFSEMInletFvPatchVectorField.C | 21 +++++++------------ .../boundaryData/boundaryDataSurfaceWriter.C | 4 ++-- .../boundaryDataSurfaceWriterTemplates.C | 4 ++-- .../constant/boundaryData/inlet/points | 14 ------------- 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index d51189ec57..20dfcaa0f7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -190,22 +190,17 @@ Foam::turbulentDFSEMInletFvPatchVectorField::patchMapper() const // Initialise interpolation (2D planar interpolation by triangulation) if (mapperPtr_.empty()) { -// vectorGlobalIOField samplePoints - vectorIOField samplePoints + // Reread values and interpolate + fileName samplePointsFile ( - IOobject - ( - "points", - this->db().time().caseConstant(), - "boundaryData"/this->patch().name(), - this->db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE, - false - ) + this->db().time().path() + /this->db().time().caseConstant() + /"boundaryData" + /this->patch().name() + /"points" ); - const fileName samplePointsFile = samplePoints.filePath(); + pointField samplePoints((IFstream(samplePointsFile)())); if (debug) { diff --git a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriter.C b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriter.C index dd393180c2..3e2009c5af 100644 --- a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriter.C @@ -88,9 +88,9 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::write mkDir(pts.path()); OFstream os(pts.objectPath()); - pts.writeHeader(os); + //pts.writeHeader(os); pts.writeData(os); - pts.writeEndDivider(os); + //pts.writeEndDivider(os); } return baseDir; diff --git a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C index fc3eaba568..74d2c18281 100644 --- a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C +++ b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C @@ -106,9 +106,9 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate mkDir(pts.path()); OFstream os(pts.objectPath()); - pts.writeHeader(os); + //pts.writeHeader(os); pts.writeData(os); - pts.writeEndDivider(os); + //pts.writeEndDivider(os); } diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points index a89fc76345..5474eb4eae 100644 --- a/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points +++ b/tutorials/incompressible/pimpleFoam/LES/channel395DFSEM/constant/boundaryData/inlet/points @@ -1,17 +1,3 @@ -/*--------------------------------*- C++ -*----------------------------------*| ========= | | -| \ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \ / O peration | Version: plus | -| \ / A nd | Web: www.OpenFOAM.com | -| \/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class vectorField; - object points; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ( (0 0.0000e+00 0) (0 7.5298e-05 0)