BUG: Corrections to AMI patch output when projecting to intermediate surface

This commit is contained in:
andy
2012-01-18 11:53:41 +00:00
parent a7e19a9632
commit f2e98ffb26
2 changed files with 13 additions and 10 deletions

View File

@ -366,7 +366,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL),
AMIReverse_(false),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(fileName("surface"))
{
// Neighbour patch might not be valid yet so no transformation
// calculation possible
@ -474,7 +474,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL),
AMIReverse_(pp.AMIReverse_),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(pp.surfDict_)
{
// Neighbour patch might not be valid yet so no transformation
// calculation possible
@ -501,7 +501,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL),
AMIReverse_(pp.AMIReverse_),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(pp.surfDict_)
{
if (nbrPatchName_ == name())
{
@ -825,7 +825,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
<< token::END_STATEMENT << nl;
}
if (surfDict_ != dictionary::null)
if (!surfDict_.empty())
{
os.writeKeyword(surfDict_.dictName());
os << surfDict_;

View File

@ -798,7 +798,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL),
AMIReverse_(false),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(fileName("surface"))
{}
@ -824,7 +824,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL),
AMIReverse_(false),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(fileName("surface"))
{}
@ -850,7 +850,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL),
AMIReverse_(false),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(fileName("surface"))
{}
@ -876,7 +876,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL),
AMIReverse_(false),
surfPtr_(NULL),
surfDict_(dictionary::null)
surfDict_(fileName("surface"))
{}
@ -1216,8 +1216,11 @@ void Foam::mappedPatchBase::write(Ostream& os) const
<< token::END_STATEMENT << nl;
}
os.writeKeyword(surfDict_.dictName());
os << surfDict_;
if (!surfDict_.empty())
{
os.writeKeyword(surfDict_.dictName());
os << surfDict_;
}
}
}