Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
Expand Down Expand Up @@ -121,4 +125,3 @@ StatementMacros:
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never

4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

# Apply LLVM stlye for the first time
b864952a14025d953acc5fad1198e5ba119e25d3
# Apply mneme style
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2022 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

name: CMake

on: [push]
Expand All @@ -8,6 +12,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
build_type: ["Release", "Debug"]

Expand All @@ -18,27 +23,23 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -qq g++ openmpi-bin openmpi-common libopenmpi-dev hdf5-tools libhdf5-openmpi-dev libnetcdf-dev

- name: Configure PUMGen
working-directory: ${{ github.workspace }}
run: |
git submodule update --init --recursive
mkdir build_${{ matrix.build_type}} && cd build_${{ matrix.build_type}}
cmake .. -DCMAKE_PREFIX_PATH=${{ runner.workspace }}/opt -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
working-directory: ${{ github.workspace }}/build_${{ matrix.build_type }}
run: cmake --build .
clang-format:

pre-commit-check:
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: clang-format
run: |
sudo apt-get update
sudo apt-get install -qq python3 python3-pip
pip3 install clang-format==19.1.0
git submodule update --init
./submodules/run-clang-format/run-clang-format.py --clang-format-executable clang-format --exclude src/third_party -r src
- uses: pre-commit/action@v3.0.1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2017 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

# KDevelop4
*.kdev4
*.kdev4/
Expand Down
7 changes: 4 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# SPDX-FileCopyrightText: 2017 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

[submodule "submodules/utils"]
path = submodules/utils
url = ../../TUM-I5/utils.git
[submodule "submodules/tinyxml2"]
path = submodules/tinyxml2
url = ../../leethomason/tinyxml2.git
[submodule "submodules/run-clang-format"]
path = submodules/run-clang-format
url = ../../Sarcasm/run-clang-format.git
63 changes: 63 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-FileCopyrightText: 2025 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-LicenseComments: Full text under /LICENSE and /LICENSES/
#
# SPDX-FileContributor: Author lists in /AUTHORS and /CITATION.cff

---

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
name: '[GENERIC] merge conflict check'
- id: check-symlinks
name: '[GENERIC] symlink check'
- id: destroyed-symlinks
name: '[GENERIC] detect broken symlinks'
- id: detect-private-key
name: '[GENERIC] detect private keys uploaded by accident'
- id: check-case-conflict
name: '[GENERIC] detect OS file naming case conflicts'
- id: check-executables-have-shebangs
name: '[GENERIC] check for shebangs in executable files'
- id: check-illegal-windows-names
name: '[GENERIC] detect illegal Windows file names'
- id: check-json
name: '[JSON] check'
#- id: check-xml
# name: '[XML] check'

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
hooks:
- id: markdownlint-cli2
name: '[MARKDOWN] lint'

- repo: https://github.com/fsfe/reuse-tool
rev: v5.1.1
hooks:
- id: reuse
name: '[GENERIC] REUSE compatibiltiy'

- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: 'v1.0.0'
hooks:
- id: sphinx-lint
name: '[SPHINX/RST] sphinx lint'

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v21.1.0'
hooks:
- id: clang-format
name: '[C++] clang-format'

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
name: '[GENERIC] newline eof'
- id: trailing-whitespace
name: '[GENERIC] remove trailing whitespace'
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.9)

