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
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request, workflow_dispatch]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.16.26
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches:
- main
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
pull_request:
paths-ignore:
- 'AUTHORS.md'
- 'LICENSE.md'
- 'README.md'
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure
run: |
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install
- name: Build
run: |
cd build
make -j 2
- name: Install
run: |
cd build
make install
- name: Run test
run: |
install/bin/test_smesh
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session for debugging
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled && always() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
install/
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default.extend-words]
inout = "inout"
INOUT = "INOUT"
alle = "alle"
36 changes: 36 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required (VERSION 3.5.1)

# Get project version from `VERSION` file
file(READ "${CMAKE_SOURCE_DIR}/VERSION" version_file)
# Parse string
if (${version_file} MATCHES "(([0-9]+)\\.([0-9]+)\\.([0-9]+)([+-]([A-Za-z0-9_-]+))?)")
set(SMESH_VERSION ${CMAKE_MATCH_1})
set(SMESH_VERSION_MAJOR ${CMAKE_MATCH_2})
set(SMESH_VERSION_MINOR ${CMAKE_MATCH_3})
set(SMESH_VERSION_PATCH ${CMAKE_MATCH_4})
set(SMESH_VERSION_PRERELEASE ${CMAKE_MATCH_6})
else()
message(FATAL_ERROR "Unable to parse version from `VERSION` file")
endif()

project(smesh
VERSION ${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}
LANGUAGES Fortran)

set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

add_library(smesh SHARED
${CMAKE_SOURCE_DIR}/src/smesh.f90
)

add_library(input_output SHARED
${CMAKE_SOURCE_DIR}/src/input_output.f90
)

add_executable(test_smesh
${CMAKE_SOURCE_DIR}/src/test_smesh.f90
)
target_link_libraries(test_smesh PRIVATE smesh input_output)

install(TARGETS smesh input_output test_smesh)
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0-dev
1 change: 1 addition & 0 deletions output_data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 0 additions & 1 deletion output_data/empty.txt

This file was deleted.

File renamed without changes.
12 changes: 6 additions & 6 deletions smesh.f90 → src/smesh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ SUBROUTINE build_delaunay_triangulation(ve_out, data_points, shuffle, verbose)
! some degree of spatial organization, apparently not shuffling them leads to
! very short search times when starting the search at the last inserted triangle,
! while shuffling renders very few edge flips necessary in orger to
! mantain the delaunay property.
! maintain the delaunay property.

IF (present(shuffle)) THEN
IF (shuffle) THEN
Expand Down Expand Up @@ -268,7 +268,7 @@ SUBROUTINE build_delaunay_triangulation(ve_out, data_points, shuffle, verbose)
pt(:,ve(2,j)), pt(:,ve(3,j)), triangle_inside)
IF (triangle_inside) THEN
! The point has been located inside the triangle j
! Save the informations about the old triangle j and build k1 and k2
! Save the information about the old triangle j and build k1 and k2
k1 = k + 1
k2 = k + 2
! WRITE(*,"(A, I6, A, I6, A, I6, A, I6, A, I6)") "Point ", i, &
Expand Down Expand Up @@ -322,7 +322,7 @@ SUBROUTINE build_delaunay_triangulation(ve_out, data_points, shuffle, verbose)
bc(:, j) = sum(pt(:,ve(:, j)),2)*oot
bc(:,k1) = sum(pt(:,ve(:,k1)),2)*oot
bc(:,k2) = sum(pt(:,ve(:,k2)),2)*oot
k = k2 ! 3 triangles added - 1 deletd
k = k2 ! 3 triangles added - 1 deleted
END IF
END IF
IF (triangle_inside .or. triangle_edge) THEN
Expand Down Expand Up @@ -794,7 +794,7 @@ END SUBROUTINE fuzzy_test_segment

PURE SUBROUTINE onedge(p, v1, v2, v3, edge, ii)
! Tests if p lies on an edge of triangle (v1, v2, v3).
! Returns the index of the edge yelding maximum collinearity
! Returns the index of the edge yielding maximum collinearity
REAL(8), DIMENSION(2), INTENT(IN) :: p, v1, v2, v3
LOGICAL, INTENT(OUT) :: edge
INTEGER, INTENT(OUT) :: ii
Expand Down Expand Up @@ -995,7 +995,7 @@ PURE FUNCTION obtuse(po, pe1, pe2)
obtuse = sum((pe1 - po)*(pe2 - po)) .lt. 0.0d0
! in doubt we might say that pi/2 and slightly less is still
! obtuse and generate one more node, for robustness
! but maybe we introduce instability on boundig box borders?
! but maybe we introduce instability on bounding box borders?
END FUNCTION obtuse

PURE FUNCTION acute(po, pe1, pe2)
Expand All @@ -1004,7 +1004,7 @@ PURE FUNCTION acute(po, pe1, pe2)
acute = sum((pe1 - po)*(pe2 - po)) .gt. 0.0d0
! in doubt we might say that pi/2 and slightly less is still
! obtuse and generate one more node, for robustness
! but maybe we introduce instability on boundig box borders?
! but maybe we introduce instability on bounding box borders?
END FUNCTION acute

PURE FUNCTION near_obtuse(po, pe1, pe2, cosmin)
Expand Down
File renamed without changes.