Skip to content

Commit

Permalink
Updated python-publish
Browse files Browse the repository at this point in the history
Generated a new codecov token and updated badge to track the new branch
Example in the documentation fixed
  • Loading branch information
thomgrand committed Jun 4, 2021
1 parent 025f0b0 commit a91986f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Test with pytest
run: |
python -m pytest --cov-config=.coveragerc_cpu --cov=fimpy tests/
bash <(curl -s https://codecov.io/bash) -t 9ad55939-f54d-4aad-a7eb-fcd2d22d4ecd
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
- name: Test installation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
run: python -m build -s
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Fast Iterative Method - Numpy/Cupy
This repository implements the Fast Iterative Method on [tetrahedral domains](https://epubs.siam.org/doi/abs/10.1137/120881956) and [triangulated surfaces](https://epubs.siam.org/doi/abs/10.1137/100788951) purely in python both for CPU (numpy) and GPU (cupy). The main focus is however on the GPU implementation, since it can be better exploited for very large domains.

[![codecov](https://codecov.io/gh/thomgrand/fim-python/branch/main/graph/badge.svg?token=DG05WR5030)](https://codecov.io/gh/thomgrand/fim-python)
[![codecov](https://codecov.io/gh/thomgrand/fim-python/branch/master/graph/badge.svg?token=DG05WR5030)](https://codecov.io/gh/thomgrand/fim-python)
[![CI Tests](https://github.com/thomgrand/fim-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/thomgrand/fim-python/actions/workflows/python-package.yml)

# Details
Expand Down
8 changes: 4 additions & 4 deletions docs/example.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

import numpy as np
import cupy as cp
from fimpy import fim_solver
from fimpy.solver import FIMPY
from scipy.spatial import Delaunay
import matplotlib.pyplot as plt

#Create triangulated points in 2D
x = np.linspace(-1, 1, num=50)
X, Y = np.meshgrid(x, x)
points = np.stack([X, Y], axis=-1).reshape([-1]).astype(np.float32)
points = np.stack([X, Y], axis=-1).reshape([-1, 2]).astype(np.float32)
elems = Delaunay(points).simplices
elem_centers = np.mean(points[elems], axis=1)

#The domain will have a small spot where movement will be slow
velocity_p = (1 / (1 + np.exp(3.5 - 25*np.linalg.norm(points - np.array([[0.33, 0.33]]), axis=-1)**2)))
velocity_e = (1 / (1 + np.exp(3.5 - 25*np.linalg.norm(elem_centers - np.array([[0.33, 0.33]]), axis=-1)**2)))
velocity_e = (1 / (1 + np.exp(3.5 - 25*np.linalg.norm(elem_centers - np.array([[0.33, 0.33]]), axis=-1)**2)))
D = np.eye(2, dtype=np.float32)[np.newaxis] * velocity_e[..., np.newaxis, np.newaxis] #Isotropic propagation

x0 = np.array([np.argmin(np.linalg.norm(points, axis=-1), axis=0)])
x0_vals = np.array([0.])

#Create a FIM solver, by default the GPU solver will be called with the active list
fim = fim_solver(points, elems, D)
fim = FIMPY.create_fim_solver(points, elems, D)
phi = fim.comp_fim(x0, x0_vals)

#Plot the data of all points to the given x0 at the center of the domain
Expand Down
2 changes: 1 addition & 1 deletion fimpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#TODO: Import all symbols and methods here
from .solver import FIMPY

__version__ = "1.0.0"
__version__ = "1.0.1"
__author__ = "Thomas Grandits"
#__all__ = ["FIMPY"]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
long_description = readme.read()

setup(name="fim-python",
version="1.0.0",
version="1.0.1",
description="This repository implements the Fast Iterative Method on tetrahedral domains and triangulated surfaces purely in python both for CPU (numpy) and GPU (cupy).",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
9 changes: 0 additions & 9 deletions tests/test_fim_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,3 @@ def test_comp(self, dims, elem_dims, precision, use_active_list, device='cpu'):
@pytest.mark.parametrize('use_active_list', [True, False])
def test_comp_gpu(self, dims, elem_dims, precision, use_active_list):
self.test_comp(dims, elem_dims, precision, use_active_list=use_active_list, device='gpu')

#def test_init
#def test_1D_network
#def test_multidim_network
#def test_manifold
#def test_volumetric_model

#if __name__ == "__main__":
#unittest.main()

0 comments on commit a91986f

Please sign in to comment.