diff --git a/_config.yml b/_config.yml index f09ad726..95970070 100644 --- a/_config.yml +++ b/_config.yml @@ -76,6 +76,16 @@ defaults: sectionid: vandv seo: type: "WebPage" + +- scope: + path: _su2gui + type: su2gui + values: + layout: su2gui + sectionid: su2gui + seo: + type: "WebPage" + collections: docs: permalink: /:collection/:path/ @@ -89,6 +99,9 @@ collections: vandv: permalink: /:collection/:path/ output: true + su2gui: + permalink: /:collection/:path/ + output: true posts: permalink: /blog/:year/:month/:day/:title/ output: true diff --git a/_data/su2gui.yml b/_data/su2gui.yml new file mode 100644 index 00000000..c822b29e --- /dev/null +++ b/_data/su2gui.yml @@ -0,0 +1,19 @@ +- title: Introduction to SU2GUI + su2gui: + - Introduction + - Quick-Start + +- title: Installation + su2gui: + - Installation + +- title: User Guide + su2gui: + - Terminal-Initialization + - Manage-Cases + - Mesh-File + - configurations + - Initialization + - Logs-Errors + - Result-Analysis + - Supported-Functionalities \ No newline at end of file diff --git a/_docs_v7/Container-Development.md b/_docs_v7/Container-Development.md index 54e65571..bb3b0a15 100644 --- a/_docs_v7/Container-Development.md +++ b/_docs_v7/Container-Development.md @@ -45,7 +45,7 @@ Please note that some of the examples refer to features that are only available A container can be started using the `run` command and the name, e.g. ``` -docker run su2code/su2/build-su2 +docker run su2code/build-su2 ``` You should see the following message, which means that everything works as intended: ``` @@ -64,7 +64,7 @@ The containers we provide all feature entrypoint scripts, i.e. a script that is A typical call where the current directory on the host is mounted and used as working directory would look like this: ``` -docker run -ti --rm -v $PWD:/workdir/ -w /workdir --entrypoint bash su2code/su2/build-su2 +docker run -ti --rm -v $PWD:/workdir/ -w /workdir --entrypoint bash su2code/build-su2 ``` Here, we also override the entrypoint in order to execute a bash shell. Note that all changes you make will be lost after you exit the container (except from changes in the working directory). Once in the bash you can simply use an existing or new clone of the repository to compile SU2 [the usual way](/docs_v7/Build-SU2-Linux-MacOS/), run a regression test script, or execute a specific regression test. @@ -93,7 +93,7 @@ Instead of checking out a fresh copy of the source code, it is also possible to ``` docker run -ti --rm -v ~/Documents/SU2:/workdir/src/SU2 \ -v ~/Documents/SU2/bin:/workdir/install/ -w /workdir \ - su2code/su2/build-su2 -f "-Denable-pywrapper=true" + su2code/build-su2 -f "-Denable-pywrapper=true" ``` The binaries can then be found at `~/Documents/SU2/bin`. @@ -110,7 +110,7 @@ The compiled binaries used for the tests must be mounted at `/install/bin`. The following command will clone the master branches of all required repositories and run the `parallel_regression.py` script: ``` docker run -ti --rm -v ~/Documents/SU2/bin:/workdir/install/bin \ - -w /workdir su2code/su2/test-su2 -t master -b master -c master -s parallel_regression.py + -w /workdir su2code/test-su2 -t master -b master -c master -s parallel_regression.py ``` Similar to the compilation script, you can use already existing clones of the repositories by mounting them at `/src/Tutorials`, `/src/SU2`, `/src/TestData` and omitting the `-t`, `-b` or `-c` option, respectively. @@ -119,11 +119,11 @@ The following example will compile SU2 using the `build-su2` container and then ``` docker run -ti --rm -v $PWD:/workdir/ -w /workdir \ - su2code/su2/build-su2 -f "-Denable-pywrapper=true" -b develop + su2code/build-su2 -f "-Denable-pywrapper=true" -b develop docker run -ti --rm -v $PWD/install/bin:/workdir/install/bin -w /workdir \ -v $PWD/src/SU2_develop:/workdir/src/SU2 \ - su2code/su2/test-su2 -t develop -c develop -s parallel_regression.py + su2code/test-su2 -t develop -c develop -s parallel_regression.py ``` ### Running thread sanitizer tests ### diff --git a/_docs_v7/Execution.md b/_docs_v7/Execution.md index e0ffc443..109a9519 100644 --- a/_docs_v7/Execution.md +++ b/_docs_v7/Execution.md @@ -15,7 +15,7 @@ Once downloaded and installed, and now that you know the basics for setting up y - [Discrete Adjoint Gradient Calculation (discrete_adjoint.py)](#discrete-adjoint-gradient-calculation-discreteadjointpy) - [Finite Difference Gradient Calculation (finite_differences.py)](#finite-difference-gradient-calculation-finitedifferencespy) - [Shape Optimization Script (shape_optimization.py)](#shape-optimization-script-shapeoptimizationpy) - + - [Python wrapper scripts](#python-wrapper-scripts) --- ## C++ Modules @@ -109,3 +109,30 @@ Options: * `-n PARTITIONS, --partitions=PARTITIONS` number of PARTITIONS * `-g GRADIENT, --gradient=GRADIENT` Method for computing the GRADIENT (ADJOINT, DISCRETE_ADJOINT, FINDIFF, NONE) * `-q QUIET, --quiet=QUIET` True/False Quiet all SU2 output (optimizer output only) + +### Python wrapper scripts + +It is possible to call SU2 from python by importing it as a module. The first step is to compile SU2 with python wrapper support. For instance if your SU2 repository is in your home directory at *~/SU2*: + +Usage: `$ ./meson.py build -Denable-pywrapper=true --prefix=~/SU2` + +The python module will then be available in the installation folder *~/SU2/bin*. To make the SU2 python wrapper available from everywhere in the system, add the installation path to *PYTHONPATH*: + +Usage: `export PYTHONPATH=~/SU2/bin:$PYTHONPATH` + +You should now be able to call SU2 from a python file. A quick way to test this is by using the following command: + +Usage: `python -c "import pysu2; print('hello world') "` + +If you see the message *hello world* without any error messages, you can now try to run the pywrapper examples in the */Testcases/py_wrapper* subdirectory. +For instance the unsteady flat plate with conjugate heat transfer. Note that the configuration files are inside the SU2 repository and the meshes for the testcases are inside the Testcases repository. We recommend to copy .cfg files to the Testcases repository and run from there. +``` +cd ~/Testcases/py_wrapper/flatplate_unsteady_CHT +cp ~/SU2/Testcases/py_wrapper/flatplate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg . +python launch_unsteady_CHT_FlatPlate.py -f unsteady_CHT_FlatPlate_Conf.cfg +``` + +Options: +* `-h, --help` show this help message and exit +* `-f FILE, --file=FILE` read config from FILE +* `--parallel` Specify if we need to initialize MPI diff --git a/_includes/su2gui_nav.html b/_includes/su2gui_nav.html new file mode 100644 index 00000000..f2d70c56 --- /dev/null +++ b/_includes/su2gui_nav.html @@ -0,0 +1,22 @@ +
+{% for section in site.data.su2gui %} +
+ +
+
    + {% for item in section.su2gui %} + {% assign item_url = item | prepend:"/su2gui/" | append:"/" %} + {% assign p = site.su2gui | where:"url", item_url | first %} + {{ p.title }} + {% endfor %} +
+
+
+{% endfor %} +
diff --git a/_includes/su2gui_section_nav.html b/_includes/su2gui_section_nav.html new file mode 100644 index 00000000..a57f63f6 --- /dev/null +++ b/_includes/su2gui_section_nav.html @@ -0,0 +1,52 @@ +{% comment %} +Map grabs the doc sections, giving us an array of arrays. Join, flattens all +the items to a comma delimited string. Split turns it into an array again. +{% endcomment %} +{% assign su2gui = site.data.su2gui | map: 'su2gui' | join: ',' | split: ',' %} + +{% comment %} +Because this is built for every page, lets find where we are in the ordered +document list by comparing url strings. Then if there's something previous or +next, lets build a link to it. +{% endcomment %} + +{% for document in su2gui %} + {% assign document_url = document | prepend:"/su2gui/" | append:"/" %} + {% if document_url == page.url %} +
    + {% if forloop.first %} + + {% else %} + {% assign previous = forloop.index0 | minus: 1 %} + {% assign previous_page = su2gui[previous] | prepend:"/su2gui/" | append:"/" %} + + {% endif %} + + {% if forloop.last %} + + {% else %} + {% assign next = forloop.index0 | plus: 1 %} + {% assign next_page = su2gui[next] | prepend:"/su2gui/" | append:"/" %} + + {% endif %} + +
    + {% break %} + {% endif %} +{% endfor %} diff --git a/_includes/topnav.html b/_includes/topnav.html index b8173023..747df544 100644 --- a/_includes/topnav.html +++ b/_includes/topnav.html @@ -18,13 +18,14 @@
  • Docs
  • Tutorials
  • V&V
  • -
  • Forum
  • +
  • User Forum
  • +
  • Dev Team Slack
  • Develop
  • +
  • GUI