Skip to content

Commit

Permalink
Merge branch 'master' into fluid-p2-example
Browse files Browse the repository at this point in the history
  • Loading branch information
jginternational committed May 31, 2024
2 parents 51cb2c9 + 5938b99 commit 2dac437
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 40 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dockers/create-release.sh
Original file line number Diff line number Diff line change
@@ -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 *

4 changes: 2 additions & 2 deletions dockers/deploy.bat
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion dockers/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/Stent/start.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ proc ::Stent::CustomToolbarItems { } {
}

proc ::Stent::BeforeMeshGeneration { size } {
::Structural::BeforeMeshGeneration $size
catch {::Structural::BeforeMeshGeneration $size}
}
10 changes: 0 additions & 10 deletions kratos.gid/apps/Structural/start.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
24 changes: 14 additions & 10 deletions kratos.gid/apps/Structural/write/write.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]
Expand Down
8 changes: 1 addition & 7 deletions kratos.gid/kratos.cnd
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion kratos.gid/kratos.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions kratos.gid/kratos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<Infoproblemtype version="1.0">
<Program>
<Name>Kratos</Name>
<Version>9.4.3</Version>
<Version>9.5.2</Version>
<ExecutableVersion></ExecutableVersion>
<MinimumGiDVersion>16.1.4d</MinimumGiDVersion>
<MaximumGiDVersion>16.1.10d</MaximumGiDVersion>
<MaximumGiDVersion>17.1.99d</MaximumGiDVersion>
<CustomLibAutomatic>0</CustomLibAutomatic>
<CustomLibNativeGroups>1</CustomLibNativeGroups>
<ImageFileBrowser>images/ImageFileBrowser.gif</ImageFileBrowser>
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/kratos_default.spd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -*- coding: utf-8; mode: SGML -*- -->
<Kratos_data version='9.4.3'>
<Kratos_data version='9.4.6'>
<style show_menubutton_about='0' show_menubutton_search='1'></style>
<groups/>
<units></units>
Expand Down
2 changes: 1 addition & 1 deletion tools/create-release.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2dac437

Please sign in to comment.