mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
dynamicCode: the "code" entry is now optional
codedFunctionObject: Added the "codeWrite" entry
for the "write" function for consistency.
The previous method of using the "code" entry for the "write"
function was inconsistent and very confusing.
This commit is contained in:
@ -136,6 +136,21 @@ bool ${typeName}FunctionObject::execute(const bool postProcess)
|
||||
}
|
||||
|
||||
|
||||
bool ${typeName}FunctionObject::write(const bool postProcess)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"write ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeWrite}
|
||||
//}}} end code
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ${typeName}FunctionObject::end()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
@ -151,36 +166,6 @@ bool ${typeName}FunctionObject::end()
|
||||
}
|
||||
|
||||
|
||||
bool ${typeName}FunctionObject::timeSet()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"timeSet ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin codeTime
|
||||
${codeTimeSet}
|
||||
//}}} end code
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ${typeName}FunctionObject::write(const bool postProcess)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"write ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
Reference in New Issue
Block a user