STYLE: include primitivePatch.H (instead of PrimitivePatch.H)
- further de-clutter in the future ENH: PrimitivePatchInterpolation with unique_ptr for memory management
This commit is contained in:
parent
d51aa5a74d
commit
f0a196a908
@ -68,9 +68,7 @@ SourceFiles
|
|||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
#include "treeBoundBox.H"
|
#include "treeBoundBox.H"
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "face.H"
|
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataPrimitivePatch.H"
|
#include "treeDataPrimitivePatch.H"
|
||||||
#include "volumeType.H"
|
#include "volumeType.H"
|
||||||
|
@ -38,7 +38,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "cellSizeCalculationType.H"
|
#include "cellSizeCalculationType.H"
|
||||||
#include "triSurfaceFields.H"
|
#include "triSurfaceFields.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "cellSizeCalculationType.H"
|
#include "cellSizeCalculationType.H"
|
||||||
#include "triSurfaceFields.H"
|
#include "triSurfaceFields.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ SourceFiles
|
|||||||
#define nonUniformField_H
|
#define nonUniformField_H
|
||||||
|
|
||||||
#include "triSurfaceFields.H"
|
#include "triSurfaceFields.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
#include "surfaceCellSizeFunction.H"
|
#include "surfaceCellSizeFunction.H"
|
||||||
#include "cellSizeCalculationType.H"
|
#include "cellSizeCalculationType.H"
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,19 +27,12 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "PrimitivePatchInterpolation.H"
|
||||||
#include "faceList.H"
|
|
||||||
#include "demandDrivenData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
const scalarListList&
|
const Foam::scalarListList&
|
||||||
PrimitivePatchInterpolation<Patch>::faceToPointWeights() const
|
Foam::PrimitivePatchInterpolation<Patch>::faceToPointWeights() const
|
||||||
{
|
{
|
||||||
if (!faceToPointWeightsPtr_)
|
if (!faceToPointWeightsPtr_)
|
||||||
{
|
{
|
||||||
@ -51,7 +44,7 @@ PrimitivePatchInterpolation<Patch>::faceToPointWeights() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
void PrimitivePatchInterpolation<Patch>::makeFaceToPointWeights() const
|
void Foam::PrimitivePatchInterpolation<Patch>::makeFaceToPointWeights() const
|
||||||
{
|
{
|
||||||
if (faceToPointWeightsPtr_)
|
if (faceToPointWeightsPtr_)
|
||||||
{
|
{
|
||||||
@ -60,10 +53,10 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToPointWeights() const
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointField& points = patch_.localPoints();
|
const auto& points = patch_.localPoints();
|
||||||
const List<typename Patch::face_type>& faces = patch_.localFaces();
|
const auto& faces = patch_.localFaces();
|
||||||
|
|
||||||
faceToPointWeightsPtr_ = new scalarListList(points.size());
|
faceToPointWeightsPtr_.reset(new scalarListList(points.size()));
|
||||||
auto& weights = *faceToPointWeightsPtr_;
|
auto& weights = *faceToPointWeightsPtr_;
|
||||||
|
|
||||||
// get reference to addressing
|
// get reference to addressing
|
||||||
@ -94,8 +87,8 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToPointWeights() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
const scalarList&
|
const Foam::scalarList&
|
||||||
PrimitivePatchInterpolation<Patch>::faceToEdgeWeights() const
|
Foam::PrimitivePatchInterpolation<Patch>::faceToEdgeWeights() const
|
||||||
{
|
{
|
||||||
if (!faceToEdgeWeightsPtr_)
|
if (!faceToEdgeWeightsPtr_)
|
||||||
{
|
{
|
||||||
@ -107,7 +100,7 @@ PrimitivePatchInterpolation<Patch>::faceToEdgeWeights() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
|
void Foam::PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
|
||||||
{
|
{
|
||||||
if (faceToEdgeWeightsPtr_)
|
if (faceToEdgeWeightsPtr_)
|
||||||
{
|
{
|
||||||
@ -116,12 +109,12 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointField& points = patch_.localPoints();
|
const auto& points = patch_.localPoints();
|
||||||
const List<typename Patch::face_type>& faces = patch_.localFaces();
|
const auto& faces = patch_.localFaces();
|
||||||
const edgeList& edges = patch_.edges();
|
const edgeList& edges = patch_.edges();
|
||||||
const labelListList& edgeFaces = patch_.edgeFaces();
|
const labelListList& edgeFaces = patch_.edgeFaces();
|
||||||
|
|
||||||
faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges());
|
faceToEdgeWeightsPtr_.reset(new scalarList(patch_.nInternalEdges()));
|
||||||
auto& weights = *faceToEdgeWeightsPtr_;
|
auto& weights = *faceToEdgeWeightsPtr_;
|
||||||
|
|
||||||
forAll(weights, edgei)
|
forAll(weights, edgei)
|
||||||
@ -142,17 +135,20 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
|
|||||||
|
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
void PrimitivePatchInterpolation<Patch>::clearWeights()
|
void Foam::PrimitivePatchInterpolation<Patch>::clearWeights()
|
||||||
{
|
{
|
||||||
deleteDemandDrivenData(faceToPointWeightsPtr_);
|
faceToPointWeightsPtr_.reset(nullptr);
|
||||||
deleteDemandDrivenData(faceToEdgeWeightsPtr_);
|
faceToEdgeWeightsPtr_.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
PrimitivePatchInterpolation<Patch>::PrimitivePatchInterpolation(const Patch& p)
|
Foam::PrimitivePatchInterpolation<Patch>::PrimitivePatchInterpolation
|
||||||
|
(
|
||||||
|
const Patch& p
|
||||||
|
)
|
||||||
:
|
:
|
||||||
patch_(p),
|
patch_(p),
|
||||||
faceToPointWeightsPtr_(nullptr),
|
faceToPointWeightsPtr_(nullptr),
|
||||||
@ -160,20 +156,12 @@ PrimitivePatchInterpolation<Patch>::PrimitivePatchInterpolation(const Patch& p)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Patch>
|
|
||||||
PrimitivePatchInterpolation<Patch>::~PrimitivePatchInterpolation()
|
|
||||||
{
|
|
||||||
clearWeights();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
||||||
(
|
(
|
||||||
const Field<Type>& ff
|
const Field<Type>& ff
|
||||||
) const
|
) const
|
||||||
@ -187,15 +175,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<Field<Type>> tresult
|
auto tresult = tmp<Field<Type>>::New(patch_.nPoints(), Zero);
|
||||||
(
|
auto& result = tresult.ref();
|
||||||
new Field<Type>
|
|
||||||
(
|
|
||||||
patch_.nPoints(), Zero
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Field<Type>& result = tresult.ref();
|
|
||||||
|
|
||||||
const labelListList& pointFaces = patch_.pointFaces();
|
const labelListList& pointFaces = patch_.pointFaces();
|
||||||
const scalarListList& weights = faceToPointWeights();
|
const scalarListList& weights = faceToPointWeights();
|
||||||
@ -217,7 +198,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
|||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
||||||
(
|
(
|
||||||
const tmp<Field<Type>>& tff
|
const tmp<Field<Type>>& tff
|
||||||
) const
|
) const
|
||||||
@ -230,7 +212,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
|
|||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
||||||
(
|
(
|
||||||
const Field<Type>& pf
|
const Field<Type>& pf
|
||||||
) const
|
) const
|
||||||
@ -243,18 +226,10 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<Field<Type>> tresult
|
auto tresult = tmp<Field<Type>>::New(patch_.size(), Zero);
|
||||||
(
|
auto& result = tresult.ref();
|
||||||
new Field<Type>
|
|
||||||
(
|
|
||||||
patch_.size(),
|
|
||||||
Zero
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Field<Type>& result = tresult.ref();
|
const auto& localFaces = patch_.localFaces();
|
||||||
|
|
||||||
const List<typename Patch::face_type>& localFaces = patch_.localFaces();
|
|
||||||
|
|
||||||
forAll(result, facei)
|
forAll(result, facei)
|
||||||
{
|
{
|
||||||
@ -274,7 +249,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
|||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
||||||
(
|
(
|
||||||
const tmp<Field<Type>>& tpf
|
const tmp<Field<Type>>& tpf
|
||||||
) const
|
) const
|
||||||
@ -287,7 +263,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
|
|||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
||||||
(
|
(
|
||||||
const Field<Type>& pf
|
const Field<Type>& pf
|
||||||
) const
|
) const
|
||||||
@ -327,7 +304,8 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
|||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
Foam::tmp<Foam::Field<Type>>
|
||||||
|
Foam::PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
||||||
(
|
(
|
||||||
const tmp<Field<Type>>& tpf
|
const tmp<Field<Type>>& tpf
|
||||||
) const
|
) const
|
||||||
@ -339,7 +317,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
|
|||||||
|
|
||||||
|
|
||||||
template<class Patch>
|
template<class Patch>
|
||||||
bool PrimitivePatchInterpolation<Patch>::movePoints()
|
bool Foam::PrimitivePatchInterpolation<Patch>::movePoints()
|
||||||
{
|
{
|
||||||
clearWeights();
|
clearWeights();
|
||||||
|
|
||||||
@ -347,8 +325,4 @@ bool PrimitivePatchInterpolation<Patch>::movePoints()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
#define PrimitivePatchInterpolation_H
|
#define PrimitivePatchInterpolation_H
|
||||||
|
|
||||||
#include "scalarList.H"
|
#include "scalarList.H"
|
||||||
|
#include "faceList.H"
|
||||||
#include "Field.H"
|
#include "Field.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -46,6 +47,9 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
template<class Patch> class PrimitivePatchInterpolation;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class PrimitivePatchInterpolation Declaration
|
Class PrimitivePatchInterpolation Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -62,10 +66,10 @@ class PrimitivePatchInterpolation
|
|||||||
// Demand-driven data
|
// Demand-driven data
|
||||||
|
|
||||||
//- Face-to-point weights
|
//- Face-to-point weights
|
||||||
mutable scalarListList* faceToPointWeightsPtr_;
|
mutable std::unique_ptr<scalarListList> faceToPointWeightsPtr_;
|
||||||
|
|
||||||
//- Face-to-edge weights
|
//- Face-to-edge weights
|
||||||
mutable scalarList* faceToEdgeWeightsPtr_;
|
mutable std::unique_ptr<scalarList> faceToEdgeWeightsPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -105,7 +109,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~PrimitivePatchInterpolation();
|
~PrimitivePatchInterpolation() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
@ -35,8 +35,8 @@ Description
|
|||||||
#ifndef primitivePatchInterpolation_H
|
#ifndef primitivePatchInterpolation_H
|
||||||
#define primitivePatchInterpolation_H
|
#define primitivePatchInterpolation_H
|
||||||
|
|
||||||
#include "PrimitivePatchInterpolation.H"
|
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
|
#include "PrimitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ SourceFiles
|
|||||||
#ifndef Foam_PatchTools_H
|
#ifndef Foam_PatchTools_H
|
||||||
#define Foam_PatchTools_H
|
#define Foam_PatchTools_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
|
||||||
#include "globalIndex.H"
|
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
#include "globalIndex.H"
|
||||||
|
#include "primitivePatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -57,9 +57,11 @@ SourceFiles
|
|||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "edgeList.H"
|
#include "edgeList.H"
|
||||||
#include "point.H"
|
#include "face.H"
|
||||||
|
#include "pointField.H"
|
||||||
#include "intersection.H"
|
#include "intersection.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
|
#include "SubList.H"
|
||||||
#include "objectHit.H"
|
#include "objectHit.H"
|
||||||
#include "PrimitivePatchBase.H"
|
#include "PrimitivePatchBase.H"
|
||||||
|
|
||||||
@ -69,8 +71,9 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class face;
|
|
||||||
template<class T> class Map;
|
template<class T> class Map;
|
||||||
|
template<class FaceList, class PointField> class PrimitivePatch;
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class PrimitivePatch Declaration
|
Class PrimitivePatch Declaration
|
||||||
|
@ -43,10 +43,8 @@ Description
|
|||||||
#ifndef Foam_indirectPrimitivePatch_H
|
#ifndef Foam_indirectPrimitivePatch_H
|
||||||
#define Foam_indirectPrimitivePatch_H
|
#define Foam_indirectPrimitivePatch_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "face.H"
|
|
||||||
#include "IndirectList.H"
|
#include "IndirectList.H"
|
||||||
#include "pointField.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -48,10 +48,6 @@ Description
|
|||||||
#define Foam_primitivePatch_H
|
#define Foam_primitivePatch_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
#include "PrimitivePatch.H"
|
||||||
#include "face.H"
|
|
||||||
#include "SubList.H"
|
|
||||||
#include "List.H"
|
|
||||||
#include "pointField.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ SourceFiles
|
|||||||
#include "foamVtkPatchMeshWriter.H"
|
#include "foamVtkPatchMeshWriter.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -33,13 +33,10 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef bMesh_H
|
#ifndef Foam_bMesh_H
|
||||||
#define bMesh_H
|
#define Foam_bMesh_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "face.H"
|
|
||||||
#include "List.H"
|
|
||||||
#include "pointField.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ SourceFiles
|
|||||||
#include "boundaryPatch.H"
|
#include "boundaryPatch.H"
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
#include "polyPatch.H"
|
#include "polyPatch.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -137,7 +137,6 @@ SourceFiles
|
|||||||
#define Foam_faceCoupleInfo_H
|
#define Foam_faceCoupleInfo_H
|
||||||
|
|
||||||
#include "edgeHashes.H"
|
#include "edgeHashes.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "indirectPrimitivePatch.H"
|
#include "indirectPrimitivePatch.H"
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
|
|
||||||
@ -147,7 +146,6 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
class face;
|
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
class polyPatch;
|
class polyPatch;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
@ -39,7 +39,6 @@ SourceFiles
|
|||||||
#define hexRef8_H
|
#define hexRef8_H
|
||||||
|
|
||||||
#include "labelIOList.H"
|
#include "labelIOList.H"
|
||||||
#include "face.H"
|
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
|
@ -55,7 +55,6 @@ SourceFiles
|
|||||||
#define Foam_enrichedPatch_H
|
#define Foam_enrichedPatch_H
|
||||||
|
|
||||||
#include "Map.H"
|
#include "Map.H"
|
||||||
#include "point.H"
|
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
if (!excludeIndices_.found(index))
|
if (!excludeIndices_.found(index))
|
||||||
{
|
{
|
||||||
const typename PatchType::FaceType& f = patch[index];
|
const auto& f = patch[index];
|
||||||
|
|
||||||
pointHit nearHit = f.nearestPoint(sample, points);
|
pointHit nearHit = f.nearestPoint(sample, points);
|
||||||
scalar distSqr = sqr(nearHit.distance());
|
scalar distSqr = sqr(nearHit.distance());
|
||||||
|
@ -40,7 +40,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "coupledPointPatchField.H"
|
#include "coupledPointPatchField.H"
|
||||||
#include "cyclicACMIPointPatch.H"
|
#include "cyclicACMIPointPatch.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "coupledPointPatchField.H"
|
#include "coupledPointPatchField.H"
|
||||||
#include "cyclicAMIPointPatch.H"
|
#include "cyclicAMIPointPatch.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "bitSet.H"
|
#include "bitSet.H"
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "vectorTensorTransform.H"
|
#include "vectorTensorTransform.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -56,14 +56,14 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef extendedEdgeMesh_H
|
#ifndef Foam_extendedEdgeMesh_H
|
||||||
#define extendedEdgeMesh_H
|
#define Foam_extendedEdgeMesh_H
|
||||||
|
|
||||||
#include "edgeMesh.H"
|
#include "edgeMesh.H"
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataEdge.H"
|
#include "treeDataEdge.H"
|
||||||
#include "treeDataPoint.H"
|
#include "treeDataPoint.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -199,9 +199,9 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
|
|||||||
<< " nearest face:" << facei;
|
<< " nearest face:" << facei;
|
||||||
}
|
}
|
||||||
|
|
||||||
const typename PatchType::face_type& localF = patch_.localFaces()[facei];
|
const auto& localF = patch_.localFaces()[facei];
|
||||||
const typename PatchType::face_type& f = patch_[facei];
|
const auto& f = patch_[facei];
|
||||||
const pointField& points = patch_.points();
|
const auto& points = patch_.points();
|
||||||
|
|
||||||
// Retest to classify where on face info is. Note: could be improved. We
|
// Retest to classify where on face info is. Note: could be improved. We
|
||||||
// already have point.
|
// already have point.
|
||||||
@ -412,8 +412,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::overlaps
|
|||||||
|
|
||||||
// 2. Check if one or more face points inside
|
// 2. Check if one or more face points inside
|
||||||
|
|
||||||
const pointField& points = patch_.points();
|
const auto& points = patch_.points();
|
||||||
const typename PatchType::face_type& f = patch_[index];
|
const auto& f = patch_[index];
|
||||||
|
|
||||||
if (f.size() == 3)
|
if (f.size() == 3)
|
||||||
{
|
{
|
||||||
@ -469,8 +469,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::overlaps
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointField& points = patch_.points();
|
const auto& points = patch_.points();
|
||||||
const face& f = patch_[index];
|
const auto& f = patch_[index];
|
||||||
|
|
||||||
pointHit nearHit = f.nearestPoint(centre, points);
|
pointHit nearHit = f.nearestPoint(centre, points);
|
||||||
|
|
||||||
@ -498,11 +498,11 @@ void Foam::treeDataPrimitivePatch<PatchType>::findNearest
|
|||||||
point& nearestPoint
|
point& nearestPoint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const pointField& points = patch_.points();
|
const auto& points = patch_.points();
|
||||||
|
|
||||||
for (const label index : indices)
|
for (const label index : indices)
|
||||||
{
|
{
|
||||||
const typename PatchType::face_type& f = patch_[index];
|
const auto& f = patch_[index];
|
||||||
|
|
||||||
const pointHit nearHit = f.nearestPoint(sample, points);
|
const pointHit nearHit = f.nearestPoint(sample, points);
|
||||||
const scalar distSqr = sqr(nearHit.distance());
|
const scalar distSqr = sqr(nearHit.distance());
|
||||||
@ -606,7 +606,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
|
|||||||
const treeDataPrimitivePatch<PatchType>& shape = tree_.shapes();
|
const treeDataPrimitivePatch<PatchType>& shape = tree_.shapes();
|
||||||
const PatchType& patch = shape.patch();
|
const PatchType& patch = shape.patch();
|
||||||
|
|
||||||
const typename PatchType::face_type& f = patch.localFaces()[index];
|
const auto& f = patch.localFaces()[index];
|
||||||
const edge& e = patch.edges()[edgeID_];
|
const edge& e = patch.edges()[edgeID_];
|
||||||
|
|
||||||
if (!f.found(e[0]) && !f.found(e[1]))
|
if (!f.found(e[0]) && !f.found(e[1]))
|
||||||
@ -631,8 +631,8 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection
|
|||||||
const treeDataPrimitivePatch<PatchType>& shape = tree.shapes();
|
const treeDataPrimitivePatch<PatchType>& shape = tree.shapes();
|
||||||
const PatchType& patch = shape.patch();
|
const PatchType& patch = shape.patch();
|
||||||
|
|
||||||
const pointField& points = patch.points();
|
const auto& points = patch.points();
|
||||||
const typename PatchType::face_type& f = patch[index];
|
const auto& f = patch[index];
|
||||||
|
|
||||||
// Do quick rejection test
|
// Do quick rejection test
|
||||||
if (shape.cacheBb_)
|
if (shape.cacheBb_)
|
||||||
|
@ -34,14 +34,13 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef meshTools_H
|
#ifndef Foam_meshTools_H
|
||||||
#define meshTools_H
|
#define Foam_meshTools_H
|
||||||
|
|
||||||
#include "label.H"
|
#include "label.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "triad.H"
|
#include "triad.H"
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "faceList.H"
|
#include "faceList.H"
|
||||||
#include "cellList.H"
|
#include "cellList.H"
|
||||||
#include "primitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
@ -51,6 +50,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
class treeBoundBox;
|
class treeBoundBox;
|
||||||
|
@ -25,7 +25,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::incompressible::sensitivityBezier
|
Foam::incompressible::sensitivityBezier
|
||||||
|
|
||||||
@ -37,8 +36,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef sensitivityBezierIncompressible_H
|
#ifndef Foam_sensitivityBezierIncompressible_H
|
||||||
#define sensitivityBezierIncompressible_H
|
#define Foam_sensitivityBezierIncompressible_H
|
||||||
|
|
||||||
#include "primitiveFieldsFwd.H"
|
#include "primitiveFieldsFwd.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
@ -46,8 +45,7 @@ SourceFiles
|
|||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
#include "SIBaseIncompressible.H"
|
#include "SIBaseIncompressible.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
#include "PrimitivePatch.H"
|
|
||||||
#include "deltaBoundary.H"
|
#include "deltaBoundary.H"
|
||||||
#include "Bezier.H"
|
#include "Bezier.H"
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ SourceFiles
|
|||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
#include "FIBaseIncompressible.H"
|
#include "FIBaseIncompressible.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
#include "deltaBoundary.H"
|
#include "deltaBoundary.H"
|
||||||
#include "Bezier.H"
|
#include "Bezier.H"
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ License
|
|||||||
|
|
||||||
#include "sensitivitySurfaceIncompressible.H"
|
#include "sensitivitySurfaceIncompressible.H"
|
||||||
#include "incompressibleAdjointSolver.H"
|
#include "incompressibleAdjointSolver.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "faMatrices.H"
|
#include "faMatrices.H"
|
||||||
|
@ -36,16 +36,15 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef Bezier_H
|
#ifndef Foam_Bezier_H
|
||||||
#define Bezier_H
|
#define Foam_Bezier_H
|
||||||
|
|
||||||
#include "primitiveFieldsFwd.H"
|
#include "primitiveFieldsFwd.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "pointFieldsFwd.H"
|
#include "pointFieldsFwd.H"
|
||||||
#include "surfaceFieldsFwd.H"
|
#include "surfaceFieldsFwd.H"
|
||||||
#include "volPointInterpolation.H"
|
#include "volPointInterpolation.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
#include "PrimitivePatch.H"
|
|
||||||
#include "deltaBoundary.H"
|
#include "deltaBoundary.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
#include "sampledPatchInternalField.H"
|
#include "sampledPatchInternalField.H"
|
||||||
#include "interpolationCellPoint.H"
|
#include "interpolationCellPoint.H"
|
||||||
#include "PrimitivePatchInterpolation.H"
|
#include "primitivePatchInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -52,12 +52,11 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef MeshedSurface_H
|
#ifndef Foam_MeshedSurface_H
|
||||||
#define MeshedSurface_H
|
#define Foam_MeshedSurface_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "PatchTools.H"
|
#include "PatchTools.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "face.H"
|
#include "face.H"
|
||||||
#include "labelledTri.H"
|
#include "labelledTri.H"
|
||||||
#include "bitSet.H"
|
#include "bitSet.H"
|
||||||
|
@ -42,7 +42,7 @@ SourceFiles
|
|||||||
#define Foam_polySurface_H
|
#define Foam_polySurface_H
|
||||||
|
|
||||||
#include "objectRegistry.H"
|
#include "objectRegistry.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "meshedSurf.H"
|
#include "meshedSurf.H"
|
||||||
#include "polySurfaceFieldsFwd.H"
|
#include "polySurfaceFieldsFwd.H"
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "surfaceRegistry.H"
|
#include "surfaceRegistry.H"
|
||||||
#include "MeshedSurfaceIOAllocator.H"
|
#include "MeshedSurfaceIOAllocator.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "surfZoneIOList.H"
|
#include "surfZoneIOList.H"
|
||||||
#include "surfFieldsFwd.H"
|
#include "surfFieldsFwd.H"
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
#include "AC3DsurfaceFormat.H"
|
#include "AC3DsurfaceFormat.H"
|
||||||
#include "StringStream.H"
|
#include "StringStream.H"
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "faceTraits.H"
|
#include "faceTraits.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
@ -38,12 +38,11 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef triSurface_H
|
#ifndef Foam_triSurface_H
|
||||||
#define triSurface_H
|
#define Foam_triSurface_H
|
||||||
|
|
||||||
#include "PrimitivePatch.H"
|
#include "primitivePatch.H"
|
||||||
#include "PatchTools.H"
|
#include "PatchTools.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "labelledTri.H"
|
#include "labelledTri.H"
|
||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "bitSet.H"
|
#include "bitSet.H"
|
||||||
|
Loading…
Reference in New Issue
Block a user