Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kratos.gid/apps/Buoyancy/xml/Procs.spd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
lappend arguments "SolutionType" $solutionType
#W "arguments $arguments"
set Sols [::Model::GetSolutionStrategies $arguments ]
set ids [list ]
set ids [list ]
foreach ss $Sols {
lappend ids [$ss getName]
append names [$ss getName] ","
Expand Down
22 changes: 12 additions & 10 deletions kratos.gid/exec/compiled.unix.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/bin/bash
# OutputFile: "$2/$1.info"
# ErrorFile: "$2/$1.err"

cd "$case_path"

#delete previous result file
rm -f "$2/$1*.post.bin"
rm -f "$2/$1*.post.res"
rm -f "$2/$1*.post.msh"
rm -f "$2/$1.info"
rm -f "$2/$1.err"
rm -f "$2/$1.flavia.dat"
rm -fr "$2/gid_output"
rm -fr "$2/vtk_output"
rm -f "$case_path/$1*.post.bin"
rm -f "$case_path/$1*.post.res"
rm -f "$case_path/$1*.post.msh"
rm -f "$case_path/$1.info"
rm -f "$case_path/$1.err"
rm -f "$case_path/$1.flavia.dat"
rm -fr "$case_path/gid_output"
rm -fr "$case_path/vtk_output"

# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
Expand All @@ -36,6 +39,5 @@ export PYTHONHOME=$python_home

KERNEL_NAME="linux"


# Run Python using the script MainKratos.py
$python_path MainKratos.py > "$2/$1.info" 2> "$2/$1.err"
$python_path MainKratos.py > "$case_path/$1.info" 2> "$case_path/$1.err"
25 changes: 14 additions & 11 deletions kratos.gid/exec/compiled.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ REM Problem directory = %3
REM OutputFile: "%2\%1.info"
REM ErrorFile: "%2\%1.err"

DEL "%2\%1.info"
DEL "%2\%1.err"
DEL "%2\%1*.post.bin"
DEL "%2\%1*.post.res"
DEL "%2\%1*.post.msh"
DEL "%2\%1.info"
DEL "%2\%1.err"
DEL "%2\%1.flavia.dat"
DEL "%2\gid_output"
DEL "%2\vtk_output"
cd %case_path%

DEL "%case_path%\%1.info"
DEL "%case_path%\%1.err"
DEL "%case_path%\%1*.post.bin"
DEL "%case_path%\%1*.post.res"
DEL "%case_path%\%1*.post.msh"
DEL "%case_path%\%1.info"
DEL "%case_path%\%1.err"
DEL "%case_path%\%1.flavia.dat"
DEL "%case_path%\gid_output"
DEL "%case_path%\vtk_output"

@REM echo "Launching on Compiled for windows -> %kratos_bin_path%" > .run

set PATH=%kratos_bin_path%\libs;%PATH%
set PYTHONPATH=%kratos_bin_path%
set PYTHONHOME=%python_home%


REM Run Python using the script MainKratos.py
%python_path% MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
%python_path% MainKratos.py > "%case_path%\\%1.info" 2> "%case_path%\\%1.err"
21 changes: 11 additions & 10 deletions kratos.gid/exec/docker.unix.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash
# OutputFile: "$2/$1.info"
# ErrorFile: "$2/$1.err"
# OutputFile: "$case_path/$1.info"
# ErrorFile: "$case_path/$1.err"
#delete previous result file
rm -f "$2/$1*.post.bin"
rm -f "$2/$1*.post.res"
rm -f "$2/$1*.post.msh"
rm -f "$2/$1.info"
rm -f "$2/$1.err"
rm -f "$2/$1.flavia.dat"
cd "$case_path"
rm -f "$case_path/$1*.post.bin"
rm -f "$case_path/$1*.post.res"
rm -f "$case_path/$1*.post.msh"
rm -f "$case_path/$1.info"
rm -f "$case_path/$1.err"
rm -f "$case_path/$1.flavia.dat"

# Run Python using the script MainKratos.py
docker run -v "$2:/model" --rm --name "$1" $kratos_docker_image > "$2/$1.info" 2> "$2/$1.err"
# docker run -v "%2:/model" --rm --name "%1" %kratos_docker_image% > "%2\\%1.info" 2> "%2\\%1.err"
docker run -v "$case_path:/model" --rm --name "$1" $kratos_docker_image > "$case_path/$1.info" 2> "$case_path/$1.err"
# docker run -v "%case_path%:/model" --rm --name "%1" %kratos_docker_image% > "%case_path%\\%1.info" 2> "%case_path%\\%1.err"
16 changes: 9 additions & 7 deletions kratos.gid/exec/docker.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ REM Problem directory = %3
REM OutputFile: "%2\%1.info"
REM ErrorFile: "%2\%1.err"

REM Remove previous calculation files and results
DEL "%2\%1.info"
DEL "%2\%1.err"
DEL "%2\%1*.post.bin"
DEL "%2\%1*.post.res"
DEL "%2\%1*.post.msh"
@REM if case_path environment variable is defined use it, change directory to it
cd %case_path%

REM Remove previous calculation files and results
DEL "%case_path%\%1.info"
DEL "%case_path%\%1.err"
DEL "%case_path%\%1*.post.bin"
DEL "%case_path%\%1*.post.res"
DEL "%case_path%\%1*.post.msh"
@REM Calculate!
docker run -v "%2:/model" --rm --name "%1" %kratos_docker_image% > "%2\\%1.info" 2> "%2\\%1.err"
docker run -v "%case_path%:/model" --rm --name "%1" %kratos_docker_image% > "%case_path%\%1.info" 2> "%case_path%\%1.err"
22 changes: 0 additions & 22 deletions kratos.gid/exec/global_pip.win.bat

This file was deleted.

14 changes: 0 additions & 14 deletions kratos.gid/exec/install_python.win.bat

This file was deleted.

2 changes: 0 additions & 2 deletions kratos.gid/exec/install_python_and_dependencies.unix.sh

This file was deleted.

15 changes: 0 additions & 15 deletions kratos.gid/exec/install_python_and_dependencies.win.bat

This file was deleted.

15 changes: 8 additions & 7 deletions kratos.gid/exec/pip.unix.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/bin/bash
# OutputFile: "$2/$1.info"
# ErrorFile: "$2/$1.err"
cd "$case_path"
#delete previous result file
rm -f "$2/$1*.post.bin"
rm -f "$2/$1*.post.res"
rm -f "$2/$1*.post.msh"
rm -f "$2/$1.info"
rm -f "$2/$1.err"
rm -f "$2/$1.flavia.dat"
rm -f "$case_path/$1*.post.bin"
rm -f "$case_path/$1*.post.res"
rm -f "$case_path/$1*.post.msh"
rm -f "$case_path/$1.info"
rm -f "$case_path/$1.err"
rm -f "$case_path/$1.flavia.dat"

export PYTHONPATH=%python_home%
export PYTHONHOME=%python_home%

# Run Python using the script MainKratos.py
$python_home/python3 MainKratos.py > "$2/$1.info" 2> "$2/$1.err"
$python_home/python3 MainKratos.py > "$case_path/$1.info" 2> "$case_path/$1.err"
15 changes: 9 additions & 6 deletions kratos.gid/exec/pip.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ REM Problem directory = %3
REM OutputFile: "%2\%1.info"
REM ErrorFile: "%2\%1.err"

@REM if case_path environment variable is defined use it, change directory to it
cd %case_path%

REM Remove previous calculation files and results
DEL "%2\%1.info"
DEL "%2\%1.err"
DEL "%2\%1*.post.bin"
DEL "%2\%1*.post.res"
DEL "%2\%1*.post.msh"
DEL "%case_path%\%1.info"
DEL "%case_path%\%1.err"
DEL "%case_path%\%1*.post.bin"
DEL "%case_path%\%1*.post.res"
DEL "%case_path%\%1*.post.msh"

set PYTHONPATH=%python_home%
set PYTHONHOME=%python_home%

@REM Calculate!
%python_home%/python.exe MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"
%python_home%/python.exe MainKratos.py > "%case_path%\%1.info" 2> "%case_path%\%1.err"
16 changes: 9 additions & 7 deletions kratos.gid/exec/pip_gids_python.unix.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
# OutputFile: "$2/$1.info"
# ErrorFile: "$2/$1.err"
#delete previous result file
rm -f "$2/$1*.post.bin"
rm -f "$2/$1*.post.res"
rm -f "$2/$1*.post.msh"
rm -f "$2/$1.info"
rm -f "$2/$1.err"
rm -f "$2/$1.flavia.dat"
cd "$case_path"
rm -f "$case_path/$1*.post.bin"
rm -f "$case_path/$1*.post.res"
rm -f "$case_path/$1*.post.msh"
rm -f "$case_path/$1.info"
rm -f "$case_path/$1.err"
rm -f "$case_path/$1.flavia.dat"

export PYTHONPATH=""
export PYTHONHOME=""


# Run Python using the script MainKratos.py
$python_path MainKratos.py > "$2/$1.info" 2> "$2/$1.err"
$python_path MainKratos.py > "$case_path/$1.info" 2> "$case_path/$1.err"
16 changes: 10 additions & 6 deletions kratos.gid/exec/pip_gids_python.win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ REM Problem directory = %3

REM OutputFile: "%2\%1.info"
REM ErrorFile: "%2\%1.err"
@REM if case_path environment variable is defined use it, change directory to it
cd %case_path%

REM Remove previous calculation files and results
DEL "%2\%1.info"
DEL "%2\%1.err"
DEL "%2\%1*.post.bin"
DEL "%2\%1*.post.res"
DEL "%2\%1*.post.msh"
DEL "%case_path%\%1.info"
DEL "%case_path%\%1.err"
DEL "%case_path%\%1*.post.bin"
DEL "%case_path%\%1*.post.res"
DEL "%case_path%\%1*.post.msh"

@REM Calculate!
set PYTHONPATH=""
set PYTHONHOME=""
%python_path% MainKratos.py > "%2\\%1.info" 2> "%2\\%1.err"


%python_path% MainKratos.py > "%case_path%\%1.info" 2> "%case_path%\%1.err"
Binary file added kratos.gid/images/error16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kratos.gid/images/ok16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kratos.gid/images/run16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kratos.gid/images/running.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added kratos.gid/images/settings24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions kratos.gid/kratos.spd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<appLink n="MdpaGenerator" public="1" pn="Mdpa Generator" active="0" appid="MdpaGenerator" prefix="MDPAGen_" is_tool="1" production="1"/>
<appLink n="Examples" public="1" pn="Examples" active="0" appid="Examples" prefix="EXA_" is_tool="1" production="1"/>
<appLink n="GeoMechanics" public="1" pn="GeoMechanics" active="0" appid="GeoMechanics" prefix="GEOM_" />
<container n="Simulations" pn="Simulations" un="simulation_runs" open_window="1" icon="run16" state="[FillSimulations]" removecontextualmenu='{Edit} {Expand} {View this}'>
</container>
<blockdata n="units" pn="Units" icon="units" open_window="0">
<value n='units_mesh' pn='Mesh units' unit_mesh_definition="1"/>
<value n='units_system' pn='Units system' units_system_definition="1">
Expand Down Expand Up @@ -330,9 +332,6 @@
return [spdAux::ProcGetFilesValues $domNode]
]]>
</proc>



<proc n='GetMaterialsList' args='args'>
<![CDATA[
spdAux::ProcGetMaterialsList $domNode {*}$args
Expand All @@ -349,6 +348,13 @@
spdAux::ProcEditDatabaseList $domNode $dict $dict_units $boundary_conds $args
]]>
</proc>

<proc n='FillSimulations' args='args'>
<![CDATA[
spdAux::ProcFillSimulations $domNode {*}$args
return "normal"
]]>
</proc>
<dynamicnode command="spdAux::injectProcs" args=""/>
</procs>
<container n="files" state="hidden"></container>
Expand Down
Loading