updating IO for (previously missed) clouds

This commit is contained in:
andy
2009-09-04 17:49:14 +01:00
parent f9a420cfa9
commit b82e21a815
5 changed files with 19 additions and 45 deletions

View File

@ -47,7 +47,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class indexedParticle Declaration
Class indexedParticle Declaration
\*---------------------------------------------------------------------------*/
class indexedParticle

View File

@ -45,20 +45,17 @@ defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0);
Foam::indexedParticleCloud::indexedParticleCloud
(
const polyMesh& mesh,
const word& cloudName
const word& cloudName,
bool readFields
)
:
Cloud<indexedParticle>(mesh, cloudName, false)
{
indexedParticle::readFields(*this);
if (readFields)
{
indexedParticle::readFields(*this);
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::indexedParticleCloud::writeFields() const
{
indexedParticle::writeFields(*this);
}
// ************************************************************************* //

View File

@ -45,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class indexedParticleCloud Declaration
Class indexedParticleCloud Declaration
\*---------------------------------------------------------------------------*/
class indexedParticleCloud
@ -69,14 +69,9 @@ public:
indexedParticleCloud
(
const polyMesh&,
const word& cloudName = "defaultCloud"
const word& cloudName = "defaultCloud",
bool readFields = true
);
// Member Functions
//- Write fields
virtual void writeFields() const;
};

View File

@ -43,12 +43,16 @@ defineTemplateTypeNameAndDebug(Cloud<passiveParticle>, 0);
Foam::passiveParticleCloud::passiveParticleCloud
(
const polyMesh& mesh,
const word& cloudName
const word& cloudName,
bool readFields
)
:
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);
}
// ************************************************************************* //

View File

@ -45,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class passiveParticleCloud Declaration
Class passiveParticleCloud Declaration
\*---------------------------------------------------------------------------*/
class passiveParticleCloud
@ -72,7 +72,8 @@ public:
passiveParticleCloud
(
const polyMesh&,
const word& cloudName = "defaultCloud"
const word& cloudName = "defaultCloud",
bool readFields = true
);
//- Construct from mesh, cloud name, and a list of particles
@ -82,15 +83,6 @@ public:
const word& cloudName,
const IDLList<passiveParticle>& particles
);
// Member Functions
//- Read fields
virtual void readFields();
//- Write fields
virtual void writeFields() const;
};