diff --git a/README.md b/README.md index f043a1db0..12940aab0 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ If you need the developer version, you are on the right place. * 4.1- To execute Kratos using the standard pip packages: * Python version recommended: 3.8, 3.9, 3.10, 3.11 * Open a terminal and run - - Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.2` - - Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.2` + - Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6` + - Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6` * 4.2- To execute Kratos using your compiled binaries: * Fill the Kratos preferences windows with - Path to the python folder diff --git a/dockers/create-release.sh b/dockers/create-release.sh index 6fc11066f..98636e6f5 100644 --- a/dockers/create-release.sh +++ b/dockers/create-release.sh @@ -1,12 +1,12 @@ #!/bin/bash # Change directory to the specified directory -cd /tmp/dist/kratos-9.4.2/ +cd /tmp/dist/kratos-9.4.6/ find . -type f -name "*.unix.bat" -print0 | xargs -0 dos2unix # Add execute permission to all .bat files in the directory # chmod 755 *.bat # Create a tgz file from the directory -tar -czf ../kratos-9.4.2-linux-64.tgz * +tar -czf ../kratos-9.4.6-linux-64.tgz * diff --git a/dockers/deploy.bat b/dockers/deploy.bat index 7971a3c36..3b868f017 100644 --- a/dockers/deploy.bat +++ b/dockers/deploy.bat @@ -1,5 +1,5 @@ -set krversion=9.4.2 -set pyversion=3.10.5 +set krversion=9.4.6 +set pyversion=3.11 @REM 3.10.10-alpine3.17 echo "Building kratos %krversion% on python %pyversion%" docker build --build-arg krversion=%krversion% --build-arg pyversion=%pyversion% -t kratos-run:%krversion% -t kratos-run:latest . diff --git a/dockers/dockerfile b/dockers/dockerfile index d501c32a6..0208b8fba 100644 --- a/dockers/dockerfile +++ b/dockers/dockerfile @@ -8,7 +8,7 @@ FROM python:$pyversion # Update pip RUN pip install --upgrade pip -ARG krversion=9.4.2 +ARG krversion=9.4.6 # WORKDIR /tmp # COPY ./wheels/ ./wheels/ diff --git a/kratos.gid/apps/Stent/start.tcl b/kratos.gid/apps/Stent/start.tcl index 4f9b994bf..a6d15e44e 100644 --- a/kratos.gid/apps/Stent/start.tcl +++ b/kratos.gid/apps/Stent/start.tcl @@ -49,5 +49,5 @@ proc ::Stent::CustomToolbarItems { } { } proc ::Stent::BeforeMeshGeneration { size } { - ::Structural::BeforeMeshGeneration $size + catch {::Structural::BeforeMeshGeneration $size} } diff --git a/kratos.gid/apps/Structural/start.tcl b/kratos.gid/apps/Structural/start.tcl index f47d6c34c..a3d83d3ea 100644 --- a/kratos.gid/apps/Structural/start.tcl +++ b/kratos.gid/apps/Structural/start.tcl @@ -22,16 +22,6 @@ proc ::Structural::Init { app } { ::Structural::write::Init } -# Create the old-gid condition relation_line_geo_mesh to link geometry and mesh entities. -# Topic: Local axes, beams -# TODO: remove this when GiD creates this relation automatically -proc ::Structural::BeforeMeshGeneration { size } { - GiD_UnAssignData condition relation_line_geo_mesh Lines all - foreach group [GiD_Groups list] { - GiD_AssignData condition relation_line_geo_mesh Lines {0} [GiD_EntitiesGroups get $group lines] - } -} - # Some conditions applied over small displacement parts must change the topology name... una chufa proc ::Structural::ApplicationSpecificGetCondition {condition group etype nnodes} { return [Structural::write::ApplicationSpecificGetCondition $condition $group $etype $nnodes] diff --git a/kratos.gid/apps/Structural/write/write.tcl b/kratos.gid/apps/Structural/write/write.tcl index 35e818e8c..6a8ce7982 100644 --- a/kratos.gid/apps/Structural/write/write.tcl +++ b/kratos.gid/apps/Structural/write/write.tcl @@ -249,13 +249,6 @@ proc ::Structural::write::writeHinges { } { # format for writing ids set id_f [dict get $write::formats_dict ID] - # Preprocess old_conditions. Each mesh linear element remembers the origin line in geometry - set match_dict [dict create] - foreach line [GiD_Info conditions relation_line_geo_mesh mesh] { - lassign $line E eid - geom_line - dict lappend match_dict $geom_line $eid - } - # Process groups assigned to Hinges if {$::Model::SpatialDimension eq "3D"} { set xp1 "[spdAux::getRoute [GetAttribute nodal_conditions_un]]/condition\[@n = 'CONDENSED_DOF_LIST'\]/group" @@ -297,9 +290,20 @@ proc ::Structural::write::writeHinges { } { # Write Left and Rigth end of each geometrical bar foreach geom_line [GiD_EntitiesGroups get $group lines] { - set linear_elements [dict get $match_dict $geom_line] - set first [::tcl::mathfunc::min {*}$linear_elements] - set end [::tcl::mathfunc::max {*}$linear_elements] + # ask the mesh for the linear elements of this line + # check https://gidsimulation.atlassian.net/wiki/spaces/GCM/pages/2385543949/Geometry + # set linear_elements [lindex [GiD_Geometry get line $geom_line mesh] 4] + # set first [::tcl::mathfunc::min {*}$linear_elements] + # set end [::tcl::mathfunc::max {*}$linear_elements] + + lassign [lrange [GiD_Geometry get line $geom_line] 2 3] first_point end_point + set first [GiD_Geometry get point $first_point node] + set end [GiD_Geometry get point $end_point node] + if {$first eq "" || $end eq ""} { + W "Error: Line $geom_line has no nodes. Please make sure the mesh is attached to the geometry." + continue + } + if {[llength $first_list] > 0} { set value [join $first_list ,] write::WriteString [format "$id_f \[%d\] (%s)" $first [llength $first_list] $value] diff --git a/kratos.gid/kratos.cnd b/kratos.gid/kratos.cnd index 6dd7f98d9..2ea58a13d 100644 --- a/kratos.gid/kratos.cnd +++ b/kratos.gid/kratos.cnd @@ -29,11 +29,5 @@ CANREPEAT: yes QUESTION: pair_name VALUE: - END CONDITION -CONDITION: relation_line_geo_mesh -CONDTYPE: over lines -CONDMESHTYPE: over body elements -CANREPEAT: no -QUESTION: id#FUNC#(NumEntity) -VALUE: 0 -END CONDITION + diff --git a/kratos.gid/kratos.tcl b/kratos.gid/kratos.tcl index 1ba81d304..509d137a6 100644 --- a/kratos.gid/kratos.tcl +++ b/kratos.gid/kratos.tcl @@ -191,7 +191,7 @@ proc Kratos::InitGlobalVariables {dir} { set namespaces [list ] variable pip_packages_required - set pip_packages_required [list KratosMultiphysics-all==9.4.2] + set pip_packages_required [list KratosMultiphysics-all==9.5.1] variable mesh_criteria_forced set mesh_criteria_forced [dict create] diff --git a/kratos.gid/kratos.xml b/kratos.gid/kratos.xml index c0783ad6b..c9f831684 100644 --- a/kratos.gid/kratos.xml +++ b/kratos.gid/kratos.xml @@ -3,10 +3,10 @@ Kratos - 9.4.3 + 9.5.2 16.1.4d - 16.1.10d + 17.1.99d 0 1 images/ImageFileBrowser.gif diff --git a/kratos.gid/kratos_default.spd b/kratos.gid/kratos_default.spd index 018d36850..8f716d7b8 100644 --- a/kratos.gid/kratos_default.spd +++ b/kratos.gid/kratos_default.spd @@ -1,6 +1,6 @@ - + diff --git a/tools/create-release.bat b/tools/create-release.bat index 2413e9930..427666b59 100644 --- a/tools/create-release.bat +++ b/tools/create-release.bat @@ -1,4 +1,4 @@ -set VERSION=9.4.2 +set VERSION=9.4.6 @REM git checkout master @REM git fetch -p @REM git pull -p