mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Corrected basic source and derived classes I/O
This commit is contained in:
@ -29,25 +29,8 @@ License
|
||||
|
||||
void Foam::explicitSource::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << nl
|
||||
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
|
||||
os.writeKeyword("volumeMode") << volumeModeTypeNames_[volumeMode_]
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
||||
if (scalarFields_.size() > 0)
|
||||
{
|
||||
os.writeKeyword("scalarFields") << scalarFields_
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
if (vectorFields_.size() > 0)
|
||||
{
|
||||
os.writeKeyword("vectorFields") << vectorFields_
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
@ -55,12 +38,8 @@ bool Foam::explicitSource::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
const dictionary& sourceDict = dict.subDict(name());
|
||||
const dictionary& subDictCoeffs = sourceDict.subDict
|
||||
(
|
||||
typeName + "Coeffs"
|
||||
);
|
||||
setFieldData(subDictCoeffs.subDict("fieldData"));
|
||||
coeffs_ = dict.subDict(typeName + "Coeffs");
|
||||
setFieldData(coeffs_.subDict("fieldData"));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user