cmake_policy(SET CMP0074 NEW)
Expand Down Expand Up @@ -38,8 +42,8 @@ add_executable(pumgen
${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/GMSHLexer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/GMSHParser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/GMSH2Parser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/aux/InsphereCalculator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/aux/MPIConvenience.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/helper/InsphereCalculator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/helper/MPIConvenience.cpp
)

target_include_directories(pumgen PUBLIC src
Expand Down Expand Up @@ -93,7 +97,7 @@ if (SIMMETRIX)
find_package(easi 1.0.0 REQUIRED)
target_link_libraries(pumgen PUBLIC easi::easi)

target_sources(pumgen PUBLIC
target_sources(pumgen PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/input/AnalysisAttributes.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/input/EasiMeshSize.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/input/MeshAttributes.cpp
Expand Down
11 changes: 11 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<!--
SPDX-FileCopyrightText: 2023 SeisSol Group

SPDX-License-Identifier: BSD-3-Clause
-->

# PUMGen

A mesh converter to the PUML format, as used in SeisSol.

## Installing
See our wiki for detailed install instructions: https://github.com/SeisSol/PUMGen/wiki

See our [wiki](https://github.com/SeisSol/PUMGen/wiki) for detailed install instructions.
14 changes: 10 additions & 4 deletions XmlExample/meshAttributes.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<!--
SPDX-FileCopyrightText: 2020 SeisSol Group

SPDX-License-Identifier: BSD-3-Clause
-->

<freeSurface>1</freeSurface>
<dynamicRupture>2</dynamicRupture>
<absorbing>3,4</absorbing>
<!-- see https://seissol.readthedocs.io/en/latest/fault-tagging.html for SeisSol convention regarding boundaryCondition -->
<boundaryCondition tag="65">7</boundaryCondition>
<boundaryCondition tag="65">7</boundaryCondition>
<boundaryCondition tag="67">7</boundaryCondition>
<boundaryCondition tag="68">8,9</boundaryCondition>
<globalMSize value="100e3"/>
Expand All @@ -27,15 +33,15 @@
<surfaceNoMesh>1,2</surfaceNoMesh>
<regionNoMesh>1,4</regionNoMesh>

<!-- For complex geometry, finding the region in which a point lies is expensive and will
slow down the mesh generation significantly when using VelocityAwareMeshing.
<!-- For complex geometry, finding the region in which a point lies is expensive and will
slow down the mesh generation significantly when using VelocityAwareMeshing.
To avoid such an expensive call to the findGroup function, we can specify the group to use
in the easi query using the (optional) argument bypassFindRegionAndUseGroup -->

<VelocityAwareMeshing easiFile="easiFile.yaml" elementsPerWaveLength="2">
<VelocityRefinementCuboid frequency="2" centerX="200" centerY="200" centerZ="-100"
halfSizeX="100" halfSizeY="100" halfSizeZ="100" rotationZAnticlockwiseFromX="30."/>
<VelocityRefinementCuboid frequency="10" centerX="0" centerY="0" centerZ="0"
halfSizeX="100" halfSizeY="100" halfSizeZ="100"
halfSizeX="100" halfSizeY="100" halfSizeZ="100"
bypassFindRegionAndUseGroup="1"/>
</VelocityAwareMeshing>
4 changes: 4 additions & 0 deletions cmake/FindAPF.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

include(FindPackageHandleStandardArgs)

# simmetrixLibs = [('gmi_sim', 'gmi_sim.h'), ('apf_sim', 'apfSIM.h')]
Expand Down
1 change: 1 addition & 0 deletions cmake/FindNetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Provides the following variables:
# Stolen from VTK with some small modifications
# https://github.com/Kitware/VTK/blob/master/CMake/FindNetCDF.cmake
# (BSD 3-Clause License)
# SPDX-License-Identifier: BSD-3-Clause

#[[=========================================================================

Expand Down
6 changes: 5 additions & 1 deletion cmake/FindSIMMETRIX.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause

include(FindPackageHandleStandardArgs)

if (SCOREC)
Expand Down Expand Up @@ -36,7 +40,7 @@ find_library(SIM_PARTITIONED_MESH_LIB SimPartitionedMesh ${SIM_LIB_HINT})
find_library(SIM_PARTITIONED_MESH_MPI_LIB SimPartitionedMesh-mpi ${SIM_LIB_HINT})
find_library(SIM_PARTITIONED_WRAPPER_LIB SimPartitionWrapper-${SIM_MPI} ${SIM_LIB_HINT})
find_library(SIM_PS_KRNL_LIB pskernel ${SIM_LIB_HINT}/psKrnl)

get_filename_component(SIM_PS_KRNL_LIB_DIR ${SIM_PS_KRNL_LIB} DIRECTORY)

list(APPEND SIMMETRIX_LIBRARIES
Expand Down
Loading