ENH: cyclicPolyPatch : disallow non-uniform rotational cyclic

This commit is contained in:
mattijs
2010-12-13 16:09:08 +00:00
parent bb81cc9f07
commit c7560ad8b6

View File

@ -273,6 +273,28 @@ void Foam::cyclicPolyPatch::calcTransforms
half1Normals,
half0Tols
);
if (transform_ == ROTATIONAL && !parallel() && forwardT().size() > 1)
{
const_cast<tensorField&>(forwardT()).setSize(1);
const_cast<tensorField&>(reverseT()).setSize(1);
const_cast<boolList&>(collocated()).setSize(1);
WarningIn
(
"cyclicPolyPatch::calcTransforms\n"
" (\n"
" const primitivePatch&,\n"
" const UList<point>&,\n"
" const UList<point>&,\n"
" const UList<point>&,\n"
" const UList<point>&\n"
" )"
) << "For transform " << transformTypeNames[transform_]
<< " found non-uniform transform."
<< " Setting the transformation to be a uniform rotation."
<< endl;
}
}
}
@ -851,22 +873,6 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledPoints() const
str<< "l " << vertI-1 << ' ' << vertI << nl;
}
}
// Remove any addressing calculated for the coupled edges calculation
const_cast<primitivePatch&>
(
static_cast<const primitivePatch&>
(
*this
)
).clearOut();
const_cast<primitivePatch&>
(
static_cast<const primitivePatch&>
(
neighbPatch()
)
).clearOut();
}
return *coupledPointsPtr_;
}
@ -1006,22 +1012,6 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const
str<< "l " << vertI-1 << ' ' << vertI << nl;
}
}
// Remove any addressing calculated for the coupled edges calculation
const_cast<primitivePatch&>
(
static_cast<const primitivePatch&>
(
*this
)
).clearOut();
const_cast<primitivePatch&>
(
static_cast<const primitivePatch&>
(
neighbPatch
)
).clearOut();
}
return *coupledEdgesPtr_;
}