...
 
Commits (2)
......@@ -62,7 +62,7 @@ namespace Module
class edgeMeshGeometryModification
{
// Private data
// Private Data
//- reference to edgeMesh
const edgeMesh& edgeMesh_;
......@@ -77,16 +77,17 @@ class edgeMeshGeometryModification
bool modificationActive_;
// Private member functions
// Private Member Functions
//- check existence of geometry modifiers
void checkModification();
//- disallow bitwise copy construct
edgeMeshGeometryModification(const edgeMeshGeometryModification&);
//- No copy construct
edgeMeshGeometryModification
(const edgeMeshGeometryModification&) = delete;
//- disallow bitwise assignment
void operator=(const edgeMeshGeometryModification&);
//- No copy assignment
void operator=(const edgeMeshGeometryModification&) = delete;
public:
......
......@@ -78,19 +78,17 @@ class surfaceMeshGeometryModification
bool modificationActive_;
// Private member functions
// Private Member Functions
//- check existence of geometry modifiers
void checkModification();
//- disallow bitwise copy construct
//- No copy construct
surfaceMeshGeometryModification
(
const surfaceMeshGeometryModification&
);
(const surfaceMeshGeometryModification&) = delete;
//- disallow bitwise assignment
void operator=(const surfaceMeshGeometryModification&);
//- No copy assignment
void operator=(const surfaceMeshGeometryModification&) = delete;
public:
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -56,12 +57,12 @@ namespace Module
class labelledPair
{
// Private data
// Private Data
//- label
//- Label
label pLabel_;
//- pair data
//- Pair data
labelPair pair_;
......@@ -69,7 +70,7 @@ public:
// Constructors
//- Null construct
//- Default construct
labelledPair()
:
pLabel_(-1),
......@@ -88,32 +89,22 @@ public:
{}
//- Destructor
~labelledPair() = default;
// Member Functions
// Member functions
//- return pair label
//- The label for the pair
inline label pairLabel() const
{
return pLabel_;
}
//- return the pair
//- The pair
inline const labelPair& pair() const
{
return pair_;
}
// Member operators
inline void operator=(const labelledPair& lpp)
{
pLabel_ = lpp.pLabel_;
pair_ = lpp.pair_;
}
// Member Operators
inline bool operator==
(
......@@ -147,12 +138,9 @@ public:
return false;
}
inline bool operator!=
(
const labelledPair& lcc
) const
inline bool operator!=(const labelledPair& rhs) const
{
return !this->operator==(lcc);
return !(*this == rhs);
}
inline bool operator<(const labelledPair& lpp) const
......@@ -188,7 +176,7 @@ public:
}
// Friend operators
// Friend Operators
friend Ostream& operator<<
(
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -57,12 +58,12 @@ namespace Module
class labelledPoint
{
// Private data
// Private Data
//- point label
//- Point label
label pLabel_;
//- point coordinates
//- Point coordinates
point coords_;
......@@ -70,7 +71,7 @@ public:
// Constructors
//- Null construct
//- Default construct, as invalid
labelledPoint()
:
pLabel_(-1),
......@@ -86,11 +87,7 @@ public:
{}
//- Destructor
~labelledPoint() = default;
// Member functions
// Member Functions
//- return point label
inline label pointLabel() const
......@@ -115,26 +112,20 @@ public:
}
// Member operators
inline void operator=(const labelledPoint& lp)
{
pLabel_ = lp.pLabel_;
coords_ = lp.coords_;
}
// Member Operators
inline bool operator==(const labelledPoint& lp) const
inline bool operator==(const labelledPoint& rhs) const
{
return (pLabel_ == lp.pLabel_);
return (pLabel_ == rhs.pLabel_);
}
inline bool operator!=(const labelledPoint& lp) const
inline bool operator!=(const labelledPoint& rhs) const
{
return !this->operator==(lp);
return !(*this == rhs);
}
// Friend operators
// IOstream Operators
friend Ostream& operator<<(Ostream& os, const labelledPoint& lp)
{
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -57,15 +58,15 @@ namespace Module
class labelledPointScalar
{
// Private data
// Private Data
//- point label
//- Point label
label pLabel_;
//- point coordinates
//- Point coordinates
point coords_;
//- scalar data
//- Scalar data
scalar weight_;
......@@ -73,7 +74,7 @@ public:
// Constructors
//- Null construct
//- Default construct, as invalid
labelledPointScalar()
:
pLabel_(-1),
......@@ -90,13 +91,9 @@ public:
{}
//- Destructor
~labelledPointScalar() = default;
// Member Functions
// Member functions
//- return point label
//- Return point label
inline label pointLabel() const
{
return pLabel_;
......@@ -107,7 +104,7 @@ public:
return pLabel_;
}
//- return point coordinates
//- Return point coordinates
inline const point& coordinates() const
{
return coords_;
......@@ -118,7 +115,7 @@ public:
return coords_;
}
//- return scalar value
//- Return scalar value
inline scalar scalarValue() const
{
return weight_;
......@@ -130,32 +127,20 @@ public:
}
// Member operators
inline void operator=(const labelledPointScalar& lps)
{
pLabel_ = lps.pLabel_;
coords_ = lps.coords_;
weight_ = lps.weight_;
}
// Member Operators
inline bool operator==(const labelledPointScalar& lps) const
inline bool operator==(const labelledPointScalar& rhs) const
{
if (pLabel_ == lps.pLabel_)
{
return true;
}
return false;
return (pLabel_ == rhs.pLabel_);
}
inline bool operator!=(const labelledPointScalar& lps) const
inline bool operator!=(const labelledPointScalar& rhs) const
{
return !this->operator==(lps);
return !(*this == rhs);
}
// Friend operators
// IOstream Operators
friend Ostream& operator<<(Ostream& os, const labelledPointScalar& lps)
{
......
......@@ -105,7 +105,7 @@ class partTriMesh
mutable labelLongList* pAtBufferLayersPtr_;
// Private member functions
// Private Member Functions
//- create surface triangulation
void createPointsAndTrias(const List<direction>&);
......@@ -123,11 +123,12 @@ class partTriMesh
//- update buffer layer points
void updateBufferLayers();
//- disallow bitwise assignment
void operator=(const partTriMesh&);
//- disallow bitwise copy construct
partTriMesh(const partTriMesh&);
//- No copy construct
partTriMesh(const partTriMesh&) = delete;
//- No copy assignment
void operator=(const partTriMesh&) = delete;
public:
......
......@@ -129,15 +129,6 @@ Foam::Istream& Foam::Module::boundaryPatch::operator>>
}
void Foam::Module::boundaryPatch::operator=(const boundaryPatch& wp)
{
name_ = wp.name_;
type_ = wp.type_;
nFaces_ = wp.nFaces_;
startFace_ = wp.startFace_;
}
bool Foam::Module::boundaryPatch::operator!=(const boundaryPatch& wp) const
{
if (name_ != wp.name_)
......
......@@ -119,14 +119,12 @@ public:
void writeDict(Ostream&) const;
// Member operators
// Member Operators
Ostream& operator<<(Ostream&) const;
Istream& operator>>(Istream&);
void operator=(const boundaryPatch&);
bool operator!=(const boundaryPatch&) const;
};
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -61,7 +62,7 @@ class boundaryPatchBase
{
protected:
// Protected data
// Protected Data
word name_;
......@@ -92,8 +93,7 @@ public:
//- Destructor
virtual ~boundaryPatchBase()
{}
virtual ~boundaryPatchBase() = default;
//- Declare run-time constructor selection table
......@@ -122,6 +122,7 @@ public:
Istream&
);
//- Construct and return a clone
autoPtr<boundaryPatchBase> clone() const
{
......@@ -139,7 +140,7 @@ public:
virtual void writeDict(Ostream&) const = 0;
// Member functions
// Member Functions
inline const word& patchName() const
{
......@@ -185,12 +186,10 @@ public:
virtual dictionary dict() const = 0;
// Member operators
// Member Operators
friend Ostream& operator<<(Ostream&, const boundaryPatchBase&);
virtual Istream& operator>>(Istream&) = 0;
//virtual void operator=(const boundaryPatchBase&) = 0;
//virtual bool operator!=(const boundaryPatchBase&) const = 0;
};
......
......@@ -144,20 +144,6 @@ Foam::Istream& Foam::Module::processorBoundaryPatch::operator>>(Istream& is)
}
void Foam::Module::processorBoundaryPatch::operator=
(
const processorBoundaryPatch& wp
)
{
name_ = wp.name_;
type_ = wp.type_;
nFaces_ = wp.nFaces_;
startFace_ = wp.startFace_;
myProcNo_ = wp.myProcNo_;
neighbProcNo_ = wp.neighbProcNo_;
}
bool Foam::Module::processorBoundaryPatch::operator!=
(
const processorBoundaryPatch& wp
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -56,7 +57,7 @@ class processorBoundaryPatch
:
public boundaryPatchBase
{
// private data
// Private Data
label myProcNo_;
......@@ -138,12 +139,7 @@ public:
//- check if the processor is the owner of the interface
inline bool owner() const
{
if (myProcNo_ < neighbProcNo_)
{
return true;
}
return false;
return (myProcNo_ < neighbProcNo_);
}
//- Return as dictionary of entries
......@@ -159,14 +155,12 @@ public:
void writeDict(Ostream&) const;
// Member operators
// Member Operators
Ostream& operator<<(Ostream&) const;
Istream& operator>>(Istream&);
void operator=(const processorBoundaryPatch&);
bool operator!=(const processorBoundaryPatch&) const;
};
......
......@@ -61,7 +61,7 @@ class polyMeshGenFaces
{
protected:
// Protected data
// Protected Data
//- list of faces
faceListPMG faces_;
......@@ -86,7 +86,7 @@ protected:
mutable labelIOList* neighbourPtr_;
// Private member functions
// Private Member Functions
//- calculate owner and neighbour addressing
virtual void calculateOwnersAndNeighbours() const = 0;
......@@ -95,11 +95,11 @@ protected:
void clearOut() const;
// Disallow bitwise assignment
//- No copy construct
polyMeshGenFaces(const polyMeshGenFaces&) = delete;
void operator=(const polyMeshGenFaces&);
polyMeshGenFaces(const polyMeshGenFaces&);
//- No copy assignment
void operator=(const polyMeshGenFaces&) = delete;
public:
......@@ -131,7 +131,7 @@ public:
);
//- Destructor
//- Destructor, calls clearOut()
virtual ~polyMeshGenFaces();
......
......@@ -57,7 +57,7 @@ namespace Module
class polyMeshGen2DEngine
{
// Private data
// Private Data
//- const reference to the mesh
const polyMeshGen& mesh_;
......@@ -90,7 +90,7 @@ class polyMeshGen2DEngine
mutable labelList* zMaxToZMinPtr_;
// Private member functions
// Private Member Functions
//- find active faces
void findActiveFaces() const;
......@@ -116,11 +116,12 @@ class polyMeshGen2DEngine
//- find offset point to each zMin point
void findZMaxOffsetPoints() const;
//- disallow bitwise assignment
void operator=(const polyMeshGen2DEngine&);
//- disallow copy construct
polyMeshGen2DEngine(const polyMeshGen2DEngine&);
//- No copy construct
polyMeshGen2DEngine(const polyMeshGen2DEngine&) = delete;
//- No copy assignment
void operator=(const polyMeshGen2DEngine&) = delete;
public:
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -49,6 +50,7 @@ namespace Foam
{
namespace Module
{
// Forward Declarations
class meshOctreeCubeBasic;
inline Ostream& operator<<(Ostream&, const meshOctreeCubeBasic&);
inline Istream& operator>>(Istream&, meshOctreeCubeBasic&);
......@@ -61,7 +63,7 @@ class meshOctreeCubeBasic
:
public meshOctreeCubeCoordinates
{
// Private data
// Private Data
//- cube type
direction cubeType_;
......@@ -74,7 +76,7 @@ public:
// Constructors
//- Null constructor
//- Default construct
inline meshOctreeCubeBasic();
//- Construct from coordinates
......@@ -109,7 +111,7 @@ public:
};
// Member functions
// Member Functions
//- return type
inline direction cubeType() const;
......@@ -127,12 +129,7 @@ public:
inline const meshOctreeCubeCoordinates& coordinates() const;
// Member operators
inline void operator=(const meshOctreeCubeBasic&);
// Friend operators
// IOstream Operators
inline friend Ostream& operator<<
(
......
......@@ -97,19 +97,6 @@ Foam::Module::meshOctreeCubeBasic::coordinates() const
}
inline void Foam::Module::meshOctreeCubeBasic::operator=
(
const meshOctreeCubeBasic& ocb
)
{
cubeType_ = ocb.cubeType_;
procNo_ = ocb.procNo_;
static_cast<meshOctreeCubeCoordinates&>(*this) =
static_cast<const meshOctreeCubeCoordinates&>(ocb);
}
inline Foam::Ostream& Foam::Module::operator<<
(
Ostream& os,
......
......@@ -74,8 +74,10 @@ Foam::label
Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const
{
forAll(ts.patches(), patchI)
{
if (ts.patches()[patchI].name() == patchName_)
return patchI;
}
FatalErrorInFunction
<< "Patch " << patchName_
......@@ -88,13 +90,6 @@ Foam::Module::patchRefinement::patchInSurface(const triSurf& ts) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void Foam::Module::patchRefinement::operator=(const patchRefinement& pr)
{
patchName_ = pr.patchName_;
cellSize_ = pr.cellSize_;
}
Foam::Istream& Foam::Module::operator>>
(
Istream& is,
......@@ -113,7 +108,7 @@ Foam::Ostream& Foam::Module::operator<<
const Foam::Module::patchRefinement& pr
)
{
os << pr.patchName_ << " " << pr.cellSize_ << nl;
os << pr.patchName_ << token::SPACE << pr.cellSize_ << nl;
return os;
}
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2014-2017 Creative Fields, Ltd.
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
Author
Franjo Juretic (franjo.juretic@c-fields.com)
......@@ -48,12 +49,10 @@ SourceFiles
namespace Foam
{
// Forward declarations
class Istream;
class Ostream;
namespace Module
{
// Forward Declarations
class triSurf;
class patchRefinement;
Istream& operator>>(Istream& is, patchRefinement& pr);
......@@ -65,7 +64,7 @@ Ostream& operator<<(Ostream& os, const patchRefinement& pr);
class patchRefinement
{
// Private members
// Private Data
word patchName_;
......@@ -74,22 +73,21 @@ class patchRefinement
public:
// Generated Methods: copy construct, copy assign
// Constructors
//- Null contructor
//- Default contruct, cell-size = 0
patchRefinement();
//- Construct from word and desired cell size
patchRefinement(const word&, const scalar);
//- contruct from stream
//- Construct from stream
patchRefinement(Istream&);
//- Destructor
~patchRefinement() = default;
// Member Functions
const word& patchName() const;
......@@ -99,9 +97,7 @@ public:
label patchInSurface(const triSurf& ts) const;
// Operators
void operator=(const patchRefinement&);
// IOstream Operators
friend Istream& operator>>(Istream& is, patchRefinement& pr);
friend Ostream& operator<<(Ostream& os, const patchRefinement& pr);
......
......@@ -261,9 +261,9 @@ autoPtr<triSurf> mergeSurfacePatches
{
newPatches[patchCount] = geometricSurfacePatch
(
newPatchType,
newPatchName,
patchCount
patchCount,
newPatchType
);
}
if (patchAddr[patchAddr.size()-1].size() || keepPatches)
......