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
  • montoyav/ogs
  • TomFischer/ogs
  • wenqing/ogs
  • renchao-lu/ogs
  • ChaofanChen/ogs
  • rinkk/ogs
  • WanlongCai/ogs
  • dominik-kern/ogs
  • Yonghui56/ogs
  • endJunction/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
  • suresh199824/ogs
84 results
Show changes
Commits on Source (2778)
Showing
with 471 additions and 466 deletions
---
Checks: '-*,clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-pro-type-member-init, *explicit-conversions*, google-explicit-constructor, google-readability-braces-around-statements, modernize-loop-convert, modernize-use-default-member-init, modernize-use-emplace, modernize-use-using, readability-braces-around-statements, readability-else-after-return, readability-named-parameter, *readability-namespace-comments, *readability-inconsistent-*, readability-redundant-member-init, readability-simplify-boolean-expr, readability-string-compare'
Checks: >
-*
,clang-diagnostic-*,
clang-analyzer-*,
cppcoreguidelines-pro-type-member-init,
*explicit-conversions*,
google-explicit-constructor,
google-readability-braces-around-statements,
modernize-loop-convert,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-use-using,
readability-braces-around-statements,
readability-else-after-return,
readability-named-parameter,
*readability-namespace-comments,
*readability-inconsistent-*,
readability-redundant-member-init,
readability-simplify-boolean-expr,
readability-string-compare
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
WarningsAsErrors: ""
HeaderFilterRegex: ".*"
AnalyzeTemporaryDtors: false
FormatStyle: file
FormatStyle: file
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: hicpp-braces-around-statements.ShortStatementLines
value: '1'
- key: readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-braces-around-statements.ShortStatementLines
value: "1"
- key: hicpp-braces-around-statements.ShortStatementLines
value: "1"
- key: readability-braces-around-statements.ShortStatementLines
value: "1"
......@@ -87,6 +87,7 @@ parse:
HTTP_PASSWORD: 1
EXCLUDE_FROM_ALL: 1
OPTIONS: +
PATCH_COMMAND: +
cpmfindpackage:
pargs:
nargs: "*"
......
version: "2"
exclude_patterns:
- "ThirdParty/"
- "Tests/"
plugins:
duplication:
......
[codespell]
skip = *.bib,*.css,*.pdf,*.yaml,*.yml,*/.vale,./.git,./GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd,./Tests/Data,./ThirdParty,./web/content/imprint.md,./web/node_modules,./web/public/imprint/index.html,./web/resources,
ignore-words-list = ba,bu,ket,nd,pris,strat,sur,theis,
skip = *.bib,*.css,*.pdf,*.yaml,*.yml,*.vtu,*/.vale,./.git,./GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd,./Tests/Data,./web/content/imprint.md,./web/node_modules,./web/public/imprint/index.html,./web/resources,CITATION.cff,
ignore-words-list = ba,bu,ket,nd,pris,strat,sur,theis,ot,Jupyter,testrunner
exclude-file = .codespellexclude
uri-ignore-words-list = *
{
"name": "ogs-gcc-dev",
"image": "registry.opengeosys.org/ogs/ogs/vscode:latest",
"postStartCommand": "nohup bash -c 'cd web; yarn; yarn build; hugo server &'",
"forwardPorts": [
1313
],
"mounts": [
"source=devcontainer-cpm-cache,target=/opt/cpm,type=volume",
"source=devcontainer-ccache-cache,target=/opt/ccache,type=volume",
"source=${localWorkspaceFolder}/../build,target=${containerWorkspaceFolder}/../build,type=bind"
],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools"
]
}
},
"remoteUser": "vscode",
"features": {
"common": {}
}
"name": "ogs-gcc-dev",
"image": "mcr.microsoft.com/devcontainers/cpp",
"mounts": [
"source=devcontainer-cpm-cache,target=/opt/cpm,type=volume",
"source=devcontainer-ccache-cache,target=/opt/ccache,type=volume",
"source=${localWorkspaceFolder}/../build,target=${containerWorkspaceFolder}/../build,type=bind"
],
"features": {
"common": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
}
}
}
# .git
Tests/Data
_out/images
ThirdParty/container-maker
......@@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v2
- name: Configure CMake
run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DOGS_BUILD_PROCESS_TH2M=OFF -DOGS_USE_UNITY_BUILDS=OFF -DOGS_BUILD_TESTING=OFF -DOGS_ENABLE_ELEMENT_PRISM=OFF -DOGS_ENABLE_ELEMENT_PYRAMID=OFF -DOGS_MAX_ELEMENT_DIM=2
run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DOGS_USE_UNITY_BUILDS=OFF -DOGS_BUILD_TESTING=OFF -DOGS_ENABLE_ELEMENT_PRISM=OFF -DOGS_ENABLE_ELEMENT_PYRAMID=OFF -DOGS_MAX_ELEMENT_DIM=2
# Build is not required unless generated source files are used
# - name: Build CMake
......
......@@ -12,11 +12,6 @@ tags
# Visual Studio Code project files
.vscode
# Conan package manager
conanbuildinfo.cmake
conaninfo.txt
CMakeLists.txt.user*
*.pyc
.venv
......@@ -26,6 +21,7 @@ Tests/Data/_out
web/.netlify
CMakeUserPresets.json
scripts/cmake/vtk-*.patch
.snakemake
......
......@@ -16,6 +16,8 @@ variables:
CPU_TARGET: ivybridge # envinf1 has oldest cpu
ARTIFACTS_PAGES_URL: https://$CI_PROJECT_ROOT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts
PIPELINE_NAME: "Default pipeline name"
# by default skip performance tests, they can be enabled on isolated test machines
OGS_PERFORMANCE_TESTS_ALLOWED_TO_FAIL: true
workflow:
name: "$PIPELINE_NAME"
......@@ -39,6 +41,9 @@ workflow:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::win only.*/
variables:
PIPELINE_NAME: "win only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::guix only.*/
variables:
PIPELINE_NAME: "guix only MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
- if: $CI_MERGE_REQUEST_IID # merge requests
variables:
PIPELINE_NAME: "MR pipeline: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME"
......@@ -46,9 +51,6 @@ workflow:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "ogs/ogs"' # master, ogs/ogs repo only
variables:
PIPELINE_NAME: "master pipeline"
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/ && $CI_PROJECT_PATH == "ogs/ogs"' # release branches, e.g. v6.x.x
variables:
PIPELINE_NAME: "bugfix branch $CI_COMMIT_BRANCH pipeline"
include:
- local: "scripts/ci/extends/*.yml"
......@@ -73,6 +75,9 @@ include:
- local: "/scripts/ci/pipelines/win.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::win only.*/
- local: "/scripts/ci/pipelines/guix.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::guix only.*/
- local: "/scripts/ci/jobs/build-wheels.yml"
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /.*ci::wheels only.*/
[submodule "ThirdParty/container-maker"]
path = ThirdParty/container-maker
url = https://gitlab.opengeosys.org/ogs/container-maker.git
[submodule "ThirdParty/ogs6py"]
path = ThirdParty/ogs6py
url = https://github.com/joergbuchwald/ogs6py.git
[submodule "ThirdParty/bilke/cmake-modules"]
path = ThirdParty/bilke/cmake-modules
url = https://github.com/bilke/cmake-modules.git
[submodule "ThirdParty/collection"]
path = ThirdParty/collection
url = https://gitlab.opengeosys.org/ogs/libs/collection.git
;; This file lets us present this repo as a Guix channel.
(channel
(version 0)
(directory ".guix/modules")) ;look for package modules under .guix/modules/
\ No newline at end of file
;; This file defines a Guix package. It can be used to spawn an
;; interactive development environment:
;;
;; guix shell
;;
;; Or it can be used to build Guile from a checkout in an isolated
;; environment:
;;
;; guix build -f guix.scm
;;
;; Likewise, you may cross-compile it:
;;
;; guix build -f guix.scm --target=x86_64-w64-mingw32
;;
;; Or may want to build a variant:
;; guix build -L $PWD/.guix/modules ogs-petsc-ssd
(define-module (ogs-package)
#:use-module (guix)
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages algebra)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages certs) ; TODO: cpm
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages image-processing)
#:use-module (gnu packages logging)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages ninja)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages python)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
)
(define vcs-file?
;; Return true if the given file is under version control.
(or (git-predicate "../..") ; (current-source-directory)
(const #t))) ;not in a Git checkout
(define-public ogs
(package
(name "ogs")
(version "6.4.99-git")
(source (local-file "../.." "ogs-checkout"
#:recursive? #t
#:select? vcs-file?
))
(build-system cmake-build-system)
(arguments
`(#:build-type "Release"
#:configure-flags (list
; passing variables works like this
; ,(string-append "-DOGS_VERSION=" version)
; TODO: but it is not overwritten in sub-packages...
"-DGUIX_BUILD=ON"
"-DOGS_BUILD_TESTING=OFF"
"-DOGS_USE_EIGEN_UNSUPPORTED=OFF" ; Eigen 3.4.0
"-DOGS_INSTALL_DEPENDENCIES=OFF" ; handled by guix
"-DOGS_CPU_ARCHITECTURE=OFF" ; enable guix --tune
)
#:cmake ,cmake)) ;for newer CMake version
(inputs (list boost
eigen
googletest
hdf5
json-modern-cxx
libxml2
pybind11-2.10.4
python
range-v3
spdlog
zlib
vtk))
(native-inputs (list git ninja googletest nss-certs)) ; TODO: cpm
(synopsis "OpenGeoSys")
(description
"Simulation of thermo-hydro-mechanical-chemical (THMC) processes in porous and fractured media")
(home-page "https://www.opengeosys.org")
(properties '((tunable? . #t)))
(license license:bsd-3)))
(define-public ogs-ssd
(package
(inherit ogs)
(name "ogs-ssd")
(arguments
(substitute-keyword-arguments (package-arguments ogs)
((#:configure-flags flags)
`(cons* "-DOGS_BUILD_PROCESSES=SteadyStateDiffusion"
,flags))))
(synopsis "OGS with SteadyStateDiffusion only (for faster build testing)")))
(define-public ogs-petsc
(package
(inherit ogs)
(name "ogs-petsc")
(inputs (modify-inputs (package-inputs ogs)
(prepend openmpi petsc-openmpi)
(replace "vtk" vtk-openmpi)
(replace "hdf5" hdf5-parallel-openmpi)))
(arguments
(substitute-keyword-arguments (package-arguments ogs)
((#:configure-flags flags)
`(cons* "-DOGS_USE_PETSC=ON"
"-DCMAKE_C_COMPILER=mpicc"
"-DCMAKE_CXX_COMPILER=mpic++"
,flags))))
(synopsis "OGS with PETSc")))
(define-public ogs-petsc-ssd
(package
(inherit ogs-petsc)
(name "ogs-petsc-ssd")
(arguments
(substitute-keyword-arguments (package-arguments ogs-petsc)
((#:configure-flags flags)
`(cons* "-DOGS_BUILD_PROCESSES=SteadyStateDiffusion"
,flags))))
(synopsis "OGS with PETSc and SteadyStateDiffusion only (for faster build testing)")))
; #### Releases ####
(define-public ogs-6.4.4
(package
(inherit ogs)
(name "ogs")
(version "6.4.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.opengeosys.org/ogs/ogs.git")
(commit "d4ca7e627f2fc012bfe434649b797e78e5c2a8f1")
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
;; Update with `guix hash -rx .`, make sure to have submodules updated!
(base32
"1f6mcbjx76irf1g0xkh6hgpv4qn2swbiyvlazvlrhjfyxb9bckq9"))))
(synopsis "OGS 6.4.4 release")))
(define-public ogs-petsc-6.4.4
(package
(inherit ogs-petsc)
(name "ogs-petsc")
(version "6.4.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.opengeosys.org/ogs/ogs.git")
(commit "d4ca7e627f2fc012bfe434649b797e78e5c2a8f1")
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
;; Update with `guix hash -rx .`, make sure to have submodules updated!
(base32
"1f6mcbjx76irf1g0xkh6hgpv4qn2swbiyvlazvlrhjfyxb9bckq9"))))
(synopsis "OGS 6.4.4 with PETSc release")))
; #### Dependencies ####
(define-public vtk-openmpi
(package
(inherit vtk)
(name "vtk-openmpi")
(inputs (modify-inputs (package-inputs vtk)
(prepend hdf5-parallel-openmpi openmpi)))
(arguments
(substitute-keyword-arguments (package-arguments vtk)
((#:configure-flags flags)
#~(append '("-DVTK_MODULE_ENABLE_VTK_IOParallelXML=YES"
"-DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES" "-DVTK_USE_MPI=ON")
#$flags))))
(synopsis "VTK with OpenMPI support")))
(define pybind11-2.10.4
(package
(inherit pybind11)
(version "2.10.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/pybind/pybind11")
(commit (string-append "v" version))))
(sha256
(base32
"0rbcfvl7y472sykzdq3vrkw83kar0lpzhk3wq9yj9cdydl8cpfcz"))))))
;; return package
ogs
;; TODO: add this to web page
; ## Using the ogs repo as a Guix channel (as a user of ogs)
;
; Add the following to `~/.config/guix/channels.scm`:
;
; ```scheme
; (append (list (channel
; (name 'ogs)
; (url "https://gitlab.opengeosys.org/ogs/ogs.git")
; (branch "master"))) %default-channels)
; ```
;
; Run `guix pull`.
;
; Then you can install the ogs package:
;
; ```bash
; guix install ogs@6.4.4
; # OR, e.g.
; guix install ogs-petsc@6.4.4
; ```
......@@ -2,11 +2,14 @@ Alireza Hassanzadegan <a.hassanzadegan@gmail.com> AlirezaBGE <a.hassanzadegan@gm
Aqeel Chaudhry <Aqeel.Chaudhry@ifgt.tu-freiberg.de> aachaudhry <aqeel318@gmail.com>
Carolin Helbig <carolin.helbig@ufz.de>
Chaofan Chen <chaofan.chen@ufz.de>
Chaofan Chen <chaofan.chen@ufz.de> <cchaofan1311@gmail.com>
Christian Silbermann <christian.silbermann@ifgt.tu-freiberg.de> cbsilver <christian.silbermann@ifgt.tu-freiberg.de>
Christoph Lehmann <christoph.lehmann@ufz.de> <chleh@users.noreply.github.com>
Dmitri Naumov <dmitri.naumov@ufz.de> <github@naumov.de>
Dmitri Naumov <dmitri.naumov@ufz.de> Dmitrij Naumov <dmitrij@naumov.de>
Dmitri Naumov <dmitri.naumov@ufz.de> Dmitry Yu. Naumov <dmitri.naumov@ufz.de>
Dmitri Naumov <dmitri-jurievic.naumov@ifgt.tu-freiberg.de> <github@naumov.de>
Dmitri Naumov <dmitri-jurievic.naumov@ifgt.tu-freiberg.de> Dmitrij Naumov <dmitrij@naumov.de>
Dmitri Naumov <dmitri-jurievic.naumov@ifgt.tu-freiberg.de> Dmitry Yu. Naumov <dmitri.naumov@ufz.de>
Dmitri Naumov <dmitri-jurievic.naumov@ifgt.tu-freiberg.de> <dmitri.naumov@ufz.de>
Dmitri Naumov <dmitri-jurievic.naumov@ifgt.tu-freiberg.de> <Dmitri-Jurievic.Naumov@ifgt.tu-freiberg.de>
Dominik Kern <dominik.kern1@ifgt.tu-freiberg.de> <dominik.kern.ifgt@gmail.com>
Eric Simo <eric.simo@bge.de> ericsimo <kuateric>
Florian Zill <florian.zill@ufz.de> Florian Krupsack <florian.krupsack@ufz.de>
......@@ -27,21 +30,25 @@ Jörg Buchwald <joerg.buchwald@ufz.de> joerg <joerg@debian>
Jörg Buchwald <joerg.buchwald@ufz.de> joergbuchwald <44933043+joergbuchwald@users.noreply.github.com>
Jörg Buchwald <joerg.buchwald@ufz.de> joergbuchwald <joerg.buchwald@ufz.de>
Karsten Rink <karsten.rink@ufz.de>
Keita Yoshioka <keita.yoshioka@ufz.de> KeitaYoshioka <32516139+KeitaYoshioka@users.noreply.github.com>
Keita Yoshioka <keita.yoshioka@ufz.de>
Keita Yoshioka <keita.yoshioka@ufz.de> <32516139+KeitaYoshioka@users.noreply.github.com>
Lars Bilke <lars.bilke@ufz.de> <bilke@users.noreply.github.com> <lars@bilke.info>
Lars Bilke <lars.bilke@ufz.de> Lars Bilke <lars@bilke.info>
Lars Bilke <lars.bilke@ufz.de> Lars Bilke <larsbilke83@googlemail.com>
Marc Walther <marc.walther@ufz.de>
Mostafa Mollaali <mostafa.mollaali@ufz.de> MostafaMollaali <m.molaali@gmail.com>
Myles English <mylesenglish@gmail.com>
Norbert Grunwald <norbert.grunwald@ufz.de> <n.g.boettcher@gmail.com> <Norbert.Grunwald@ufz.de>
Norihiro Watanabe <norihiro.watanabe@aist.go.jp> <norihiro.w@gmail.com> <norihiro.watanabe@ufz.de>
Norbert Grunwald <norbert.grunwald@ufz.de> <n.g.boettcher@gmail.com>
Norbert Grunwald <norbert.grunwald@ufz.de> <Norbert.Grunwald@ufz.de>
Norihiro Watanabe <norihiro.watanabe@ufz.de> <norihiro.watanabe@aist.go.jp>
Norihiro Watanabe <norihiro.watanabe@ufz.de> <norihiro.w@gmail.com>
OGS Bot[bot] <no-email> git@dev2 <lars.bilke@ufz.de>
OGS Bot[bot] <no-email> GitLab Runner <ci@opengeosys.org>
OGS Bot[bot] <no-email> OGS Bot <larsbilke@web.de>
OGS Bot[bot] <no-email> OGS Bot <larsbilke@web.de>
OGS Bot[bot] <no-email> ogsbot <larsbilke@web.de>
Renchao Lu <renchao.lu@ufz.de> <renchao.lu@gmail.com> <lur@modmon128.intranet.ufz.de>
Renchao Lu <renchao.lu@ufz.de> <renchao.lu@gmail.com>
Renchao Lu <renchao.lu@ufz.de> <lur@modmon128.intranet.ufz.de>
Renchao Lu <renchao.lu@ufz.de> renchao.lu <renchao.lu@ufz.de>
Reza Taher Dang Koo <reza.taherdangkoo@ifgt.tu-freiberg.de> rezataherdangkoo <reza.taherdangkoo@gmail.com>
Shuang Chen <shuang.chen@bgr.de> <gechenshuang88@gmail.com>
......@@ -49,7 +56,7 @@ Shuang Chen <shuang.chen@bgr.de> Shuang Chen <shuang.chen@ufz.de>
Tengfei Deng <Tengfei.Deng@doktorand.tu-freiberg.de> tengfeideng <54792615+tengfeideng@users.noreply.github.com>
Tengfei Deng <Tengfei.Deng@doktorand.tu-freiberg.de> tengfeideng <dengtengfei2016@hotmail.com>
Thomas Fischer <thomas.fischer@ufz.de> <123_tom_dabei@web.de> <Thomas.Fischer@ufz.de>
Thomas Fischer <thomas.fischer@ufz.de>
Thomas Fischer <thomas.fischer@ufz.de> <Thomas.Fischer@ufz.de>
Thomas Kalbacher <thomas.kalbacher@ufz.de> Thomas-TK <thomas.kalbacher@ufz.de>
Thomas Nagel <thomas.nagel@ufz.de> <nagelt@tcd.ie>
Thomas Nagel <thomas.nagel@ufz.de> nagelt <thomas.nagel@ufz.de>
......@@ -85,3 +92,10 @@ Julian Heinze <julian.heinze@ufz.de>
Tao You <hhutyou@126.com>
Matthes Kantzenbach <m.kantzenbach@outlook.de>
Feliks K. Kiszkurno <feliks-kuba.kiszkurno@ufz.de>
Philipp Selzer <philipp.selzer@ufz.de>
Philipp Selzer <philipp.selzer@ufz.de> <Philipp.Selzer@gmx.net>
Joy Brato Shil <joybroto6@gmail.com>
Frieder Loer <frieder.loer@ufz.de>
Eike Radeisen <eike.radeisen@bgr.de>
Maximilian Dörnbrack <maximilian.doernbrack@ufz.de> <maximlian.doernbrack@ufz.de>
Kristof Kessler <kristof.kessler@bgr.de> <mail@kristofkessler.com>
\ No newline at end of file
......@@ -4,7 +4,9 @@ repos:
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md, --markdown-linebreak-ext=pandoc]
exclude: "^ThirdParty/.*|^Tests/Data/.*|^web/static|^Documentation/.vale/.*"
# Tests/Python/res/test_docu_scripts/ contain improper white spaces on
# purpose: such whitespace errors should be tested, there.
exclude: "^Tests/Data/.*|^Tests/Python/res/test_docu_scripts/|^web/static|^Documentation/.vale/.*|.*\\.patch"
- id: check-added-large-files
args: [--maxkb 1024]
- id: check-merge-conflict
......@@ -19,70 +21,84 @@ repos:
- id: fix-byte-order-marker
exclude: "^Documentation/.vale/.*"
- id: mixed-line-ending
exclude: ".*\\.vtu"
exclude: ".*\\.vtu|.*@@"
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
exclude: "ThirdParty|LinearMFront/generate_ref.py"
exclude: "LinearMFront/generate_ref.py"
# Run black on markdown notebooks
- repo: https://github.com/mwouts/jupytext
rev: v1.14.5
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: jupytext
args: [--pipe, black]
additional_dependencies:
- black==23.1.0 # Matches black hook
exclude: "web/.*"
- id: nbqa-black
additional_dependencies: [jupytext, black==23.1.0]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
exclude: 'ThirdParty/.*|Tests/Data/.*|.*\.ya?ml|.*\.bib|^web/content/imprint.md|^GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd|^Applications/FileIO/Legacy/OGSIOVer4.cpp|^scripts/cmake/CPM.cmake|Documentation/.vale/.*'
exclude: 'Tests/Data/.*|.*\.ya?ml|.*\.bib|^web/content/imprint.md|^GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd|^Applications/FileIO/Legacy/OGSIOVer4.cpp|^scripts/cmake/CPM.cmake|Documentation/.vale/.*|.*\.ipynb|.*\.svg|^GeoLib/predicates.c'
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: ["cmakelang[YAML]"]
args: [--config=.cmake-format.yaml]
exclude: "scripts/cmake/jedbrown/.*|PackagingMacros.cmake|conan.cmake|CPM.cmake|FindFilesystem.cmake|ConanSetup.cmake|Tests.cmake"
exclude: "CPM.cmake|FindFilesystem.cmake|FindMKL.cmake|JSONParser.cmake|Tests.cmake|FindTFEL.cmake|FindMFrontGenericInterface.cmake"
- id: cmake-lint
additional_dependencies: ["cmakelang[YAML]"]
exclude: "scripts/cmake/jedbrown/.*|PackagingMacros.cmake|conan.cmake|CPM.cmake|FindFilesystem.cmake|ConanSetup.cmake|BuildExternalProject.cmake"
exclude: "CPM.cmake|FindFilesystem.cmake|FindMKL.cmake|JSONParser.cmake|BuildExternalProject.cmake|FindTFEL.cmake|FindMFrontGenericInterface.cmake"
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
rev: v0.42.0
hooks:
- id: markdownlint
language_version: 22.11.0
- repo: local
hooks:
- id: git-diff-check
name: Run git diff --check
entry: git diff --check --cached -- ':!*.md' ':!*.pandoc' ':!*.asc' ':!*.dat' ':!*.ts'
language: system
exclude: "ThirdParty/*|Tests/Data/*|web/static/images/xsd"
stages: [commit, manual]
exclude: "Tests/Data/.*|web/static/images/xsd"
stages: [pre-commit, manual]
- id: file-extensions
name: Check file extensions
entry: scripts/hooks/pre-commit-file-extensions.sh
language: system
files: '.*\.cpp'
stages: [commit, manual]
stages: [pre-commit, manual]
- id: git-clang-format
name: git-clang-format
entry: bash -c 'if command -v git-clang-format &> /dev/null; then git clang-format; else exit 0; fi'
language: system
pass_filenames: false
files: \.(h|cpp)$
- repo: https://github.com/errata-ai/vale
rev: v2.24.4
hooks:
- id: vale
name: Check spelling with vale
entry: bash -c 'if command -v vale &> /dev/null; then vale sync; VALE_MIN_ALERT_LEVEL=error scripts/ci/helper/run-vale; else exit 0; fi'
name: vale sync
pass_filenames: false
language: system
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.262"
args: [sync]
- id: vale
args: [--output=line, --minAlertLevel=error]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.9"
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--output-format=full]
# A variant of the ruff hook above that automatically applies proposed fixes.
# Runs only manually.
# Run this hook (and all other manual hooks if any) with:
# pre-commit run --hook-stage manual
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.9"
hooks:
- id: ruff
files: "Applications/Python/.*"
types_or: [python, pyi, jupyter]
args: [--output-format=full, --fix, --exit-non-zero-on-fix]
stages: [manual]
# Enable on demand, run with
# pre-commit run --all-files clang-format
#
......
......@@ -7,10 +7,19 @@ ogs_add_library(ApplicationsLib ${LIB_SOURCES})
target_link_libraries(
ApplicationsLib
PUBLIC BaseLib GeoLib NumLib
$<$<TARGET_EXISTS:VTK::ParallelMPI>:VTK::ParallelMPI>
PRIVATE CMakeInfoLib MathLib MeshLib MeshGeoToolsLib MeshToolsLib pybind11::pybind11
$<$<BOOL:${OGS_USE_PETSC}>:petsc>
PUBLIC
BaseLib
GeoLib
NumLib
$<$<AND:$<BOOL:${OGS_USE_PETSC}>,$<TARGET_EXISTS:VTK::ParallelMPI>>:VTK::ParallelMPI>
$<$<AND:$<NOT:$<BOOL:${OGS_BUILD_WHEEL}>>,$<BOOL:${OGS_BUILD_CLI}>>:ogs_embedded_python>
PRIVATE CMakeInfoLib
MathLib
MeshLib
MeshGeoToolsLib
MeshToolsLib
$<$<BOOL:${OGS_USE_PETSC}>:PkgConfig::PETSC>
pybind11::module
)
if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTING)
......@@ -18,7 +27,9 @@ if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTING)
ApplicationsLib PUBLIC Processes PRIVATE ParameterLib ProcessLib
)
elseif(OGS_BUILD_GUI)
target_link_libraries(ApplicationsLib PRIVATE MeshToolsLib nlohmann_json::nlohmann_json)
target_link_libraries(
ApplicationsLib PRIVATE MeshToolsLib nlohmann_json::nlohmann_json
)
endif()
if(OGS_USE_LIS)
......@@ -36,7 +47,6 @@ target_compile_definitions(
# see https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes
# ~~~
if(NOT OGS_BUILD_WHEEL AND OGS_BUILD_CLI)
target_link_libraries(ApplicationsLib PRIVATE ogs_embedded_python)
set_target_properties(
ApplicationsLib PROPERTIES CXX_VISIBILITY_PRESET hidden
)
......
/**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Copyright (c) 2012-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
......@@ -19,6 +19,7 @@
/// The default implementation is empty providing polymorphic behaviour when
/// using this class.
#include "BaseLib/MPI.h"
#include "NumLib/DOF/GlobalMatrixProviders.h"
#if defined(USE_PETSC)
......@@ -28,9 +29,8 @@ namespace ApplicationsLib
{
struct LinearSolverLibrarySetup final
{
LinearSolverLibrarySetup(int argc, char* argv[])
LinearSolverLibrarySetup(int argc, char* argv[]) : mpi_setup(argc, argv)
{
MPI_Init(&argc, &argv);
char help[] = "ogs6 with PETSc \n";
PetscInitialize(&argc, &argv, nullptr, help);
MPI_Comm_set_errhandler(PETSC_COMM_WORLD, MPI_ERRORS_RETURN);
......@@ -40,8 +40,9 @@ struct LinearSolverLibrarySetup final
{
NumLib::cleanupGlobalMatrixProviders();
PetscFinalize();
MPI_Finalize();
}
BaseLib::MPI::Setup mpi_setup;
};
} // ApplicationsLib
#elif defined(USE_LIS)
......@@ -67,7 +68,22 @@ namespace ApplicationsLib
{
struct LinearSolverLibrarySetup final
{
LinearSolverLibrarySetup(int /*argc*/, char* /*argv*/[]) {}
LinearSolverLibrarySetup(int /*argc*/, char* /*argv*/[])
{
#ifdef _OPENMP
const char* omp_num_threads_env = std::getenv("OMP_NUM_THREADS");
if (omp_num_threads_env)
{
INFO("OMP_NUM_THREADS is set to: {:s}", omp_num_threads_env);
}
else
{
WARN("OMP_NUM_THREADS is not set, falling back to: {:d}",
omp_get_max_threads());
}
#endif
INFO("Eigen use {:d} threads", Eigen::nbThreads());
}
~LinearSolverLibrarySetup()
{
NumLib::cleanupGlobalMatrixProviders();
......
......@@ -4,7 +4,7 @@
* \date 2010-08-25
*
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Copyright (c) 2012-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
......@@ -32,6 +32,11 @@
#include <pybind11/embed.h>
#endif
namespace GeoLib
{
struct NamedRaster;
}
namespace MeshLib
{
class Mesh;
......@@ -89,7 +94,7 @@ public:
ProcessLib::TimeLoop& getTimeLoop() { return *_time_loop; }
MeshLib::Mesh* getMesh(std::string const& mesh_name) const;
MeshLib::Mesh& getMesh(std::string const& mesh_name) const;
std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const&
getMedia() const
......@@ -138,6 +143,7 @@ private:
const std::string& output_directory);
std::vector<std::unique_ptr<MeshLib::Mesh>> _mesh_vec;
std::vector<GeoLib::NamedRaster> _named_rasters;
std::vector<std::unique_ptr<ProcessLib::Process>> _processes;
std::vector<ProcessLib::ProcessVariable> _process_variables;
......
......@@ -3,7 +3,7 @@
* \brief Implementation of class Simulation
*
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Copyright (c) 2012-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
......@@ -115,13 +115,13 @@ void Simulation::initializeDataStructures(
double Simulation::currentTime() const
{
auto const& time_loop = project_data->getTimeLoop();
return time_loop.currentTime();
return time_loop.currentTime()();
}
double Simulation::endTime() const
{
auto const& time_loop = project_data->getTimeLoop();
return time_loop.endTime();
return time_loop.endTime()();
}
bool Simulation::executeTimeStep()
......@@ -139,7 +139,7 @@ bool Simulation::executeTimeStep()
return false;
}
MeshLib::Mesh* Simulation::getMesh(std::string const& name)
MeshLib::Mesh& Simulation::getMesh(std::string const& name)
{
return project_data->getMesh(name);
}
......
......@@ -3,7 +3,7 @@
* \brief Declaration of class Simulation
*
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Copyright (c) 2012-2025, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
......@@ -38,12 +38,12 @@ public:
bool nonfatal, std::string const& outdir, std::string const& mesh_dir,
std::string const& script_dir, bool write_prj);
double currentTime() const;
double endTime() const;
OGS_EXPORT_SYMBOL double currentTime() const;
OGS_EXPORT_SYMBOL double endTime() const;
OGS_EXPORT_SYMBOL bool executeTimeStep();
OGS_EXPORT_SYMBOL bool executeSimulation();
OGS_EXPORT_SYMBOL void outputLastTimeStep() const;
OGS_EXPORT_SYMBOL MeshLib::Mesh* getMesh(std::string const& name);
OGS_EXPORT_SYMBOL MeshLib::Mesh& getMesh(std::string const& name);
OGS_EXPORT_SYMBOL std::optional<ApplicationsLib::TestDefinition>
getTestDefinition() const;
......