Skip to content

Commit 2dac437

Browse files
Merge branch 'master' into fluid-p2-example
2 parents 51cb2c9 + 5938b99 commit 2dac437

12 files changed

Lines changed: 28 additions & 40 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ If you need the developer version, you are on the right place.
2525
* 4.1- To execute Kratos using the standard pip packages:
2626
* Python version recommended: 3.8, 3.9, 3.10, 3.11
2727
* Open a terminal and run
28-
- Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.2`
29-
- Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.2`
28+
- Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6`
29+
- Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6`
3030
* 4.2- To execute Kratos using your compiled binaries:
3131
* Fill the Kratos preferences windows with
3232
- Path to the python folder

dockers/create-release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
22

33
# Change directory to the specified directory
4-
cd /tmp/dist/kratos-9.4.2/
4+
cd /tmp/dist/kratos-9.4.6/
55
find . -type f -name "*.unix.bat" -print0 | xargs -0 dos2unix
66

77
# Add execute permission to all .bat files in the directory
88
# chmod 755 *.bat
99

1010
# Create a tgz file from the directory
11-
tar -czf ../kratos-9.4.2-linux-64.tgz *
11+
tar -czf ../kratos-9.4.6-linux-64.tgz *
1212

dockers/deploy.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
set krversion=9.4.2
2-
set pyversion=3.10.5
1+
set krversion=9.4.6
2+
set pyversion=3.11
33
@REM 3.10.10-alpine3.17
44
echo "Building kratos %krversion% on python %pyversion%"
55
docker build --build-arg krversion=%krversion% --build-arg pyversion=%pyversion% -t kratos-run:%krversion% -t kratos-run:latest .

dockers/dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FROM python:$pyversion
88
# Update pip
99
RUN pip install --upgrade pip
1010

11-
ARG krversion=9.4.2
11+
ARG krversion=9.4.6
1212

1313
# WORKDIR /tmp
1414
# COPY ./wheels/ ./wheels/

kratos.gid/apps/Stent/start.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ proc ::Stent::CustomToolbarItems { } {
4949
}
5050

5151
proc ::Stent::BeforeMeshGeneration { size } {
52-
::Structural::BeforeMeshGeneration $size
52+
catch {::Structural::BeforeMeshGeneration $size}
5353
}

kratos.gid/apps/Structural/start.tcl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ proc ::Structural::Init { app } {
2222
::Structural::write::Init
2323
}
2424

25-
# Create the old-gid condition relation_line_geo_mesh to link geometry and mesh entities.
26-
# Topic: Local axes, beams
27-
# TODO: remove this when GiD creates this relation automatically
28-
proc ::Structural::BeforeMeshGeneration { size } {
29-
GiD_UnAssignData condition relation_line_geo_mesh Lines all
30-
foreach group [GiD_Groups list] {
31-
GiD_AssignData condition relation_line_geo_mesh Lines {0} [GiD_EntitiesGroups get $group lines]
32-
}
33-
}
34-
3525
# Some conditions applied over small displacement parts must change the topology name... una chufa
3626
proc ::Structural::ApplicationSpecificGetCondition {condition group etype nnodes} {
3727
return [Structural::write::ApplicationSpecificGetCondition $condition $group $etype $nnodes]

kratos.gid/apps/Structural/write/write.tcl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ proc ::Structural::write::writeHinges { } {
249249
# format for writing ids
250250
set id_f [dict get $write::formats_dict ID]
251251

252-
# Preprocess old_conditions. Each mesh linear element remembers the origin line in geometry
253-
set match_dict [dict create]
254-
foreach line [GiD_Info conditions relation_line_geo_mesh mesh] {
255-
lassign $line E eid - geom_line
256-
dict lappend match_dict $geom_line $eid
257-
}
258-
259252
# Process groups assigned to Hinges
260253
if {$::Model::SpatialDimension eq "3D"} {
261254
set xp1 "[spdAux::getRoute [GetAttribute nodal_conditions_un]]/condition\[@n = 'CONDENSED_DOF_LIST'\]/group"
@@ -297,9 +290,20 @@ proc ::Structural::write::writeHinges { } {
297290

298291
# Write Left and Rigth end of each geometrical bar
299292
foreach geom_line [GiD_EntitiesGroups get $group lines] {
300-
set linear_elements [dict get $match_dict $geom_line]
301-
set first [::tcl::mathfunc::min {*}$linear_elements]
302-
set end [::tcl::mathfunc::max {*}$linear_elements]
293+
# ask the mesh for the linear elements of this line
294+
# check https://gidsimulation.atlassian.net/wiki/spaces/GCM/pages/2385543949/Geometry
295+
# set linear_elements [lindex [GiD_Geometry get line $geom_line mesh] 4]
296+
# set first [::tcl::mathfunc::min {*}$linear_elements]
297+
# set end [::tcl::mathfunc::max {*}$linear_elements]
298+
299+
lassign [lrange [GiD_Geometry get line $geom_line] 2 3] first_point end_point
300+
set first [GiD_Geometry get point $first_point node]
301+
set end [GiD_Geometry get point $end_point node]
302+
if {$first eq "" || $end eq ""} {
303+
W "Error: Line $geom_line has no nodes. Please make sure the mesh is attached to the geometry."
304+
continue
305+
}
306+
303307
if {[llength $first_list] > 0} {
304308
set value [join $first_list ,]
305309
write::WriteString [format "$id_f \[%d\] (%s)" $first [llength $first_list] $value]

kratos.gid/kratos.cnd

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,5 @@ CANREPEAT: yes
2929
QUESTION: pair_name
3030
VALUE: -
3131
END CONDITION
32-
CONDITION: relation_line_geo_mesh
33-
CONDTYPE: over lines
34-
CONDMESHTYPE: over body elements
35-
CANREPEAT: no
36-
QUESTION: id#FUNC#(NumEntity)
37-
VALUE: 0
38-
END CONDITION
32+
3933

kratos.gid/kratos.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ proc Kratos::InitGlobalVariables {dir} {
191191
set namespaces [list ]
192192

193193
variable pip_packages_required
194-
set pip_packages_required [list KratosMultiphysics-all==9.4.2]
194+
set pip_packages_required [list KratosMultiphysics-all==9.5.1]
195195

196196
variable mesh_criteria_forced
197197
set mesh_criteria_forced [dict create]

kratos.gid/kratos.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<Infoproblemtype version="1.0">
44
<Program>
55
<Name>Kratos</Name>
6-
<Version>9.4.3</Version>
6+
<Version>9.5.2</Version>
77
<ExecutableVersion></ExecutableVersion>
88
<MinimumGiDVersion>16.1.4d</MinimumGiDVersion>
9-
<MaximumGiDVersion>16.1.10d</MaximumGiDVersion>
9+
<MaximumGiDVersion>17.1.99d</MaximumGiDVersion>
1010
<CustomLibAutomatic>0</CustomLibAutomatic>
1111
<CustomLibNativeGroups>1</CustomLibNativeGroups>
1212
<ImageFileBrowser>images/ImageFileBrowser.gif</ImageFileBrowser>

0 commit comments

Comments
 (0)