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
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -305,7 +305,7 @@ int main(int argc, char *argv[])
(
"cvSearchableSurfaces",
runTime.constant(),
"triSurface",
searchableSurface::geometryDir(runTime),
runTime,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -119,7 +119,7 @@ castellatedMeshControls
// Specifies a level for any cell intersected by explicitly provided
// 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
// refinementRegions (see below). The old specification
// level 2;

View File

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

View File

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

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run buoyantSimpleFoam
+ The case is designed to be meshed with snappyHexMesh
+ 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 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
+ rotating.obj: CAD of the rotating geometry
+ 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
patches in the mesh

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run the compressible rhoSimpleFoam solver
+ The case is designed to be meshed with snappyHexMesh
+ 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
patches in the mesh

View File

@ -4,7 +4,7 @@ Overview
+ Setup to run the simpleFoam solver
+ The case is designed to be meshed with snappyHexMesh
+ 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
patches in the mesh

View File

@ -8,7 +8,7 @@ Overview
+ fixed.obj: CAD of the stationary geometry
+ rotating.obj: CAD of the rotating geometry
+ 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
patches in the mesh

View File

@ -23,7 +23,7 @@ Meshing Strategy
Surface Geometry
================
+ 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
patches in the mesh

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,6 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "searchableSurface.H"
#include "Time.H"
#include "triSurface.H"
#include "OSspecific.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -33,6 +36,8 @@ namespace Foam
defineRunTimeSelectionTable(searchableSurface, dict);
}
Foam::word Foam::searchableSurface::geometryDir_("geometry");
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,6 +81,43 @@ Foam::searchableSurface::~searchableSurface()
// * * * * * * * * * * * * * * * 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
(
const pointField& sample,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,6 +80,14 @@ public:
//- Runtime type information
TypeName("searchableSurface");
// Static data
//- Name of the directory for the geometry files
// Defaults to "geometry"
static word geometryDir_;
// Declare run-time constructor selection table
// For the dictionary constructor
@ -154,6 +162,13 @@ public:
// 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
const boundBox& bounds() const
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -127,7 +127,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 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
(
{

View File

@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# 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
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
# 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
runApplication blockMesh

View File

@ -135,7 +135,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 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
(
{

View File

@ -80,7 +80,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 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 ();

View File

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

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# 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
cp system/decomposeParDict.hierarchical system/decomposeParDict

View File

@ -88,7 +88,7 @@ castellatedMeshControls
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 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
(
//{

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
rm *.obj > /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
cleanCase

View File

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

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