Detect mismatch between maxNodes and Nodes in a gmsh block. Fixes #2342
PiperOrigin-RevId: 745967745 Change-Id: If1b5fcd71079a0e6a6def9b442758678e31a5828
This commit is contained in:
committed by
Copybara-Service
parent
eadd13038a
commit
3429a4881a
@@ -1167,6 +1167,11 @@ void mjCFlexcomp::LoadGMSH41(char* buffer, int binary, int nodeend,
|
||||
throw mjCError(NULL, "All nodes must be in single block");
|
||||
}
|
||||
|
||||
// require maximum number of nodes be equal to maximum number of nodes in a block
|
||||
if (maxNodeTag != numNodesInBlock){
|
||||
throw mjCError(NULL, "Maximum number of nodes must be equal to number of nodes in a block");
|
||||
}
|
||||
|
||||
// check dimensionality and save
|
||||
if (entityDim < 1 || entityDim > 3) {
|
||||
throw mjCError(NULL, "Entity must be 1D, 2D or 3D");
|
||||
|
||||
Reference in New Issue
Block a user