Skip to content

Commit

Permalink
Merge pull request #8 from tataratat/ft-custom-poisson
Browse files Browse the repository at this point in the history
update formatting, add custom poisson 2d
  • Loading branch information
j042 authored Dec 19, 2023
2 parents 6667182 + fcb7c13 commit 532558a
Show file tree
Hide file tree
Showing 7 changed files with 417 additions and 26 deletions.
11 changes: 0 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: "v3.15.0"
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: "23.11.0"
hooks:
Expand Down
7 changes: 7 additions & 0 deletions examples/custom_poisson2d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import feigen

if __name__ == "__main__":
# feigen.log.configure(debug=True)

b = feigen.CustomPoisson2D()
b.start()
5 changes: 4 additions & 1 deletion feigen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from feigen import bspline, comm, log, poisson2d
from feigen import bspline, comm, custom_poisson2d, log, poisson2d
from feigen._version import __version__
from feigen.bspline import BSpline2D
from feigen.custom_poisson2d import CustomPoisson2D
from feigen.poisson2d import Poisson2D

__all__ = [
Expand All @@ -9,6 +10,8 @@
"comm",
"log",
"poisson2d",
"custom_poisson2d",
"BSpline2D",
"Poisson2D",
"CustomPoisson2D",
]
14 changes: 7 additions & 7 deletions feigen/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ def __init__(self, uri, degree=None, ncoeffs=None): # noqa PLR0915
self._state = {}

# plotter initialization constants
self._config["dim"] = int(2) # 2D
self._config["n_subplots"] = int(
3
) # geometry, boundary condition, server response
self._config["geometry_plot"] = int(0)
self._config["bc_plot"] = int(1)
self._config["server_plot"] = int(2)
self._config["dim"] = 2 # 2D
self._config[
"n_subplots"
] = 3 # geometry, boundary condition, server response
self._config["geometry_plot"] = 0
self._config["bc_plot"] = 1
self._config["server_plot"] = 2

# field dim is temporary for now - (1)
self._config["field_dim"] = 1
Expand Down
Loading

0 comments on commit 532558a

Please sign in to comment.