-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
38 lines (27 loc) · 755 Bytes
/
Copy pathmain.py
File metadata and controls
38 lines (27 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## main file
# this file glues all ops in different files and runs the solve
from ititree import *
from input_ import PlaneWave
from external import SqDomain
import numpy as np
import matplotlib.pyplot as plt
# def _plot_grid(grid):
# """Plot a grid of points with index label"""
# fig, ax = plt.subplots()
# ax.scatter(grid[0, :], grid[1, :])
# for i, pt in enumerate(grid.T):
# if i%4==0: ax.annotate(str(i), (pt[0], pt[1]))
# plt.show()
# return
def main():
in_ = PlaneWave(40, np.array([1+0j]))
a = BoxTree((1.0, 1.0), (1.25, 1.25))
Tint, R = build_sol(a)
u = {}
solveBVP(a, in_.f, u)
plot_solution(a,u, in_)
b = SqDomain(a, 16, 224)
us = b.solve(Tint, in_)
print(us)
if __name__ == '__main__':
main()