Skip to content

Commit 89f2d2f

Browse files
minor buoyancy 2d
1 parent 44cd723 commit 89f2d2f

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

kratos.gid/apps/Buoyancy/examples/examples.tcl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ proc Buoyancy::examples::Init { } {
77
}
88

99
proc Buoyancy::examples::UpdateMenus { } {
10-
GiDMenu::InsertOption "Kratos" [list "---"] 8 PRE "" "" "" insertafter =
11-
GiDMenu::InsertOption "Kratos" [list "Heated square" ] 8 PRE [list ::Buoyancy::examples::HeatedSquare] "" "" insertafter =
12-
GiDMenu::UpdateMenus
10+
if {$::Model::SpatialDimension eq "2D"} {
11+
GiDMenu::InsertOption "Kratos" [list "---"] 8 PRE "" "" "" insertafter =
12+
GiDMenu::InsertOption "Kratos" [list "Heated square" ] 8 PRE [list ::Buoyancy::examples::HeatedSquare] "" "" insertafter =
13+
GiDMenu::UpdateMenus
14+
}
1315
}
1416

1517
Buoyancy::examples::Init

kratos.gid/apps/Buoyancy/start.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ proc ::Buoyancy::GetAttribute {name} {
5858

5959
proc ::Buoyancy::CustomToolbarItems { } {
6060
variable dir
61-
Kratos::ToolbarAddItem "Example" "example.png" [list -np- ::Buoyancy::examples::HeatedSquare] [= "Example\nBuoyancy driven cavity flow (Ra = 1e6 - Pr = 0.71)"]
61+
62+
if {$::Model::SpatialDimension eq "2D"} {
63+
Kratos::ToolbarAddItem "Example" "example.png" [list -np- ::Buoyancy::examples::HeatedSquare] [= "Example\nBuoyancy driven cavity flow (Ra = 1e6 - Pr = 0.71)"]
64+
}
6265
}
6366

6467
::Buoyancy::Init

0 commit comments

Comments
 (0)