mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: reconstructPar: delay locating positions. Fixes #2205.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017, 2020 OpenFOAM Foundation
|
Copyright (C) 2011-2017, 2020 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -295,6 +295,17 @@ protected:
|
|||||||
|
|
||||||
// Patch interactions
|
// Patch interactions
|
||||||
|
|
||||||
|
//- Read particle from stream. Optionally (for old format) return
|
||||||
|
// read position. Used by construct-from-Istream
|
||||||
|
void readData
|
||||||
|
(
|
||||||
|
Istream& is,
|
||||||
|
point& position,
|
||||||
|
const bool readFields,
|
||||||
|
const bool newFormat,
|
||||||
|
const bool doLocate
|
||||||
|
);
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a patch.
|
//- Overridable function to handle the particle hitting a patch.
|
||||||
// Executed before other patch-hitting functions.
|
// Executed before other patch-hitting functions.
|
||||||
template<class TrackCloudType>
|
template<class TrackCloudType>
|
||||||
@ -399,8 +410,9 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
Istream&,
|
Istream&,
|
||||||
bool readFields = true,
|
const bool readFields = true,
|
||||||
bool newFormat = true
|
const bool newFormat = true,
|
||||||
|
const bool doLocate = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct as a copy
|
//- Construct as a copy
|
||||||
|
|||||||
@ -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-2019,2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -50,8 +50,9 @@ Foam::particle::particle
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
bool readFields,
|
const bool readFields,
|
||||||
bool newFormat
|
const bool newFormat,
|
||||||
|
const bool doLocate
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
@ -63,6 +64,22 @@ Foam::particle::particle
|
|||||||
stepFraction_(0.0),
|
stepFraction_(0.0),
|
||||||
origProc_(Pstream::myProcNo()),
|
origProc_(Pstream::myProcNo()),
|
||||||
origId_(-1)
|
origId_(-1)
|
||||||
|
{
|
||||||
|
point position;
|
||||||
|
readData(is, position, readFields, newFormat, doLocate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::particle::readData
|
||||||
|
(
|
||||||
|
Istream& is,
|
||||||
|
point& position,
|
||||||
|
const bool readFields,
|
||||||
|
const bool newFormat,
|
||||||
|
const bool doLocate
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (newFormat)
|
if (newFormat)
|
||||||
{
|
{
|
||||||
@ -178,6 +195,11 @@ Foam::particle::particle
|
|||||||
origId_ = p.origId;
|
origId_ = p.origId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Preserve read position
|
||||||
|
position = p.position;
|
||||||
|
|
||||||
|
if (doLocate)
|
||||||
|
{
|
||||||
locate
|
locate
|
||||||
(
|
(
|
||||||
p.position,
|
p.position,
|
||||||
@ -187,6 +209,7 @@ Foam::particle::particle
|
|||||||
"Particle initialised with a location outside of the mesh."
|
"Particle initialised with a location outside of the mesh."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
is.check(FUNCTION_NAME);
|
is.check(FUNCTION_NAME);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
processorMeshes.C
|
processorMeshes.C
|
||||||
fvFieldReconstructor.C
|
fvFieldReconstructor.C
|
||||||
pointFieldReconstructor.C
|
pointFieldReconstructor.C
|
||||||
|
passivePositionParticleCloud.C
|
||||||
lagrangianReconstructor.C
|
lagrangianReconstructor.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libreconstruct
|
LIB = $(FOAM_LIBBIN)/libreconstruct
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018,2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,8 +27,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "lagrangianReconstructor.H"
|
#include "lagrangianReconstructor.H"
|
||||||
#include "labelIOList.H"
|
#include "passivePositionParticleCloud.H"
|
||||||
#include "passiveParticleCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -54,11 +53,11 @@ Foam::label Foam::lagrangianReconstructor::reconstructPositions
|
|||||||
const word& cloudName
|
const word& cloudName
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
passiveParticleCloud lagrangianPositions
|
passivePositionParticleCloud lagrangianPositions
|
||||||
(
|
(
|
||||||
mesh_,
|
mesh_,
|
||||||
cloudName,
|
cloudName,
|
||||||
IDLList<passiveParticle>()
|
IDLList<passivePositionParticle>()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(procMeshes_, meshi)
|
forAll(procMeshes_, meshi)
|
||||||
@ -66,21 +65,41 @@ Foam::label Foam::lagrangianReconstructor::reconstructPositions
|
|||||||
const labelList& cellMap = cellProcAddressing_[meshi];
|
const labelList& cellMap = cellProcAddressing_[meshi];
|
||||||
const labelList& faceMap = faceProcAddressing_[meshi];
|
const labelList& faceMap = faceProcAddressing_[meshi];
|
||||||
|
|
||||||
Cloud<passiveParticle> lpi(procMeshes_[meshi], cloudName, false);
|
// Use a special particle that does not try to find the particle on
|
||||||
|
// the mesh. This is to be able to handle particles originating
|
||||||
|
// from a different processor. This can happen with some
|
||||||
|
// functionObjects - e.g. extractEulerianParticles.
|
||||||
|
// These particles should be
|
||||||
|
// - written in the old format
|
||||||
|
passivePositionParticleCloud lpi(procMeshes_[meshi], cloudName, false);
|
||||||
|
|
||||||
forAllConstIters(lpi, iter)
|
forAllConstIters(lpi, iter)
|
||||||
{
|
{
|
||||||
const passiveParticle& ppi = *iter;
|
const passivePositionParticle& ppi = *iter;
|
||||||
|
|
||||||
const label mappedCell = cellMap[ppi.cell()];
|
const label mappedCell =
|
||||||
|
(
|
||||||
|
(ppi.cell() >= 0)
|
||||||
|
? cellMap[ppi.cell()]
|
||||||
|
: -1
|
||||||
|
);
|
||||||
|
|
||||||
// Inverting sign if necessary and subtracting 1 from
|
// Inverting sign if necessary and subtracting 1 from
|
||||||
// faceProcAddressing
|
// faceProcAddressing
|
||||||
const label mappedTetFace = mag(faceMap[ppi.tetFace()]) - 1;
|
const label mappedTetFace =
|
||||||
|
(
|
||||||
|
(ppi.tetFace() >= 0)
|
||||||
|
? mag(faceMap[ppi.tetFace()]) - 1
|
||||||
|
: -1
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((ppi.cell() >= 0) && (ppi.tetFace() >= 0))
|
||||||
|
{
|
||||||
|
// cell,face succesfully mapped. Coordinates inside the cell
|
||||||
|
// should be same
|
||||||
lagrangianPositions.append
|
lagrangianPositions.append
|
||||||
(
|
(
|
||||||
new passiveParticle
|
new passivePositionParticle
|
||||||
(
|
(
|
||||||
mesh_,
|
mesh_,
|
||||||
ppi.coordinates(),
|
ppi.coordinates(),
|
||||||
@ -90,14 +109,29 @@ Foam::label Foam::lagrangianReconstructor::reconstructPositions
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// No valid coordinates. Use built-in locating from cell -1
|
||||||
|
lagrangianPositions.append
|
||||||
|
(
|
||||||
|
new passivePositionParticle
|
||||||
|
(
|
||||||
|
mesh_,
|
||||||
|
ppi.location(),
|
||||||
|
mappedCell
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOPosition<Cloud<passiveParticle>>(lagrangianPositions).write();
|
|
||||||
|
IOPosition<passivePositionParticleCloud>(lagrangianPositions).write();
|
||||||
|
|
||||||
// Force writing of "positions" too, if specified via the InfoSwitch
|
// Force writing of "positions" too, if specified via the InfoSwitch
|
||||||
if (particle::writeLagrangianPositions)
|
if (particle::writeLagrangianPositions)
|
||||||
{
|
{
|
||||||
IOPosition<Cloud<passiveParticle>>
|
IOPosition<passivePositionParticleCloud>
|
||||||
(
|
(
|
||||||
lagrangianPositions,
|
lagrangianPositions,
|
||||||
cloud::geometryType::POSITIONS
|
cloud::geometryType::POSITIONS
|
||||||
|
|||||||
182
src/parallel/reconstruct/reconstruct/passivePositionParticle.H
Normal file
182
src/parallel/reconstruct/reconstruct/passivePositionParticle.H
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::passivePositionParticle
|
||||||
|
|
||||||
|
Description
|
||||||
|
Copy of base particle but without particle locating and preserving
|
||||||
|
read location.
|
||||||
|
|
||||||
|
Used in reconstructing lagrangian positions generated outside the
|
||||||
|
mesh domain (can happen in extractEulerianParticles functionObject)
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
passivePositionParticle.H
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef passivePositionParticle_H
|
||||||
|
#define passivePositionParticle_H
|
||||||
|
|
||||||
|
#include "particle.H"
|
||||||
|
#include "IOstream.H"
|
||||||
|
#include "autoPtr.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class passivePositionParticle Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class passivePositionParticle
|
||||||
|
:
|
||||||
|
public particle
|
||||||
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Raw location
|
||||||
|
point location_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
passivePositionParticle
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const barycentric& coordinates,
|
||||||
|
const label celli,
|
||||||
|
const label tetFacei,
|
||||||
|
const label tetPti
|
||||||
|
)
|
||||||
|
:
|
||||||
|
particle(mesh, coordinates, celli, tetFacei, tetPti),
|
||||||
|
location_(position())
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct from a position and a cell.
|
||||||
|
// Searches for the rest of the required topology.
|
||||||
|
passivePositionParticle
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const vector& position,
|
||||||
|
const label celli = -1
|
||||||
|
)
|
||||||
|
:
|
||||||
|
particle(mesh, position, celli),
|
||||||
|
location_(position)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct from Istream
|
||||||
|
passivePositionParticle
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
Istream& is,
|
||||||
|
const bool readFields = true,
|
||||||
|
const bool newFormat = true
|
||||||
|
)
|
||||||
|
:
|
||||||
|
//particle(mesh, is, readFields, newFormat)
|
||||||
|
particle
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
Zero, // position
|
||||||
|
-1, // celli
|
||||||
|
-1, // tetFacei
|
||||||
|
-1, // tetPti
|
||||||
|
false // doLocate
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readData
|
||||||
|
(
|
||||||
|
is,
|
||||||
|
location_,
|
||||||
|
readFields,
|
||||||
|
newFormat,
|
||||||
|
false //doLocate
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
passivePositionParticle(const passivePositionParticle& p)
|
||||||
|
:
|
||||||
|
particle(p)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual autoPtr<particle> clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<particle>(new passivePositionParticle(*this));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Factory class to read-construct particles (for parallel transfer)
|
||||||
|
class iNew
|
||||||
|
{
|
||||||
|
const polyMesh& mesh_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
iNew(const polyMesh& mesh)
|
||||||
|
:
|
||||||
|
mesh_(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
autoPtr<passivePositionParticle> operator()(Istream& is) const
|
||||||
|
{
|
||||||
|
return autoPtr<passivePositionParticle>::New(mesh_, is, true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return current particle position
|
||||||
|
inline const point& location() const
|
||||||
|
{
|
||||||
|
return location_;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "passivePositionParticleCloud.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTemplateTypeNameAndDebug(Cloud<passivePositionParticle>, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::passivePositionParticleCloud::passivePositionParticleCloud
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Cloud<passivePositionParticle>(mesh, cloudName, false)
|
||||||
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
passivePositionParticle::readFields(*this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::passivePositionParticleCloud::passivePositionParticleCloud
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const word& cloudName,
|
||||||
|
const IDLList<passivePositionParticle>& particles
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Cloud<passivePositionParticle>(mesh, cloudName, particles)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::passivePositionParticleCloud
|
||||||
|
|
||||||
|
Description
|
||||||
|
A Cloud of passive particles
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
passivePositionParticleCloud.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef passivePositionParticleCloud_H
|
||||||
|
#define passivePositionParticleCloud_H
|
||||||
|
|
||||||
|
#include "Cloud.H"
|
||||||
|
#include "passivePositionParticle.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class passivePositionParticleCloud Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class passivePositionParticleCloud
|
||||||
|
:
|
||||||
|
public Cloud<passivePositionParticle>
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
passivePositionParticleCloud(const passivePositionParticleCloud&) =
|
||||||
|
delete;
|
||||||
|
|
||||||
|
//- No copy assignment
|
||||||
|
void operator=(const passivePositionParticleCloud&) = delete;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct given mesh
|
||||||
|
explicit passivePositionParticleCloud
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const word& cloudName = cloud::defaultName,
|
||||||
|
bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from mesh, cloud name, and a list of particles
|
||||||
|
passivePositionParticleCloud
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const word& cloudName,
|
||||||
|
const IDLList<passivePositionParticle>& particles
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user