mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
updating IO for (previously missed) clouds
This commit is contained in:
@ -47,7 +47,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class indexedParticle Declaration
|
Class indexedParticle Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class indexedParticle
|
class indexedParticle
|
||||||
|
|||||||
@ -45,20 +45,17 @@ defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0);
|
|||||||
Foam::indexedParticleCloud::indexedParticleCloud
|
Foam::indexedParticleCloud::indexedParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<indexedParticle>(mesh, cloudName, false)
|
Cloud<indexedParticle>(mesh, cloudName, false)
|
||||||
{
|
{
|
||||||
indexedParticle::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
indexedParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::indexedParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
indexedParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class indexedParticleCloud Declaration
|
Class indexedParticleCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class indexedParticleCloud
|
class indexedParticleCloud
|
||||||
@ -69,14 +69,9 @@ public:
|
|||||||
indexedParticleCloud
|
indexedParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const polyMesh&,
|
||||||
const word& cloudName = "defaultCloud"
|
const word& cloudName = "defaultCloud",
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,12 +43,16 @@ defineTemplateTypeNameAndDebug(Cloud<passiveParticle>, 0);
|
|||||||
Foam::passiveParticleCloud::passiveParticleCloud
|
Foam::passiveParticleCloud::passiveParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<passiveParticle>(mesh, cloudName, false)
|
Cloud<passiveParticle>(mesh, cloudName, false)
|
||||||
{
|
{
|
||||||
readFields();
|
if (readFields)
|
||||||
|
{
|
||||||
|
passiveParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,18 +67,4 @@ Foam::passiveParticleCloud::passiveParticleCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::passiveParticleCloud::readFields()
|
|
||||||
{
|
|
||||||
passiveParticle::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::passiveParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
passiveParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class passiveParticleCloud Declaration
|
Class passiveParticleCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class passiveParticleCloud
|
class passiveParticleCloud
|
||||||
@ -72,7 +72,8 @@ public:
|
|||||||
passiveParticleCloud
|
passiveParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const polyMesh&,
|
||||||
const word& cloudName = "defaultCloud"
|
const word& cloudName = "defaultCloud",
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from mesh, cloud name, and a list of particles
|
//- Construct from mesh, cloud name, and a list of particles
|
||||||
@ -82,15 +83,6 @@ public:
|
|||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const IDLList<passiveParticle>& particles
|
const IDLList<passiveParticle>& particles
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Read fields
|
|
||||||
virtual void readFields();
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user