searchableSurface, topoSet: Checked unit conversion of input parameters

This commit is contained in:
Will Bainbridge
2024-05-16 14:55:55 +01:00
parent 41705e9eca
commit 6045c63e36
87 changed files with 303 additions and 318 deletions

View File

@ -26,7 +26,6 @@ License
#include "boundBox.H"
#include "pointField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline Foam::boundBox::boundBox()
@ -45,8 +44,8 @@ inline Foam::boundBox::boundBox(const point& min, const point& max)
inline Foam::boundBox::boundBox(const dictionary& dict)
:
min_(dict.lookup("min")),
max_(dict.lookup("max"))
min_(dict.lookup<point>("min", dimLength)),
max_(dict.lookup<point>("max", dimLength))
{}

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,6 +25,7 @@ License
#include "plane.H"
#include "tensor.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -127,19 +128,19 @@ Foam::plane::plane(const dictionary& dict)
{
calcPntAndVec
(
subDict.lookup<scalar>("a"),
subDict.lookup<scalar>("b"),
subDict.lookup<scalar>("c"),
subDict.lookup<scalar>("d")
subDict.lookup<scalar>("a", unitNone),
subDict.lookup<scalar>("b", unitNone),
subDict.lookup<scalar>("c", unitNone),
subDict.lookup<scalar>("d", unitNone)
);
}
else if (planeType == "embeddedPoints")
{
calcPntAndVec
(
subDict.lookup<point>("point1"),
subDict.lookup<point>("point2"),
subDict.lookup<point>("point3")
subDict.lookup<point>("point1", dimLength),
subDict.lookup<point>("point2", dimLength),
subDict.lookup<point>("point3", dimLength)
);
}
else if (planeType == "pointAndNormal")
@ -147,7 +148,8 @@ Foam::plane::plane(const dictionary& dict)
point_ =
subDict.lookupBackwardsCompatible<point>
(
{"point", "basePoint"}
{"point", "basePoint"},
dimLength
);
normal_ =
@ -155,7 +157,8 @@ Foam::plane::plane(const dictionary& dict)
(
subDict.lookupBackwardsCompatible<vector>
(
{"normal", "normalVector"}
{"normal", "normalVector"},
dimless
)
);
}

View File

@ -97,7 +97,8 @@ Foam::surfaceZonesInfo::surfaceZonesInfo
zoneInside_ = areaSelectionAlgoNames[method];
if (zoneInside_ == INSIDEPOINT)
{
surfacesDict.lookup("insidePoint") >> zoneInsidePoint_;
zoneInsidePoint_ =
surfacesDict.lookup<point>("insidePoint", dimLength);
}
}

View File

