searchableSurface: Renamed geometry directory triSurface -> geometry

Originally the only supported geometry specification were triangulated surfaces,
hence the name of the directory: constant/triSurface, however now that other
surface specifications are supported and provided it is much more logical that
the directory is named accordingly: constant/geometry.  All tutorial and
template cases have been updated.

Note that backward compatibility is provided such that if the constant/geometry
directory does not exist but constant/triSurface does then the geometry files
are read from there.
This commit is contained in:
Henry Weller
2021-02-04 13:51:48 +00:00
parent 1e728ad7e3
commit 66c62e9296
171 changed files with 323 additions and 232 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -305,7 +305,7 @@ int main(int argc, char *argv[])
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -145,7 +145,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
( (
surfaceName_ + ".cellSize", surfaceName_ + ".cellSize",
surface_.searchableSurface::time().constant(), surface_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surface_.searchableSurface::time(), surface_.searchableSurface::time(),
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -169,7 +172,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
( (
curvatureFile_, curvatureFile_,
surface_.searchableSurface::time().constant(), surface_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surface_.searchableSurface::time(), surface_.searchableSurface::time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -214,7 +220,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
( (
internalClosenessFile_, internalClosenessFile_,
surface_.searchableSurface::time().constant(), surface_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surface_.searchableSurface::time(), surface_.searchableSurface::time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -247,7 +256,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
( (
featureProximityFile_, featureProximityFile_,
surface_.searchableSurface::time().constant(), surface_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surface_.searchableSurface::time(), surface_.searchableSurface::time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -291,7 +303,11 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
surface_.searchableSurface::time().writeFormat() surface_.searchableSurface::time().writeFormat()
).write ).write
( (
surface_.searchableSurface::time().constant()/"triSurface", surface_.searchableSurface::time().constant()/
searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surfaceName_.lessExt().name(), surfaceName_.lessExt().name(),
surface_.points(), surface_.points(),
faces, faces,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -87,7 +87,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::fieldFromFile::load()
( (
fileName_, fileName_,
surface_.searchableSurface::time().constant(), surface_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface_.searchableSurface::time()
),
surface_.searchableSurface::time(), surface_.searchableSurface::time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,7 +75,10 @@ Foam::nonUniformField::nonUniformField
( (
"pointCellSize.cellSize", "pointCellSize.cellSize",
surfaceTriMesh_.searchableSurface::time().constant(), surfaceTriMesh_.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surfaceTriMesh_.searchableSurface::time()
),
surfaceTriMesh_.searchableSurface::time(), surfaceTriMesh_.searchableSurface::time(),
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -835,7 +835,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime_.constant(), runTime_.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime_, runTime_,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -83,7 +83,7 @@ int main(int argc, char *argv[])
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -432,7 +432,7 @@ int main(int argc, char *argv[])
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -401,7 +401,7 @@ int main(int argc, char *argv[])
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -611,9 +611,9 @@ int main(int argc, char *argv[])
IOobject IOobject
( (
exportName, exportName,
runTime.constant(), // instance runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, // registry runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE, IOobject::AUTO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -323,9 +323,9 @@ int main(int argc, char *argv[])
IOobject IOobject
( (
exportName, exportName,
runTime.constant(), // instance runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, // registry runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE, IOobject::AUTO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -117,7 +117,7 @@ Foam::CV2D::CV2D
( (
"cvSearchableSurfaces", "cvSearchableSurfaces",
runTime_.constant(), runTime_.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime_, runTime_,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -867,11 +867,10 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
"abc", // dummy name "abc",
mesh.time().constant(), // instance mesh.time().constant(),
// mesh.time().findInstance("triSurface", word::null),// instance searchableSurface::geometryDir(mesh.time()),
"triSurface", // local mesh.time(),
mesh.time(), // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,7 @@ Description
#include "pointFields.H" #include "pointFields.H"
#include "fvMeshMapper.H" #include "fvMeshMapper.H"
#include "faceSelection.H" #include "faceSelection.H"
#include "searchableSurface.H"
#include "fvMeshTools.H" #include "fvMeshTools.H"
using namespace Foam; using namespace Foam;
@ -446,7 +446,6 @@ int main(int argc, char *argv[])
runTime.functionObjects().off(); runTime.functionObjects().off();
#include "createNamedMesh.H" #include "createNamedMesh.H"
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,7 +66,7 @@ Foam::faceSelections::searchableSurfaceSelection::searchableSurfaceSelection
( (
dict.lookupOrDefault("name", mesh.objectRegistry::db().name()), dict.lookupOrDefault("name", mesh.objectRegistry::db().name()),
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh.objectRegistry::db(), mesh.objectRegistry::db(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -56,9 +56,9 @@ distributedTriSurfaceMesh surfacesMesh
IOobject IOobject
( (
"wallSurface.stl", "wallSurface.stl",
runTime.constant(), // directory runTime.constant(),
"triSurface", // instance searchableSurface::geometryDir(runTime),
runTime, // registry runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -780,10 +780,10 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
sFeatFileName + ".eMesh", // name sFeatFileName + ".eMesh",
runTime.constant(), // instance runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, // registry runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -180,7 +180,12 @@ namespace Foam
// Read // Read
// ~~~~ // ~~~~
triSurface surf(runTime.constantPath()/"triSurface"/surfaceFileName); triSurface surf
(
runTime.constantPath()
/searchableSurface::geometryDir(runTime)
/surfaceFileName
);
Info<< "Statistics:" << endl; Info<< "Statistics:" << endl;
surf.writeStats(Info); surf.writeStats(Info);
@ -405,7 +410,7 @@ namespace Foam
( (
surfaceFileName.lessExt().name() + ".eMesh", surfaceFileName.lessExt().name() + ".eMesh",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE, IOobject::AUTO_WRITE,
@ -457,7 +462,7 @@ namespace Foam
( (
sFeatFileName + ".closeness", sFeatFileName + ".closeness",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
surf surf
@ -488,8 +493,9 @@ namespace Foam
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
searchSurf.objectRegistry::name(), // surfaceName /searchableSurface::geometryDir(runTime),
searchSurf.objectRegistry::name(),
searchSurf.points(), searchSurf.points(),
faces, faces,
"internalCloseness", // fieldName "internalCloseness", // fieldName
@ -499,8 +505,9 @@ namespace Foam
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
searchSurf.objectRegistry::name(), // surfaceName /searchableSurface::geometryDir(runTime),
searchSurf.objectRegistry::name(),
searchSurf.points(), searchSurf.points(),
faces, faces,
"externalCloseness", // fieldName "externalCloseness", // fieldName
@ -554,8 +561,9 @@ namespace Foam
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
searchSurf.objectRegistry::name(), // surfaceName /searchableSurface::geometryDir(runTime),
searchSurf.objectRegistry::name(),
searchSurf.points(), searchSurf.points(),
faces, faces,
"internalPointCloseness", // fieldName "internalPointCloseness", // fieldName
@ -565,8 +573,9 @@ namespace Foam
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
searchSurf.objectRegistry::name(), // surfaceName /searchableSurface::geometryDir(runTime),
searchSurf.objectRegistry::name(),
searchSurf.points(), searchSurf.points(),
faces, faces,
"externalPointCloseness", // fieldName "externalPointCloseness", // fieldName
@ -589,7 +598,7 @@ namespace Foam
( (
sFeatFileName + ".curvature", sFeatFileName + ".curvature",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
surf, surf,
@ -603,8 +612,9 @@ namespace Foam
{ {
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
sFeatFileName, // surfaceName /searchableSurface::geometryDir(runTime),
sFeatFileName,
surf.points(), surf.points(),
faces, faces,
"curvature", // fieldName "curvature", // fieldName
@ -659,7 +669,7 @@ namespace Foam
( (
sFeatFileName + ".featureProximity", sFeatFileName + ".featureProximity",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime, runTime,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
@ -675,8 +685,9 @@ namespace Foam
{ {
vtkSurfaceWriter(runTime.writeFormat()).write vtkSurfaceWriter(runTime.writeFormat()).write
( (
runTime.constantPath()/"triSurface",// outputDir runTime.constantPath()
sFeatFileName, // surfaceName /searchableSurface::geometryDir(runTime),
sFeatFileName,
surf.points(), surf.points(),
faces, faces,
"featureProximity", // fieldName "featureProximity", // fieldName

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -300,7 +300,7 @@ int main(int argc, char *argv[])
( (
"surfacesToHook", "surfacesToHook",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
dict, dict,
@ -345,7 +345,7 @@ int main(int argc, char *argv[])
( (
"hookedSurface_" + surfs.names()[surfI], "hookedSurface_" + surfs.names()[surfI],
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
surf surf
@ -559,7 +559,7 @@ int main(int argc, char *argv[])
( (
"hookedSurface_" + surfs.names()[surfI], "hookedSurface_" + surfs.names()[surfI],
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
triSurface triSurface

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
argList::addBoolOption("clean"); argList::addBoolOption("clean");
argList::addBoolOption("orient"); argList::addBoolOption("orient");
argList::addBoolOption("surfMesh"); argList::addBoolOption("surfMesh");
argList::addBoolOption("triSurface"); argList::addBoolOption(triSurface::typeName);
argList::addBoolOption("unsorted"); argList::addBoolOption("unsorted");
argList::addBoolOption("triFace"); argList::addBoolOption("triFace");
@ -119,7 +119,7 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
if (args.optionFound("triSurface")) if (args.optionFound(triSurface::typeName))
{ {
triSurface surf(importName); triSurface surf(importName);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -158,11 +158,10 @@ int main(int argc, char *argv[])
IOobject io IOobject io
( (
surfFileName, // name surfFileName,
// runTime.findInstance("triSurface", surfFileName), // instance runTime.constant(),
runTime.constant(), // instance searchableSurface::geometryDir(runTime),
"triSurface", // local runTime,
runTime, // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
); );

View File

@ -119,7 +119,7 @@ castellatedMeshControls
// Specifies a level for any cell intersected by explicitly provided // Specifies a level for any cell intersected by explicitly provided
// edges. // edges.
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/geometry for now.
// Specify 'levels' in the same way as the 'distance' mode in the // Specify 'levels' in the same way as the 'distance' mode in the
// refinementRegions (see below). The old specification // refinementRegions (see below). The old specification
// level 2; // level 2;

View File

@ -45,7 +45,7 @@ surface2
// Load from an existing feature edge file // Load from an existing feature edge file
files files
( (
"surface2.nas" "constant/triSurface/featureEdges.nas"; "surface2.nas" "constant/geometry/featureEdges.nas";
); );
trimFeatures trimFeatures

View File

@ -76,7 +76,7 @@ sphereRandom
triSurfaceMesh triSurfaceMesh
{ {
type triSurfaceMesh; type triSurfaceMesh;
surface "surfaceMeshFile.obj"; // in constant/triSurface directory surface "surfaceMeshFile.obj"; // in constant/geometry directory
} }
// Seeding at a boundary // Seeding at a boundary

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run buoyantSimpleFoam + Setup to run buoyantSimpleFoam
+ The case is designed to be meshed with snappyHexMesh + The case is designed to be meshed with snappyHexMesh
+ snappyHexMesh is setup to use a single trisurface file named CAD.obj + snappyHexMesh is setup to use a single trisurface file named CAD.obj
+ Copy the CAD.obj file to the constant/triSurface directory + Copy the CAD.obj file to the constant/geometry directory
+ The CAD.obj can contain one or more regions to create patches in the mesh + The CAD.obj can contain one or more regions to create patches in the mesh
+ The user can then specify different boundary condition on T on these patches + The user can then specify different boundary condition on T on these patches

View File

@ -8,7 +8,7 @@ Overview
+ fixed.obj: CAD of the stationary geometry + fixed.obj: CAD of the stationary geometry
+ rotating.obj: CAD of the rotating geometry + rotating.obj: CAD of the rotating geometry
+ rotatingZone.obj: CAD of surface bounding the rotating region + rotatingZone.obj: CAD of surface bounding the rotating region
+ Copy the *.obj files to the constant/triSurface directory + Copy the *.obj files to the constant/geometry directory
+ The fixed.obj should contain an inlet and outlet region to create the relevant + The fixed.obj should contain an inlet and outlet region to create the relevant
patches in the mesh patches in the mesh

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run the compressible rhoSimpleFoam solver + Setup to run the compressible rhoSimpleFoam solver
+ The case is designed to be meshed with snappyHexMesh + The case is designed to be meshed with snappyHexMesh
+ snappyHexMesh is setup to use a single trisurface file named CAD.obj + snappyHexMesh is setup to use a single trisurface file named CAD.obj
+ Copy the CAD.obj file to the constant/triSurface directory + Copy the CAD.obj file to the constant/geometry directory
+ The CAD.obj should contain an inlet and outlet region to create the relevant + The CAD.obj should contain an inlet and outlet region to create the relevant
patches in the mesh patches in the mesh

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run the simpleFoam solver + Setup to run the simpleFoam solver
+ The case is designed to be meshed with snappyHexMesh + The case is designed to be meshed with snappyHexMesh
+ snappyHexMesh is setup to use a single trisurface file named CAD.obj + snappyHexMesh is setup to use a single trisurface file named CAD.obj
+ Copy the CAD.obj file to the constant/triSurface directory + Copy the CAD.obj file to the constant/geometry directory
+ The CAD.obj should contain an inlet and outlet region to create the relevant + The CAD.obj should contain an inlet and outlet region to create the relevant
patches in the mesh patches in the mesh

View File

@ -8,7 +8,7 @@ Overview
+ fixed.obj: CAD of the stationary geometry + fixed.obj: CAD of the stationary geometry
+ rotating.obj: CAD of the rotating geometry + rotating.obj: CAD of the rotating geometry
+ rotatingZone.obj: CAD of surface bounding the rotating region + rotatingZone.obj: CAD of surface bounding the rotating region
+ Copy the *.obj files to the constant/triSurface directory + Copy the *.obj files to the constant/geometry directory
+ The fixed.obj should contain an inlet and outlet region to create the relevant + The fixed.obj should contain an inlet and outlet region to create the relevant
patches in the mesh patches in the mesh

View File

@ -23,7 +23,7 @@ Meshing Strategy
Surface Geometry Surface Geometry
================ ================
+ Copy the overall domain geometry file ("CAD.obj") and solid geometry files + Copy the overall domain geometry file ("CAD.obj") and solid geometry files
(e.g. "solid.obj") to the constant/triSurface (e.g. "solid.obj") to the constant/geometry
+ The CAD.obj should contain an inlet and outlet region to create the relevant + The CAD.obj should contain an inlet and outlet region to create the relevant
patches in the mesh patches in the mesh

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -83,7 +83,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone
( (
topSurfaceFileName, topSurfaceFileName,
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh.time() mesh.time()
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -392,10 +392,10 @@ surfaceDisplacementPointPatchVectorField::surfaces() const
( (
IOobject IOobject
( (
"abc", // dummy name "abc", // dummy name
db().time().constant(), // directory db().time().constant(),
"triSurface", // instance searchableSurface::geometryDir(db().time()),
db().time(), // registry db().time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -378,10 +378,10 @@ surfaceSlipDisplacementPointPatchVectorField::surfaces() const
( (
IOobject IOobject
( (
"abc", // dummy name "abc", // dummy name
db().time().constant(), // directory db().time().constant(),
"triSurface", // instance searchableSurface::geometryDir(db().time()),
db().time(), // registry db().time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,10 +51,10 @@ Foam::blockMesh::blockMesh(const IOdictionary& dict, const word& regionName)
( (
IOobject IOobject
( (
"geometry", // dummy name "geometry",
meshDict_.time().constant(), // instance meshDict_.time().constant(),
"geometry", // local searchableSurface::geometryDir(),
meshDict_.time(), // registry meshDict_.time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -79,10 +79,10 @@ void Foam::refinementFeatures::read
IOobject featObj IOobject featObj
( (
featFileName, // name featFileName,
io.time().constant(), // instance io.time().constant(),
"triSurface", // local searchableSurface::geometryDir(io.time()),
io.time(), // registry io.time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -532,7 +532,10 @@ Foam::shellSurfaces::shellSurfaces
) )
+ "PointCloseness", + "PointCloseness",
surface.searchableSurface::time().constant(), surface.searchableSurface::time().constant(),
"triSurface", searchableSurface::geometryDir
(
surface.searchableSurface::time()
),
surface.searchableSurface::time(), surface.searchableSurface::time(),
IOobject::MUST_READ IOobject::MUST_READ
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,6 +28,7 @@ License
#include "linearEqn.H" #include "linearEqn.H"
#include "quadraticEqn.H" #include "quadraticEqn.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "triSurface.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -56,7 +57,7 @@ void Foam::sweptFaceAreaWeightAMI::writeCutTrisVTK
OFstream obj(typeName + "_" + name + ".vtk"); OFstream obj(typeName + "_" + name + ".vtk");
obj << "# vtk DataFile Version 2.0" << endl obj << "# vtk DataFile Version 2.0" << endl
<< "triSurface" << endl << triSurface::typeName << endl
<< "ASCII" << endl << "ASCII" << endl
<< "DATASET POLYDATA" << endl << "DATASET POLYDATA" << endl
<< "POINTS " << 3*tris.size() << " float" << endl; << "POINTS " << 3*tris.size() << " float" << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -486,7 +486,7 @@ Foam::cyclicAMIPolyPatch::surfPtr() const
( (
surfName, surfName,
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -793,7 +793,7 @@ const
( (
surfName, surfName,
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -266,7 +266,7 @@ surfPtr() const
( (
surfName, surfName,
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,10 +61,10 @@ Foam::searchableExtrudedCircle::searchableExtrudedCircle
( (
IOobject IOobject
( (
dict.lookup("file"), // name dict.lookup("file"),
io.time().constant(), // instance io.time().constant(),
"geometry", // local searchableSurface::geometryDir(),
io.time(), // registry io.time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,6 +24,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "searchableSurface.H" #include "searchableSurface.H"
#include "Time.H"
#include "triSurface.H"
#include "OSspecific.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -33,6 +36,8 @@ namespace Foam
defineRunTimeSelectionTable(searchableSurface, dict); defineRunTimeSelectionTable(searchableSurface, dict);
} }
Foam::word Foam::searchableSurface::geometryDir_("geometry");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,6 +81,43 @@ Foam::searchableSurface::~searchableSurface()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::word& Foam::searchableSurface::geometryDir()
{
return geometryDir_;
}
const Foam::word& Foam::searchableSurface::geometryDir(const Time& time)
{
if
(
isDir
(
time.rootPath()/time.globalCaseName()/time.constant()/
searchableSurface::geometryDir_
)
)
{
return searchableSurface::geometryDir_;
}
else if
(
isDir
(
time.rootPath()/time.globalCaseName()/time.constant()/
triSurface::typeName
)
)
{
return triSurface::typeName;
}
else
{
return searchableSurface::geometryDir_;
}
}
void Foam::searchableSurface::findNearest void Foam::searchableSurface::findNearest
( (
const pointField& sample, const pointField& sample,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,6 +80,14 @@ public:
//- Runtime type information //- Runtime type information
TypeName("searchableSurface"); TypeName("searchableSurface");
// Static data
//- Name of the directory for the geometry files
// Defaults to "geometry"
static word geometryDir_;
// Declare run-time constructor selection table // Declare run-time constructor selection table
// For the dictionary constructor // For the dictionary constructor
@ -154,6 +162,13 @@ public:
// Member Functions // Member Functions
//- Return the geometry directory name
static const word& geometryDir();
//- Check that the geometry directory exists and return
// if not return "triSurface" for backward compatibility
static const word& geometryDir(const Time& time);
//- Return const reference to boundBox //- Return const reference to boundBox
const boundBox& bounds() const const boundBox& bounds() const
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -266,7 +266,7 @@ Foam::triSurfaceMesh::extractCloseness
( (
objectRegistry::name() + ".internalCloseness", objectRegistry::name() + ".internalCloseness",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
*this, *this,
@ -283,7 +283,7 @@ Foam::triSurfaceMesh::extractCloseness
( (
objectRegistry::name() + ".externalCloseness", objectRegistry::name() + ".externalCloseness",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
*this, *this,
@ -396,7 +396,7 @@ Foam::triSurfaceMesh::extractPointCloseness
( (
objectRegistry::name() + ".internalPointCloseness", objectRegistry::name() + ".internalPointCloseness",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
*this, *this,
@ -413,7 +413,7 @@ Foam::triSurfaceMesh::extractPointCloseness
( (
objectRegistry::name() + ".externalPointCloseness", objectRegistry::name() + ".externalPointCloseness",
runTime.constant(), runTime.constant(),
"triSurface", searchableSurface::geometryDir(runTime),
runTime runTime
), ),
*this, *this,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -828,8 +828,8 @@ void Foam::triSurfaceMesh::setField(const labelList& values)
IOobject IOobject
( (
"values", "values",
objectRegistry::time().timeName(), // instance objectRegistry::time().timeName(),
"triSurface", // local searchableSurface::geometryDir(objectRegistry::time()),
*this, *this,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -220,7 +220,7 @@ Foam::searchableSurfaceToFaceZone::searchableSurfaceToFaceZone
( (
dict.lookupOrDefault("name", mesh.objectRegistry::db().name()), dict.lookupOrDefault("name", mesh.objectRegistry::db().name()),
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh.objectRegistry::db(), mesh.objectRegistry::db(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -128,7 +128,7 @@ Foam::sampledSets::triSurfaceMeshSampledSet::triSurfaceMeshSampledSet
( (
surface_, surface_,
mesh.time().constant(), mesh.time().constant(),
"triSurface", searchableSurface::geometryDir(mesh.time()),
mesh.time(), mesh.time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -329,10 +329,10 @@ Foam::sampledSurfaces::distanceSurface::distanceSurface
dict.lookup("surfaceType"), dict.lookup("surfaceType"),
IOobject IOobject
( (
dict.lookupOrDefault("surfaceName", name), // name dict.lookupOrDefault("surfaceName", name),
mesh.time().constant(), // directory mesh.time().constant(),
"triSurface", // instance searchableSurface::geometryDir(mesh.time()),
mesh.time(), // registry mesh.time(),
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -528,9 +528,9 @@ Foam::sampledSurfaces::triSurfaceMesh::triSurfaceMesh
IOobject IOobject
( (
surfaceName, surfaceName,
mesh.time().constant(), // instance mesh.time().constant(),
"triSurface", // local searchableSurface::geometryDir(mesh.time()),
mesh, // registry mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -556,9 +556,9 @@ Foam::sampledSurfaces::triSurfaceMesh::triSurfaceMesh
IOobject IOobject
( (
dict.lookup("surface"), dict.lookup("surface"),
mesh.time().constant(), // instance mesh.time().constant(),
"triSurface", // local searchableSurface::geometryDir(mesh.time()),
mesh, // registry mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -585,9 +585,9 @@ Foam::sampledSurfaces::triSurfaceMesh::triSurfaceMesh
IOobject IOobject
( (
name, name,
mesh.time().constant(), // instance mesh.time().constant(),
"triSurface", // local searchableSurface::geometryDir(mesh.time()),
mesh, // registry mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,7 +36,7 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const
{ {
// Write header // Write header
os << "# vtk DataFile Version 2.0" << nl os << "# vtk DataFile Version 2.0" << nl
<< "triSurface" << nl << triSurface::typeName << nl
<< "ASCII" << nl << "ASCII" << nl
<< "DATASET POLYDATA" << "DATASET POLYDATA"
<< nl; << nl;

View File

@ -127,7 +127,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges. // Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/geometry for now.
features features
( (
{ {

View File

@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove surfaces # Remove surfaces
rm -f constant/triSurface/propeller*.obj.gz > /dev/null 2>&1 rm -f constant/geometry/propeller*.obj.gz > /dev/null 2>&1
cleanCase cleanCase
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 rm -f constant/geometry/*.eMesh* > /dev/null 2>&1
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Copy propeller surfaces from resources directory # Copy propeller surfaces from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propeller*.obj.gz constant/triSurface/ cp $FOAM_TUTORIALS/resources/geometry/propeller*.obj.gz constant/geometry/
# Meshing # Meshing
runApplication blockMesh runApplication blockMesh

View File

@ -135,7 +135,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges. // Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/geometry for now.
features features
( (
{ {

View File

@ -80,7 +80,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges. // Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/geometry for now.
features (); features ();

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove surface # Remove surface
rm -f constant/triSurface/motorBike.obj.gz rm -f constant/geometry/motorBike.obj.gz
cleanCase cleanCase

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory # copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/ cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/geometry/
runApplication blockMesh runApplication blockMesh
cp system/decomposeParDict.hierarchical system/decomposeParDict cp system/decomposeParDict.hierarchical system/decomposeParDict

View File

@ -88,7 +88,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges. // Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now. // This is a featureEdgeMesh, read from constant/geometry for now.
features features
( (
//{ //{

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
rm *.obj > /dev/null 2>&1 rm *.obj > /dev/null 2>&1
rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1 rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm constant/triSurface/boundaryAndFaceZones.eMesh > /dev/null 2>&1 rm constant/geometry/boundaryAndFaceZones.eMesh > /dev/null 2>&1
rm constant/polyMesh/boundary > /dev/null 2>&1 rm constant/polyMesh/boundary > /dev/null 2>&1
cleanCase cleanCase

View File

@ -1,9 +1,9 @@
2013-10-01 Meshing the angledDuct geometry. 2013-10-01 Meshing the angledDuct geometry.
constant/triSurface/angledDuct.stl constant/geometry/angledDuct.stl
outer geometry outer geometry
constant/triSurface/boundaryAndFaceZones.stl constant/geometry/boundaryAndFaceZones.stl
boundary and faceZones to extract feature boundary and faceZones to extract feature
edges from. edges from.
@ -23,7 +23,7 @@ surfaceFeatures
constant/triSurface/porosity_inflated.stl constant/geometry/porosity_inflated.stl
block around porosity block around porosity
(slightly inflated) (slightly inflated)

Some files were not shown because too many files have changed in this diff Show More