Commit c7560ad8 authored by mattijs's avatar mattijs
Browse files

ENH: cyclicPolyPatch : disallow non-uniform rotational cyclic

parent bb81cc9f
......@@ -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_;
}
......
Markdown is supported
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