mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: scaling: added scaling to various sampling routines. See #514.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -435,7 +435,14 @@ Foam::surfaceToCell::surfaceToCell
|
|||||||
),
|
),
|
||||||
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
||||||
curvature_(readScalar(dict.lookup("curvature"))),
|
curvature_(readScalar(dict.lookup("curvature"))),
|
||||||
surfPtr_(new triSurface(surfName_)),
|
surfPtr_
|
||||||
|
(
|
||||||
|
new triSurface
|
||||||
|
(
|
||||||
|
surfName_,
|
||||||
|
dict.lookupOrDefault<scalar>("scale", -1)
|
||||||
|
)
|
||||||
|
),
|
||||||
querySurfPtr_(new triSurfaceSearch(*surfPtr_)),
|
querySurfPtr_(new triSurfaceSearch(*surfPtr_)),
|
||||||
IOwnPtrs_(true)
|
IOwnPtrs_(true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -59,7 +59,7 @@ void Foam::surfaceToPoint::combine(topoSet& set, const bool add) const
|
|||||||
{
|
{
|
||||||
cpuTime timer;
|
cpuTime timer;
|
||||||
|
|
||||||
triSurface surf(surfName_);
|
triSurface surf(surfName_, scale_);
|
||||||
|
|
||||||
Info<< " Read surface from " << surfName_
|
Info<< " Read surface from " << surfName_
|
||||||
<< " in = "<< timer.cpuTimeIncrement() << " s" << endl << endl;
|
<< " in = "<< timer.cpuTimeIncrement() << " s" << endl << endl;
|
||||||
@ -131,6 +131,7 @@ Foam::surfaceToPoint::surfaceToPoint
|
|||||||
:
|
:
|
||||||
topoSetSource(mesh),
|
topoSetSource(mesh),
|
||||||
surfName_(surfName),
|
surfName_(surfName),
|
||||||
|
scale_(1.0),
|
||||||
nearDist_(nearDist),
|
nearDist_(nearDist),
|
||||||
includeInside_(includeInside),
|
includeInside_(includeInside),
|
||||||
includeOutside_(includeOutside)
|
includeOutside_(includeOutside)
|
||||||
@ -147,6 +148,7 @@ Foam::surfaceToPoint::surfaceToPoint
|
|||||||
:
|
:
|
||||||
topoSetSource(mesh),
|
topoSetSource(mesh),
|
||||||
surfName_(fileName(dict.lookup("file")).expand()),
|
surfName_(fileName(dict.lookup("file")).expand()),
|
||||||
|
scale_(dict.lookupOrDefault<scalar>("scale", 1.0)),
|
||||||
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
nearDist_(readScalar(dict.lookup("nearDistance"))),
|
||||||
includeInside_(readBool(dict.lookup("includeInside"))),
|
includeInside_(readBool(dict.lookup("includeInside"))),
|
||||||
includeOutside_(readBool(dict.lookup("includeOutside")))
|
includeOutside_(readBool(dict.lookup("includeOutside")))
|
||||||
@ -163,6 +165,7 @@ Foam::surfaceToPoint::surfaceToPoint
|
|||||||
:
|
:
|
||||||
topoSetSource(mesh),
|
topoSetSource(mesh),
|
||||||
surfName_(checkIs(is)),
|
surfName_(checkIs(is)),
|
||||||
|
scale_(1.0),
|
||||||
nearDist_(readScalar(checkIs(is))),
|
nearDist_(readScalar(checkIs(is))),
|
||||||
includeInside_(readBool(checkIs(is))),
|
includeInside_(readBool(checkIs(is))),
|
||||||
includeOutside_(readBool(checkIs(is)))
|
includeOutside_(readBool(checkIs(is)))
|
||||||
|
|||||||
@ -67,6 +67,9 @@ class surfaceToPoint
|
|||||||
//- Name of surface file
|
//- Name of surface file
|
||||||
const fileName surfName_;
|
const fileName surfName_;
|
||||||
|
|
||||||
|
//- Optional scaling for surface
|
||||||
|
const scalar scale_;
|
||||||
|
|
||||||
//- If > 0 : include points with distance to surface less than nearDist.
|
//- If > 0 : include points with distance to surface less than nearDist.
|
||||||
const scalar nearDist_;
|
const scalar nearDist_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user