Skip to content

Commit 51cb2c9

Browse files
do not mesh if incompatible
1 parent 413aa02 commit 51cb2c9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

kratos.gid/kratos.tcl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ proc Kratos::Event_BeforeMeshGeneration {elementsize} {
454454
}
455455

456456
# Change the mesh settings depending on the element requirements
457-
catch {Kratos::CheckMeshCriteria $elementsize}
457+
if {[Kratos::CheckMeshCriteria $elementsize]<0} {
458+
return "-cancel-"
459+
}
458460

459461
# Maybe the current application needs to do some extra job
460462
set ret [apps::ExecuteOnCurrentApp BeforeMeshGeneration $elementsize]

kratos.gid/scripts/Utils.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ proc Kratos::CheckMeshCriteria { elementsize } {
311311
} else {
312312
if {$forced_mesh_order ne $element_forces} {
313313
# W "The element $element_id requires a different mesh order"
314-
error "Incompatible mesh orders in elements"
314+
W "Incompatible mesh orders in elements"
315+
return -1
315316
}
316317
}
317318
}

0 commit comments

Comments
 (0)