Skip to content
Snippets Groups Projects
Commit 31410347 authored by mattijs's avatar mattijs
Browse files

BUG: codedFixed/codedMixed: were only writing out code section so restarts did not work

parent f14dc621
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -329,6 +329,26 @@ void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
os.writeKeyword("redirectType") << redirectType_
<< token::END_STATEMENT << nl;
if (dict_.found("codeInclude"))
{
os.writeKeyword("codeInclude")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["codeInclude"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("localCode"))
{
os.writeKeyword("localCode")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["localCode"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("code"))
{
os.writeKeyword("code")
......@@ -338,10 +358,27 @@ void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
}
if (dict_.found("codeOptions"))
{
os.writeKeyword("codeOptions")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["codeOptions"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("codeLibs"))
{
os.writeKeyword("codeLibs")
<< token::HASH << token::BEGIN_BLOCK;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
os.writeQuoted(string(dict_["codeLibs"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
}
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -341,6 +341,26 @@ void Foam::codedMixedFvPatchField<Type>::write(Ostream& os) const
os.writeKeyword("redirectType") << redirectType_
<< token::END_STATEMENT << nl;
if (dict_.found("codeInclude"))
{
os.writeKeyword("codeInclude")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["codeInclude"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("localCode"))
{
os.writeKeyword("localCode")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["localCode"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("code"))
{
os.writeKeyword("code")
......@@ -350,6 +370,26 @@ void Foam::codedMixedFvPatchField<Type>::write(Ostream& os) const
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("codeOptions"))
{
os.writeKeyword("codeOptions")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["codeOptions"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
if (dict_.found("codeLibs"))
{
os.writeKeyword("codeLibs")
<< token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(string(dict_["codeLibs"]), false)
<< token::HASH << token::END_BLOCK
<< token::END_STATEMENT << nl;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment