mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
surfaceToCell, surfaceToPoint: Add surface file name expansion
Resolves feature-request http://www.openfoam.org/mantisbt/view.php?id=1754
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,13 +37,9 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(surfaceToCell, 0);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, surfaceToCell, word);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, surfaceToCell, istream);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -98,18 +94,15 @@ Foam::label Foam::surfaceToCell::getNearest
|
||||
}
|
||||
|
||||
|
||||
// Return true if nearest surface to points on cell makes largish angle
|
||||
// with nearest surface to cell centre. Returns false otherwise. Points visited
|
||||
// are cached in pointToNearest
|
||||
bool Foam::surfaceToCell::differingPointNormals
|
||||
(
|
||||
const triSurfaceSearch& querySurf,
|
||||
|
||||
const vector& span, // current search span
|
||||
const vector& span, // Current search span
|
||||
const label cellI,
|
||||
const label cellTriI, // nearest (to cell centre) surface triangle
|
||||
const label cellTriI, // Nearest (to cell centre) surface triangle
|
||||
|
||||
Map<label>& pointToNearest // cache for nearest triangle to point
|
||||
Map<label>& pointToNearest // Cache for nearest triangle to point
|
||||
) const
|
||||
{
|
||||
const triSurface& surf = querySurf.surface();
|
||||
@ -366,7 +359,6 @@ void Foam::surfaceToCell::checkSettings() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::surfaceToCell::surfaceToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -397,7 +389,6 @@ Foam::surfaceToCell::surfaceToCell
|
||||
}
|
||||
|
||||
|
||||
// Construct from components. Externally supplied surface.
|
||||
Foam::surfaceToCell::surfaceToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -430,7 +421,6 @@ Foam::surfaceToCell::surfaceToCell
|
||||
}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::surfaceToCell::surfaceToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -438,7 +428,7 @@ Foam::surfaceToCell::surfaceToCell
|
||||
)
|
||||
:
|
||||
topoSetSource(mesh),
|
||||
surfName_(dict.lookup("file")),
|
||||
surfName_(fileName(dict.lookup("file")).expand()),
|
||||
outsidePoints_(dict.lookup("outsidePoints")),
|
||||
includeCut_(readBool(dict.lookup("includeCut"))),
|
||||
includeInside_(readBool(dict.lookup("includeInside"))),
|
||||
@ -457,7 +447,6 @@ Foam::surfaceToCell::surfaceToCell
|
||||
}
|
||||
|
||||
|
||||
// Construct from Istream
|
||||
Foam::surfaceToCell::surfaceToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,20 +28,15 @@ License
|
||||
#include "triSurfaceSearch.H"
|
||||
#include "triSurface.H"
|
||||
#include "cpuTime.H"
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(surfaceToPoint, 0);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, surfaceToPoint, word);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, surfaceToPoint, istream);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +120,6 @@ void Foam::surfaceToPoint::checkSettings() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::surfaceToPoint::surfaceToPoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -145,7 +139,6 @@ Foam::surfaceToPoint::surfaceToPoint
|
||||
}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::surfaceToPoint::surfaceToPoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -153,7 +146,7 @@ Foam::surfaceToPoint::surfaceToPoint
|
||||
)
|
||||
:
|
||||
topoSetSource(mesh),
|
||||
surfName_(dict.lookup("file")),
|
||||
surfName_(fileName(dict.lookup("file")).expand()),
|
||||
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
||||
includeInside_(readBool(dict.lookup("includeInside"))),
|
||||
includeOutside_(readBool(dict.lookup("includeOutside")))
|
||||
@ -162,7 +155,6 @@ Foam::surfaceToPoint::surfaceToPoint
|
||||
}
|
||||
|
||||
|
||||
// Construct from Istream
|
||||
Foam::surfaceToPoint::surfaceToPoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
|
||||
Reference in New Issue
Block a user