mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rigidBodyMeshMotion: Check for attempted assignment of patches to a merged body
This commit is contained in:
@ -130,13 +130,24 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
|||||||
|
|
||||||
if (bodyDict.found("patches"))
|
if (bodyDict.found("patches"))
|
||||||
{
|
{
|
||||||
|
const label bodyID = model_.bodyID(iter().keyword());
|
||||||
|
|
||||||
|
if (bodyID == -1)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Body " << iter().keyword()
|
||||||
|
<< " has been merged with another body"
|
||||||
|
" and cannot be assigned a set of patches"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
bodyMeshes_.append
|
bodyMeshes_.append
|
||||||
(
|
(
|
||||||
new bodyMesh
|
new bodyMesh
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
iter().keyword(),
|
iter().keyword(),
|
||||||
model_.bodyID(iter().keyword()),
|
bodyID,
|
||||||
bodyDict
|
bodyDict
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user