mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use unique_ptr for resource handling in dynamicMesh
ENH: defaulting for destructors where possible STYLE: clear() instead of setSize(0) for plain Lists STYLE: use bool operator instead of valid()/empty() for autoPtr tests
This commit is contained in:
@ -33,7 +33,6 @@ License
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "demandDrivenData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -222,13 +221,12 @@ void Foam::attachDetach::checkDefinition()
|
|||||||
|
|
||||||
void Foam::attachDetach::clearAddressing() const
|
void Foam::attachDetach::clearAddressing() const
|
||||||
{
|
{
|
||||||
deleteDemandDrivenData(pointMatchMapPtr_);
|
pointMatchMapPtr_.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::attachDetach::attachDetach
|
Foam::attachDetach::attachDetach
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -256,7 +254,6 @@ Foam::attachDetach::attachDetach
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::attachDetach::attachDetach
|
Foam::attachDetach::attachDetach
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -292,26 +289,11 @@ Foam::attachDetach::attachDetach
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::attachDetach::~attachDetach()
|
|
||||||
{
|
|
||||||
clearAddressing();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::attachDetach::setAttach() const
|
bool Foam::attachDetach::setAttach() const
|
||||||
{
|
{
|
||||||
if (!attached())
|
trigger_ = (!attached());
|
||||||
{
|
|
||||||
trigger_ = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
trigger_ = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return trigger_;
|
return trigger_;
|
||||||
}
|
}
|
||||||
@ -319,14 +301,7 @@ bool Foam::attachDetach::setAttach() const
|
|||||||
|
|
||||||
bool Foam::attachDetach::setDetach() const
|
bool Foam::attachDetach::setDetach() const
|
||||||
{
|
{
|
||||||
if (attached())
|
trigger_ = (attached());
|
||||||
{
|
|
||||||
trigger_ = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
trigger_ = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return trigger_;
|
return trigger_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -63,7 +64,7 @@ class attachDetach
|
|||||||
:
|
:
|
||||||
public polyMeshModifier
|
public polyMeshModifier
|
||||||
{
|
{
|
||||||
// Data types
|
// Data Types
|
||||||
|
|
||||||
//- State of the modifier
|
//- State of the modifier
|
||||||
enum modifierState
|
enum modifierState
|
||||||
@ -74,7 +75,7 @@ class attachDetach
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Master face zone ID
|
//- Master face zone ID
|
||||||
faceZoneID faceZoneID_;
|
faceZoneID faceZoneID_;
|
||||||
@ -103,8 +104,8 @@ class attachDetach
|
|||||||
|
|
||||||
// Private addressing data. Created on topology change
|
// Private addressing data. Created on topology change
|
||||||
|
|
||||||
//- Map of matching points
|
//- Map of matching points
|
||||||
mutable Map<label>* pointMatchMapPtr_;
|
mutable unique_ptr<Map<label>> pointMatchMapPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -174,7 +175,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~attachDetach();
|
virtual ~attachDetach() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -89,8 +90,8 @@ void Foam::attachDetach::calcPointMatchMap() const
|
|||||||
const faceList& masterLocalFaces = masterPatch.localFaces();
|
const faceList& masterLocalFaces = masterPatch.localFaces();
|
||||||
const faceList& slaveLocalFaces = reverseSlavePatch.localFaces();
|
const faceList& slaveLocalFaces = reverseSlavePatch.localFaces();
|
||||||
|
|
||||||
pointMatchMapPtr_ = new Map<label>(2*slaveMeshPoints.size());
|
pointMatchMapPtr_.reset(new Map<label>(2*slaveMeshPoints.size()));
|
||||||
Map<label>& removedPointMap = *pointMatchMapPtr_;
|
auto& removedPointMap = *pointMatchMapPtr_;
|
||||||
|
|
||||||
forAll(masterLocalFaces, facei)
|
forAll(masterLocalFaces, facei)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,14 +43,14 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(boundaryMesh, 0);
|
defineTypeNameAndDebug(boundaryMesh, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Normal along which to divide faces into categories (used in getNearest)
|
// Normal along which to divide faces into categories (used in getNearest)
|
||||||
const vector boundaryMesh::splitNormal_(3, 2, 1);
|
const Foam::vector Foam::boundaryMesh::splitNormal_(3, 2, 1);
|
||||||
|
|
||||||
// Distance to face tolerance for getNearest
|
// Distance to face tolerance for getNearest
|
||||||
const scalar boundaryMesh::distanceTol_ = 1e-2;
|
const Foam::scalar Foam::boundaryMesh::distanceTol_ = 1e-2;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
@ -437,7 +437,6 @@ void Foam::boundaryMesh::markZone
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Null constructor
|
|
||||||
Foam::boundaryMesh::boundaryMesh()
|
Foam::boundaryMesh::boundaryMesh()
|
||||||
:
|
:
|
||||||
meshPtr_(nullptr),
|
meshPtr_(nullptr),
|
||||||
@ -452,27 +451,14 @@ Foam::boundaryMesh::boundaryMesh()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::boundaryMesh::~boundaryMesh()
|
|
||||||
{
|
|
||||||
clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::boundaryMesh::clearOut()
|
void Foam::boundaryMesh::clearOut()
|
||||||
{
|
{
|
||||||
if (meshPtr_)
|
meshPtr_.reset(nullptr);
|
||||||
{
|
|
||||||
delete meshPtr_;
|
|
||||||
|
|
||||||
meshPtr_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::boundaryMesh::read(const polyMesh& mesh)
|
void Foam::boundaryMesh::read(const polyMesh& mesh)
|
||||||
{
|
{
|
||||||
patches_.clear();
|
patches_.clear();
|
||||||
@ -544,8 +530,10 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
|
|||||||
// Store in local(compact) addressing
|
// Store in local(compact) addressing
|
||||||
clearOut();
|
clearOut();
|
||||||
|
|
||||||
meshPtr_ = new bMesh(globalPatch.localFaces(), globalPatch.localPoints());
|
meshPtr_.reset
|
||||||
|
(
|
||||||
|
new bMesh(globalPatch.localFaces(), globalPatch.localPoints())
|
||||||
|
);
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
{
|
{
|
||||||
@ -586,16 +574,15 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clear edge storage
|
// Clear edge storage
|
||||||
featurePoints_.setSize(0);
|
featurePoints_.clear();
|
||||||
featureEdges_.setSize(0);
|
featureEdges_.clear();
|
||||||
|
|
||||||
featureToEdge_.setSize(0);
|
featureToEdge_.clear();
|
||||||
edgeToFeature_.setSize(meshPtr_->nEdges());
|
edgeToFeature_.resize(meshPtr_->nEdges());
|
||||||
edgeToFeature_ = -1;
|
edgeToFeature_ = -1;
|
||||||
|
|
||||||
featureSegments_.setSize(0);
|
featureSegments_.clear();
|
||||||
|
extraEdges_.clear();
|
||||||
extraEdges_.setSize(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -752,19 +739,18 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName)
|
|||||||
clearOut();
|
clearOut();
|
||||||
|
|
||||||
// Store compact.
|
// Store compact.
|
||||||
meshPtr_ = new bMesh(bFaces, surf.localPoints());
|
meshPtr_.reset(new bMesh(bFaces, surf.localPoints()));
|
||||||
|
|
||||||
// Clear edge storage
|
// Clear edge storage
|
||||||
featurePoints_.setSize(0);
|
featurePoints_.clear();
|
||||||
featureEdges_.setSize(0);
|
featureEdges_.clear();
|
||||||
|
|
||||||
featureToEdge_.setSize(0);
|
featureToEdge_.clear();
|
||||||
edgeToFeature_.setSize(meshPtr_->nEdges());
|
edgeToFeature_.resize(meshPtr_->nEdges());
|
||||||
edgeToFeature_ = -1;
|
edgeToFeature_ = -1;
|
||||||
|
|
||||||
featureSegments_.setSize(0);
|
featureSegments_.clear();
|
||||||
|
extraEdges_.clear();
|
||||||
extraEdges_.setSize(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1813,7 +1799,8 @@ void Foam::boundaryMesh::changeFaces
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reconstruct 'mesh' from new faces and (copy of) existing points.
|
// Reconstruct 'mesh' from new faces and (copy of) existing points.
|
||||||
bMesh* newMeshPtr_ = new bMesh(newFaces, mesh().points());
|
|
||||||
|
unique_ptr<bMesh> newMeshPtr(new bMesh(newFaces, mesh().points()));
|
||||||
|
|
||||||
// Reset meshFace_ to new ordering.
|
// Reset meshFace_ to new ordering.
|
||||||
meshFace_.transfer(newMeshFace);
|
meshFace_.transfer(newMeshFace);
|
||||||
@ -1823,7 +1810,7 @@ void Foam::boundaryMesh::changeFaces
|
|||||||
clearOut();
|
clearOut();
|
||||||
|
|
||||||
// And insert new 'mesh'.
|
// And insert new 'mesh'.
|
||||||
meshPtr_ = newMeshPtr_;
|
meshPtr_ = std::move(newMeshPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -76,7 +77,7 @@ class boundaryMesh
|
|||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- All boundary mesh data. Reconstructed every time faces are repatched
|
//- All boundary mesh data. Reconstructed every time faces are repatched
|
||||||
bMesh* meshPtr_;
|
unique_ptr<bMesh> meshPtr_;
|
||||||
|
|
||||||
//- Patches. Reconstructed every time faces are repatched.
|
//- Patches. Reconstructed every time faces are repatched.
|
||||||
PtrList<boundaryPatch> patches_;
|
PtrList<boundaryPatch> patches_;
|
||||||
@ -189,12 +190,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Default construct
|
||||||
boundaryMesh();
|
boundaryMesh();
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~boundaryMesh();
|
~boundaryMesh() = default;
|
||||||
|
|
||||||
void clearOut();
|
void clearOut();
|
||||||
|
|
||||||
@ -208,8 +209,8 @@ public:
|
|||||||
if (!meshPtr_)
|
if (!meshPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "No mesh available. Probably mesh not yet"
|
<< "No mesh available. Probably mesh not yet read\n"
|
||||||
<< " read." << abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
return *meshPtr_;
|
return *meshPtr_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class globalMeshData;
|
class globalMeshData;
|
||||||
@ -61,7 +61,7 @@ class globalMeshData;
|
|||||||
|
|
||||||
class createShellMesh
|
class createShellMesh
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to patch to extrude
|
//- Reference to patch to extrude
|
||||||
const primitiveFacePatch& patch_;
|
const primitiveFacePatch& patch_;
|
||||||
@ -113,7 +113,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh.
|
//- Construct from face patch
|
||||||
createShellMesh
|
createShellMesh
|
||||||
(
|
(
|
||||||
const primitiveFacePatch& patch,
|
const primitiveFacePatch& patch,
|
||||||
@ -124,7 +124,6 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- From region cell to patch face. Consecutively added so
|
//- From region cell to patch face. Consecutively added so
|
||||||
|
|||||||
@ -51,7 +51,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class IOobject;
|
class IOobject;
|
||||||
class faceCoupleInfo;
|
class faceCoupleInfo;
|
||||||
class IOobjectList;
|
class IOobjectList;
|
||||||
@ -68,7 +68,6 @@ class fvMeshAdder
|
|||||||
:
|
:
|
||||||
public polyMeshAdder
|
public polyMeshAdder
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|||||||
@ -1650,7 +1650,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::fvMeshDistribute::fvMeshDistribute(fvMesh& mesh, const scalar mergeTol)
|
Foam::fvMeshDistribute::fvMeshDistribute(fvMesh& mesh, const scalar mergeTol)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2016 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -63,7 +63,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class mapAddedPolyMesh;
|
class mapAddedPolyMesh;
|
||||||
class mapDistributePolyMesh;
|
class mapDistributePolyMesh;
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ Foam::word Foam::fvMeshSubset::exposedPatchName("oldInternalFaces");
|
|||||||
|
|
||||||
bool Foam::fvMeshSubset::checkCellSubset() const
|
bool Foam::fvMeshSubset::checkCellSubset() const
|
||||||
{
|
{
|
||||||
if (fvMeshSubsetPtr_.empty())
|
if (!fvMeshSubsetPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "setCellSubset()" << nl
|
<< "setCellSubset()" << nl
|
||||||
@ -87,9 +87,8 @@ void Foam::fvMeshSubset::calcFaceFlipMap() const
|
|||||||
const labelList& subToBaseFace = faceMap();
|
const labelList& subToBaseFace = faceMap();
|
||||||
const labelList& subToBaseCell = cellMap();
|
const labelList& subToBaseCell = cellMap();
|
||||||
|
|
||||||
faceFlipMapPtr_.clear();
|
|
||||||
faceFlipMapPtr_.reset(new labelList(subToBaseFace.size()));
|
faceFlipMapPtr_.reset(new labelList(subToBaseFace.size()));
|
||||||
labelList& faceFlipMap = *faceFlipMapPtr_;
|
auto& faceFlipMap = *faceFlipMapPtr_;
|
||||||
|
|
||||||
// Only exposed internal faces might be flipped (since we don't do
|
// Only exposed internal faces might be flipped (since we don't do
|
||||||
// any cell renumbering, just compacting)
|
// any cell renumbering, just compacting)
|
||||||
@ -546,8 +545,8 @@ Foam::fvMeshSubset::fvMeshSubset
|
|||||||
|
|
||||||
void Foam::fvMeshSubset::clear()
|
void Foam::fvMeshSubset::clear()
|
||||||
{
|
{
|
||||||
fvMeshSubsetPtr_.clear();
|
fvMeshSubsetPtr_.reset(nullptr);
|
||||||
faceFlipMapPtr_.clear();
|
faceFlipMapPtr_.reset(nullptr);
|
||||||
|
|
||||||
pointMap_.clear();
|
pointMap_.clear();
|
||||||
faceMap_.clear();
|
faceMap_.clear();
|
||||||
|
|||||||
@ -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.
|
||||||
@ -35,13 +35,13 @@ inline const Foam::fvMesh& Foam::fvMeshSubset::baseMesh() const
|
|||||||
|
|
||||||
inline const Foam::fvMesh& Foam::fvMeshSubset::mesh() const
|
inline const Foam::fvMesh& Foam::fvMeshSubset::mesh() const
|
||||||
{
|
{
|
||||||
return fvMeshSubsetPtr_.valid() ? *fvMeshSubsetPtr_ : baseMesh_;
|
return fvMeshSubsetPtr_ ? *fvMeshSubsetPtr_ : baseMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::fvMeshSubset::hasSubMesh() const
|
inline bool Foam::fvMeshSubset::hasSubMesh() const
|
||||||
{
|
{
|
||||||
return fvMeshSubsetPtr_.valid();
|
return bool(fvMeshSubsetPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ inline const Foam::labelList& Foam::fvMeshSubset::faceMap() const
|
|||||||
|
|
||||||
inline const Foam::labelList& Foam::fvMeshSubset::faceFlipMap() const
|
inline const Foam::labelList& Foam::fvMeshSubset::faceFlipMap() const
|
||||||
{
|
{
|
||||||
if (!faceFlipMapPtr_.valid())
|
if (!faceFlipMapPtr_)
|
||||||
{
|
{
|
||||||
calcFaceFlipMap();
|
calcFaceFlipMap();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.
|
||||||
@ -49,9 +49,6 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
class Time;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fvMeshSubsetProxy Declaration
|
Class fvMeshSubsetProxy Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -60,6 +57,8 @@ class fvMeshSubsetProxy
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Data Types
|
||||||
|
|
||||||
//- Internal bookkeeping for subset type
|
//- Internal bookkeeping for subset type
|
||||||
enum subsetType
|
enum subsetType
|
||||||
{
|
{
|
||||||
|
|||||||
@ -33,7 +33,6 @@ License
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "demandDrivenData.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -96,38 +95,10 @@ void Foam::layerAdditionRemoval::checkDefinition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar Foam::layerAdditionRemoval::readOldThickness
|
|
||||||
(
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return dict.lookupOrDefault("oldLayerThickness", -1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::layerAdditionRemoval::clearAddressing() const
|
void Foam::layerAdditionRemoval::clearAddressing() const
|
||||||
{
|
{
|
||||||
if (pointsPairingPtr_)
|
pointsPairingPtr_.reset(nullptr);
|
||||||
{
|
facesPairingPtr_.reset(nullptr);
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "layerAdditionRemoval::clearAddressing()" << nl
|
|
||||||
<< " clearing pointsPairingPtr_" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteDemandDrivenData(pointsPairingPtr_);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (facesPairingPtr_)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "layerAdditionRemoval::clearAddressing()" << nl
|
|
||||||
<< " clearing facesPairingPtr_" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteDemandDrivenData(facesPairingPtr_);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,8 +142,8 @@ Foam::layerAdditionRemoval::layerAdditionRemoval
|
|||||||
faceZoneID_(dict.lookup("faceZoneName"), ptc.mesh().faceZones()),
|
faceZoneID_(dict.lookup("faceZoneName"), ptc.mesh().faceZones()),
|
||||||
minLayerThickness_(dict.get<scalar>("minLayerThickness")),
|
minLayerThickness_(dict.get<scalar>("minLayerThickness")),
|
||||||
maxLayerThickness_(dict.get<scalar>("maxLayerThickness")),
|
maxLayerThickness_(dict.get<scalar>("maxLayerThickness")),
|
||||||
thicknessFromVolume_(dict.lookupOrDefault("thicknessFromVolume", true)),
|
thicknessFromVolume_(dict.getOrDefault("thicknessFromVolume", true)),
|
||||||
oldLayerThickness_(readOldThickness(dict)),
|
oldLayerThickness_(dict.getOrDefault<scalar>("oldLayerThickness", -1.0)),
|
||||||
pointsPairingPtr_(nullptr),
|
pointsPairingPtr_(nullptr),
|
||||||
facesPairingPtr_(nullptr),
|
facesPairingPtr_(nullptr),
|
||||||
triggerRemoval_(-1),
|
triggerRemoval_(-1),
|
||||||
@ -182,14 +153,6 @@ Foam::layerAdditionRemoval::layerAdditionRemoval
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::layerAdditionRemoval::~layerAdditionRemoval()
|
|
||||||
{
|
|
||||||
clearAddressing();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::layerAdditionRemoval::changeTopology() const
|
bool Foam::layerAdditionRemoval::changeTopology() const
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +57,7 @@ class layerAdditionRemoval
|
|||||||
:
|
:
|
||||||
public polyMeshModifier
|
public polyMeshModifier
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Master face zone ID
|
//- Master face zone ID
|
||||||
faceZoneID faceZoneID_;
|
faceZoneID faceZoneID_;
|
||||||
@ -76,10 +77,10 @@ class layerAdditionRemoval
|
|||||||
mutable scalar oldLayerThickness_;
|
mutable scalar oldLayerThickness_;
|
||||||
|
|
||||||
//- Point pairing
|
//- Point pairing
|
||||||
mutable labelList* pointsPairingPtr_;
|
mutable unique_ptr<labelList> pointsPairingPtr_;
|
||||||
|
|
||||||
//- Face pairing
|
//- Face pairing
|
||||||
mutable labelList* facesPairingPtr_;
|
mutable unique_ptr<labelList> facesPairingPtr_;
|
||||||
|
|
||||||
//- Layer removal trigger time index
|
//- Layer removal trigger time index
|
||||||
mutable label triggerRemoval_;
|
mutable label triggerRemoval_;
|
||||||
@ -100,7 +101,7 @@ class layerAdditionRemoval
|
|||||||
void checkDefinition();
|
void checkDefinition();
|
||||||
|
|
||||||
|
|
||||||
// Topological changes
|
// Topological Changes
|
||||||
|
|
||||||
//- Check for valid layer
|
//- Check for valid layer
|
||||||
bool validCollapse() const;
|
bool validCollapse() const;
|
||||||
@ -127,13 +128,7 @@ class layerAdditionRemoval
|
|||||||
void clearAddressing() const;
|
void clearAddressing() const;
|
||||||
|
|
||||||
|
|
||||||
// Helpers
|
// Static Data Members
|
||||||
|
|
||||||
//- Optionally read old thickness
|
|
||||||
static scalar readOldThickness(const dictionary&);
|
|
||||||
|
|
||||||
|
|
||||||
// Static data members
|
|
||||||
|
|
||||||
//- Thickness insertion fraction for the pre-motion
|
//- Thickness insertion fraction for the pre-motion
|
||||||
static const scalar addDelta_;
|
static const scalar addDelta_;
|
||||||
@ -174,7 +169,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~layerAdditionRemoval();
|
virtual ~layerAdditionRemoval() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -83,11 +84,11 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const
|
|||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointsPairingPtr_ = new labelList(meshPoints.size(), -1);
|
pointsPairingPtr_.reset(new labelList(meshPoints.size(), -1));
|
||||||
labelList& ptc = *pointsPairingPtr_;
|
facesPairingPtr_.reset(new labelList(mf.size(), -1));
|
||||||
|
|
||||||
facesPairingPtr_ = new labelList(mf.size(), -1);
|
auto& ptc = *pointsPairingPtr_;
|
||||||
labelList& ftc = *facesPairingPtr_;
|
auto& ftc = *facesPairingPtr_;
|
||||||
|
|
||||||
if (debug > 1)
|
if (debug > 1)
|
||||||
{
|
{
|
||||||
@ -177,11 +178,9 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
// Valid layer
|
||||||
// Valid layer
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -197,6 +196,7 @@ const Foam::labelList& Foam::layerAdditionRemoval::pointsPairing() const
|
|||||||
return *pointsPairingPtr_;
|
return *pointsPairingPtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::labelList& Foam::layerAdditionRemoval::facesPairing() const
|
const Foam::labelList& Foam::layerAdditionRemoval::facesPairing() const
|
||||||
{
|
{
|
||||||
if (!facesPairingPtr_)
|
if (!facesPairingPtr_)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -488,7 +488,7 @@ Foam::label Foam::cellCuts::vertexVertexToFace
|
|||||||
|
|
||||||
void Foam::cellCuts::calcFaceCuts() const
|
void Foam::cellCuts::calcFaceCuts() const
|
||||||
{
|
{
|
||||||
if (faceCutsPtr_.valid())
|
if (faceCutsPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "faceCuts already calculated" << abort(FatalError);
|
<< "faceCuts already calculated" << abort(FatalError);
|
||||||
@ -497,7 +497,7 @@ void Foam::cellCuts::calcFaceCuts() const
|
|||||||
const faceList& faces = mesh().faces();
|
const faceList& faces = mesh().faces();
|
||||||
|
|
||||||
faceCutsPtr_.reset(new labelListList(mesh().nFaces()));
|
faceCutsPtr_.reset(new labelListList(mesh().nFaces()));
|
||||||
labelListList& faceCuts = faceCutsPtr_();
|
auto& faceCuts = *faceCutsPtr_;
|
||||||
|
|
||||||
for (label facei = 0; facei < mesh().nFaces(); facei++)
|
for (label facei = 0; facei < mesh().nFaces(); facei++)
|
||||||
{
|
{
|
||||||
@ -1275,7 +1275,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
|
|||||||
// Dump cell and cuts on cell.
|
// Dump cell and cuts on cell.
|
||||||
writeUncutOBJ(".", celli);
|
writeUncutOBJ(".", celli);
|
||||||
}
|
}
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1283,7 +1283,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
|
|||||||
//Pout<< "calcCellLoops(const labelList&) : did not find valid"
|
//Pout<< "calcCellLoops(const labelList&) : did not find valid"
|
||||||
// << " loop for cell " << celli << " since not enough cut faces"
|
// << " loop for cell " << celli << " since not enough cut faces"
|
||||||
// << endl;
|
// << endl;
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2196,8 +2196,8 @@ void Foam::cellCuts::setFromCellLoops()
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
cellAnchorPoints_[celli].setSize(0);
|
cellAnchorPoints_[celli].clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2368,7 +2368,7 @@ void Foam::cellCuts::setFromCellLoops
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Clear cellLoops
|
// Clear cellLoops
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2430,7 +2430,7 @@ void Foam::cellCuts::setFromCellCutter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
|
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Found loop on cell " << celli
|
<< "Found loop on cell " << celli
|
||||||
@ -2455,7 +2455,7 @@ void Foam::cellCuts::setFromCellCutter
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Clear cellLoops
|
// Clear cellLoops
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2552,7 +2552,7 @@ void Foam::cellCuts::setFromCellCutter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
|
|
||||||
// Discarded by validLoop
|
// Discarded by validLoop
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -2566,7 +2566,7 @@ void Foam::cellCuts::setFromCellCutter
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Clear cellLoops
|
// Clear cellLoops
|
||||||
cellLoops_[celli].setSize(0);
|
cellLoops_[celli].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3138,22 +3138,14 @@ Foam::cellCuts::cellCuts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::cellCuts::~cellCuts()
|
|
||||||
{
|
|
||||||
clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::cellCuts::clearOut()
|
void Foam::cellCuts::clearOut()
|
||||||
{
|
{
|
||||||
faceCutsPtr_.clear();
|
faceCutsPtr_.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::pointField Foam::cellCuts::loopPoints(const label celli) const
|
Foam::pointField Foam::cellCuts::loopPoints(const label celli) const
|
||||||
{
|
{
|
||||||
const labelList& loop = cellLoops_[celli];
|
const labelList& loop = cellLoops_[celli];
|
||||||
|
|||||||
@ -98,7 +98,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class cellLooper;
|
class cellLooper;
|
||||||
class refineCell;
|
class refineCell;
|
||||||
@ -112,7 +112,7 @@ class cellCuts
|
|||||||
:
|
:
|
||||||
public edgeVertex
|
public edgeVertex
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Warn for illegal cuts
|
//- Warn for illegal cuts
|
||||||
const bool verbose_;
|
const bool verbose_;
|
||||||
@ -134,7 +134,7 @@ class cellCuts
|
|||||||
|
|
||||||
//- Cuts per existing face (includes those along edge of face)
|
//- Cuts per existing face (includes those along edge of face)
|
||||||
// Cuts in no particular order.
|
// Cuts in no particular order.
|
||||||
mutable autoPtr<labelListList> faceCutsPtr_;
|
mutable unique_ptr<labelListList> faceCutsPtr_;
|
||||||
|
|
||||||
//- Per face : cut across edge (so not along existing edge)
|
//- Per face : cut across edge (so not along existing edge)
|
||||||
// (can only be one per face)
|
// (can only be one per face)
|
||||||
@ -184,6 +184,7 @@ class cellCuts
|
|||||||
const Map<label>&
|
const Map<label>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Debugging: write cell's edges and any cut vertices and edges
|
//- Debugging: write cell's edges and any cut vertices and edges
|
||||||
@ -541,9 +542,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~cellCuts();
|
~cellCuts() = default;
|
||||||
|
|
||||||
//- Clear out demand driven storage
|
//- Clear out demand-driven storage
|
||||||
void clearOut();
|
void clearOut();
|
||||||
|
|
||||||
|
|
||||||
@ -573,7 +574,7 @@ public:
|
|||||||
// Cuts in no particular order
|
// Cuts in no particular order
|
||||||
const labelListList& faceCuts() const
|
const labelListList& faceCuts() const
|
||||||
{
|
{
|
||||||
if (!faceCutsPtr_.valid())
|
if (!faceCutsPtr_)
|
||||||
{
|
{
|
||||||
calcFaceCuts();
|
calcFaceCuts();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -202,10 +202,4 @@ Foam::cellLooper::cellLooper(const polyMesh& mesh)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::cellLooper::~cellLooper()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,7 +62,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class plane;
|
class plane;
|
||||||
|
|
||||||
@ -73,7 +74,6 @@ class cellLooper
|
|||||||
:
|
:
|
||||||
public edgeVertex
|
public edgeVertex
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -106,10 +106,6 @@ protected:
|
|||||||
label getMisAlignedEdge(const vector& refDir, const label celli) const;
|
label getMisAlignedEdge(const vector& refDir, const label celli) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
cellLooper(const cellLooper&) = delete;
|
cellLooper(const cellLooper&) = delete;
|
||||||
|
|
||||||
@ -140,8 +136,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from mesh
|
||||||
cellLooper(const polyMesh& mesh);
|
explicit cellLooper(const polyMesh& mesh);
|
||||||
|
|
||||||
//- Clone
|
//- Clone
|
||||||
autoPtr<cellLooper> clone() const
|
autoPtr<cellLooper> clone() const
|
||||||
@ -162,7 +158,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~cellLooper();
|
virtual ~cellLooper() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -198,7 +194,6 @@ public:
|
|||||||
labelList& loop,
|
labelList& loop,
|
||||||
scalarField& loopWeights
|
scalarField& loopWeights
|
||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,9 +36,16 @@ License
|
|||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "transform.H"
|
#include "transform.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(geomCellLooper, 0);
|
||||||
|
addToRunTimeSelectionTable(cellLooper, geomCellLooper, word);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Extension factor of edges to make sure we catch intersections through
|
// Extension factor of edges to make sure we catch intersections through
|
||||||
// edge endpoints
|
// edge endpoints
|
||||||
@ -49,17 +56,6 @@ const Foam::scalar Foam::geomCellLooper::pointEqualTol_ = 1e-3;
|
|||||||
Foam::scalar Foam::geomCellLooper::snapTol_ = 0.1;
|
Foam::scalar Foam::geomCellLooper::snapTol_ = 0.1;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
defineTypeNameAndDebug(geomCellLooper, 0);
|
|
||||||
addToRunTimeSelectionTable(cellLooper, geomCellLooper, word);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::scalar Foam::geomCellLooper::minEdgeLen(const label vertI) const
|
Foam::scalar Foam::geomCellLooper::minEdgeLen(const label vertI) const
|
||||||
@ -209,19 +205,12 @@ bool Foam::geomCellLooper::edgeEndsCut
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::geomCellLooper::geomCellLooper(const polyMesh& mesh)
|
Foam::geomCellLooper::geomCellLooper(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
cellLooper(mesh)
|
cellLooper(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::geomCellLooper::~geomCellLooper()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::geomCellLooper::cut
|
bool Foam::geomCellLooper::cut
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +57,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class plane;
|
class plane;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -67,7 +68,6 @@ class geomCellLooper
|
|||||||
:
|
:
|
||||||
public cellLooper
|
public cellLooper
|
||||||
{
|
{
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
|
|
||||||
//- Tolerance for point equal test. Fraction of edge length.
|
//- Tolerance for point equal test. Fraction of edge length.
|
||||||
@ -140,22 +140,18 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from mesh
|
||||||
geomCellLooper(const polyMesh& mesh);
|
explicit geomCellLooper(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~geomCellLooper();
|
virtual ~geomCellLooper() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- Create cut along circumference of celli. Gets current mesh cuts.
|
//- Create cut along circumference of celli. Gets current mesh cuts.
|
||||||
// Cut along circumference is expressed as loop of cuts plus weights
|
// Cut along circumference is expressed as loop of cuts plus weights
|
||||||
// for cuts along edges (only valid for edge cuts).
|
// for cuts along edges (only valid for edge cuts).
|
||||||
|
|||||||
@ -34,15 +34,14 @@ License
|
|||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(hexCellLooper, 0);
|
defineTypeNameAndDebug(hexCellLooper, 0);
|
||||||
addToRunTimeSelectionTable(cellLooper, hexCellLooper, word);
|
addToRunTimeSelectionTable(cellLooper, hexCellLooper, word);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +149,6 @@ void Foam::hexCellLooper::makeFace
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::hexCellLooper::hexCellLooper(const polyMesh& mesh)
|
Foam::hexCellLooper::hexCellLooper(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
geomCellLooper(mesh),
|
geomCellLooper(mesh),
|
||||||
@ -158,12 +156,6 @@ Foam::hexCellLooper::hexCellLooper(const polyMesh& mesh)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::hexCellLooper::~hexCellLooper()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::hexCellLooper::cut
|
bool Foam::hexCellLooper::cut
|
||||||
|
|||||||
@ -53,7 +53,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class cellModel;
|
class cellModel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -64,10 +64,9 @@ class hexCellLooper
|
|||||||
:
|
:
|
||||||
public geomCellLooper
|
public geomCellLooper
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
//- Reference to hex cell shape.
|
//- Reference to hex cell shape.
|
||||||
const cellModel& hex_;
|
const cellModel& hex_;
|
||||||
@ -114,12 +113,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from mesh
|
||||||
hexCellLooper(const polyMesh& mesh);
|
explicit hexCellLooper(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~hexCellLooper();
|
virtual ~hexCellLooper() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -33,7 +33,6 @@ License
|
|||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "hexMatcher.H"
|
#include "hexMatcher.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -662,19 +661,12 @@ void Foam::topoCellLooper::walkSplitHex
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::topoCellLooper::topoCellLooper(const polyMesh& mesh)
|
Foam::topoCellLooper::topoCellLooper(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
hexCellLooper(mesh)
|
hexCellLooper(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::topoCellLooper::~topoCellLooper()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::topoCellLooper::cut
|
bool Foam::topoCellLooper::cut
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -59,7 +60,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class cellFeatures;
|
class cellFeatures;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -70,7 +71,6 @@ class topoCellLooper
|
|||||||
:
|
:
|
||||||
public hexCellLooper
|
public hexCellLooper
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- In-memory truncate a list
|
//- In-memory truncate a list
|
||||||
@ -166,12 +166,12 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from mesh
|
||||||
topoCellLooper(const polyMesh& mesh);
|
explicit topoCellLooper(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~topoCellLooper();
|
virtual ~topoCellLooper() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,7 +54,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class twoDPointCorrector;
|
class twoDPointCorrector;
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
@ -68,10 +69,9 @@ class directions
|
|||||||
:
|
:
|
||||||
public List<vectorField>
|
public List<vectorField>
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Data types
|
// Data Types
|
||||||
|
|
||||||
//- Enumeration listing the possible coordinate directions.
|
//- Enumeration listing the possible coordinate directions.
|
||||||
enum directionType
|
enum directionType
|
||||||
|
|||||||
@ -30,7 +30,6 @@ License
|
|||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "refineCell.H"
|
#include "refineCell.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Static Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Update stored refine list using map
|
// Update stored refine list using map
|
||||||
|
|||||||
@ -31,6 +31,7 @@ Description
|
|||||||
cell circumference.
|
cell circumference.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
edgeVertex.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class refineCell;
|
class refineCell;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -54,7 +55,7 @@ class refineCell;
|
|||||||
|
|
||||||
class edgeVertex
|
class edgeVertex
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh. (could be primitive mesh but keeping polyMesh
|
//- Reference to mesh. (could be primitive mesh but keeping polyMesh
|
||||||
// here saves storing reference at higher levels where we do need it)
|
// here saves storing reference at higher levels where we do need it)
|
||||||
@ -90,7 +91,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
edgeVertex(const polyMesh& mesh)
|
explicit edgeVertex(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
mesh_(mesh)
|
mesh_(mesh)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -385,7 +385,6 @@ bool Foam::boundaryCutter::splitFace
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::boundaryCutter::boundaryCutter(const polyMesh& mesh)
|
Foam::boundaryCutter::boundaryCutter(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
@ -394,12 +393,6 @@ Foam::boundaryCutter::boundaryCutter(const polyMesh& mesh)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::boundaryCutter::~boundaryCutter()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::boundaryCutter::setRefinement
|
void Foam::boundaryCutter::setRefinement
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -55,7 +56,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
@ -127,11 +128,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
boundaryCutter(const polyMesh& mesh);
|
explicit boundaryCutter(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~boundaryCutter();
|
~boundaryCutter() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -563,7 +563,6 @@ Foam::face Foam::meshCutAndRemove::loopToFace
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::meshCutAndRemove::meshCutAndRemove(const polyMesh& mesh)
|
Foam::meshCutAndRemove::meshCutAndRemove(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
edgeVertex(mesh),
|
edgeVertex(mesh),
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,7 +28,7 @@ Class
|
|||||||
Foam::meshCutAndRemove
|
Foam::meshCutAndRemove
|
||||||
|
|
||||||
Description
|
Description
|
||||||
like meshCutter but also removes non-anchor side of cell.
|
Like meshCutter but also removes non-anchor side of cell.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
meshCutAndRemove.C
|
meshCutAndRemove.C
|
||||||
@ -49,7 +50,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class Time;
|
class Time;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class cellCuts;
|
class cellCuts;
|
||||||
@ -65,14 +66,14 @@ class meshCutAndRemove
|
|||||||
:
|
:
|
||||||
public edgeVertex
|
public edgeVertex
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Faces added in last setRefinement. Per split cell label of added
|
//- Faces added in last setRefinement.
|
||||||
// face
|
// Per split cell label of added face
|
||||||
Map<label> addedFaces_;
|
Map<label> addedFaces_;
|
||||||
|
|
||||||
//- Points added in last setRefinement. Per split edge label of added
|
//- Points added in last setRefinement.
|
||||||
// point
|
// Per split edge label of added point
|
||||||
EdgeMap<label> addedPoints_;
|
EdgeMap<label> addedPoints_;
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +194,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
meshCutAndRemove(const polyMesh& mesh);
|
explicit meshCutAndRemove(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -516,12 +516,6 @@ Foam::meshCutter::meshCutter(const polyMesh& mesh)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::meshCutter::~meshCutter()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::meshCutter::setRefinement
|
void Foam::meshCutter::setRefinement
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -124,7 +125,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class Time;
|
class Time;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class cellCuts;
|
class cellCuts;
|
||||||
@ -276,11 +277,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
meshCutter(const polyMesh& mesh);
|
explicit meshCutter(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~meshCutter();
|
~meshCutter() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -65,7 +65,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class undoableMeshCutter;
|
class undoableMeshCutter;
|
||||||
class cellLooper;
|
class cellLooper;
|
||||||
class topoSet;
|
class topoSet;
|
||||||
|
|||||||
@ -47,7 +47,6 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::refinementIterator::refinementIterator
|
Foam::refinementIterator::refinementIterator
|
||||||
(
|
(
|
||||||
polyMesh& mesh,
|
polyMesh& mesh,
|
||||||
@ -67,7 +66,7 @@ Foam::refinementIterator::refinementIterator
|
|||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::refinementIterator::~refinementIterator()
|
Foam::refinementIterator::~refinementIterator()
|
||||||
{}
|
{} // Define here since polyMesh was forward declared
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,7 +55,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class refineCell;
|
class refineCell;
|
||||||
class undoableMeshCutter;
|
class undoableMeshCutter;
|
||||||
@ -68,7 +69,7 @@ class refinementIterator
|
|||||||
:
|
:
|
||||||
public edgeVertex
|
public edgeVertex
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
polyMesh& mesh_;
|
polyMesh& mesh_;
|
||||||
|
|||||||
@ -174,7 +174,6 @@ void Foam::undoableMeshCutter::updateLabels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::undoableMeshCutter::undoableMeshCutter
|
Foam::undoableMeshCutter::undoableMeshCutter
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
|
|||||||
@ -59,8 +59,6 @@ Description
|
|||||||
|
|
||||||
- liveSplitCells contains pointers to splitCells with null children.
|
- liveSplitCells contains pointers to splitCells with null children.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
undoableMeshCutter.C
|
undoableMeshCutter.C
|
||||||
|
|
||||||
@ -83,7 +81,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class refineCell;
|
class refineCell;
|
||||||
@ -97,7 +95,7 @@ class undoableMeshCutter
|
|||||||
:
|
:
|
||||||
public meshCutter
|
public meshCutter
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Whether or not to store actions for unplaying.
|
//- Whether or not to store actions for unplaying.
|
||||||
const bool undoable_;
|
const bool undoable_;
|
||||||
@ -143,12 +141,15 @@ public:
|
|||||||
ClassName("undoableMeshCutter");
|
ClassName("undoableMeshCutter");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh and flag whether refinement pattern needs
|
//- Construct from mesh and flag whether refinement pattern needs
|
||||||
// to be stored.
|
//- to be stored.
|
||||||
undoableMeshCutter(const polyMesh& mesh, const bool undoable = true);
|
explicit undoableMeshCutter
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const bool undoable = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -45,10 +45,8 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward Declarations
|
||||||
|
|
||||||
class refineCell;
|
class refineCell;
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const refineCell&);
|
Ostream& operator<<(Ostream&, const refineCell&);
|
||||||
|
|
||||||
|
|
||||||
@ -58,26 +56,27 @@ Ostream& operator<<(Ostream&, const refineCell&);
|
|||||||
|
|
||||||
class refineCell
|
class refineCell
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Cell label
|
//- Cell label
|
||||||
label cellNo_;
|
label cellNo_;
|
||||||
|
|
||||||
|
//- Preferred refinement direction (always normalized).
|
||||||
|
vector direction_;
|
||||||
|
|
||||||
//- Preferred refinement direction (always normalized).
|
|
||||||
vector direction_;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null
|
//- Default construct
|
||||||
refineCell();
|
refineCell();
|
||||||
|
|
||||||
//- From components. Vector will be normalized upon construction.
|
//- From components. Vector will be normalized upon construction.
|
||||||
refineCell(const label, const vector&);
|
refineCell(const label celli, const vector& direction);
|
||||||
|
|
||||||
//- From Istream. Vector will be normalized upon construction.
|
//- From Istream. Vector will be normalized upon construction.
|
||||||
refineCell(Istream& is);
|
explicit refineCell(Istream& is);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -30,7 +30,6 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from cell number and parent
|
|
||||||
Foam::splitCell::splitCell(const label celli, splitCell* parent)
|
Foam::splitCell::splitCell(const label celli, splitCell* parent)
|
||||||
:
|
:
|
||||||
celli_(celli),
|
celli_(celli),
|
||||||
|
|||||||
@ -45,24 +45,22 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class splitCell Declaration
|
Class splitCell Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class splitCell
|
class splitCell
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Unsplit cell label. Only uptodate if this cell is 'live'
|
//- Unsplit cell label.
|
||||||
// (i.e. no master or slave)
|
// Only uptodate if this cell is 'live' (i.e. no master or slave)
|
||||||
label celli_;
|
label celli_;
|
||||||
|
|
||||||
//- Parent splitCell or null
|
//- Parent splitCell or nullptr
|
||||||
splitCell* parent_;
|
splitCell* parent_;
|
||||||
|
|
||||||
//- Cells replacing this or null
|
//- Cells replacing this or nullptr
|
||||||
splitCell* master_;
|
splitCell* master_;
|
||||||
|
|
||||||
splitCell* slave_;
|
splitCell* slave_;
|
||||||
|
|||||||
@ -324,7 +324,6 @@ bool Foam::polyMeshGeometry::checkFaceTet
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::polyMeshGeometry::polyMeshGeometry(const polyMesh& mesh)
|
Foam::polyMeshGeometry::polyMeshGeometry(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
mesh_(mesh)
|
mesh_(mesh)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -131,7 +132,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
polyMeshGeometry(const polyMesh&);
|
explicit polyMeshGeometry(const polyMesh&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -130,18 +130,12 @@ Foam::codedPoints0MotionSolver::codedPoints0MotionSolver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::codedPoints0MotionSolver::~codedPoints0MotionSolver()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::motionSolver&
|
Foam::motionSolver&
|
||||||
Foam::codedPoints0MotionSolver::redirectMotionSolver() const
|
Foam::codedPoints0MotionSolver::redirectMotionSolver() const
|
||||||
{
|
{
|
||||||
if (!redirectMotionSolverPtr_.valid())
|
if (!redirectMotionSolverPtr_)
|
||||||
{
|
{
|
||||||
// Get the dictionary for the solver and override the
|
// Get the dictionary for the solver and override the
|
||||||
// solver name (in case it is not a subdictionary and contains
|
// solver name (in case it is not a subdictionary and contains
|
||||||
@ -159,7 +153,8 @@ Foam::codedPoints0MotionSolver::redirectMotionSolver() const
|
|||||||
IOdictionary(io, constructDict)
|
IOdictionary(io, constructDict)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return redirectMotionSolverPtr_();
|
|
||||||
|
return *redirectMotionSolverPtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~codedPoints0MotionSolver();
|
virtual ~codedPoints0MotionSolver() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -128,12 +128,6 @@ Foam::zoneMotion::zoneMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::zoneMotion::~zoneMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Members * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Members * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::labelList& Foam::zoneMotion::pointIDs() const
|
const Foam::labelList& Foam::zoneMotion::pointIDs() const
|
||||||
@ -147,4 +141,5 @@ bool Foam::zoneMotion::moveAllCells() const
|
|||||||
return moveAllCells_;
|
return moveAllCells_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -46,6 +46,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -54,8 +55,7 @@ class polyMesh;
|
|||||||
|
|
||||||
class zoneMotion
|
class zoneMotion
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
|
|
||||||
//- Points to move when cell zone is supplied
|
//- Points to move when cell zone is supplied
|
||||||
labelList pointIDs_;
|
labelList pointIDs_;
|
||||||
@ -93,8 +93,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~zoneMotion();
|
virtual ~zoneMotion() = default;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -325,13 +325,6 @@ displacementInterpolationMotionSolver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::displacementInterpolationMotionSolver::
|
|
||||||
~displacementInterpolationMotionSolver()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2015 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,7 +65,7 @@ class displacementInterpolationMotionSolver
|
|||||||
:
|
:
|
||||||
public displacementMotionSolver
|
public displacementMotionSolver
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
// Face zone information (note: could pack these to only contain
|
// Face zone information (note: could pack these to only contain
|
||||||
// used zones)
|
// used zones)
|
||||||
@ -131,7 +131,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~displacementInterpolationMotionSolver();
|
~displacementInterpolationMotionSolver() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -45,7 +46,8 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchVectorField(p, iF),
|
fixedValuePointPatchVectorField(p, iF),
|
||||||
SBMFPtr_()
|
SBMFPtr_(nullptr),
|
||||||
|
localPoints0Ptr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +60,8 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchVectorField(p, iF, dict, false),
|
fixedValuePointPatchVectorField(p, iF, dict, false),
|
||||||
SBMFPtr_(solidBodyMotionFunction::New(dict, this->db().time()))
|
SBMFPtr_(solidBodyMotionFunction::New(dict, this->db().time())),
|
||||||
|
localPoints0Ptr_(nullptr)
|
||||||
{
|
{
|
||||||
if (!dict.found("value"))
|
if (!dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -82,7 +85,8 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchVectorField(ptf, p, iF, mapper),
|
fixedValuePointPatchVectorField(ptf, p, iF, mapper),
|
||||||
SBMFPtr_(ptf.SBMFPtr_().clone().ptr())
|
SBMFPtr_(ptf.SBMFPtr_().clone()),
|
||||||
|
localPoints0Ptr_(nullptr)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
|
|
||||||
@ -101,7 +105,8 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchVectorField(ptf),
|
fixedValuePointPatchVectorField(ptf),
|
||||||
SBMFPtr_(ptf.SBMFPtr_().clone().ptr())
|
SBMFPtr_(ptf.SBMFPtr_().clone()),
|
||||||
|
localPoints0Ptr_(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -113,7 +118,8 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchVectorField(ptf, iF),
|
fixedValuePointPatchVectorField(ptf, iF),
|
||||||
SBMFPtr_(ptf.SBMFPtr_().clone().ptr())
|
SBMFPtr_(ptf.SBMFPtr_().clone()),
|
||||||
|
localPoints0Ptr_(nullptr)
|
||||||
{
|
{
|
||||||
// For safety re-evaluate
|
// For safety re-evaluate
|
||||||
|
|
||||||
@ -130,7 +136,7 @@ solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
const pointField&
|
const pointField&
|
||||||
solidBodyMotionDisplacementPointPatchVectorField::localPoints0() const
|
solidBodyMotionDisplacementPointPatchVectorField::localPoints0() const
|
||||||
{
|
{
|
||||||
if (!localPoints0Ptr_.valid())
|
if (!localPoints0Ptr_)
|
||||||
{
|
{
|
||||||
pointIOField points0
|
pointIOField points0
|
||||||
(
|
(
|
||||||
@ -148,6 +154,7 @@ solidBodyMotionDisplacementPointPatchVectorField::localPoints0() const
|
|||||||
|
|
||||||
localPoints0Ptr_.reset(new pointField(points0, patch().meshPoints()));
|
localPoints0Ptr_.reset(new pointField(points0, patch().meshPoints()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *localPoints0Ptr_;
|
return *localPoints0Ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,7 +55,7 @@ class solidBodyMotionDisplacementPointPatchVectorField
|
|||||||
:
|
:
|
||||||
public fixedValuePointPatchVectorField
|
public fixedValuePointPatchVectorField
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- The motion control function
|
//- The motion control function
|
||||||
autoPtr<solidBodyMotionFunction> SBMFPtr_;
|
autoPtr<solidBodyMotionFunction> SBMFPtr_;
|
||||||
@ -149,7 +150,8 @@ public:
|
|||||||
|
|
||||||
const pointField& localPoints0() const;
|
const pointField& localPoints0() const;
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
// Evaluation Functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|||||||
@ -59,12 +59,6 @@ Foam::solidBodyMotionFunctions::SDA::SDA
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::SDA::~SDA()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion Foam::solidBodyMotionFunctions::SDA::transformation() const
|
Foam::septernion Foam::solidBodyMotionFunctions::SDA::transformation() const
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -60,7 +61,7 @@ class SDA
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Center of gravity
|
//- Center of gravity
|
||||||
vector CofG_;
|
vector CofG_;
|
||||||
@ -135,7 +136,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~SDA();
|
virtual ~SDA() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -62,12 +62,6 @@ Foam::solidBodyMotionFunctions::axisRotationMotion::axisRotationMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::axisRotationMotion::~axisRotationMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -57,7 +58,7 @@ class axisRotationMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Origin
|
//- Origin
|
||||||
point origin_;
|
point origin_;
|
||||||
@ -105,7 +106,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~axisRotationMotion();
|
virtual ~axisRotationMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -79,12 +79,6 @@ Foam::solidBodyMotionFunctions::drivenLinearMotion::drivenLinearMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::drivenLinearMotion::~drivenLinearMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~drivenLinearMotion();
|
virtual ~drivenLinearMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -59,12 +59,6 @@ Foam::solidBodyMotionFunctions::linearMotion::linearMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::linearMotion::~linearMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class linearMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Linear velocity
|
//- Linear velocity
|
||||||
vector velocity_;
|
vector velocity_;
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~linearMotion();
|
virtual ~linearMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -59,12 +59,6 @@ Foam::solidBodyMotionFunctions::multiMotion::multiMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::multiMotion::~multiMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class multiMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Motions to combine
|
//- Motions to combine
|
||||||
PtrList<solidBodyMotionFunction> SBMFs_;
|
PtrList<solidBodyMotionFunction> SBMFs_;
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~multiMotion();
|
virtual ~multiMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -59,13 +59,6 @@ Foam::solidBodyMotionFunctions::oscillatingLinearMotion::oscillatingLinearMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::oscillatingLinearMotion::
|
|
||||||
~oscillatingLinearMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +57,7 @@ class oscillatingLinearMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Amplitude
|
//- Amplitude
|
||||||
vector amplitude_;
|
vector amplitude_;
|
||||||
@ -104,7 +105,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~oscillatingLinearMotion();
|
virtual ~oscillatingLinearMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -62,13 +62,6 @@ oscillatingRotatingMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::
|
|
||||||
~oscillatingRotatingMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,7 +57,7 @@ class oscillatingRotatingMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Centre of gravity
|
//- Centre of gravity
|
||||||
point origin_;
|
point origin_;
|
||||||
@ -107,7 +108,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~oscillatingRotatingMotion();
|
virtual ~oscillatingRotatingMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -28,9 +28,6 @@ License
|
|||||||
|
|
||||||
#include "rotatingMotion.H"
|
#include "rotatingMotion.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "mathematicalConstants.H"
|
|
||||||
|
|
||||||
using namespace Foam::constant::mathematical;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -64,12 +61,6 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::rotatingMotion::~rotatingMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
@ -98,7 +89,7 @@ bool Foam::solidBodyMotionFunctions::rotatingMotion::read
|
|||||||
|
|
||||||
omega_.reset
|
omega_.reset
|
||||||
(
|
(
|
||||||
Function1<scalar>::New("omega", SBMFCoeffs_).ptr()
|
Function1<scalar>::New("omega", SBMFCoeffs_)
|
||||||
);
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,7 +62,7 @@ class rotatingMotion
|
|||||||
:
|
:
|
||||||
public solidBodyMotionFunction
|
public solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Origin of the axis
|
//- Origin of the axis
|
||||||
const vector origin_;
|
const vector origin_;
|
||||||
@ -112,7 +113,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~rotatingMotion();
|
virtual ~rotatingMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -55,12 +55,6 @@ Foam::solidBodyMotionFunction::solidBodyMotionFunction
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunction::~solidBodyMotionFunction()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::solidBodyMotionFunction::read(const dictionary& SBMFCoeffs)
|
bool Foam::solidBodyMotionFunction::read(const dictionary& SBMFCoeffs)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -57,22 +58,21 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
s Class solidBodyMotionFunction Declaration
|
Class solidBodyMotionFunction Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class solidBodyMotionFunction
|
class solidBodyMotionFunction
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
dictionary SBMFCoeffs_;
|
dictionary SBMFCoeffs_;
|
||||||
|
|
||||||
const Time& time_;
|
const Time& time_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
// Protected Member Functions
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
solidBodyMotionFunction(const solidBodyMotionFunction&) = delete;
|
solidBodyMotionFunction(const solidBodyMotionFunction&) = delete;
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~solidBodyMotionFunction();
|
virtual ~solidBodyMotionFunction() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -65,12 +65,6 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::solidBodyMotionFunctions::tabulated6DoFMotion::~tabulated6DoFMotion()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::septernion
|
Foam::septernion
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -117,7 +118,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~tabulated6DoFMotion();
|
virtual ~tabulated6DoFMotion() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -195,12 +195,6 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::iNew::operator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::motionSolver::~motionSolver()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
|
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
|
||||||
|
|||||||
@ -49,7 +49,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -60,7 +60,7 @@ class motionSolver
|
|||||||
:
|
:
|
||||||
public IOdictionary
|
public IOdictionary
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -136,7 +136,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~motionSolver();
|
virtual ~motionSolver() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -61,12 +61,6 @@ Foam::velocityMotionSolver::velocityMotionSolver
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::velocityMotionSolver::~velocityMotionSolver()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::velocityMotionSolver::movePoints(const pointField& p)
|
void Foam::velocityMotionSolver::movePoints(const pointField& p)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -48,6 +49,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -60,14 +62,13 @@ class velocityMotionSolver
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
//- Point motion field
|
//- Point motion field
|
||||||
mutable pointVectorField pointMotionU_;
|
mutable pointVectorField pointMotionU_;
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
velocityMotionSolver(const velocityMotionSolver&) = delete;
|
velocityMotionSolver(const velocityMotionSolver&) = delete;
|
||||||
@ -93,7 +94,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~velocityMotionSolver();
|
virtual ~velocityMotionSolver() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -126,12 +126,6 @@ Foam::perfectInterface::perfectInterface
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::perfectInterface::~perfectInterface()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::perfectInterface::changeTopology() const
|
bool Foam::perfectInterface::changeTopology() const
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -48,7 +49,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class Time;
|
class Time;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -59,7 +60,7 @@ class perfectInterface
|
|||||||
:
|
:
|
||||||
public polyMeshModifier
|
public polyMeshModifier
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Master face zone ID
|
//- Master face zone ID
|
||||||
faceZoneID faceZoneID_;
|
faceZoneID faceZoneID_;
|
||||||
@ -70,10 +71,11 @@ class perfectInterface
|
|||||||
//- Slave patch ID
|
//- Slave patch ID
|
||||||
polyPatchID slavePatchID_;
|
polyPatchID slavePatchID_;
|
||||||
|
|
||||||
//- Tolerance used for distance comparison (fraction of minimum edge
|
//- Tolerance used for distance comparison
|
||||||
// length)
|
// (fraction of minimum edge length)
|
||||||
static const scalar tol_;
|
static const scalar tol_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Calculate face centres on patch
|
//- Calculate face centres on patch
|
||||||
@ -117,7 +119,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~perfectInterface();
|
virtual ~perfectInterface() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -59,12 +59,6 @@ Foam::pointPatchDist::pointPatchDist
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::pointPatchDist::~pointPatchDist()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::pointPatchDist::correct()
|
void Foam::pointPatchDist::correct()
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -44,6 +45,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
class pointMesh;
|
class pointMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -54,7 +56,6 @@ class pointPatchDist
|
|||||||
:
|
:
|
||||||
public pointScalarField
|
public pointScalarField
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Data
|
// Private Member Data
|
||||||
@ -92,7 +93,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~pointPatchDist();
|
virtual ~pointPatchDist() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -2088,12 +2088,6 @@ Foam::faceCoupleInfo::faceCoupleInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::faceCoupleInfo::~faceCoupleInfo()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::labelList Foam::faceCoupleInfo::faceLabels(const polyPatch& pp)
|
Foam::labelList Foam::faceCoupleInfo::faceLabels(const polyPatch& pp)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -147,7 +148,7 @@ namespace Foam
|
|||||||
typedef HashTable<labelList, edge, Hash<edge>> edgeLookup;
|
typedef HashTable<labelList, edge, Hash<edge>> edgeLookup;
|
||||||
|
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class face;
|
class face;
|
||||||
class primitiveMesh;
|
class primitiveMesh;
|
||||||
class polyPatch;
|
class polyPatch;
|
||||||
@ -159,16 +160,16 @@ class polyMesh;
|
|||||||
|
|
||||||
class faceCoupleInfo
|
class faceCoupleInfo
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Angle matching tolerance.
|
//- Angle matching tolerance.
|
||||||
static const scalar angleTol_;
|
static const scalar angleTol_;
|
||||||
|
|
||||||
//- Master patch
|
//- Master patch
|
||||||
autoPtr<indirectPrimitivePatch> masterPatchPtr_;
|
unique_ptr<indirectPrimitivePatch> masterPatchPtr_;
|
||||||
|
|
||||||
//- Slave patch
|
//- Slave patch
|
||||||
autoPtr<indirectPrimitivePatch> slavePatchPtr_;
|
unique_ptr<indirectPrimitivePatch> slavePatchPtr_;
|
||||||
|
|
||||||
|
|
||||||
//- Description of cut.
|
//- Description of cut.
|
||||||
@ -185,7 +186,8 @@ class faceCoupleInfo
|
|||||||
// them)
|
// them)
|
||||||
// Orientation of cutFaces should be same as masterFaces!
|
// Orientation of cutFaces should be same as masterFaces!
|
||||||
pointField cutPoints_;
|
pointField cutPoints_;
|
||||||
autoPtr<primitiveFacePatch> cutFacesPtr_;
|
|
||||||
|
unique_ptr<primitiveFacePatch> cutFacesPtr_;
|
||||||
|
|
||||||
//- Additional point coupling information. Is between points on
|
//- Additional point coupling information. Is between points on
|
||||||
// boundary of both meshes.
|
// boundary of both meshes.
|
||||||
@ -432,7 +434,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~faceCoupleInfo();
|
~faceCoupleInfo() = default;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -51,7 +52,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class IOobject;
|
class IOobject;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
|
|
||||||
@ -61,9 +62,6 @@ class polyTopoChange;
|
|||||||
|
|
||||||
class polyMeshAdder
|
class polyMeshAdder
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Index of patch in allPatches. Add if nonexisting.
|
//- Index of patch in allPatches. Add if nonexisting.
|
||||||
@ -247,8 +245,8 @@ private:
|
|||||||
polyMesh& mesh
|
polyMesh& mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -967,12 +967,6 @@ Foam::polyMeshFilter::polyMeshFilter
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::polyMeshFilter::~polyMeshFilter()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
|
Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -219,7 +220,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~polyMeshFilter();
|
~polyMeshFilter() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -38,13 +38,11 @@ Description
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(polyMeshModifier, 0);
|
defineTypeNameAndDebug(polyMeshModifier, 0);
|
||||||
|
|
||||||
defineRunTimeSelectionTable(polyMeshModifier, dictionary);
|
defineRunTimeSelectionTable(polyMeshModifier, dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::polyMeshModifier::polyMeshModifier
|
Foam::polyMeshModifier::polyMeshModifier
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
@ -60,12 +58,6 @@ Foam::polyMeshModifier::polyMeshModifier
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::polyMeshModifier::~polyMeshModifier()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::polyTopoChanger& Foam::polyMeshModifier::topoChanger() const
|
const Foam::polyTopoChanger& Foam::polyMeshModifier::topoChanger() const
|
||||||
|
|||||||
@ -53,14 +53,10 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyTopoChanger;
|
class polyTopoChanger;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
|
||||||
|
|
||||||
class polyMeshModifier;
|
class polyMeshModifier;
|
||||||
|
|
||||||
Ostream& operator<<(Ostream&, const polyMeshModifier&);
|
Ostream& operator<<(Ostream&, const polyMeshModifier&);
|
||||||
@ -146,7 +142,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~polyMeshModifier();
|
virtual ~polyMeshModifier() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -114,7 +115,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
@ -127,7 +128,7 @@ class globalIndex;
|
|||||||
|
|
||||||
class addPatchCellLayer
|
class addPatchCellLayer
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -263,12 +264,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh.
|
//- Construct from mesh.
|
||||||
addPatchCellLayer(const polyMesh&, const bool addToMesh = true);
|
explicit addPatchCellLayer(const polyMesh&, const bool addToMesh=true);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Added points per patch point.
|
//- Added points per patch point.
|
||||||
|
|||||||
@ -46,7 +46,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
@ -58,7 +58,7 @@ class face;
|
|||||||
|
|
||||||
class combineFaces
|
class combineFaces
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -79,7 +79,6 @@ class combineFaces
|
|||||||
pointField savedPoints_;
|
pointField savedPoints_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Test if face is convex. Allow slight concavity through
|
//- Test if face is convex. Allow slight concavity through
|
||||||
@ -118,7 +117,6 @@ class combineFaces
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- No copy construct
|
//- No copy construct
|
||||||
combineFaces(const combineFaces&) = delete;
|
combineFaces(const combineFaces&) = delete;
|
||||||
|
|
||||||
@ -134,7 +132,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
combineFaces(const polyMesh& mesh, const bool undoable = false);
|
explicit combineFaces(const polyMesh& mesh, const bool undoable=false);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -46,7 +46,6 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from mesh
|
|
||||||
Foam::duplicatePoints::duplicatePoints(const polyMesh& mesh)
|
Foam::duplicatePoints::duplicatePoints(const polyMesh& mesh)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
|
|||||||
@ -45,7 +45,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class edge;
|
class edge;
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
duplicatePoints(const polyMesh& mesh);
|
explicit duplicatePoints(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -54,7 +54,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class bitSet;
|
class bitSet;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
@ -254,7 +254,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
edgeCollapser(const polyMesh& mesh);
|
explicit edgeCollapser(const polyMesh& mesh);
|
||||||
|
|
||||||
//- Construct from mesh and dict
|
//- Construct from mesh and dict
|
||||||
edgeCollapser(const polyMesh& mesh, const dictionary& dict);
|
edgeCollapser(const polyMesh& mesh, const dictionary& dict);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,7 +67,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
@ -77,7 +78,7 @@ class mapPolyMesh;
|
|||||||
|
|
||||||
class faceCollapser
|
class faceCollapser
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -130,7 +131,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh.
|
//- Construct from mesh.
|
||||||
faceCollapser(const polyMesh& mesh);
|
explicit faceCollapser(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 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.
|
||||||
@ -2040,7 +2040,6 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::hexRef8::hexRef8
|
Foam::hexRef8::hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -2150,7 +2149,6 @@ Foam::hexRef8::hexRef8
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from components
|
|
||||||
Foam::hexRef8::hexRef8
|
Foam::hexRef8::hexRef8
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
@ -5011,7 +5009,7 @@ void Foam::hexRef8::checkRefinementLevels
|
|||||||
|
|
||||||
const Foam::cellShapeList& Foam::hexRef8::cellShapes() const
|
const Foam::cellShapeList& Foam::hexRef8::cellShapes() const
|
||||||
{
|
{
|
||||||
if (cellShapesPtr_.empty())
|
if (!cellShapesPtr_)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,7 +54,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyPatch;
|
class polyPatch;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
@ -67,7 +67,7 @@ class mapDistributePolyMesh;
|
|||||||
|
|
||||||
class hexRef8
|
class hexRef8
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to underlying mesh.
|
//- Reference to underlying mesh.
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
@ -362,7 +362,7 @@ public:
|
|||||||
//- Construct from mesh, read_if_present refinement data
|
//- Construct from mesh, read_if_present refinement data
|
||||||
// (from write below). If readHistory is true does read_if_present
|
// (from write below). If readHistory is true does read_if_present
|
||||||
// of refinement history. If false clears all history
|
// of refinement history. If false clears all history
|
||||||
hexRef8(const polyMesh& mesh, const bool readHistory = true);
|
explicit hexRef8(const polyMesh& mesh, const bool readHistory=true);
|
||||||
|
|
||||||
//- Construct from mesh and un/refinement data and optional size of
|
//- Construct from mesh and un/refinement data and optional size of
|
||||||
// starting cells
|
// starting cells
|
||||||
@ -593,7 +593,6 @@ public:
|
|||||||
|
|
||||||
//- Helper: remove all relevant files from mesh instance
|
//- Helper: remove all relevant files from mesh instance
|
||||||
static void removeFiles(const polyMesh&);
|
static void removeFiles(const polyMesh&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2017 OpenFOAM Foundation
|
Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,7 +28,6 @@ License
|
|||||||
|
|
||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
#include "UList.H"
|
#include "UList.H"
|
||||||
|
|
||||||
#include "hexRef8Data.H"
|
#include "hexRef8Data.H"
|
||||||
#include "mapPolyMesh.H"
|
#include "mapPolyMesh.H"
|
||||||
#include "mapDistributePolyMesh.H"
|
#include "mapDistributePolyMesh.H"
|
||||||
@ -42,59 +41,47 @@ License
|
|||||||
Foam::hexRef8Data::hexRef8Data(const IOobject& io)
|
Foam::hexRef8Data::hexRef8Data(const IOobject& io)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
typedef labelIOList Type;
|
||||||
rio.rename("cellLevel");
|
IOobject rio(io, "cellLevel");
|
||||||
bool haveFile = returnReduce
|
|
||||||
(
|
// haveFile
|
||||||
rio.typeHeaderOk<labelIOList>(true),
|
if (returnReduce(rio.typeHeaderOk<Type>(true), orOp<bool>()))
|
||||||
orOp<bool>()
|
|
||||||
);
|
|
||||||
if (haveFile)
|
|
||||||
{
|
{
|
||||||
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
||||||
cellLevelPtr_.reset(new labelIOList(rio));
|
cellLevelPtr_.reset(new Type(rio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
typedef labelIOList Type;
|
||||||
rio.rename("pointLevel");
|
IOobject rio(io, "pointLevel");
|
||||||
bool haveFile = returnReduce
|
|
||||||
(
|
// haveFile
|
||||||
rio.typeHeaderOk<labelIOList>(true),
|
if (returnReduce(rio.typeHeaderOk<Type>(true), orOp<bool>()))
|
||||||
orOp<bool>()
|
|
||||||
);
|
|
||||||
if (haveFile)
|
|
||||||
{
|
{
|
||||||
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
||||||
pointLevelPtr_.reset(new labelIOList(rio));
|
pointLevelPtr_.reset(new Type(rio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
typedef uniformDimensionedScalarField Type;
|
||||||
rio.rename("level0Edge");
|
IOobject rio(io, "level0Edge");
|
||||||
bool haveFile = returnReduce
|
|
||||||
(
|
// haveFile
|
||||||
rio.typeHeaderOk<uniformDimensionedScalarField>(true),
|
if (returnReduce(rio.typeHeaderOk<Type>(true), orOp<bool>()))
|
||||||
orOp<bool>()
|
|
||||||
);
|
|
||||||
if (haveFile)
|
|
||||||
{
|
{
|
||||||
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
||||||
level0EdgePtr_.reset(new uniformDimensionedScalarField(rio));
|
level0EdgePtr_.reset(new Type(rio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
typedef refinementHistory Type;
|
||||||
rio.rename("refinementHistory");
|
IOobject rio(io, "refinementHistory");
|
||||||
bool haveFile = returnReduce
|
|
||||||
(
|
// haveFile
|
||||||
rio.typeHeaderOk<refinementHistory>(true),
|
if (returnReduce(rio.typeHeaderOk<Type>(true), orOp<bool>()))
|
||||||
orOp<bool>()
|
|
||||||
);
|
|
||||||
if (haveFile)
|
|
||||||
{
|
{
|
||||||
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
Info<< "Reading hexRef8 data : " << rio.name() << endl;
|
||||||
refHistoryPtr_.reset(new refinementHistory(rio));
|
refHistoryPtr_.reset(new Type(rio));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,10 +95,9 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
const labelList& pointMap
|
const labelList& pointMap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (data.cellLevelPtr_.valid())
|
if (data.cellLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, data.cellLevelPtr_().name());
|
||||||
rio.rename(data.cellLevelPtr_().name());
|
|
||||||
|
|
||||||
cellLevelPtr_.reset
|
cellLevelPtr_.reset
|
||||||
(
|
(
|
||||||
@ -122,10 +108,9 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.pointLevelPtr_.valid())
|
if (data.pointLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, data.pointLevelPtr_().name());
|
||||||
rio.rename(data.pointLevelPtr_().name());
|
|
||||||
|
|
||||||
pointLevelPtr_.reset
|
pointLevelPtr_.reset
|
||||||
(
|
(
|
||||||
@ -136,20 +121,18 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.level0EdgePtr_.valid())
|
if (data.level0EdgePtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, data.level0EdgePtr_().name());
|
||||||
rio.rename(data.level0EdgePtr_().name());
|
|
||||||
|
|
||||||
level0EdgePtr_.reset
|
level0EdgePtr_.reset
|
||||||
(
|
(
|
||||||
new uniformDimensionedScalarField(rio, data.level0EdgePtr_())
|
new uniformDimensionedScalarField(rio, data.level0EdgePtr_())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.refHistoryPtr_.valid())
|
if (data.refHistoryPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, data.refHistoryPtr_().name());
|
||||||
rio.rename(data.refHistoryPtr_().name());
|
|
||||||
|
|
||||||
refHistoryPtr_ = data.refHistoryPtr_().clone(rio, cellMap);
|
refHistoryPtr_ = data.refHistoryPtr_().clone(rio, cellMap);
|
||||||
}
|
}
|
||||||
@ -168,13 +151,12 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
|
|
||||||
// cellLevel
|
// cellLevel
|
||||||
|
|
||||||
if (procDatas[0].cellLevelPtr_.valid())
|
if (procDatas[0].cellLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, procDatas[0].cellLevelPtr_().name());
|
||||||
rio.rename(procDatas[0].cellLevelPtr_().name());
|
|
||||||
|
|
||||||
cellLevelPtr_.reset(new labelIOList(rio, mesh.nCells()));
|
cellLevelPtr_.reset(new labelIOList(rio, mesh.nCells()));
|
||||||
labelList& cellLevel = cellLevelPtr_();
|
auto& cellLevel = *cellLevelPtr_;
|
||||||
|
|
||||||
forAll(procDatas, procI)
|
forAll(procDatas, procI)
|
||||||
{
|
{
|
||||||
@ -186,13 +168,12 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
|
|
||||||
// pointLevel
|
// pointLevel
|
||||||
|
|
||||||
if (procDatas[0].pointLevelPtr_.valid())
|
if (procDatas[0].pointLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, procDatas[0].pointLevelPtr_().name());
|
||||||
rio.rename(procDatas[0].pointLevelPtr_().name());
|
|
||||||
|
|
||||||
pointLevelPtr_.reset(new labelIOList(rio, mesh.nPoints()));
|
pointLevelPtr_.reset(new labelIOList(rio, mesh.nPoints()));
|
||||||
labelList& pointLevel = pointLevelPtr_();
|
auto& pointLevel = *pointLevelPtr_;
|
||||||
|
|
||||||
forAll(procDatas, procI)
|
forAll(procDatas, procI)
|
||||||
{
|
{
|
||||||
@ -204,10 +185,9 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
|
|
||||||
// level0Edge
|
// level0Edge
|
||||||
|
|
||||||
if (procDatas[0].level0EdgePtr_.valid())
|
if (procDatas[0].level0EdgePtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, procDatas[0].level0EdgePtr_().name());
|
||||||
rio.rename(procDatas[0].level0EdgePtr_().name());
|
|
||||||
|
|
||||||
level0EdgePtr_.reset
|
level0EdgePtr_.reset
|
||||||
(
|
(
|
||||||
@ -222,10 +202,9 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
|
|
||||||
// refinementHistory
|
// refinementHistory
|
||||||
|
|
||||||
if (procDatas[0].refHistoryPtr_.valid())
|
if (procDatas[0].refHistoryPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, procDatas[0].refHistoryPtr_().name());
|
||||||
rio.rename(procDatas[0].refHistoryPtr_().name());
|
|
||||||
|
|
||||||
UPtrList<const refinementHistory> procRefs(procDatas.size());
|
UPtrList<const refinementHistory> procRefs(procDatas.size());
|
||||||
forAll(procDatas, i)
|
forAll(procDatas, i)
|
||||||
@ -246,23 +225,16 @@ Foam::hexRef8Data::hexRef8Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::hexRef8Data::~hexRef8Data()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::hexRef8Data::sync(const IOobject& io)
|
void Foam::hexRef8Data::sync(const IOobject& io)
|
||||||
{
|
{
|
||||||
const polyMesh& mesh = dynamic_cast<const polyMesh&>(io.db());
|
const polyMesh& mesh = dynamic_cast<const polyMesh&>(io.db());
|
||||||
|
|
||||||
bool hasCellLevel = returnReduce(cellLevelPtr_.valid(), orOp<bool>());
|
bool hasCellLevel = returnReduce(bool(cellLevelPtr_), orOp<bool>());
|
||||||
if (hasCellLevel && !cellLevelPtr_.valid())
|
if (hasCellLevel && !cellLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, "cellLevel");
|
||||||
rio.rename("cellLevel");
|
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt() = IOobject::NO_READ;
|
||||||
cellLevelPtr_.reset
|
cellLevelPtr_.reset
|
||||||
(
|
(
|
||||||
@ -270,11 +242,10 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasPointLevel = returnReduce(pointLevelPtr_.valid(), orOp<bool>());
|
bool hasPointLevel = returnReduce(bool(pointLevelPtr_), orOp<bool>());
|
||||||
if (hasPointLevel && !pointLevelPtr_.valid())
|
if (hasPointLevel && !pointLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, "pointLevel");
|
||||||
rio.rename("pointLevel");
|
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt() = IOobject::NO_READ;
|
||||||
pointLevelPtr_.reset
|
pointLevelPtr_.reset
|
||||||
(
|
(
|
||||||
@ -282,16 +253,15 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasLevel0Edge = returnReduce(level0EdgePtr_.valid(), orOp<bool>());
|
bool hasLevel0Edge = returnReduce(bool(level0EdgePtr_), orOp<bool>());
|
||||||
if (hasLevel0Edge)
|
if (hasLevel0Edge)
|
||||||
{
|
{
|
||||||
// Get master length
|
// Get master length
|
||||||
scalar masterLen = (Pstream::master() ? level0EdgePtr_().value() : 0);
|
scalar masterLen = (Pstream::master() ? level0EdgePtr_().value() : 0);
|
||||||
Pstream::scatter(masterLen);
|
Pstream::scatter(masterLen);
|
||||||
if (!level0EdgePtr_.valid())
|
if (!level0EdgePtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, "level0Edge");
|
||||||
rio.rename("level0Edge");
|
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt() = IOobject::NO_READ;
|
||||||
level0EdgePtr_.reset
|
level0EdgePtr_.reset
|
||||||
(
|
(
|
||||||
@ -304,11 +274,10 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasHistory = returnReduce(refHistoryPtr_.valid(), orOp<bool>());
|
bool hasHistory = returnReduce(bool(refHistoryPtr_), orOp<bool>());
|
||||||
if (hasHistory && !refHistoryPtr_.valid())
|
if (hasHistory && !refHistoryPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io);
|
IOobject rio(io, "refinementHistory");
|
||||||
rio.rename("refinementHistory");
|
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt() = IOobject::NO_READ;
|
||||||
refHistoryPtr_.reset(new refinementHistory(rio, mesh.nCells(), true));
|
refHistoryPtr_.reset(new refinementHistory(rio, mesh.nCells(), true));
|
||||||
}
|
}
|
||||||
@ -320,8 +289,8 @@ void Foam::hexRef8Data::updateMesh(const mapPolyMesh& map)
|
|||||||
// Sanity check
|
// Sanity check
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
(cellLevelPtr_.valid() && cellLevelPtr_().size() != map.nOldCells())
|
(cellLevelPtr_ && cellLevelPtr_().size() != map.nOldCells())
|
||||||
|| (pointLevelPtr_.valid() && pointLevelPtr_().size() != map.nOldPoints())
|
|| (pointLevelPtr_ && pointLevelPtr_().size() != map.nOldPoints())
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
cellLevelPtr_.clear();
|
cellLevelPtr_.clear();
|
||||||
@ -332,7 +301,7 @@ void Foam::hexRef8Data::updateMesh(const mapPolyMesh& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (cellLevelPtr_.valid())
|
if (cellLevelPtr_)
|
||||||
{
|
{
|
||||||
const labelList& cellMap = map.cellMap();
|
const labelList& cellMap = map.cellMap();
|
||||||
labelList& cellLevel = cellLevelPtr_();
|
labelList& cellLevel = cellLevelPtr_();
|
||||||
@ -354,7 +323,7 @@ void Foam::hexRef8Data::updateMesh(const mapPolyMesh& map)
|
|||||||
cellLevel.transfer(newCellLevel);
|
cellLevel.transfer(newCellLevel);
|
||||||
cellLevelPtr_().instance() = map.mesh().facesInstance();
|
cellLevelPtr_().instance() = map.mesh().facesInstance();
|
||||||
}
|
}
|
||||||
if (pointLevelPtr_.valid())
|
if (pointLevelPtr_)
|
||||||
{
|
{
|
||||||
const labelList& pointMap = map.pointMap();
|
const labelList& pointMap = map.pointMap();
|
||||||
labelList& pointLevel = pointLevelPtr_();
|
labelList& pointLevel = pointLevelPtr_();
|
||||||
@ -378,7 +347,7 @@ void Foam::hexRef8Data::updateMesh(const mapPolyMesh& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (refHistoryPtr_.valid() && refHistoryPtr_().active())
|
if (refHistoryPtr_ && refHistoryPtr_().active())
|
||||||
{
|
{
|
||||||
refHistoryPtr_().updateMesh(map);
|
refHistoryPtr_().updateMesh(map);
|
||||||
refHistoryPtr_().instance() = map.mesh().facesInstance();
|
refHistoryPtr_().instance() = map.mesh().facesInstance();
|
||||||
@ -388,18 +357,18 @@ void Foam::hexRef8Data::updateMesh(const mapPolyMesh& map)
|
|||||||
|
|
||||||
void Foam::hexRef8Data::distribute(const mapDistributePolyMesh& map)
|
void Foam::hexRef8Data::distribute(const mapDistributePolyMesh& map)
|
||||||
{
|
{
|
||||||
if (cellLevelPtr_.valid())
|
if (cellLevelPtr_)
|
||||||
{
|
{
|
||||||
map.cellMap().distribute(cellLevelPtr_());
|
map.cellMap().distribute(*cellLevelPtr_);
|
||||||
}
|
}
|
||||||
if (pointLevelPtr_.valid())
|
if (pointLevelPtr_)
|
||||||
{
|
{
|
||||||
map.pointMap().distribute(pointLevelPtr_());
|
map.pointMap().distribute(*pointLevelPtr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need to distribute the level0Edge
|
// No need to distribute the level0Edge
|
||||||
|
|
||||||
if (refHistoryPtr_.valid() && refHistoryPtr_().active())
|
if (refHistoryPtr_ && refHistoryPtr_().active())
|
||||||
{
|
{
|
||||||
refHistoryPtr_().distribute(map);
|
refHistoryPtr_().distribute(map);
|
||||||
}
|
}
|
||||||
@ -409,19 +378,19 @@ void Foam::hexRef8Data::distribute(const mapDistributePolyMesh& map)
|
|||||||
bool Foam::hexRef8Data::write() const
|
bool Foam::hexRef8Data::write() const
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
if (cellLevelPtr_.valid())
|
if (cellLevelPtr_)
|
||||||
{
|
{
|
||||||
ok = ok && cellLevelPtr_().write();
|
ok = ok && cellLevelPtr_().write();
|
||||||
}
|
}
|
||||||
if (pointLevelPtr_.valid())
|
if (pointLevelPtr_)
|
||||||
{
|
{
|
||||||
ok = ok && pointLevelPtr_().write();
|
ok = ok && pointLevelPtr_().write();
|
||||||
}
|
}
|
||||||
if (level0EdgePtr_.valid())
|
if (level0EdgePtr_)
|
||||||
{
|
{
|
||||||
ok = ok && level0EdgePtr_().write();
|
ok = ok && level0EdgePtr_().write();
|
||||||
}
|
}
|
||||||
if (refHistoryPtr_.valid())
|
if (refHistoryPtr_)
|
||||||
{
|
{
|
||||||
ok = ok && refHistoryPtr_().write();
|
ok = ok && refHistoryPtr_().write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2016 OpenFOAM Foundation
|
Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -48,7 +48,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
class mapDistributePolyMesh;
|
class mapDistributePolyMesh;
|
||||||
class refinementHistory;
|
class refinementHistory;
|
||||||
@ -60,10 +60,7 @@ class fvMesh;
|
|||||||
|
|
||||||
class hexRef8Data
|
class hexRef8Data
|
||||||
{
|
{
|
||||||
|
// Private Data
|
||||||
private:
|
|
||||||
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
autoPtr<labelIOList> cellLevelPtr_;
|
autoPtr<labelIOList> cellLevelPtr_;
|
||||||
|
|
||||||
@ -88,8 +85,8 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct read. Has special provision for only some processors
|
//- Construct read. Has special provision for only some processors
|
||||||
// having the files so can be used in redistribution.
|
//- having the files so can be used in redistribution.
|
||||||
hexRef8Data(const IOobject& io);
|
explicit hexRef8Data(const IOobject& io);
|
||||||
|
|
||||||
//- Construct as subset
|
//- Construct as subset
|
||||||
hexRef8Data
|
hexRef8Data
|
||||||
@ -111,7 +108,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~hexRef8Data();
|
~hexRef8Data() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -50,7 +50,7 @@ void Foam::refinementHistory::writeEntry
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Write me:
|
// Write me:
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
Pout<< "parent:" << split.parent_
|
Pout<< "parent:" << split.parent_
|
||||||
<< " subCells:" << split.addedCellsPtr_()
|
<< " subCells:" << split.addedCellsPtr_()
|
||||||
@ -124,67 +124,65 @@ Foam::refinementHistory::splitCell8::splitCell8(const label parent)
|
|||||||
|
|
||||||
|
|
||||||
Foam::refinementHistory::splitCell8::splitCell8(Istream& is)
|
Foam::refinementHistory::splitCell8::splitCell8(Istream& is)
|
||||||
|
:
|
||||||
|
splitCell8()
|
||||||
{
|
{
|
||||||
is >> *this;
|
is >> *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::refinementHistory::splitCell8::splitCell8(const splitCell8& sc)
|
Foam::refinementHistory::splitCell8::splitCell8(const splitCell8& rhs)
|
||||||
:
|
:
|
||||||
parent_(sc.parent_),
|
parent_(rhs.parent_),
|
||||||
addedCellsPtr_
|
addedCellsPtr_(rhs.addedCellsPtr_.clone()) // Copy, not steal
|
||||||
(
|
|
||||||
sc.addedCellsPtr_.valid()
|
|
||||||
? new FixedList<label, 8>(sc.addedCellsPtr_())
|
|
||||||
: nullptr
|
|
||||||
)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::refinementHistory::splitCell8::operator=(const splitCell8& s)
|
void Foam::refinementHistory::splitCell8::operator=(const splitCell8& rhs)
|
||||||
{
|
{
|
||||||
// Assignment operator since autoPtr otherwise 'steals' storage.
|
// Assignment operator since autoPtr otherwise 'steals' storage.
|
||||||
|
|
||||||
if (this == &s)
|
if (this == &rhs)
|
||||||
{
|
{
|
||||||
return; // Self-assignment is a no-op
|
return; // Self-assignment is a no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
parent_ = s.parent_;
|
parent_ = rhs.parent_;
|
||||||
|
addedCellsPtr_.reset(rhs.addedCellsPtr_.clone()); // Copy, not steal
|
||||||
addedCellsPtr_.reset
|
|
||||||
(
|
|
||||||
s.addedCellsPtr_.valid()
|
|
||||||
? new FixedList<label, 8>(s.addedCellsPtr_())
|
|
||||||
: nullptr
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::refinementHistory::splitCell8::operator==(const splitCell8& s) const
|
bool Foam::refinementHistory::splitCell8::operator==
|
||||||
|
(
|
||||||
|
const splitCell8& rhs
|
||||||
|
)
|
||||||
|
const
|
||||||
{
|
{
|
||||||
if (addedCellsPtr_.valid() != s.addedCellsPtr_.valid())
|
if (parent_ != rhs.parent_)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (parent_ != s.parent_)
|
if (bool(addedCellsPtr_) != bool(rhs.addedCellsPtr_))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (addedCellsPtr_.valid())
|
else if (addedCellsPtr_) // With previous test, means rhs is also defined
|
||||||
{
|
{
|
||||||
return addedCellsPtr_() == s.addedCellsPtr_();
|
return addedCellsPtr_() == rhs.addedCellsPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::refinementHistory::splitCell8::operator!=(const splitCell8& s) const
|
bool Foam::refinementHistory::splitCell8::operator!=
|
||||||
|
(
|
||||||
|
const splitCell8& rhs
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
return !operator==(s);
|
return !operator==(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,17 +217,14 @@ Foam::Ostream& Foam::operator<<
|
|||||||
// output as fixedlist with e.g. -1 elements and check for this upon
|
// output as fixedlist with e.g. -1 elements and check for this upon
|
||||||
// reading. However would cause much more data to be transferred.
|
// reading. However would cause much more data to be transferred.
|
||||||
|
|
||||||
if (sc.addedCellsPtr_.valid())
|
labelList labels;
|
||||||
|
|
||||||
|
if (sc.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
return os
|
labels = sc.addedCellsPtr_();
|
||||||
<< sc.parent_
|
|
||||||
<< token::SPACE
|
|
||||||
<< labelList(sc.addedCellsPtr_());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return os << sc.parent_ << token::SPACE << labelList(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return os << sc.parent_ << token::SPACE << labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -280,7 +275,7 @@ Foam::label Foam::refinementHistory::allocateSplitCell
|
|||||||
{
|
{
|
||||||
splitCell8& parentSplit = splitCells_[parent];
|
splitCell8& parentSplit = splitCells_[parent];
|
||||||
|
|
||||||
if (parentSplit.addedCellsPtr_.empty())
|
if (!parentSplit.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
// Allocate storage on parent for the 8 subcells.
|
// Allocate storage on parent for the 8 subcells.
|
||||||
parentSplit.addedCellsPtr_.reset(new FixedList<label, 8>(-1));
|
parentSplit.addedCellsPtr_.reset(new FixedList<label, 8>(-1));
|
||||||
@ -307,7 +302,7 @@ void Foam::refinementHistory::freeSplitCell(const label index)
|
|||||||
autoPtr<FixedList<label, 8>>& subCellsPtr =
|
autoPtr<FixedList<label, 8>>& subCellsPtr =
|
||||||
splitCells_[split.parent_].addedCellsPtr_;
|
splitCells_[split.parent_].addedCellsPtr_;
|
||||||
|
|
||||||
if (subCellsPtr.valid())
|
if (subCellsPtr)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& subCells = subCellsPtr();
|
FixedList<label, 8>& subCells = subCellsPtr();
|
||||||
|
|
||||||
@ -354,7 +349,7 @@ void Foam::refinementHistory::markSplit
|
|||||||
{
|
{
|
||||||
markSplit(split.parent_, oldToNew, newSplitCells);
|
markSplit(split.parent_, oldToNew, newSplitCells);
|
||||||
}
|
}
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
const FixedList<label, 8>& splits = split.addedCellsPtr_();
|
const FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
@ -381,7 +376,7 @@ void Foam::refinementHistory::mark
|
|||||||
|
|
||||||
const splitCell8& split = splitCells_[index];
|
const splitCell8& split = splitCells_[index];
|
||||||
|
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
const FixedList<label, 8>& splits = split.addedCellsPtr_();
|
const FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
@ -809,7 +804,7 @@ Foam::refinementHistory::refinementHistory
|
|||||||
newSplit.parent_ += offsets[refI];
|
newSplit.parent_ += offsets[refI];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newSplit.addedCellsPtr_.valid())
|
if (newSplit.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& splits = newSplit.addedCellsPtr_();
|
FixedList<label, 8>& splits = newSplit.addedCellsPtr_();
|
||||||
|
|
||||||
@ -963,7 +958,7 @@ Foam::autoPtr<Foam::refinementHistory> Foam::refinementHistory::clone
|
|||||||
{
|
{
|
||||||
split.parent_ = oldToNewSplit[split.parent_];
|
split.parent_ = oldToNewSplit[split.parent_];
|
||||||
}
|
}
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
@ -1119,7 +1114,7 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map)
|
|||||||
label index = visibleCells_[celli];
|
label index = visibleCells_[celli];
|
||||||
|
|
||||||
// Check not already set
|
// Check not already set
|
||||||
if (splitCells_[index].addedCellsPtr_.valid())
|
if (splitCells_[index].addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Problem" << abort(FatalError);
|
<< "Problem" << abort(FatalError);
|
||||||
@ -1165,7 +1160,7 @@ void Foam::refinementHistory::subset
|
|||||||
label index = visibleCells_[oldCelli];
|
label index = visibleCells_[oldCelli];
|
||||||
|
|
||||||
// Check that cell is live (so its parent has no refinement)
|
// Check that cell is live (so its parent has no refinement)
|
||||||
if (index >= 0 && splitCells_[index].addedCellsPtr_.valid())
|
if (index >= 0 && splitCells_[index].addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Problem" << abort(FatalError);
|
<< "Problem" << abort(FatalError);
|
||||||
@ -1363,7 +1358,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
{
|
{
|
||||||
split.parent_ = oldToNew[split.parent_];
|
split.parent_ = oldToNew[split.parent_];
|
||||||
}
|
}
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
@ -1443,7 +1438,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
{
|
{
|
||||||
split.parent_ += offset;
|
split.parent_ += offset;
|
||||||
}
|
}
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
@ -1538,7 +1533,7 @@ void Foam::refinementHistory::compact()
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
splitCells_[index].parent_ != -1
|
splitCells_[index].parent_ != -1
|
||||||
|| splitCells_[index].addedCellsPtr_.valid()
|
|| splitCells_[index].addedCellsPtr_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
markSplit(index, oldToNew, newSplitCells);
|
markSplit(index, oldToNew, newSplitCells);
|
||||||
@ -1556,7 +1551,7 @@ void Foam::refinementHistory::compact()
|
|||||||
else if
|
else if
|
||||||
(
|
(
|
||||||
splitCells_[index].parent_ == -1
|
splitCells_[index].parent_ == -1
|
||||||
&& splitCells_[index].addedCellsPtr_.empty()
|
&& !splitCells_[index].addedCellsPtr_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// recombined cell. No need to keep since no parent and no subsplits
|
// recombined cell. No need to keep since no parent and no subsplits
|
||||||
@ -1581,7 +1576,7 @@ void Foam::refinementHistory::compact()
|
|||||||
{
|
{
|
||||||
split.parent_ = oldToNew[split.parent_];
|
split.parent_ = oldToNew[split.parent_];
|
||||||
}
|
}
|
||||||
if (split.addedCellsPtr_.valid())
|
if (split.addedCellsPtr_)
|
||||||
{
|
{
|
||||||
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
FixedList<label, 8>& splits = split.addedCellsPtr_();
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2016 OpenCFD Ltd.
|
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,7 +65,6 @@ Description
|
|||||||
|
|
||||||
The parent 0 refers back to the splitcell entries.
|
The parent 0 refers back to the splitcell entries.
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
refinementHistory.C
|
refinementHistory.C
|
||||||
|
|
||||||
@ -87,13 +86,10 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward Declarations
|
||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
class mapDistributePolyMesh;
|
class mapDistributePolyMesh;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
|
||||||
|
|
||||||
class refinementHistory;
|
class refinementHistory;
|
||||||
|
|
||||||
Istream& operator>>(Istream&, refinementHistory&);
|
Istream& operator>>(Istream&, refinementHistory&);
|
||||||
@ -122,7 +118,7 @@ public:
|
|||||||
//- Cells this cell was refined into
|
//- Cells this cell was refined into
|
||||||
autoPtr<FixedList<label, 8>> addedCellsPtr_;
|
autoPtr<FixedList<label, 8>> addedCellsPtr_;
|
||||||
|
|
||||||
//- Construct null (parent = -1)
|
//- Default construct (parent = -1)
|
||||||
splitCell8();
|
splitCell8();
|
||||||
|
|
||||||
//- Construct from parent
|
//- Construct from parent
|
||||||
@ -132,14 +128,14 @@ public:
|
|||||||
splitCell8(Istream& is);
|
splitCell8(Istream& is);
|
||||||
|
|
||||||
//- Construct as deep copy
|
//- Construct as deep copy
|
||||||
splitCell8(const splitCell8&);
|
splitCell8(const splitCell8& rhs);
|
||||||
|
|
||||||
//- Copy operator since autoPtr otherwise 'steals' storage.
|
//- Copy assignment (no autoPtr stealing)
|
||||||
void operator=(const splitCell8& s);
|
void operator=(const splitCell8& rhs);
|
||||||
|
|
||||||
bool operator==(const splitCell8& s) const;
|
bool operator==(const splitCell8& rhs) const;
|
||||||
|
|
||||||
bool operator!=(const splitCell8& s) const;
|
bool operator!=(const splitCell8& rhs) const;
|
||||||
|
|
||||||
friend Istream& operator>>(Istream&, splitCell8&);
|
friend Istream& operator>>(Istream&, splitCell8&);
|
||||||
friend Ostream& operator<<(Ostream&, const splitCell8&);
|
friend Ostream& operator<<(Ostream&, const splitCell8&);
|
||||||
@ -148,7 +144,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Is active?
|
//- Is active?
|
||||||
bool active_;
|
bool active_;
|
||||||
@ -221,9 +217,9 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct (read) given an IOobject. If global number of visible
|
//- Construct (read) given an IOobject.
|
||||||
// cells > 0 becomes active
|
// If global number of visible cells > 0 becomes active
|
||||||
refinementHistory(const IOobject&);
|
explicit refinementHistory(const IOobject&);
|
||||||
|
|
||||||
//- Construct (read) or construct from components
|
//- Construct (read) or construct from components
|
||||||
refinementHistory
|
refinementHistory
|
||||||
@ -235,12 +231,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct (read) or construct from initial number of cells
|
//- Construct (read) or construct from initial number of cells
|
||||||
// (all visible). If global number of visible
|
//- (all visible).
|
||||||
// cells > 0 becomes active
|
// If global number of visible cells > 0 becomes active
|
||||||
refinementHistory(const IOobject&, const label nCells);
|
refinementHistory(const IOobject&, const label nCells);
|
||||||
|
|
||||||
//- Construct (read) or construct from initial number of cells
|
//- Construct (read) or construct from initial number of cells
|
||||||
// (all visible) and active flag
|
//- (all visible) and active flag
|
||||||
refinementHistory
|
refinementHistory
|
||||||
(
|
(
|
||||||
const IOobject&,
|
const IOobject&,
|
||||||
@ -251,8 +247,8 @@ public:
|
|||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
refinementHistory(const IOobject&, const refinementHistory&);
|
refinementHistory(const IOobject&, const refinementHistory&);
|
||||||
|
|
||||||
//- Construct from multiple refinement histories. If global number of
|
//- Construct from multiple refinement histories.
|
||||||
// visible cells > 0 becomes active
|
// If global number of visible cells > 0 becomes active
|
||||||
refinementHistory
|
refinementHistory
|
||||||
(
|
(
|
||||||
const IOobject&,
|
const IOobject&,
|
||||||
@ -260,22 +256,22 @@ public:
|
|||||||
const UPtrList<const refinementHistory>&
|
const UPtrList<const refinementHistory>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream. If global number of
|
//- Construct from Istream.
|
||||||
// visible cells > 0 becomes active
|
// If global number of visible cells > 0 becomes active
|
||||||
refinementHistory(const IOobject&, Istream&);
|
explicit refinementHistory(const IOobject&, Istream&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
//- Per cell in the current mesh (i.e. visible) either -1 (unrefined)
|
//- Per cell in the current mesh (i.e. visible) either -1 (unrefined)
|
||||||
// or an index into splitCells.
|
//- or an index into splitCells.
|
||||||
const labelList& visibleCells() const
|
const labelList& visibleCells() const
|
||||||
{
|
{
|
||||||
return visibleCells_;
|
return visibleCells_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Storage for splitCell8s.
|
//- Storage for splitCell8s
|
||||||
const DynamicList<splitCell8>& splitCells() const
|
const DynamicList<splitCell8>& splitCells() const
|
||||||
{
|
{
|
||||||
return splitCells_;
|
return splitCells_;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class bitSet;
|
class bitSet;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChange;
|
class polyTopoChange;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user