mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: code consistency in sampling
TUT: dictionary form of surfaces instead of list
This commit is contained in:
@ -36,12 +36,12 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type distanceSurface;
|
type distanceSurface;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -44,6 +44,13 @@ namespace Foam
|
|||||||
word,
|
word,
|
||||||
isoSurface
|
isoSurface
|
||||||
);
|
);
|
||||||
|
addNamedToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
sampledSurface,
|
||||||
|
sampledIsoSurface,
|
||||||
|
word,
|
||||||
|
isoSurfacePoint
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
@ -519,7 +526,8 @@ bool Foam::sampledIsoSurface::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::sampledIsoSurface::sample
|
Foam::tmp<Foam::scalarField>
|
||||||
|
Foam::sampledIsoSurface::sample
|
||||||
(
|
(
|
||||||
const interpolation<scalar>& sampler
|
const interpolation<scalar>& sampler
|
||||||
) const
|
) const
|
||||||
@ -528,7 +536,8 @@ Foam::tmp<Foam::scalarField> Foam::sampledIsoSurface::sample
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::sampledIsoSurface::sample
|
Foam::tmp<Foam::vectorField>
|
||||||
|
Foam::sampledIsoSurface::sample
|
||||||
(
|
(
|
||||||
const interpolation<vector>& sampler
|
const interpolation<vector>& sampler
|
||||||
) const
|
) const
|
||||||
@ -537,7 +546,8 @@ Foam::tmp<Foam::vectorField> Foam::sampledIsoSurface::sample
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField> Foam::sampledIsoSurface::sample
|
Foam::tmp<Foam::sphericalTensorField>
|
||||||
|
Foam::sampledIsoSurface::sample
|
||||||
(
|
(
|
||||||
const interpolation<sphericalTensor>& sampler
|
const interpolation<sphericalTensor>& sampler
|
||||||
) const
|
) const
|
||||||
@ -546,7 +556,8 @@ Foam::tmp<Foam::sphericalTensorField> Foam::sampledIsoSurface::sample
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::symmTensorField> Foam::sampledIsoSurface::sample
|
Foam::tmp<Foam::symmTensorField>
|
||||||
|
Foam::sampledIsoSurface::sample
|
||||||
(
|
(
|
||||||
const interpolation<symmTensor>& sampler
|
const interpolation<symmTensor>& sampler
|
||||||
) const
|
) const
|
||||||
@ -555,7 +566,8 @@ Foam::tmp<Foam::symmTensorField> Foam::sampledIsoSurface::sample
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::tensorField> Foam::sampledIsoSurface::sample
|
Foam::tmp<Foam::tensorField>
|
||||||
|
Foam::sampledIsoSurface::sample
|
||||||
(
|
(
|
||||||
const interpolation<tensor>& sampler
|
const interpolation<tensor>& sampler
|
||||||
) const
|
) const
|
||||||
@ -564,7 +576,8 @@ Foam::tmp<Foam::tensorField> Foam::sampledIsoSurface::sample
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::sampledIsoSurface::interpolate
|
Foam::tmp<Foam::scalarField>
|
||||||
|
Foam::sampledIsoSurface::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<scalar>& interpolator
|
const interpolation<scalar>& interpolator
|
||||||
) const
|
) const
|
||||||
@ -573,7 +586,8 @@ Foam::tmp<Foam::scalarField> Foam::sampledIsoSurface::interpolate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::vectorField> Foam::sampledIsoSurface::interpolate
|
Foam::tmp<Foam::vectorField>
|
||||||
|
Foam::sampledIsoSurface::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<vector>& interpolator
|
const interpolation<vector>& interpolator
|
||||||
) const
|
) const
|
||||||
@ -581,7 +595,8 @@ Foam::tmp<Foam::vectorField> Foam::sampledIsoSurface::interpolate
|
|||||||
return sampleOnPoints(interpolator);
|
return sampleOnPoints(interpolator);
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::tmp<Foam::sphericalTensorField> Foam::sampledIsoSurface::interpolate
|
Foam::tmp<Foam::sphericalTensorField>
|
||||||
|
Foam::sampledIsoSurface::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<sphericalTensor>& interpolator
|
const interpolation<sphericalTensor>& interpolator
|
||||||
) const
|
) const
|
||||||
@ -590,7 +605,8 @@ Foam::tmp<Foam::sphericalTensorField> Foam::sampledIsoSurface::interpolate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::symmTensorField> Foam::sampledIsoSurface::interpolate
|
Foam::tmp<Foam::symmTensorField>
|
||||||
|
Foam::sampledIsoSurface::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<symmTensor>& interpolator
|
const interpolation<symmTensor>& interpolator
|
||||||
) const
|
) const
|
||||||
@ -599,7 +615,8 @@ Foam::tmp<Foam::symmTensorField> Foam::sampledIsoSurface::interpolate
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::tensorField> Foam::sampledIsoSurface::interpolate
|
Foam::tmp<Foam::tensorField>
|
||||||
|
Foam::sampledIsoSurface::interpolate
|
||||||
(
|
(
|
||||||
const interpolation<tensor>& interpolator
|
const interpolation<tensor>& interpolator
|
||||||
) const
|
) const
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,42 +28,43 @@ Class
|
|||||||
Foam::sampledIsoSurface
|
Foam::sampledIsoSurface
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A sampledSurface defined by a surface of iso value. Always triangulated.
|
A sampledSurface defined by a surface of iso value using a
|
||||||
To be used in sampleSurfaces / functionObjects. Recalculates iso surface
|
\em point algorithm (always triangulated!).
|
||||||
only if time changes.
|
It only recalculates the iso-surface if time changes.
|
||||||
|
To be used in sampleSurfaces / functionObjects.
|
||||||
This is often embedded as part of a sampled surfaces function object.
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type sampledIsoSurface;
|
type isoSurfacePoint;
|
||||||
cell false;
|
isoField T;
|
||||||
|
isoValue 373;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
type | sampledIsoSurface | yes |
|
type | isoSurfacePoint / isoSurface | yes |
|
||||||
isoField | field name for obtaining iso-surface | yes |
|
isoField | field name for obtaining iso-surface | yes |
|
||||||
isoValue | value of iso-surface | yes |
|
isoValue | value of iso-surface | yes |
|
||||||
mergeTol | tolerance for merging points | no | 1e-6
|
|
||||||
regularise | point snapping (bool or enum) | no | true
|
|
||||||
average | cell values from averaged point values | no | false
|
average | cell values from averaged point values | no | false
|
||||||
bounds | limit with bounding box | no |
|
bounds | limit with bounding box | no |
|
||||||
zone | limit to cell zone (name or regex) | no |
|
zone | limit to cell zone (name or regex) | no |
|
||||||
zones | limit to cell zones (names, regexs) | no |
|
zones | limit to cell zones (names, regexs) | no |
|
||||||
exposedPatchName | name for zone subset | partly |
|
exposedPatchName | name for zone subset | partly |
|
||||||
|
regularise | point snapping (bool or enum) | no | true
|
||||||
|
mergeTol | tolerance for merging points | no | 1e-6
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledIsoSurface.C
|
sampledIsoSurface.C
|
||||||
|
sampledIsoSurfaceTemplates.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ class sampledIsoSurface
|
|||||||
:
|
:
|
||||||
public sampledSurface
|
public sampledSurface
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Field to get isoSurface of
|
//- Field to get isoSurface of
|
||||||
const word isoField_;
|
const word isoField_;
|
||||||
@ -128,6 +129,7 @@ class sampledIsoSurface
|
|||||||
//- Cached pointfield
|
//- Cached pointfield
|
||||||
mutable const pointScalarField* pointFieldPtr_;
|
mutable const pointScalarField* pointFieldPtr_;
|
||||||
|
|
||||||
|
|
||||||
// And on subsetted mesh
|
// And on subsetted mesh
|
||||||
|
|
||||||
//- Cached submesh
|
//- Cached submesh
|
||||||
@ -243,11 +245,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Lookup or read isoField.
|
|
||||||
// Sets volFieldPtr_ and pointFieldPtr_.
|
|
||||||
void getIsoField();
|
|
||||||
|
|
||||||
|
|
||||||
// Sample
|
// Sample
|
||||||
|
|
||||||
//- Sample volume field onto surface faces
|
//- Sample volume field onto surface faces
|
||||||
@ -317,7 +314,7 @@ public:
|
|||||||
// Output
|
// Output
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void print(Ostream&) const;
|
virtual void print(Ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -111,10 +111,15 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
|
|||||||
|
|
||||||
auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld);
|
auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld);
|
||||||
|
|
||||||
|
// Non-averaged? Use reference
|
||||||
|
tmp<scalarField> tcellValues(cellFld.primitiveField());
|
||||||
|
|
||||||
if (average_)
|
if (average_)
|
||||||
{
|
{
|
||||||
//- From point field and interpolated cell.
|
// From point field and interpolated cell.
|
||||||
scalarField cellAvg(fvm.nCells(), Zero);
|
tcellValues = tmp<scalarField>::New(fvm.nCells(), Zero);
|
||||||
|
auto& cellAvg = tcellValues.ref();
|
||||||
|
|
||||||
labelField nPointCells(fvm.nCells(), Zero);
|
labelField nPointCells(fvm.nCells(), Zero);
|
||||||
|
|
||||||
for (label pointi = 0; pointi < fvm.nPoints(); ++pointi)
|
for (label pointi = 0; pointi < fvm.nPoints(); ++pointi)
|
||||||
@ -132,47 +137,29 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
|
|||||||
{
|
{
|
||||||
cellAvg[celli] /= nPointCells[celli];
|
cellAvg[celli] /= nPointCells[celli];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
isoSurfaceCell surf
|
isoSurfaceCell surf
|
||||||
(
|
(
|
||||||
fvm,
|
fvm,
|
||||||
cellAvg,
|
tcellValues(),
|
||||||
tpointFld().primitiveField(),
|
tpointFld().primitiveField(),
|
||||||
isoVal_,
|
isoVal_,
|
||||||
filter_,
|
filter_,
|
||||||
bounds_
|
bounds_,
|
||||||
|
1e-6 // mergeTol
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Replace current geomety
|
||||||
const_cast<sampledIsoSurfaceCell&>
|
const_cast<sampledIsoSurfaceCell&>
|
||||||
(
|
(
|
||||||
*this
|
*this
|
||||||
).transfer(static_cast<meshedSurface&>(surf));
|
).transfer(static_cast<meshedSurface&>(surf));
|
||||||
meshCells_.transfer(surf.meshCells());
|
meshCells_.transfer(surf.meshCells());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//- Direct from cell field and point field. Gives bad continuity.
|
|
||||||
isoSurfaceCell surf
|
|
||||||
(
|
|
||||||
fvm,
|
|
||||||
cellFld.primitiveField(),
|
|
||||||
tpointFld().primitiveField(),
|
|
||||||
isoVal_,
|
|
||||||
filter_,
|
|
||||||
bounds_
|
|
||||||
);
|
|
||||||
|
|
||||||
const_cast<sampledIsoSurfaceCell&>
|
|
||||||
(
|
|
||||||
*this
|
|
||||||
).transfer(static_cast<meshedSurface&>(surf));
|
|
||||||
meshCells_.transfer(surf.meshCells());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "sampledIsoSurfaceCell::updateGeometry() : constructed iso:"
|
Pout<< "isoSurfaceCell::updateGeometry() : constructed iso:"
|
||||||
<< nl
|
<< nl
|
||||||
<< " filter : " << Switch(bool(filter_)) << nl
|
<< " filter : " << Switch(bool(filter_)) << nl
|
||||||
<< " average : " << Switch(average_) << nl
|
<< " average : " << Switch(average_) << nl
|
||||||
@ -180,7 +167,7 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
|
|||||||
<< " isoValue : " << isoVal_ << nl
|
<< " isoValue : " << isoVal_ << nl
|
||||||
<< " bounds : " << bounds_ << nl
|
<< " bounds : " << bounds_ << nl
|
||||||
<< " points : " << points().size() << nl
|
<< " points : " << points().size() << nl
|
||||||
<< " faces : " << MeshStorage::size() << nl
|
<< " faces : " << Mesh::size() << nl
|
||||||
<< " cut cells : " << meshCells_.size() << endl;
|
<< " cut cells : " << meshCells_.size() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +185,7 @@ Foam::sampledIsoSurfaceCell::sampledIsoSurfaceCell
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
sampledSurface(name, mesh, dict),
|
sampledSurface(name, mesh, dict),
|
||||||
MeshStorage(),
|
Mesh(),
|
||||||
isoField_(dict.get<word>("isoField")),
|
isoField_(dict.get<word>("isoField")),
|
||||||
isoVal_(dict.get<scalar>("isoValue")),
|
isoVal_(dict.get<scalar>("isoValue")),
|
||||||
filter_
|
filter_
|
||||||
@ -356,7 +343,7 @@ Foam::sampledIsoSurfaceCell::interpolate
|
|||||||
|
|
||||||
void Foam::sampledIsoSurfaceCell::print(Ostream& os) const
|
void Foam::sampledIsoSurfaceCell::print(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << "sampledIsoSurfaceCell: " << name() << " :"
|
os << "isoSurfaceCell: " << name() << " :"
|
||||||
<< " field:" << isoField_
|
<< " field:" << isoField_
|
||||||
<< " value:" << isoVal_;
|
<< " value:" << isoVal_;
|
||||||
//<< " faces:" << faces().size() // possibly no geom yet
|
//<< " faces:" << faces().size() // possibly no geom yet
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,35 +28,35 @@ Class
|
|||||||
Foam::sampledIsoSurfaceCell
|
Foam::sampledIsoSurfaceCell
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A sampledSurface defined by a surface of iso value. Always triangulated.
|
A sampledSurface defined by a surface of iso value using a
|
||||||
To be used in sampleSurfaces / functionObjects. Recalculates iso surface
|
\em cell algorithm.
|
||||||
only if time changes.
|
It only recalculates the iso-surface if time changes.
|
||||||
|
To be used in sampleSurfaces / functionObjects.
|
||||||
This is often embedded as part of a sampled surfaces function object.
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type sampledIsoSurfaceCell;
|
type isoSurfaceCell;
|
||||||
cell true;
|
isoField T;
|
||||||
|
isoValue 373;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
type | sampledIsoSurfaceCell | yes |
|
type | isoSurfaceCell | yes |
|
||||||
isoField | field name for obtaining iso-surface | yes |
|
isoField | field name for obtaining iso-surface | yes |
|
||||||
isoValue | value of iso-surface | yes |
|
isoValue | value of iso-surface | yes |
|
||||||
mergeTol | tolerance for merging points | no | 1e-6
|
|
||||||
regularise | point snapping | yes |
|
|
||||||
average | cell values from averaged point values | no | false
|
average | cell values from averaged point values | no | false
|
||||||
bounds | limit with bounding box | no |
|
bounds | limit with bounding box | no |
|
||||||
|
regularise | point snapping | yes |
|
||||||
|
mergeTol | tolerance for merging points | no | 1e-6
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note
|
Note
|
||||||
@ -64,6 +64,7 @@ Note
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledIsoSurfaceCell.C
|
sampledIsoSurfaceCell.C
|
||||||
|
sampledIsoSurfaceCellTemplates.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -90,9 +91,10 @@ class sampledIsoSurfaceCell
|
|||||||
public meshedSurface
|
public meshedSurface
|
||||||
{
|
{
|
||||||
// Private typedefs for convenience
|
// Private typedefs for convenience
|
||||||
typedef meshedSurface MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
// Private data
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
//- Field to get isoSurface of
|
//- Field to get isoSurface of
|
||||||
const word isoField_;
|
const word isoField_;
|
||||||
@ -112,7 +114,7 @@ class sampledIsoSurfaceCell
|
|||||||
|
|
||||||
// Recreated for every isoSurface
|
// Recreated for every isoSurface
|
||||||
|
|
||||||
//- Time at last call, also track it surface needs an update
|
//- Time at last call, also track if surface needs an update
|
||||||
mutable label prevTimeIndex_;
|
mutable label prevTimeIndex_;
|
||||||
|
|
||||||
//- For every triangle the original cell in mesh
|
//- For every triangle the original cell in mesh
|
||||||
@ -179,13 +181,13 @@ public:
|
|||||||
//- Points of surface
|
//- Points of surface
|
||||||
virtual const pointField& points() const
|
virtual const pointField& points() const
|
||||||
{
|
{
|
||||||
return MeshStorage::points();
|
return Mesh::points();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Faces of surface
|
//- Faces of surface
|
||||||
virtual const faceList& faces() const
|
virtual const faceList& faces() const
|
||||||
{
|
{
|
||||||
return MeshStorage::surfFaces();
|
return Mesh::surfFaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Per-face zone/region information
|
//- Per-face zone/region information
|
||||||
@ -197,19 +199,19 @@ public:
|
|||||||
//- Face area magnitudes
|
//- Face area magnitudes
|
||||||
virtual const vectorField& Sf() const
|
virtual const vectorField& Sf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Sf();
|
return Mesh::Sf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face area magnitudes
|
//- Face area magnitudes
|
||||||
virtual const scalarField& magSf() const
|
virtual const scalarField& magSf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::magSf();
|
return Mesh::magSf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face centres
|
//- Face centres
|
||||||
virtual const vectorField& Cf() const
|
virtual const vectorField& Cf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Cf();
|
return Mesh::Cf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +281,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void print(Ostream&) const;
|
virtual void print(Ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,8 @@ bool Foam::sampledIsoSurfaceTopo::updateGeometry() const
|
|||||||
|
|
||||||
auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld);
|
auto tpointFld = volPointInterpolation::New(fvm).interpolate(cellFld);
|
||||||
|
|
||||||
//- Direct from cell field and point field. Gives bad continuity.
|
Mesh& mySurface = const_cast<sampledIsoSurfaceTopo&>(*this);
|
||||||
|
|
||||||
isoSurfaceTopo surf
|
isoSurfaceTopo surf
|
||||||
(
|
(
|
||||||
fvm,
|
fvm,
|
||||||
@ -121,8 +122,6 @@ bool Foam::sampledIsoSurfaceTopo::updateGeometry() const
|
|||||||
filter_
|
filter_
|
||||||
);
|
);
|
||||||
|
|
||||||
MeshedSurface<face>& mySurface = const_cast<sampledIsoSurfaceTopo&>(*this);
|
|
||||||
|
|
||||||
mySurface.transfer(static_cast<meshedSurface&>(surf));
|
mySurface.transfer(static_cast<meshedSurface&>(surf));
|
||||||
meshCells_ = std::move(surf.meshCells());
|
meshCells_ = std::move(surf.meshCells());
|
||||||
|
|
||||||
@ -147,7 +146,7 @@ bool Foam::sampledIsoSurfaceTopo::updateGeometry() const
|
|||||||
<< " isoField : " << isoField_ << nl
|
<< " isoField : " << isoField_ << nl
|
||||||
<< " isoValue : " << isoVal_ << nl
|
<< " isoValue : " << isoVal_ << nl
|
||||||
<< " points : " << points().size() << nl
|
<< " points : " << points().size() << nl
|
||||||
<< " faces : " << MeshStorage::size() << nl
|
<< " faces : " << Mesh::size() << nl
|
||||||
<< " cut cells : " << meshCells_.size() << endl;
|
<< " cut cells : " << meshCells_.size() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +164,7 @@ Foam::sampledIsoSurfaceTopo::sampledIsoSurfaceTopo
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
sampledSurface(name, mesh, dict),
|
sampledSurface(name, mesh, dict),
|
||||||
MeshStorage(),
|
Mesh(),
|
||||||
isoField_(dict.get<word>("isoField")),
|
isoField_(dict.get<word>("isoField")),
|
||||||
isoVal_(dict.get<scalar>("isoValue")),
|
isoVal_(dict.get<scalar>("isoValue")),
|
||||||
filter_
|
filter_
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018 OpenFOAM Foundation
|
Copyright (C) 2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,24 +28,23 @@ Class
|
|||||||
Foam::sampledIsoSurfaceTopo
|
Foam::sampledIsoSurfaceTopo
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A sampledSurface defined by a surface of iso value.
|
A sampledSurface defined by a surface of iso value using a
|
||||||
To be used in sampleSurfaces / functionObjects. Recalculates iso surface
|
\em topo algorithm.
|
||||||
only if time changes.
|
It only recalculates the iso-surface if time changes.
|
||||||
|
To be used in sampleSurfaces / functionObjects.
|
||||||
This is often embedded as part of a sampled surfaces function object.
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type isoSurfaceTopo;
|
type isoSurfaceTopo;
|
||||||
isoField p;
|
isoField T;
|
||||||
isoValue 0.0;
|
isoValue 373;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
@ -55,7 +54,7 @@ Usage
|
|||||||
isoField | field name for obtaining iso-surface | yes |
|
isoField | field name for obtaining iso-surface | yes |
|
||||||
isoValue | value of iso-surface | yes |
|
isoValue | value of iso-surface | yes |
|
||||||
regularise | filter faces (bool or enum) | no | true
|
regularise | filter faces (bool or enum) | no | true
|
||||||
triangulate | triangulate faces (if regularise) | no | false
|
triangulate | triangulate faces (requires regularise) | no | false
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Note
|
Note
|
||||||
@ -63,6 +62,7 @@ Note
|
|||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledIsoSurfaceTopo.C
|
sampledIsoSurfaceTopo.C
|
||||||
|
sampledIsoSurfaceTopoTemplates.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -86,12 +86,13 @@ namespace Foam
|
|||||||
class sampledIsoSurfaceTopo
|
class sampledIsoSurfaceTopo
|
||||||
:
|
:
|
||||||
public sampledSurface,
|
public sampledSurface,
|
||||||
public MeshedSurface<face>
|
public meshedSurface
|
||||||
{
|
{
|
||||||
// Private typedefs for convenience
|
// Private typedefs for convenience
|
||||||
typedef MeshedSurface<face> MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
// Private data
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
//- Field to get isoSurface of
|
//- Field to get isoSurface of
|
||||||
const word isoField_;
|
const word isoField_;
|
||||||
@ -175,7 +176,7 @@ public:
|
|||||||
//- Points of surface
|
//- Points of surface
|
||||||
virtual const pointField& points() const
|
virtual const pointField& points() const
|
||||||
{
|
{
|
||||||
return MeshStorage::points();
|
return Mesh::points();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Faces of surface
|
//- Faces of surface
|
||||||
@ -193,19 +194,19 @@ public:
|
|||||||
//- Face area magnitudes
|
//- Face area magnitudes
|
||||||
virtual const vectorField& Sf() const
|
virtual const vectorField& Sf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Sf();
|
return Mesh::Sf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face area magnitudes
|
//- Face area magnitudes
|
||||||
virtual const scalarField& magSf() const
|
virtual const scalarField& magSf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::magSf();
|
return Mesh::magSf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face centres
|
//- Face centres
|
||||||
virtual const vectorField& Cf() const
|
virtual const vectorField& Cf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Cf();
|
return Mesh::Cf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -275,7 +276,7 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void print(Ostream&) const;
|
virtual void print(Ostream& os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
@ -47,7 +47,7 @@ Usage
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -36,13 +36,13 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type faceZones;
|
type faceZones;
|
||||||
zones (zone1 "sides.*");
|
zones (zone1 "sides.*");
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -69,25 +69,6 @@ namespace Foam
|
|||||||
sampledTriSurfaceMesh
|
sampledTriSurfaceMesh
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Private class for finding nearest
|
|
||||||
// Comprising:
|
|
||||||
// - global index
|
|
||||||
// - sqr(distance)
|
|
||||||
typedef Tuple2<scalar, label> nearInfo;
|
|
||||||
|
|
||||||
class nearestEqOp
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
void operator()(nearInfo& x, const nearInfo& y) const
|
|
||||||
{
|
|
||||||
if (y.first() < x.first())
|
|
||||||
{
|
|
||||||
x = y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|
||||||
@ -170,6 +151,8 @@ bool Foam::sampledMeshedSurface::update(const meshSearch& meshSearcher)
|
|||||||
// Does approximation by looking at the face centres only
|
// Does approximation by looking at the face centres only
|
||||||
const pointField& fc = surface_.faceCentres();
|
const pointField& fc = surface_.faceCentres();
|
||||||
|
|
||||||
|
// sqr(distance), global index
|
||||||
|
typedef Tuple2<scalar, label> nearInfo;
|
||||||
List<nearInfo> nearest(fc.size(), nearInfo(Foam::sqr(GREAT), labelMax));
|
List<nearInfo> nearest(fc.size(), nearInfo(Foam::sqr(GREAT), labelMax));
|
||||||
|
|
||||||
if (sampleSource_ == samplingSource::cells)
|
if (sampleSource_ == samplingSource::cells)
|
||||||
@ -244,7 +227,7 @@ bool Foam::sampledMeshedSurface::update(const meshSearch& meshSearcher)
|
|||||||
// See which processor has the nearest. Mark and subset
|
// See which processor has the nearest. Mark and subset
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Pstream::listCombineGather(nearest, nearestEqOp());
|
Pstream::listCombineGather(nearest, minFirstEqOp<scalar>{});
|
||||||
Pstream::listCombineScatter(nearest);
|
Pstream::listCombineScatter(nearest);
|
||||||
|
|
||||||
labelList cellOrFaceLabels(fc.size(), -1);
|
labelList cellOrFaceLabels(fc.size(), -1);
|
||||||
|
|||||||
@ -36,13 +36,13 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
patches (inlet "outlet.*");
|
patches (inlet "outlet.*");
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type patchInternalField;
|
type patchInternalField;
|
||||||
@ -49,7 +49,7 @@ Usage
|
|||||||
offsetMode normal;
|
offsetMode normal;
|
||||||
distance 0.05;
|
distance 0.05;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type plane;
|
type plane;
|
||||||
@ -47,7 +47,7 @@ Usage
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
|
|||||||
@ -27,12 +27,12 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "sampledThresholdCellFaces.H"
|
#include "sampledThresholdCellFaces.H"
|
||||||
|
#include "thresholdCellFaces.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "thresholdCellFaces.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -48,6 +48,7 @@ namespace Foam
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::sampledThresholdCellFaces::updateGeometry() const
|
bool Foam::sampledThresholdCellFaces::updateGeometry() const
|
||||||
@ -106,6 +107,7 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const
|
|||||||
const volScalarField& cellFld =
|
const volScalarField& cellFld =
|
||||||
(fieldReadPtr ? *fieldReadPtr : *cellFldPtr);
|
(fieldReadPtr ? *fieldReadPtr : *cellFldPtr);
|
||||||
|
|
||||||
|
Mesh& mySurface = const_cast<sampledThresholdCellFaces&>(*this);
|
||||||
|
|
||||||
thresholdCellFaces surf
|
thresholdCellFaces surf
|
||||||
(
|
(
|
||||||
@ -116,10 +118,7 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const
|
|||||||
triangulate_
|
triangulate_
|
||||||
);
|
);
|
||||||
|
|
||||||
const_cast<sampledThresholdCellFaces&>
|
mySurface.transfer(static_cast<Mesh&>(surf));
|
||||||
(
|
|
||||||
*this
|
|
||||||
).MeshedSurface<face>::transfer(surf);
|
|
||||||
meshCells_.transfer(surf.meshCells());
|
meshCells_.transfer(surf.meshCells());
|
||||||
|
|
||||||
// Clear derived data
|
// Clear derived data
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -37,14 +37,14 @@ Usage
|
|||||||
Example of function object partial specification:
|
Example of function object partial specification:
|
||||||
\verbatim
|
\verbatim
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type thresholdCellFaces;
|
type thresholdCellFaces;
|
||||||
field rho;
|
field rho;
|
||||||
lowerLimit 0.1;
|
lowerLimit 0.1;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Where the sub-entries comprise:
|
Where the sub-entries comprise:
|
||||||
@ -73,6 +73,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "sampledSurface.H"
|
#include "sampledSurface.H"
|
||||||
#include "MeshedSurface.H"
|
#include "MeshedSurface.H"
|
||||||
|
#include "MeshedSurfacesFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -86,12 +87,13 @@ namespace Foam
|
|||||||
class sampledThresholdCellFaces
|
class sampledThresholdCellFaces
|
||||||
:
|
:
|
||||||
public sampledSurface,
|
public sampledSurface,
|
||||||
public MeshedSurface<face>
|
public meshedSurface
|
||||||
{
|
{
|
||||||
//- Private typedefs for convenience
|
// Private typedef for convenience
|
||||||
typedef MeshedSurface<face> MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
// Private data
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
//- Threshold field
|
//- Threshold field
|
||||||
const word fieldName_;
|
const word fieldName_;
|
||||||
@ -173,13 +175,13 @@ public:
|
|||||||
//- Points of surface
|
//- Points of surface
|
||||||
virtual const pointField& points() const
|
virtual const pointField& points() const
|
||||||
{
|
{
|
||||||
return MeshStorage::points();
|
return Mesh::points();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Faces of surface
|
//- Faces of surface
|
||||||
virtual const faceList& faces() const
|
virtual const faceList& faces() const
|
||||||
{
|
{
|
||||||
return MeshStorage::surfFaces();
|
return Mesh::surfFaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Per-face zone/region information
|
//- Per-face zone/region information
|
||||||
@ -191,19 +193,19 @@ public:
|
|||||||
//- Face area vectors (normals)
|
//- Face area vectors (normals)
|
||||||
virtual const vectorField& Sf() const
|
virtual const vectorField& Sf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Sf();
|
return Mesh::Sf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face area magnitudes
|
//- Face area magnitudes
|
||||||
virtual const scalarField& magSf() const
|
virtual const scalarField& magSf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::magSf();
|
return Mesh::magSf();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Face centres
|
//- Face centres
|
||||||
virtual const vectorField& Cf() const
|
virtual const vectorField& Cf() const
|
||||||
{
|
{
|
||||||
return MeshStorage::Cf();
|
return Mesh::Cf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -89,7 +89,7 @@ void Foam::cuttingPlane::performCut
|
|||||||
const plane& pln = *this;
|
const plane& pln = *this;
|
||||||
const pointField& pts = mesh.points();
|
const pointField& pts = mesh.points();
|
||||||
|
|
||||||
MeshStorage::clear();
|
Mesh::clear();
|
||||||
meshCells_.clear();
|
meshCells_.clear();
|
||||||
|
|
||||||
// Pre-populate with restriction
|
// Pre-populate with restriction
|
||||||
@ -153,7 +153,7 @@ void Foam::cuttingPlane::operator=(const cuttingPlane& rhs)
|
|||||||
return; // Self-assignment is a no-op
|
return; // Self-assignment is a no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
static_cast<MeshStorage&>(*this) = rhs;
|
static_cast<Mesh&>(*this) = rhs;
|
||||||
static_cast<plane&>(*this) = rhs;
|
static_cast<plane&>(*this) = rhs;
|
||||||
meshCells_ = rhs.meshCells();
|
meshCells_ = rhs.meshCells();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,7 +98,7 @@ void Foam::cuttingSurface::performCut
|
|||||||
{
|
{
|
||||||
const fvMesh& fvm = static_cast<const fvMesh&>(mesh);
|
const fvMesh& fvm = static_cast<const fvMesh&>(mesh);
|
||||||
|
|
||||||
MeshStorage::clear();
|
Mesh::clear();
|
||||||
meshCells_.clear();
|
meshCells_.clear();
|
||||||
|
|
||||||
// Pre-populate with restriction
|
// Pre-populate with restriction
|
||||||
@ -170,8 +170,8 @@ void Foam::cuttingSurface::performCut
|
|||||||
void Foam::cuttingSurface::print(Ostream& os) const
|
void Foam::cuttingSurface::print(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << " surface:" << surfaceName()
|
os << " surface:" << surfaceName()
|
||||||
<< " faces:" << MeshStorage::surfFaces().size()
|
<< " faces:" << Mesh::surfFaces().size()
|
||||||
<< " points:" << MeshStorage::points().size();
|
<< " points:" << Mesh::points().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,12 +35,6 @@ int Foam::cuttingSurfaceBase::debug
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::cuttingSurfaceBase::cuttingSurfaceBase()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::cuttingSurfaceBase::performCut
|
void Foam::cuttingSurfaceBase::performCut
|
||||||
@ -80,7 +74,7 @@ void Foam::cuttingSurfaceBase::remapFaces(const labelUList& faceMap)
|
|||||||
{
|
{
|
||||||
if (!faceMap.empty())
|
if (!faceMap.empty())
|
||||||
{
|
{
|
||||||
MeshStorage::remapFaces(faceMap);
|
Mesh::remapFaces(faceMap);
|
||||||
|
|
||||||
List<label> remappedCells(faceMap.size());
|
List<label> remappedCells(faceMap.size());
|
||||||
forAll(faceMap, facei)
|
forAll(faceMap, facei)
|
||||||
@ -101,7 +95,7 @@ void Foam::cuttingSurfaceBase::operator=(const cuttingSurfaceBase& rhs)
|
|||||||
return; // Self-assignment is a no-op
|
return; // Self-assignment is a no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
static_cast<MeshStorage&>(*this) = rhs;
|
static_cast<Mesh&>(*this) = rhs;
|
||||||
meshCells_ = rhs.meshCells();
|
meshCells_ = rhs.meshCells();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -44,13 +44,14 @@ SourceFiles
|
|||||||
#include "bitSet.H"
|
#include "bitSet.H"
|
||||||
#include "faceList.H"
|
#include "faceList.H"
|
||||||
#include "MeshedSurface.H"
|
#include "MeshedSurface.H"
|
||||||
|
#include "MeshedSurfacesFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -59,12 +60,12 @@ class primitiveMesh;
|
|||||||
|
|
||||||
class cuttingSurfaceBase
|
class cuttingSurfaceBase
|
||||||
:
|
:
|
||||||
public MeshedSurface<face>
|
public meshedSurface
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//- Typedef for convenience
|
//- Typedef for convenience
|
||||||
typedef MeshedSurface<face> MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
|
|
||||||
// Protected Data
|
// Protected Data
|
||||||
@ -183,8 +184,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Default construct
|
||||||
cuttingSurfaceBase();
|
cuttingSurfaceBase() = default;
|
||||||
|
|
||||||
|
|
||||||
//- Destructors
|
//- Destructors
|
||||||
|
|||||||
@ -1378,11 +1378,8 @@ Foam::isoSurface::isoSurface
|
|||||||
Pout<< "isoSurface:" << nl
|
Pout<< "isoSurface:" << nl
|
||||||
<< " isoField : " << cellValues.name() << nl
|
<< " isoField : " << cellValues.name() << nl
|
||||||
<< " cell min/max : "
|
<< " cell min/max : "
|
||||||
<< min(cellValues.primitiveField()) << " / "
|
<< minMax(cellValues.primitiveField()) << nl
|
||||||
<< max(cellValues.primitiveField()) << nl
|
<< " point min/max : " << minMax(pVals_) << nl
|
||||||
<< " point min/max : "
|
|
||||||
<< min(pVals_) << " / "
|
|
||||||
<< max(pVals_) << nl
|
|
||||||
<< " isoValue : " << iso << nl
|
<< " isoValue : " << iso << nl
|
||||||
<< " filter : " << Switch(regularise_) << nl
|
<< " filter : " << Switch(regularise_) << nl
|
||||||
<< " mergeTol : " << mergeTol << nl
|
<< " mergeTol : " << mergeTol << nl
|
||||||
@ -1754,9 +1751,9 @@ Foam::isoSurface::isoSurface
|
|||||||
|
|
||||||
tmpsurf.clearOut();
|
tmpsurf.clearOut();
|
||||||
|
|
||||||
MeshStorage updated(std::move(pts), std::move(faces), surfZoneList());
|
Mesh updated(std::move(pts), std::move(faces), surfZoneList());
|
||||||
|
|
||||||
this->MeshStorage::transfer(updated);
|
this->Mesh::transfer(updated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ class isoSurfaceBase
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected typedefs for convenience
|
// Protected typedefs for convenience
|
||||||
typedef meshedSurface MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
// Protected Data
|
// Protected Data
|
||||||
|
|
||||||
|
|||||||
@ -1335,13 +1335,9 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "isoSurfaceCell::"
|
Pout<< "isoSurfaceCell:" << nl
|
||||||
<< " cell min/max : "
|
<< " cell min/max : " << minMax(cVals_) << nl
|
||||||
<< min(cVals_) << " / "
|
<< " point min/max : " << minMax(pVals_) << nl
|
||||||
<< max(cVals_) << nl
|
|
||||||
<< " point min/max : "
|
|
||||||
<< min(pVals_) << " / "
|
|
||||||
<< max(pVals_) << nl
|
|
||||||
<< " isoValue : " << iso << nl
|
<< " isoValue : " << iso << nl
|
||||||
<< " filter : " << Switch(regularise) << nl
|
<< " filter : " << Switch(regularise) << nl
|
||||||
<< " mergeTol : " << mergeTol << nl
|
<< " mergeTol : " << mergeTol << nl
|
||||||
@ -1638,9 +1634,9 @@ Foam::isoSurfaceCell::isoSurfaceCell
|
|||||||
|
|
||||||
tmpsurf.clearOut();
|
tmpsurf.clearOut();
|
||||||
|
|
||||||
MeshStorage updated(std::move(pts), std::move(faces), surfZoneList());
|
Mesh updated(std::move(pts), std::move(faces), surfZoneList());
|
||||||
|
|
||||||
this->MeshStorage::transfer(updated);
|
this->Mesh::transfer(updated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "isoSurfaceTopo.H"
|
#include "isoSurfaceTopo.H"
|
||||||
#include "isoSurface.H"
|
#include "isoSurface.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
|
#include "volFields.H"
|
||||||
#include "tetMatcher.H"
|
#include "tetMatcher.H"
|
||||||
#include "tetPointRef.H"
|
#include "tetPointRef.H"
|
||||||
#include "DynamicField.H"
|
#include "DynamicField.H"
|
||||||
@ -217,7 +218,7 @@ Foam::label Foam::isoSurfaceTopo::calcCutTypes
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "isoSurfaceCell : candidate cut cells "
|
Pout<< "isoSurfaceTopo : candidate cut cells "
|
||||||
<< nCutCells << " / " << mesh_.nCells() << endl;
|
<< nCutCells << " / " << mesh_.nCells() << endl;
|
||||||
}
|
}
|
||||||
return nCutCells;
|
return nCutCells;
|
||||||
@ -513,7 +514,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x0E)
|
if (triIndex == 0x0E)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -556,7 +557,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x0D)
|
if (triIndex == 0x0D)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -565,7 +566,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
case 0x0C:
|
case 0x0C:
|
||||||
{
|
{
|
||||||
label p0p2
|
const label p0p2
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -575,7 +576,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
label p1p3
|
const label p1p3
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -614,7 +615,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x0C)
|
if (triIndex == 0x0C)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-5], verts[sz-4]);
|
Swap(verts[sz-5], verts[sz-4]);
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
@ -658,7 +659,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x0B)
|
if (triIndex == 0x0B)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -667,7 +668,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
case 0x05:
|
case 0x05:
|
||||||
case 0x0A:
|
case 0x0A:
|
||||||
{
|
{
|
||||||
label p0p1
|
const label p0p1
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -677,7 +678,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
label p2p3
|
const label p2p3
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -716,7 +717,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x0A)
|
if (triIndex == 0x0A)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-5], verts[sz-4]);
|
Swap(verts[sz-5], verts[sz-4]);
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
@ -726,7 +727,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
case 0x06:
|
case 0x06:
|
||||||
case 0x09:
|
case 0x09:
|
||||||
{
|
{
|
||||||
label p0p1
|
const label p0p1
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -736,7 +737,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
pointToVerts, pointToFace, pointFromDiag, vertsToPoint
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
label p2p3
|
const label p2p3
|
||||||
(
|
(
|
||||||
generatePoint
|
generatePoint
|
||||||
(
|
(
|
||||||
@ -775,7 +776,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
if (triIndex == 0x09)
|
if (triIndex == 0x09)
|
||||||
{
|
{
|
||||||
// Flip normals
|
// Flip normals
|
||||||
label sz = verts.size();
|
const label sz = verts.size();
|
||||||
Swap(verts[sz-5], verts[sz-4]);
|
Swap(verts[sz-5], verts[sz-4]);
|
||||||
Swap(verts[sz-2], verts[sz-1]);
|
Swap(verts[sz-2], verts[sz-1]);
|
||||||
}
|
}
|
||||||
@ -956,7 +957,7 @@ void Foam::isoSurfaceTopo::generateTriPoints
|
|||||||
label fp = f.fcIndex(fp0);
|
label fp = f.fcIndex(fp0);
|
||||||
for (label i = 2; i < f.size(); ++i)
|
for (label i = 2; i < f.size(); ++i)
|
||||||
{
|
{
|
||||||
label nextFp = f.fcIndex(fp);
|
const label nextFp = f.fcIndex(fp);
|
||||||
|
|
||||||
FixedList<bool, 6> edgeIsDiag(false);
|
FixedList<bool, 6> edgeIsDiag(false);
|
||||||
|
|
||||||
@ -1104,10 +1105,10 @@ void Foam::isoSurfaceTopo::triangulateOutside
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::MeshedSurface<Foam::face> Foam::isoSurfaceTopo::removeInsidePoints
|
Foam::meshedSurface Foam::isoSurfaceTopo::removeInsidePoints
|
||||||
(
|
(
|
||||||
const bool filterDiag,
|
const bool filterDiag,
|
||||||
const MeshStorage& s,
|
const Mesh& s,
|
||||||
const boolList& pointFromDiag,
|
const boolList& pointFromDiag,
|
||||||
const labelList& pointToFace,
|
const labelList& pointToFace,
|
||||||
const labelList& start, // Per cell the starting triangle
|
const labelList& start, // Per cell the starting triangle
|
||||||
@ -1173,7 +1174,7 @@ Foam::MeshedSurface<Foam::face> Foam::isoSurfaceTopo::removeInsidePoints
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MeshStorage cpSurface
|
Mesh cpSurface
|
||||||
(
|
(
|
||||||
std::move(compactPoints),
|
std::move(compactPoints),
|
||||||
std::move(compactFaces),
|
std::move(compactFaces),
|
||||||
@ -1205,15 +1206,11 @@ Foam::isoSurfaceTopo::isoSurfaceTopo
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "isoSurfaceTopo::"
|
Pout<< "isoSurfaceTopo:" << nl
|
||||||
<< " cell min/max : "
|
<< " cell min/max : " << minMax(cVals_) << nl
|
||||||
<< min(cVals_) << " / "
|
<< " point min/max : " << minMax(pVals_) << nl
|
||||||
<< max(cVals_) << nl
|
|
||||||
<< " point min/max : "
|
|
||||||
<< min(pVals_) << " / "
|
|
||||||
<< max(pVals_) << nl
|
|
||||||
<< " isoValue : " << iso << nl
|
<< " isoValue : " << iso << nl
|
||||||
<< " filter : " << isoSurfaceTopo::filterNames[filter]
|
<< " filter : " << isoSurfaceBase::filterNames[filter]
|
||||||
<< nl
|
<< nl
|
||||||
<< " mesh span : " << mesh.bounds().mag() << nl
|
<< " mesh span : " << mesh.bounds().mag() << nl
|
||||||
<< " ignoreCells : " << ignoreCells_.count()
|
<< " ignoreCells : " << ignoreCells_.count()
|
||||||
@ -1324,14 +1321,14 @@ Foam::isoSurfaceTopo::isoSurfaceTopo
|
|||||||
|
|
||||||
surfZoneList allZones(one{}, surfZone("allFaces", allTris.size()));
|
surfZoneList allZones(one{}, surfZone("allFaces", allTris.size()));
|
||||||
|
|
||||||
MeshStorage::clear();
|
Mesh::clear();
|
||||||
MeshStorage updated
|
Mesh updated
|
||||||
(
|
(
|
||||||
std::move(allPoints),
|
std::move(allPoints),
|
||||||
std::move(allTris),
|
std::move(allTris),
|
||||||
std::move(allZones)
|
std::move(allZones)
|
||||||
);
|
);
|
||||||
MeshStorage::transfer(updated);
|
Mesh::transfer(updated);
|
||||||
|
|
||||||
// Now:
|
// Now:
|
||||||
// - generated faces and points are assigned to *this
|
// - generated faces and points are assigned to *this
|
||||||
@ -1354,7 +1351,7 @@ Foam::isoSurfaceTopo::isoSurfaceTopo
|
|||||||
// face diagonals)
|
// face diagonals)
|
||||||
DynamicList<label> pointCompactMap(size()); // Back to original point
|
DynamicList<label> pointCompactMap(size()); // Back to original point
|
||||||
DynamicList<label> compactCellIDs(size()); // Per tri the cell
|
DynamicList<label> compactCellIDs(size()); // Per tri the cell
|
||||||
MeshStorage::operator=
|
Mesh::operator=
|
||||||
(
|
(
|
||||||
removeInsidePoints
|
removeInsidePoints
|
||||||
(
|
(
|
||||||
@ -1444,7 +1441,7 @@ Foam::isoSurfaceTopo::isoSurfaceTopo
|
|||||||
|
|
||||||
const labelList& mp = meshPoints();
|
const labelList& mp = meshPoints();
|
||||||
|
|
||||||
const labelListList& edgeFaces = MeshStorage::edgeFaces();
|
const labelListList& edgeFaces = Mesh::edgeFaces();
|
||||||
|
|
||||||
forAll(edgeFaces, edgei)
|
forAll(edgeFaces, edgei)
|
||||||
{
|
{
|
||||||
@ -1492,16 +1489,16 @@ Foam::isoSurfaceTopo::isoSurfaceTopo
|
|||||||
|
|
||||||
labelList pointMap;
|
labelList pointMap;
|
||||||
labelList faceMap;
|
labelList faceMap;
|
||||||
MeshStorage filteredSurf
|
Mesh filteredSurf
|
||||||
(
|
(
|
||||||
MeshStorage::subsetMesh
|
Mesh::subsetMesh
|
||||||
(
|
(
|
||||||
faceSelection,
|
faceSelection,
|
||||||
pointMap,
|
pointMap,
|
||||||
faceMap
|
faceMap
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
MeshStorage::transfer(filteredSurf);
|
Mesh::transfer(filteredSurf);
|
||||||
|
|
||||||
pointToVerts_ = UIndirectList<edge>(pointToVerts_, pointMap)();
|
pointToVerts_ = UIndirectList<edge>(pointToVerts_, pointMap)();
|
||||||
pointToFace_ = UIndirectList<label>(pointToFace_, pointMap)();
|
pointToFace_ = UIndirectList<label>(pointToFace_, pointMap)();
|
||||||
|
|||||||
@ -171,10 +171,10 @@ class isoSurfaceTopo
|
|||||||
DynamicList<label>& compactCellIDs
|
DynamicList<label>& compactCellIDs
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
MeshStorage removeInsidePoints
|
Mesh removeInsidePoints
|
||||||
(
|
(
|
||||||
const bool filterDiag,
|
const bool filterDiag,
|
||||||
const MeshStorage& s,
|
const Mesh& s,
|
||||||
const boolList& pointFromDiag,
|
const boolList& pointFromDiag,
|
||||||
const labelList& pointToFace,
|
const labelList& pointToFace,
|
||||||
const labelList& start, // Per cell:starting tri
|
const labelList& start, // Per cell:starting tri
|
||||||
|
|||||||
@ -27,10 +27,8 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "thresholdCellFaces.H"
|
#include "thresholdCellFaces.H"
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
|
|
||||||
#include "emptyPolyPatch.H"
|
#include "emptyPolyPatch.H"
|
||||||
#include "processorPolyPatch.H"
|
#include "processorPolyPatch.H"
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -40,12 +40,14 @@ SourceFiles
|
|||||||
#define thresholdCellFaces_H
|
#define thresholdCellFaces_H
|
||||||
|
|
||||||
#include "MeshedSurface.H"
|
#include "MeshedSurface.H"
|
||||||
|
#include "MeshedSurfacesFwd.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -54,10 +56,13 @@ class polyMesh;
|
|||||||
|
|
||||||
class thresholdCellFaces
|
class thresholdCellFaces
|
||||||
:
|
:
|
||||||
public MeshedSurface<face>
|
public meshedSurface
|
||||||
{
|
{
|
||||||
//- Private typedefs for convenience
|
// Private typedefs for convenience
|
||||||
typedef MeshedSurface<face> MeshStorage;
|
typedef meshedSurface Mesh;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -108,7 +113,6 @@ public:
|
|||||||
{
|
{
|
||||||
return meshCells_;
|
return meshCells_;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2006 |
|
| \\ / O peration | Version: v2012 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -81,14 +81,14 @@ functions
|
|||||||
turbulenceProperties:L
|
turbulenceProperties:L
|
||||||
);
|
);
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
patches (inlet);
|
patches (inlet);
|
||||||
interpolate false;
|
interpolate false;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user