db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
75 lines
1.5 KiB
C
75 lines
1.5 KiB
C
// Construct of ptrs to all spray fields
|
|
List<IOField<scalar>* > sprayScalarFieldPtrs
|
|
(
|
|
sprayScalarNames.size(),
|
|
reinterpret_cast<IOField<scalar>*>(NULL)
|
|
);
|
|
|
|
List<IOField<vector>* > sprayVectorFieldPtrs
|
|
(
|
|
sprayVectorNames.size(),
|
|
reinterpret_cast<IOField<vector>*>(NULL)
|
|
);
|
|
|
|
{
|
|
int sprayFieldI = 0;
|
|
|
|
// Set scalar fields
|
|
forAll(sprayScalarNames, fieldI)
|
|
{
|
|
IOobject ioHeader
|
|
(
|
|
sprayScalarNames[fieldI],
|
|
runTime.timeName(),
|
|
"lagrangian",
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
);
|
|
|
|
if (ioHeader.headerOk())
|
|
{
|
|
sprayScalarFieldPtrs[sprayFieldI] = new IOField<scalar>(ioHeader);
|
|
}
|
|
else
|
|
{
|
|
Info<< " dummy lagrangian field for "
|
|
<< sprayScalarNames[fieldI] << endl;
|
|
}
|
|
|
|
sprayFieldI++;
|
|
}
|
|
}
|
|
|
|
|
|
// Set vector fields
|
|
|
|
{
|
|
int sprayFieldI = 0;
|
|
|
|
forAll(sprayVectorNames, fieldI)
|
|
{
|
|
IOobject ioHeader
|
|
(
|
|
sprayVectorNames[fieldI],
|
|
runTime.timeName(),
|
|
"lagrangian",
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
);
|
|
|
|
if (ioHeader.headerOk())
|
|
{
|
|
sprayVectorFieldPtrs[sprayFieldI] = new IOField<vector>(ioHeader);
|
|
}
|
|
else
|
|
{
|
|
Info<< " dummy lagrangian field for "
|
|
<< sprayVectorNames[fieldI] << endl;
|
|
}
|
|
|
|
sprayFieldI++;
|
|
}
|
|
}
|
|
|