Skip to content

Commit

Permalink
Merge pull request #3 from tataratat/collocation-solve
Browse files Browse the repository at this point in the history
Collocation solve
  • Loading branch information
j042 authored Sep 7, 2023
2 parents e0de49f + 30210a5 commit bd96e38
Show file tree
Hide file tree
Showing 5 changed files with 786 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ pip install git+https://github.com/tataratat/feigen.git@main
```

## Quick start
### iganet
Current version supports iganet's BSplineSurface.
Assuming that you have a server running,
```
python3 -c "import feigen; feigen.BSpline2D('ws://localhost:9001').start()"
```

### IGA examples
#### Poisson problem 2D
```
python3 -c "import feigen; feigen.Poisson2D().start()"
```
7 changes: 7 additions & 0 deletions examples/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.Poisson2D()
b.start()
5 changes: 4 additions & 1 deletion feigen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from feigen import bspline, comm, log
from feigen import bspline, comm, log, poisson2d
from feigen._version import __version__
from feigen.bspline import BSpline2D
from feigen.poisson2d import Poisson2D

__all__ = [
"__version__",
"bspline",
"comm",
"log",
"poisson2d",
"BSpline2D",
"Poisson2D",
]
4 changes: 2 additions & 2 deletions feigen/bspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def setup(self, boundary_splines):
self.end_ids = (
int(len(boundary_splines[0].cps) - 1),
int(len(boundary_splines[0].cps) - 1),
int(len(boundary_splines[1].cps) - 1),
int(len(boundary_splines[1].cps) - 1),
int(len(boundary_splines[2].cps) - 1),
int(len(boundary_splines[2].cps) - 1),
)

# this is a bit verbose and can be also done with mod but
Expand Down
Loading

0 comments on commit bd96e38

Please sign in to comment.