Skip to content

Commit 91d92b6

Browse files
Merge branch 'master' into CompressibleFluid
2 parents fa1b56a + 83c1b0d commit 91d92b6

193 files changed

Lines changed: 4619 additions & 1051 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tester.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches: [ master ]
88
pull_request:
9+
types: [ready_for_review]
910
branches: [ master ]
1011

1112
# Allows you to run this workflow manually from the Actions tab
@@ -31,7 +32,7 @@ jobs:
3132

3233
- name: Install bins
3334
run: |
34-
pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.2
35+
pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.3.2
3536
3637
# Copy problemtype to gid and copy exec
3738
- name: Move kratos where it should be

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ kratos.gid/exec/Kratos*
88
*.orig
99
.vscode/
1010

11-
custom_tools/*
11+
dist
1212
.DS_Store
1313

1414
*.zip
1515
*.tgz
16+
null
17+
__pycache__

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/36d3d305c87e4bb398bc87ea2e3b890e)](https://www.codacy.com/gh/KratosMultiphysics/GiDInterface/dashboard?utm_source=github.com&utm_medium=referral&utm_content=KratosMultiphysics/GiDInterface&utm_campaign=Badge_Grade)
44
[![Tester](https://github.com/KratosMultiphysics/GiDInterface/actions/workflows/tester.yml/badge.svg)](https://github.com/KratosMultiphysics/GiDInterface/actions/workflows/tester.yml)
55

6-
The user interface of Kratos with [GiD](http://www.gidhome.com).
6+
The user interface of Kratos with [GiD](http://www.gidsimulation.com).
77

88
If you need the latest stable release, launch your GiD, navigate to Data > Problemtype > Internet retrieve and download Kratos there.
99
Available for Linux. Windows, and macOS.
@@ -12,38 +12,41 @@ If you need the developer version, you are on the right place.
1212

1313
## First steps
1414
* 1- Clone this repository, or install a stable [release](https://github.com/KratosMultiphysics/GiDInterface/releases)
15-
* 2- Install the latest GiD developer version -> [Developer version](http://www.gidhome.com/download/developer-versions)
15+
* 2- Install the latest GiD developer version **(minimum 16.1.4d)** -> [Developer version](https://www.gidsimulation.com/gid-for-science/downloads/)
1616
* 3- Navigate to GiD's problemtype folder and delete any previous kratos.gid
1717
* Create there a link to our [kratos.gid](./kratos.gid/) downloaded in step 1
1818
* Windows: Simple shortcut to kratos.gid folder
1919
* 4- Choose your execution mode:
20+
* 4.1- **Default execution mode.** Use GiD's python:
21+
* You don't need to install python. The program will detect if you have any pending package to install.
22+
* If there's any missing package, use the GiD command line and execute:
23+
24+
`-np- W [GiD_Python_PipInstallMissingPackages [list $Kratos::pip_packages_required ] ]`
2025
* 4.1- To execute Kratos using the standard pip packages:
21-
* Python version recommended: 3.9
26+
* Python version recommended: 3.8, 3.9, 3.10, 3.11
2227
* Open a terminal and run
23-
- Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.2`
24-
- Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.2`
28+
- Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.3.2`
29+
- Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.3.2`
2530
* 4.2- To execute Kratos using your compiled binaries:
26-
* Navigate to kratos.gid/exec/
27-
* Create there a symbolic link to the kratos installation folder (where runkratos is located)
28-
* Unix : `ln -s ~/Kratos Kratos` or maybe `ln -s ~/Kratos/bin/Release Kratos` if that's the destination folder
29-
* Windows : `mklink /J Kratos C:\kratos\bin\Release` (choose actual Kratos installation folder)
31+
* Fill the Kratos preferences windows with
32+
- Path to the python folder
33+
- Path to the kratos build folder
3034
* Step by step video: https://www.youtube.com/watch?v=zZq7ypDdudo
31-
* 4.3- To execute Kratos using docker, just install docker and run:
32-
* `docker run -v "YOUR_MODEL_FOLDER_PATH:/model" --rm --name "CASE_NAME" KRATOS_DOCKER_IMAGE`
33-
* KRATOS_DOCKER_IMAGE can be 'fjgarate/kratos-run:latest'
34-
35+
* 4.3- To execute Kratos using docker, just install docker.
36+
* Note: This is the ONLY option if you are a **macOS** user at this moment
3537

3638
### Launch modes
3739
In Kratos preferences, select the execution mode:
40+
* GiD's python: Use the GiD internal python to run. It will help you install the pip packages
3841
* Pip packages: Kratos will be installed via `pip install`
3942
* local compiled: If you are a developer and build your applications, use this one
4043
* docker: If you do not want to install any dependency, just run via docker!
4144
* The default image is [fjgarate/kratos-run](https://hub.docker.com/repository/docker/fjgarate/kratos-run)
4245

4346
### Usage
4447
* Run GiD
45-
* Go to: Data / Problem type / kratos
46-
* kratos top menu / Developer mode (recommended)
48+
* Go to top menu: Data / Problem type / kratos
49+
* Go to top menu: kratos / Preferences / Developer mode (recommended)
4750

4851
### Examples
4952
* [Fluid dynamics example](https://github.com/KratosMultiphysics/Kratos/wiki/Running-an-example-from-GiD#3-set-a-fluid-dynamics-problem)

dockers/.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
!./*
3+
!dist/*
4+
!../dist/

dockers/create-release.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Change directory to the specified directory
4+
cd /tmp/dist/kratos-9.3.2/
5+
find . -type f -name "*.unix.bat" -print0 | xargs -0 dos2unix
6+
7+
# Add execute permission to all .bat files in the directory
8+
# chmod 755 *.bat
9+
10+
# Create a tgz file from the directory
11+
tar -czf ../kratos-9.3.2-linux-64.tgz *
12+

dockers/deploy.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set krversion=9.3.2
2+
set pyversion=3.10.5
3+
@REM 3.10.10-alpine3.17
4+
echo "Building kratos %krversion% on python %pyversion%"
5+
docker build --build-arg krversion=%krversion% --build-arg pyversion=%pyversion% -t kratos-run:%krversion% -t kratos-run:latest .
6+
7+
docker tag kratos-run:%krversion% fjgarate/kratos-run:%krversion%
8+
docker push fjgarate/kratos-run:%krversion%
9+
10+
docker tag kratos-run:latest fjgarate/kratos-run:latest
11+
docker push fjgarate/kratos-run:latest

dockers/dockerfile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
FROM python:3.9
1+
# Default values. Use --build-arg on build to change
2+
ARG pyversion=3.10.8
23

3-
RUN pip install KratosMultiphysics-all==9.2 numpy
4-
WORKDIR /model
4+
# Base pyton image
5+
FROM python:$pyversion
6+
# FROM python:3.10.10-alpine3.17
7+
8+
# Update pip
9+
RUN pip install --upgrade pip
10+
11+
ARG krversion=9.3.2
12+
13+
# Install Kratos and dependencies
14+
RUN python3 -m pip install KratosMultiphysics-all==$krversion numpy
15+
16+
# Prepare run folder
17+
WORKDIR "/model"
518
RUN chmod 777 /model
19+
20+
# Kratos will start on docker run
621
ENTRYPOINT [ "python3", "MainKratos.py" ]
722

8-
# docker build -t kratos-run:latest -t kratos-run:9.2 .
9-
# docker tag kratos-run:latest fjgarate/kratos-run:latest
10-
# docker tag kratos-run:9.2 fjgarate/kratos-run:9.2
11-
# docker push fjgarate/kratos-run:latest
12-
# docker push fjgarate/kratos-run:9.2
23+
# docker build -t kratos-run .
24+
# docker run -rm -it --entrypoint bash kratos-run

dockers/linux-releaser.dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu
2+
3+
RUN apt-get update && \
4+
apt-get install -y dos2unix && \
5+
apt-get clean
6+
7+
WORKDIR /tmp
8+
COPY create-release.sh create-release.sh
9+
RUN dos2unix create-release.sh
10+
RUN chmod 755 /tmp/create-release.sh
11+
12+
CMD /tmp/create-release.sh
13+
# docker build -t linux_releaser -f linux-releaser.dockerfile .
14+
# docker run --rm -v ${PWD}/dist:/tmp/dist linux_releaser

kratos.gid/apps/Buoyancy/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"write/writeProjectParameters.tcl"
2222
],
2323
"start_script": "::Buoyancy::Init",
24-
"requeriments": {
24+
"requirements": {
2525
"apps": [
2626
"Fluid",
2727
"ConvectionDiffusion"

kratos.gid/apps/CDEM/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"xml/BulkGroup.tcl"
2626
],
2727
"start_script": "::CDEM::Init",
28-
"requeriments": {
28+
"requirements": {
2929
"apps": [
3030
"DEM"
3131
],

0 commit comments

Comments
 (0)