Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lurpi/ogsPW
  • steffenbeese/ogs
  • HBShaoUFZ/ogs
  • vehling/ogs
  • kuateric/ogs
  • heinzej/ogs
  • MostafaMollaali/dynamic
  • GuanglinDu/ogs
  • katakurgyis/ogs
  • felikskiszkurno/ogs
  • aachaudhry/ogs
  • friederl/ogs
  • fparisio/ogs
  • Scinopode/ogs
  • MaxDoe/ogs
  • nagelt/ogs
  • zhangning737/ogs
  • ogs/ogs
  • bilke/ogs
  • endJunction/ogs
  • montoyav/ogs
  • TomFischer/ogs
  • wenqing/ogs
  • renchao-lu/ogs
  • ChaofanChen/ogs
  • rinkk/ogs
  • WanlongCai/ogs
  • dominik-kern/ogs
  • Yonghui56/ogs
  • VinayGK/ogs
  • AlirezaBGE/ogs
  • SebasTouristTrophyF/ogs
  • tengfeideng/ogs
  • joergbuchwald/ogs
  • KeitaYoshioka/ogs
  • hhutyou/debug-petsc-large
  • ThieJan/ogs
  • ArashPartow/ogs
  • skai95/ogs
  • yezhigangzju/ogs
  • PhilippSelzer/ogs
  • MartinBinder/ogs
  • MehranGhasabeh/ogs-mg
  • MManicaM/ogs
  • TobiasMeisel/ogs
  • norihiro-w/ogs
  • garibay-j/ogs
  • Christopher-McDermott/ogs
  • loewenzahm/ogs
  • aheinri5/ogs
  • tcajuhi/ogs
  • RichardScottOZ/ogs
  • lagraviereScience/ogs
  • jrandow/ogs
  • cbsilver/ogs
  • reza-taherdangkoo/ogs
  • joboog/ogs
  • basakz/ogs
  • ropaoleon/ogs
  • ShuangChen88/ogs
  • cguevaramorel/ogs
  • boyanmeng/ogs
  • XRuiWang/ogs
  • grubbymoon/ogs
  • yUHaOLiu-tj/ogs
  • FZill/ogs
  • michaelpitz/ogs
  • hhutyou/ogs
  • Lifan97/ogs
  • mattschy/ogs
  • Mojtaba-abdolkhani/ogs
  • kristofkessler/ogs
  • ozgurozansen/ogs
  • eike-radeisen/ogs-gitlab
  • DStafford/ogs
  • Max_Jaeschke/ogs
  • fwitte/ogs
  • LionAhrendt/ogs
  • emadnrz/ogs
  • laubry/ogs
  • HailongS/ogs
  • noorhasan/ogs
  • WenjieXuZJU/ogs
