Commit 7d61b870 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: injectedParticle/Cloud updates

parent 87056a23
......@@ -33,4 +33,30 @@ namespace Foam
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::injectedParticle::injectedParticle(const injectedParticle& p)
:
particle(p),
tag_(p.tag_),
soi_(p.soi_),
d_(p.d_),
U_(p.U_)
{}
Foam::injectedParticle::injectedParticle
(
const injectedParticle& p,
const polyMesh& mesh
)
:
particle(p, mesh),
tag_(p.tag_),
soi_(p.soi_),
d_(p.d_),
U_(p.U_)
{}
// ************************************************************************* //
......@@ -48,6 +48,16 @@ Foam::injectedParticleCloud::injectedParticleCloud
}
Foam::injectedParticleCloud::injectedParticleCloud
(
const injectedParticleCloud& c,
const word& cloudName
)
:
Cloud<injectedParticle>(c.pMesh(), cloudName, c)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::injectedParticleCloud::~injectedParticleCloud()
......
......@@ -69,7 +69,7 @@ public:
// Constructors
//-
//- Construct from mesh and cloud name
injectedParticleCloud
(
const polyMesh& mesh,
......@@ -77,6 +77,18 @@ public:
const bool readFields = true
);
//- Copy constructor with new name
injectedParticleCloud(const injectedParticleCloud& c, const word& name);
//- Construct and return clone based on (this) with new name
virtual autoPtr<injectedParticleCloud> clone(const word& name) const
{
return autoPtr<injectedParticleCloud>
(
new injectedParticleCloud(*this, name)
);
}
//- Destructor
virtual ~injectedParticleCloud();
......
......@@ -202,7 +202,7 @@ Foam::Ostream& Foam::operator<<
os << static_cast<const particle&>(p);
os.write
(
reinterpret_cast<const char*>(&p.soi_),
reinterpret_cast<const char*>(&p.tag_),
injectedParticle::sizeofFields
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment