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"))
|
||||
{
|
||||
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
|
||||
(
|
||||
new bodyMesh
|
||||
(
|
||||
mesh,
|
||||
iter().keyword(),
|
||||
model_.bodyID(iter().keyword()),
|
||||
bodyID,
|
||||
bodyDict
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user