83 results
Show changes
Commits on Source (12)
......@@ -39,7 +39,7 @@ import numpy as np
import pandas as pd
import vtuIO
from IPython.display import Image, display
from mpl_toolkits.axes_grid1.inset_locator import InsetPosition, mark_inset
from mpl_toolkits.axes_grid1.inset_locator import inset_axes, mark_inset
# %%
display(Image(filename="./model_domain.jpg", width=1000))
......@@ -197,14 +197,15 @@ ax[2].set_title("Relative error")
ax[0].legend()
fig.tight_layout()
ax2 = plt.axes([0, 0, 0, 0])
ip = InsetPosition(ax[0], [0.45, 0.4, 0.5, 0.4])
ax2.set_axes_locator(ip)
patch, pp1, pp2 = mark_inset(ax[0], ax2, loc1=3, loc2=4, fc="none", ec="0.5")
# pp1.loc1 = 3
pp1.loc2 = 2
# pp2.loc1 = 4
pp2.loc2 = 1
ax2 = inset_axes(
ax[0],
width="100%",
height="100%",
loc="center",
bbox_to_anchor=[0.45, 0.4, 0.5, 0.4],
bbox_transform=ax[0].transAxes,
)
ax2.plot(
x,
resp[0],
......@@ -220,6 +221,9 @@ ax2.set_xlim(1.57, 1.63)
ax2.set_ylim(0, 0.1)
ax2.set_yticks(np.arange(0, 0.15, 0.05))
patch, pp1, pp2 = mark_inset(ax[0], ax2, loc1=3, loc2=4, fc="none", ec="0.5")
pp1.loc2 = 2
pp2.loc2 = 1
# %%
fig, ax = plt.subplots(ncols=3, figsize=(18, 6))
......
......@@ -101,6 +101,7 @@ check docs links:
--exclude eigen.tuxfamily.org
--exclude wiki.sei.cmu.edu
--exclude-path build/docs/d0/de3/citelist.html
--exclude-path build/docs/doxygen_crawl.html
build/docs
- lychee --cache --max-cache-age 14d
--max-concurrency 2
......
......@@ -83,6 +83,9 @@ function(_check_header_compilation target)
endif()
get_target_property(_target_defs ${target} COMPILE_DEFINITIONS)
if(OGS_USE_PETSC)
list(APPEND _target_defs USE_PETSC)
endif()
foreach(def ${_target_defs})
# strip generator expressions
if(${def} MATCHES "\\$<.*")
......
......@@ -42,6 +42,11 @@ name = "Discourse"
weight = 10
url = "https://discourse.opengeosys.org"
[[menu.main]]
name = "Source Code"
weight = 11
url = "https://gitlab.opengeosys.org/ogs/ogs"
# Devguide sidebar menu top-level categories
[[menu.devguide]]
name = "Getting Started"
......
......@@ -13,6 +13,11 @@ weight = 1060
Some of these options are enabled by default ("*Defaults* to *ON*") otherwise they must be explicitly set to *ON*.
You can pass any CMake variable or option with `-DVARIABLE_NAME=VALUE` (note the
`-D` in front) to the CMake command.
You can also overwrite the generator with the `-G` parameter or the
build-directory with the `-B` parameter.
### General
CMake switches to enable / disable parts of OGS.
......@@ -25,6 +30,13 @@ CMake switches to enable / disable parts of OGS.
Run the CMake-GUI / `ccmake` to see a list of processes.
- `OGS_BUILD_PROCESSES` - A `;`-separated list specifying processes to build, e.g. `-DOGS_BUILD_PROCESSES="HT;LIE"`. Can be set to *ON* which means all processes are built or can be set to *OFF* to disable all processes. **Attention:** Setting this variable overrides individual `OGS_BUILD_PROCESS_X`-variables! This option is mainly used for CI and automation. Also the value of this variable is not cached.
### Python virtual environment
- `OGS_USE_PIP` - Creates a python virtual environment in the .venv-directory
inside the build directory, that includes useful packages like ogstools,
Jupyter and more. Defaults to *OFF*. See also
https://www.opengeosys.org/docs/devguide/packages/python-env/.
### Debugging
- `CMAKE_BUILD_TYPE` - Defaults to `Debug` which builds with debugging information, set to `Release` for an optimized build.
......
......@@ -55,7 +55,7 @@ cmake --preset release
This will create a build-directory outside the source tree (`../build/release`) with the default CMake options and the Release configuration.
Additionally you can pass any CMake variable or option with `-DVARIABLE_NAME=VALUE` (note the `-D` in front!) to the CMake command. You can also overwrite the generator with the `-G` parameter or the build-directory with the `-B` parameter (to see all available options just run `cmake --help`)
Additionally you can pass any CMake variable or option with `-DVARIABLE_NAME=VALUE` (note the `-D` in front!) to the CMake command. You can also overwrite the generator with the `-G` parameter or the build-directory with the `-B` parameter (to see all available options just run `cmake --help`).
Also all the compiled files will be generated in this directory. This keeps the actual source code clean from intermediate files which are generated from the source code. Nothing inside the build directory will ever be version controlled because its contents can be regenerated anytime from the source code.
......@@ -67,7 +67,7 @@ When you want to start over with a new configuration simply delete the build-dir
### User-defined presets
You can create a `CMakeUserPresets.json` file in the root source directory with your own presets (this file is ignored by git):
You can also create a `CMakeUserPresets.json` file in the root source directory with your own presets (this file is ignored by git):
```json
{
......@@ -143,6 +143,30 @@ CC=mpicc CXX=mpic++ cmake ../ogs -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_USE_P
</div>
<div class='note'>
### Using a python virtual environment
Additionally to
```bash
sudo apt-get install python3 python3-pip
```
(from https://www.opengeosys.org/docs/devguide/getting-started/prerequisites/), do
```bash
sudo apt-get install python3-venv
```
and then you can use the `-DOGS_USE_PIP=ON` option:
```bash
cmake ../ogs -DOGS_USE_PIP=ON -DCMAKE_BUILD_TYPE="Release" -G Ninja
```
</div>
## Option: Configure with a visual tool
<div class='win'>
......
......@@ -212,9 +212,14 @@ git config --global http.proxy http://yourproxy.example.com
<div class='linux'>
Install CMake via Kitware's APT Repository by [following their instructions](https://apt.kitware.com/).
Install CMake using system package manager, *e.g.* on Ubuntu
```bash
sudo apt install cmake
```
For other Linux distributions you want to use your distributions package manager, [pip](https://pypi.org/project/cmake/) or [snap](https://snapcraft.io/cmake).
</div>
<div class='mac'>
......
......@@ -24,6 +24,36 @@ Python packages are usually installed via `pip` inside an isolated environment (
When configuring OGS with `OGS_USE_PIP=ON` Python creates a new virtual environment in the `.venv`-directory inside your build directory. It will also install required Python packages into this environment. You can see the current environment definition in the file `requirements.txt` inside your build-directory.
Make sure, that you did
```bash
sudo apt-get install python3 python3-pip
sudo apt-get install python3-venv
```
then you can use the `-DOGS_USE_PIP=ON` option:
```bash
cmake ../ogs -DOGS_USE_PIP=ON -DCMAKE_BUILD_TYPE="Release" -G Ninja
```
When configuring OGS with `OGS_USE_PIP=ON`, Python creates a new virtual
environment in the .venv-directory inside your build directory.
It will also install required Python packages into this environment.
For example, ogstools or Jupyter will this way be available ready-made in a
consistent configuration.
You can see the current environment definition with all the included packages in
the file requirements.txt inside your build-directory.
When you want to use the python packages in this virtual environment, you need
to activate it by
```bash
source <your-build-dir>/.envrc
```
where `.envrc` is a little script including `source .venv/bin/activate` as well as some path settings.
To manually add Python packages run the following inside your build-directory:
```bash
......
......@@ -15,7 +15,9 @@ If something goes wrong when running CMake please try again with an **empty** or
Please read the CMake output carefully. Often it will tell you what went wrong.
Also consider using the command line for CMake configuration as lots of CMake options (which modify requirements on third-party libraries) have to be set via the command line **before** CMake ran for the first time. E.g. when building with PETSc the following fails:
Also consider using the command line for CMake configuration as lots of CMake options (which modify requirements on third-party libraries) have to be set via the command line **before** CMake ran for the first time.
For example when building with PETSc the following fails:
- Creating build directory
- Starting CMake GUI
......@@ -39,3 +41,21 @@ The following options are affected by this behavior and **should not be changed*
- `OGS_USE_PETSC`
- `CMAKE_BUILD_TYPE`
- `BUILD_SHARED_LIBS`
If the errors are related to TFEL, HDF5, PETSc or VTK, you may delete `~/.cache/CPM/_ext` and try again.
If there are incompatibilities to a system-installed library, e.g. HDF5, you can also use the additional cmake options, e.g. `-DOGS_BUILD_HDF5=ON`, to force a local library (in this case HDF5) build. These options are available:
- `OGS_BUILD_HDF5`
- `OGS_BUILD_TFEL`
- `OGS_BUILD_PETSC`
- `OGS_BUILD_VTK`
External dependencies are cached in `~/.cache/CPM/`.
If something goes wrong during the first build, then ogs will pick up the failed
build during subsequent cmake-runs without showing any error messages from the
dependency.
In that case you need to delete the corresponding folder in the CPM cache,
usually something like `~/.cache/CPM/_ext/TFEL/[some long hash]`.
Then the next cmake-run will retrigger a build of the dependency. This applies
to TFEL, HDF5, PETSc and VTK.
......@@ -7,7 +7,7 @@
<a class="ml-3" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" data-pagefind-ignore="all" />
src="https://licensebuttons.net/l/by-sa/4.0/88x31.png" data-pagefind-ignore="all" />
</a>
<a class="ml-3" href="https://www.netlify.com">
<img style="height: 31px;" src="https://www.netlify.com/img/global/badges/netlify-dark.svg"
......