@ -78,20 +78,20 @@ Foam::refinementParameters::cellSelectionPoints::cellSelectionPoints
inside_
(
dict.found("insidePoints")
? List<point>(dict.lookup("insidePoints"))
? dict.lookup<List<point>>("insidePoints", dimLength)
: dict.found("insidePoint")
? List<point>(1, dict.lookup("insidePoint"))
: dict.found("locationInMesh")
? List<point>(1, dict.lookup("locationInMesh"))
: List<point>::null()
? List<point>(1, dict.lookup<point>("insidePoint", dimLength))
: dict.found("locationInMesh")
? List<point>(1, dict.lookup<point>("locationInMesh", dimLength))
: List<point>::null()
),
outside_
(
dict.found("outsidePoints")
? List<point>(dict.lookup("outsidePoints"))
? dict.lookup<List<point>>("outsidePoints", dimLength)
: dict.found("outsidePoint")
? List<point>(1, dict.lookup("outsidePoint"))
: List<point>::null()
? List<point>(1, dict.lookup<point>("outsidePoint", dimLength))
: List<point>::null()
)
{
if (inside_.size())

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -248,7 +248,7 @@ void Foam::cellClassification::markCells
(
const meshSearch& queryMesh,
const boolList& piercedFace,
const pointField& outsidePts
const List<point>& outsidePts
)
{
// Use meshwave to partition mesh, starting from outsidePt
@ -482,7 +482,7 @@ Foam::cellClassification::cellClassification
const polyMesh& mesh,
const meshSearch& meshQuery,
const triSurfaceSearch& surfQuery,
const pointField& outsidePoints
const List<point>& outsidePoints
)
:
labelList(mesh.nCells(), cellClassification::NOTSET),

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,6 @@ SourceFiles
#ifndef cellClassification_H
#define cellClassification_H
#include "pointField.H"
#include "Map.H"
#include "boolList.H"
#include "labelList.H"
@ -155,6 +154,7 @@ private:
//- Count number of occurrences of elem in list
static label count(const labelList& elems, const label elem);
// Private Member Functions
//- Mark all faces intersected by or intersecting surface
@ -167,7 +167,7 @@ private:
(
const meshSearch& queryMesh,
const boolList& piercedFace,
const pointField& outsidePts
const List<point>& outsidePts
);
//- Use cell status to classify points as being internal to meshType,
@ -190,6 +190,7 @@ private:
// (meshType and non-meshType).
void getMeshOutside(const label meshType, faceList&, labelList&) const;
public:
// Static Data Members
@ -203,7 +204,7 @@ public:
const polyMesh& mesh,
const meshSearch& meshQuery,
const triSurfaceSearch& surfQuery,
const pointField& outsidePoints
const List<point>& outsidePoints
);
//- Construct from mesh and type for every cell.

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-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -188,7 +188,7 @@ Foam::searchableBox::searchableBox
)
:
searchableSurface(io),
treeBoundBox(dict.lookup("min"), dict.lookup("max"))
treeBoundBox(dict)
{
if (!contains(midpoint()))
{

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-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -500,11 +500,11 @@ Foam::searchableCylinder::searchableCylinder
)
:
searchableSurface(io),
point1_(dict.lookup("point1")),
point2_(dict.lookup("point2")),
magDir_(mag(point2_-point1_)),
unitDir_((point2_-point1_)/magDir_),
radius_(dict.lookup<scalar>("radius"))
point1_(dict.lookup<point>("point1", dimLength)),
point2_(dict.lookup<point>("point2", dimLength)),
magDir_(mag(point2_ - point1_)),
unitDir_((point2_ - point1_)/magDir_),
radius_(dict.lookup<scalar>("radius", dimLength))
{
bounds() = calcBounds();
}

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,9 +160,9 @@ Foam::searchableDisk::searchableDisk
)
:
searchableSurface(io),
origin_(dict.lookup("origin")),
normal_(dict.lookup("normal")),
radius_(dict.lookup<scalar>("radius"))
origin_(dict.lookup<point>("origin", dimLength)),
normal_(dict.lookup<vector>("normal", dimless)),
radius_(dict.lookup<scalar>("radius", dimLength))
{
normal_ /= mag(normal_);

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-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,7 +71,7 @@ Foam::searchableExtrudedCircle::searchableExtrudedCircle
).objectPath(global())
)
),
radius_(dict.lookup<scalar>("radius"))
radius_(dict.lookup<scalar>("radius", dimLength))
{
const edgeMesh& eMesh = eMeshPtr_();

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-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -236,8 +236,8 @@ Foam::searchablePlate::searchablePlate
)
:
searchableSurface(io),
origin_(dict.lookup("origin")),
span_(dict.lookup("span")),
origin_(dict.lookup<point>("origin", dimLength)),
span_(dict.lookup<vector>("span", dimLength)),
normalDir_(calcNormal(span_))
{
if (debug)

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-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -148,8 +148,8 @@ Foam::searchableSphere::searchableSphere
)
:
searchableSurface(io),
centre_(dict.lookup("centre")),
radius_(dict.lookup<scalar>("radius"))
centre_(dict.lookup<point>("centre", dimLength)),
radius_(dict.lookup<scalar>("radius", dimLength))
{
bounds() = boundBox
(

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -197,7 +197,7 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
const dictionary& subDict = dict.subDict(instance_[surfI]);
scale_[surfI] = subDict.lookup("scale");
scale_[surfI] = subDict.lookup<vector>("scale", dimless);
transform_.set
(
surfI,

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-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -178,7 +178,7 @@ Foam::searchableSurfaceWithGaps::searchableSurfaceWithGaps
)
:
searchableSurface(io),
gap_(dict.lookup<scalar>("gap")),
gap_(dict.lookup<scalar>("gap", dimLength)),
subGeom_(1)
{
const word subGeomName(dict.lookup("surface"));

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,6 @@ class boxToCell
{
// Private Data
//- Bounding box.
treeBoundBoxList bbs_;
@ -68,6 +67,7 @@ public:
//- Runtime type information
TypeName("boxToCell");
// Constructors
//- Construct from components

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,6 +61,7 @@ public:
//- Runtime type information
TypeName("cellToCell");
// Constructors
//- Construct from components

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,10 +90,10 @@ Foam::cylinderAnnulusToCell::cylinderAnnulusToCell
)
:
topoSetSource(mesh),
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"})),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"})),
outerRadius_(dict.lookup<scalar>("outerRadius")),
innerRadius_(dict.lookup<scalar>("innerRadius"))
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"}, dimLength)),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"}, dimLength)),
outerRadius_(dict.lookup<scalar>("outerRadius", dimLength)),
innerRadius_(dict.lookup<scalar>("innerRadius", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class cylinderAnnulusToCell
:
public topoSetSource
{
// Private Data
//- First point on cylinder axis
vector point1_;
@ -115,7 +113,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,9 +87,9 @@ Foam::cylinderToCell::cylinderToCell
)
:
topoSetSource(mesh),
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"})),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"})),
radius_(dict.lookup<scalar>("radius"))
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"}, dimLength)),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"}, dimLength)),
radius_(dict.lookup<scalar>("radius", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class cylinderToCell
:
public topoSetSource
{
// Private Data
//- First point on cylinder axis
vector point1_;
@ -110,7 +108,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,6 +52,9 @@ class faceToCell
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum faceAction
{
@ -61,11 +64,13 @@ public:
ALL
};
private:
//- Names of the valid options
static const NamedEnum<faceAction, 4> faceActionNames_;
private:
// Private Data
//- Name of set to use
word setName_;
@ -120,7 +125,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,6 +52,9 @@ class faceZoneToCell
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum faceAction
{
@ -59,13 +62,14 @@ public:
SLAVE
};
//- Names of the valid options
static const NamedEnum<faceAction, 2> faceActionNames_;
private:
// Private Data
static const NamedEnum<faceAction, 2> faceActionNames_;
//- Name/regular expression of faceZone
wordRe zoneName_;
@ -83,6 +87,7 @@ public:
//- Runtime type information
TypeName("faceZoneToCell");
// Constructors
//- Construct from components
@ -117,7 +122,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) const;
};

View File

@ -80,10 +80,9 @@ Foam::hemisphereToCell::hemisphereToCell
)
:
topoSetSource(mesh),
centre_(dict.lookup("centre")),
radius_(dict.lookup<scalar>("radius")),
axis_(dict.lookup("axis"))
centre_(dict.lookup<point>("centre", dimLength)),
radius_(dict.lookup<scalar>("radius", dimLength)),
axis_(dict.lookup<vector>("axis", dimless))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class labelToCell
:
public topoSetSource
{
// Private Data
//- Cell labels read from dictionary
labelList labels_;
@ -68,6 +66,7 @@ public:
//- Runtime type information
TypeName("labelToCell");
// Constructors
//- Construct from components
@ -101,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class nbrToCell
:
public topoSetSource
{
// Private Data
//- Number of internal faces on cell
label minNbrs_;
@ -69,6 +67,7 @@ public:
//- Runtime type information
TypeName("nbrToCell");
// Constructors
//- Construct from components
@ -102,7 +101,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,7 @@ Foam::nearestToCell::nearestToCell
)
:
topoSetSource(mesh),
points_(dict.lookup("points"))
points_(dict.lookup<List<point>>("points", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,12 +50,10 @@ class nearestToCell
:
public topoSetSource
{
// Private Data
//- Points to select nearest to
pointField points_;
List<point> points_;
// Private Member Functions
@ -68,6 +66,7 @@ public:
//- Runtime type information
TypeName("nearestToCell");
// Constructors
//- Construct from components
@ -101,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2021-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,7 +76,7 @@ Foam::patchDistanceToCell::patchDistanceToCell
? dict.lookup<wordReList>("patches")
: wordReList(1, dict.lookup<wordRe>("patch"))
),
distance_(dict.lookup<scalar>("distance"))
distance_(dict.lookup<scalar>("distance", dimLength))
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,6 +53,7 @@ class patchDistanceToCell
{
private:
// Private Data
//- List of patches
wordReList patches_;

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,6 +52,9 @@ class pointToCell
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum pointAction
{
@ -60,10 +63,13 @@ public:
// ALL // Possible extension: cells whose all points are in set
};
//- Names of the valid options
static const NamedEnum<pointAction, 2> pointActionNames_;
private:
static const NamedEnum<pointAction, 2> pointActionNames_;
// Private Data
//- Name of set to use
word setName_;
@ -83,6 +89,7 @@ public:
//- Runtime type information
TypeName("pointToCell");
// Constructors
//- Construct from components
@ -117,7 +124,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -391,8 +391,8 @@ Foam::regionToCell::regionToCell
insidePoints_
(
dict.found("insidePoint")
? pointField(1, dict.lookup<point>("insidePoint"))
: dict.lookup("insidePoints")
? List<point>(1, dict.lookup<point>("insidePoint", dimLength))
: dict.lookup<List<point>>("insidePoints", dimLength)
),
nErode_(dict.lookupOrDefault("nErode", 0))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,15 +67,13 @@ class regionToCell
:
public topoSetSource
{
// Private Data
//- Name of cellSet to keep to
const word setName_;
//- Coordinate(s) that is inside connected region
const pointField insidePoints_;
const List<point> insidePoints_;
//- Number of layers to erode
const label nErode_;
@ -112,6 +110,7 @@ public:
//- Runtime type information
TypeName("regionToCell");
// Constructors
//- Construct from components
@ -142,9 +141,11 @@ public:
return CELLSETSOURCE;
}
virtual void applyToSet(const topoSetSource::setAction action, topoSet&)
const;
virtual void applyToSet
(
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,9 +134,12 @@ Foam::rotatedBoxToCell::rotatedBoxToCell
if (dict.found("box"))
{
const boundBox bb(dict.lookup("box"));
const vector c(dict.lookupOrDefault<vector>("centre", bb.midpoint()));
const vector n1(normalised(dict.lookup<vector>("n1")));
const vector n2(normalised(dict.lookup<vector>("n2")));
const vector c
(
dict.lookupOrDefault<point>("centre", dimLength, bb.midpoint())
);
const vector n1(normalised(dict.lookup<vector>("n1", dimless)));
const vector n2(normalised(dict.lookup<vector>("n2", dimless)));
const tensor R(rotationTensor(n1, n2));
const pointField bbPoints(bb.points());
@ -148,10 +151,10 @@ Foam::rotatedBoxToCell::rotatedBoxToCell
}
else
{
origin_ = dict.lookup<point>("origin");
i_ = dict.lookup<vector>("i");
j_ = dict.lookup<vector>("j");
k_ = dict.lookup<vector>("k");
origin_ = dict.lookup<point>("origin", dimLength);
i_ = dict.lookup<vector>("i", dimLength);
j_ = dict.lookup<vector>("j", dimLength);
k_ = dict.lookup<vector>("k", dimLength);
}
}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,6 +108,7 @@ public:
//- Runtime type information
TypeName("rotatedBoxToCell");
// Constructors
//- Construct from components
@ -140,7 +141,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -77,8 +77,8 @@ Foam::sphereToCell::sphereToCell
)
:
topoSetSource(mesh),
centre_(dict.lookup("centre")),
radius_(dict.lookup<scalar>("radius"))
centre_(dict.lookup<point>("centre", dimLength)),
radius_(dict.lookup<scalar>("radius", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class sphereToCell
:
public topoSetSource
{
// Private Data
//- Centre
vector centre_;
@ -106,7 +104,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -406,7 +406,7 @@ Foam::surfaceToCell::surfaceToCell
:
topoSetSource(mesh),
surfName_(fileName(dict.lookup("file")).expand()),
outsidePoints_(dict.lookup("outsidePoints")),
outsidePoints_(dict.lookup<List<point>>("outsidePoints", dimLength)),
includeCut_(readBool(dict.lookup("includeCut"))),
includeInside_(readBool(dict.lookup("includeInside"))),
includeOutside_(readBool(dict.lookup("includeOutside"))),
@ -414,8 +414,8 @@ Foam::surfaceToCell::surfaceToCell
(
dict.lookupOrDefault<bool>("useSurfaceOrientation", false)
),
nearDist_(dict.lookup<scalar>("nearDistance")),
curvature_(dict.lookup<scalar>("curvature")),
nearDist_(dict.lookup<scalar>("nearDistance", dimLength)),
curvature_(dict.lookup<scalar>("curvature", unitNone)),
surfPtr_(new triSurface(surfName_)),
querySurfPtr_(new triSurfaceSearch(*surfPtr_)),
IOwnPtrs_(true)

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,15 +62,13 @@ class surfaceToCell
:
public topoSetSource
{
// Private Data
//- Name of surface file
const fileName surfName_;
//- Points which are outside
const pointField outsidePoints_;
const List<point> outsidePoints_;
//- Include cut cells
const bool includeCut_;
@ -148,6 +146,7 @@ public:
//- Runtime type information
TypeName("surfaceToCell");
// Constructors
//- Construct from components
@ -204,7 +203,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -274,8 +274,8 @@ Foam::targetVolumeToCell::targetVolumeToCell
)
:
topoSetSource(mesh),
vol_(dict.lookup<scalar>("volume")),
n_(dict.lookup("normal")),
vol_(dict.lookup<scalar>("volume", pow3(dimLength))),
n_(dict.lookup<vector>("normal", dimless)),
maskSetName_(dict.lookupOrDefault<word>("set", ""))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,10 +52,8 @@ class targetVolumeToCell
:
public topoSetSource
{
// Private Data
//- Wanted volume
const scalar vol_;
@ -85,6 +83,7 @@ public:
//- Runtime type information
TypeName("targetVolumeToCell");
// Constructors
//- Construct from components
@ -119,7 +118,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) const;
};

View File

@ -91,10 +91,10 @@ Foam::truncatedConeToCell::truncatedConeToCell
)
:
topoSetSource(mesh),
point1_(dict.lookup("point1")),
point2_(dict.lookup("point2")),
radius1_(dict.lookup<scalar>("radius1")),
radius2_(dict.lookup<scalar>("radius2"))
point1_(dict.lookup<point>("point1", dimLength)),
point2_(dict.lookup<point>("point2", dimLength)),
radius1_(dict.lookup<scalar>("radius1", dimLength)),
radius2_(dict.lookup<scalar>("radius2", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class zoneToCell
:
public topoSetSource
{
// Private Data
//- Name/regular expression of cellZone
wordRe zoneName_;
@ -69,6 +67,7 @@ public:
//- Runtime type information
TypeName("zoneToCell");
// Constructors
//- Construct from components
@ -102,7 +101,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,15 +52,16 @@ class setToCellZone
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("setToCellZone");
// Constructors
//- Construct from components
@ -94,7 +95,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,6 @@ class boundaryToFace
:
public topoSetSource
{
// Private Data
// Private Member Functions
void combine(topoSet& set, const bool add) const;
@ -64,6 +60,7 @@ public:
//- Runtime type information
TypeName("boundaryToFace");
// Constructors
//- Construct from components
@ -93,7 +90,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,8 +53,7 @@ class boxToFace
{
// Private Data
//- Bounding box.
//- Bounding box
treeBoundBoxList bbs_;
@ -68,6 +67,7 @@ public:
//- Runtime type information
TypeName("boxToFace");
// Constructors
//- Construct from components

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,6 +56,9 @@ class cellToFace
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum cellAction
{
@ -63,11 +66,13 @@ public:
BOTH
};
//- Names of the valid options
static const NamedEnum<cellAction, 2> cellActionNames_;
private:
static const NamedEnum<cellAction, 2> cellActionNames_;
// Private Data
//- Name of set to use
word setName_;
@ -87,6 +92,7 @@ public:
//- Runtime type information
TypeName("cellToFace");
// Constructors
//- Construct from components
@ -121,7 +127,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2017-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,10 +90,10 @@ Foam::cylinderAnnulusToFace::cylinderAnnulusToFace
)
:
topoSetSource(mesh),
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"})),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"})),
outerRadius_(dict.lookup<scalar>("outerRadius")),
innerRadius_(dict.lookup<scalar>("innerRadius"))
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"}, dimLength)),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"}, dimLength)),
outerRadius_(dict.lookup<scalar>("outerRadius", dimLength)),
innerRadius_(dict.lookup<scalar>("innerRadius", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class cylinderAnnulusToFace
:
public topoSetSource
{
// Private Data
//- First point on cylinder axis
vector point1_;

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,9 +87,9 @@ Foam::cylinderToFace::cylinderToFace
)
:
topoSetSource(mesh),
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"})),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"})),
radius_(dict.lookup<scalar>("radius"))
point1_(dict.lookupBackwardsCompatible<point>({"point1", "p1"}, dimLength)),
point2_(dict.lookupBackwardsCompatible<point>({"point2", "p2"}, dimLength)),
radius_(dict.lookup<scalar>("radius", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class cylinderToFace
:
public topoSetSource
{
// Private Data
//- First point on cylinder axis
vector point1_;

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,15 +52,16 @@ class faceToFace
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("faceToFace");
// Constructors
//- Construct from components
@ -94,7 +95,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class labelToFace
:
public topoSetSource
{
// Private Data
//- Cell labels read from dictionary
labelList labels_;
@ -68,6 +66,7 @@ public:
//- Runtime type information
TypeName("labelToFace");
// Constructors
//- Construct from components
@ -101,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,8 +74,8 @@ Foam::normalToFace::normalToFace
Foam::normalToFace::normalToFace(const polyMesh& mesh, const dictionary& dict)
:
topoSetSource(mesh),
normal_(dict.lookup("normal")),
tol_(dict.lookup<scalar>("cos"))
normal_(dict.lookup<vector>("normal", dimless)),
tol_(dict.lookup<scalar>("cos", dimless))
{
setNormal();
}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,11 +51,11 @@ class normalToFace
:
public topoSetSource
{
private:
// Private Data
//- (unit)vector to compare to
//- (unit) vector to compare to
vector normal_;
//- Tolerance (i.e. cos of angle between normal_ and faceNormal)
@ -73,6 +73,7 @@ public:
//- Runtime type information
TypeName("normalToFace");
// Constructors
//- Construct from components
@ -103,7 +104,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class patchToFace
:
public topoSetSource
{
// Private Data
//- Name/regular expression of patch
wordRe patchName_;
@ -69,6 +67,7 @@ public:
//- Runtime type information
TypeName("patchToFace");
// Constructors
//- Construct from components
@ -102,7 +101,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,9 +51,10 @@ class pointToFace
:
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum pointAction
{
@ -62,11 +63,13 @@ public:
EDGE
};
//- Names of the valid options
static const NamedEnum<pointAction, 3> pointActionNames_;
private:
static const NamedEnum<pointAction, 3> pointActionNames_;
// Private Data
//- Name of set to use
word setName_;
@ -86,6 +89,7 @@ public:
//- Runtime type information
TypeName("pointToFace");
// Constructors
//- Construct from components
@ -120,7 +124,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2012-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -174,7 +174,7 @@ Foam::regionToFace::regionToFace
:
topoSetSource(mesh),
setName_(dict.lookup("set")),
nearPoint_(dict.lookup("nearPoint"))
nearPoint_(dict.lookup<point>("nearPoint", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,13 +55,13 @@ class regionToFace
{
// Private Data
//- Name of set to use
word setName_;
//- Coordinate that is nearest/on connected region
point nearPoint_;
// Private Member Functions
//- Walk edge-face-edge
@ -76,11 +76,13 @@ class regionToFace
void combine(topoSet& set, const bool add) const;
public:
//- Runtime type information
TypeName("regionToFace");
// Constructors
//- Construct from components
@ -115,7 +117,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,9 +134,12 @@ Foam::rotatedBoxToFace::rotatedBoxToFace
if (dict.found("box"))
{
const boundBox bb(dict.lookup("box"));
const vector c(dict.lookupOrDefault<vector>("centre", bb.midpoint()));
const vector n1(normalised(dict.lookup<vector>("n1")));
const vector n2(normalised(dict.lookup<vector>("n2")));
const vector c
(
dict.lookupOrDefault<point>("centre", dimLength, bb.midpoint())
);
const vector n1(normalised(dict.lookup<vector>("n1", dimless)));
const vector n2(normalised(dict.lookup<vector>("n2", dimless)));
const tensor R(rotationTensor(n1, n2));
const pointField bbPoints(bb.points());
@ -148,10 +151,10 @@ Foam::rotatedBoxToFace::rotatedBoxToFace
}
else
{
origin_ = dict.lookup<point>("origin");
i_ = dict.lookup<vector>("i");
j_ = dict.lookup<vector>("j");
k_ = dict.lookup<vector>("k");
origin_ = dict.lookup<point>("origin", dimLength);
i_ = dict.lookup<vector>("i", dimLength);
j_ = dict.lookup<vector>("j", dimLength);
k_ = dict.lookup<vector>("k", dimLength);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,6 +108,7 @@ public:
//- Runtime type information
TypeName("rotatedBoxToFace");
// Constructors
//- Construct from components
@ -140,7 +141,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,6 +67,7 @@ public:
//- Runtime type information
TypeName("zoneToFace");
// Constructors
//- Construct from components

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,15 +52,16 @@ class faceZoneToFaceZone
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("faceZoneToFaceZone");
// Constructors
//- Construct from components
@ -94,7 +95,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) const;
};

View File

@ -364,8 +364,8 @@ Foam::planeToFaceZone::planeToFaceZone
)
:
topoSetSource(mesh),
point_(dict.lookup<vector>("point")),
normal_(dict.lookup<vector>("normal")),
point_(dict.lookup<vector>("point", dimLength)),
normal_(dict.lookup<vector>("normal", dimless)),
include_
(
includeNames_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,9 @@ class planeToFaceZone
:
public topoSetSource
{
public:
public:
// Public Enumerations
//- Enumeration for what to include
enum include
@ -77,7 +79,6 @@ private:
// Private Data
//- Point on the plane
const vector point_;

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-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -223,7 +223,7 @@ Foam::searchableSurfaceToFaceZone::searchableSurfaceToFaceZone
dict
)
),
tol_(dict.lookupOrDefault<scalar>("tol", rootSmall))
tol_(dict.lookupOrDefault<scalar>("tol", dimless, rootSmall))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,6 @@ class searchableSurfaceToFaceZone
{
// Private Data
//- Surface
autoPtr<searchableSurface> surfacePtr_;
@ -74,6 +73,7 @@ public:
//- Runtime type information
TypeName("searchableSurfaceToFaceZone");
// Constructors
//- Construct from dictionary
@ -100,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ Foam::setAndNormalToFaceZone::setAndNormalToFaceZone
:
topoSetSource(mesh),
setName_(dict.lookupBackwardsCompatible<word>({"set", "faceSet"})),
normal_(dict.lookup("normal"))
normal_(dict.lookup<vector>("normal", dimless))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,6 @@ class setAndNormalToFaceZone
{
// Private Data
//- Name of set to use
word setName_;
@ -66,6 +65,7 @@ public:
//- Runtime type information
TypeName("setAndNormalToFaceZone");
// Constructors
//- Construct from components
@ -100,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,15 +53,16 @@ class setToFaceZone
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("setToFaceZone");
// Constructors
//- Construct from components
@ -95,7 +96,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,6 @@ class setsToFaceZone
{
// Private Data
//- Name of set to use
const word faceSetName_;
@ -63,11 +62,13 @@ class setsToFaceZone
//- Whether cellSet is slave cells or master cells
const Switch flip_;
public:
//- Runtime type information
TypeName("setsToFaceZone");
// Constructors
//- Construct from components
@ -103,7 +104,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,11 +51,9 @@ class boxToPoint
:
public topoSetSource
{
// Private Data
//- Bounding box.
//- Bounding box
treeBoundBoxList bbs_;
@ -69,6 +67,7 @@ public:
//- Runtime type information
TypeName("boxToPoint");
// Constructors
//- Construct from components
@ -102,7 +101,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,19 +51,22 @@ class cellToPoint
:
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum cellAction
{
ALL
};
private:
//- Names of the valid options
static const NamedEnum<cellAction, 1> cellActionNames_;
private:
//- Name of set to use
word setName_;
@ -82,6 +85,7 @@ public:
//- Runtime type information
TypeName("cellToPoint");
// Constructors
//- Construct from components
@ -116,7 +120,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,19 +51,22 @@ class faceToPoint
:
public topoSetSource
{
public:
// Public Enumerations
//- Enumeration defining the valid options
enum faceAction
{
ALL
};
private:
//- Names of the valid options
static const NamedEnum<faceAction, 1> faceActionNames_;
private:
//- Name of set to use
word setName_;
@ -82,6 +85,7 @@ public:
//- Runtime type information
TypeName("faceToPoint");
// Constructors
//- Construct from components
@ -116,7 +120,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ class labelToPoint
:
public topoSetSource
{
// Private Data
//- Point labels read from dictionary
labelList labels_;
@ -68,6 +66,7 @@ public:
//- Runtime type information
TypeName("labelToPoint");
// Constructors
//- Construct from components
@ -101,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,7 +88,7 @@ Foam::nearestToPoint::nearestToPoint
)
:
topoSetSource(mesh),
points_(dict.lookup("points"))
points_(dict.lookup<List<point>>("points", dimLength))
{}

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,12 +50,10 @@ class nearestToPoint
:
public topoSetSource
{
// Private Data
//- Points to select nearest to
pointField points_;
List<point> points_;
// Private Member Functions
@ -68,6 +66,7 @@ public:
//- Runtime type information
TypeName("nearestToPoint");
// Constructors
//- Construct from components
@ -101,7 +100,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,15 +52,16 @@ class pointToPoint
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("pointToPoint");
// Constructors
//- Construct from components
@ -94,7 +95,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -133,7 +133,7 @@ Foam::surfaceToPoint::surfaceToPoint
:
topoSetSource(mesh),
surfName_(fileName(dict.lookup("file")).expand()),
nearDist_(dict.lookup<scalar>("nearDistance")),
nearDist_(dict.lookup<scalar>("nearDistance", dimLength)),
includeInside_(readBool(dict.lookup("includeInside"))),
includeOutside_(readBool(dict.lookup("includeOutside")))
{

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-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,10 +58,8 @@ class surfaceToPoint
:
public topoSetSource
{
// Private Data
//- Name of surface file
fileName surfName_;
@ -83,11 +81,13 @@ class surfaceToPoint
//- Check settings at construction time.
void checkSettings() const;
public:
//- Runtime type information
TypeName("surfaceToPoint");
// Constructors
//- Construct from components
@ -124,7 +124,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,10 +51,8 @@ class zoneToPoint
:
public topoSetSource
{
// Private Data
//- Name/regular expression of zone
wordRe zoneName_;
@ -69,6 +67,7 @@ public:
//- Runtime type information
TypeName("zoneToPoint");
// Constructors
//- Construct from components
@ -102,7 +101,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,15 +52,16 @@ class setToPointZone
{
// Private Data
//- Name of set to use
word setName_;
public:
//- Runtime type information
TypeName("setToPointZone");
// Constructors
//- Construct from components
@ -94,7 +95,6 @@ public:
const topoSetSource::setAction action,
topoSet&
) 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) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,6 +57,7 @@ class cellZoneSet
labelList addressing_;
public:
//- Runtime type information

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,8 +50,6 @@ class faceSet
:
public topoSet
{
public:
//- Runtime type information
@ -60,7 +58,6 @@ public:
// Constructors
//- Construct from IOobject
faceSet(const IOobject& obj);
@ -123,7 +120,6 @@ public:
const primitiveMesh&,
const label maxLen
) 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) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,8 +59,6 @@ class faceZoneSet
boolList flipMap_;
// Private Member Functions
public:

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,8 +50,6 @@ class pointSet
:
public topoSet
{
public:
//- Runtime type information
@ -60,7 +58,6 @@ public:
// Constructors
//- Construct from IOobject
pointSet(const IOobject& obj);
@ -126,7 +123,6 @@ public:
const primitiveMesh&,
const label maxLen
) 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) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,8 +58,6 @@ class pointZoneSet
labelList addressing_;
// Private Member Functions
public:

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-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,6 @@ class topoSet
public regIOobject,
public labelHashSet
{
protected:
// Protected Member Functions
@ -300,12 +299,10 @@ public:
virtual label maxSize(const polyMesh& mesh) const = 0;
// Member Operators
//- Copy labelHashSet part only
void operator=(const topoSet&);
};