Skip to content

Commit

Permalink
final rev1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pescap committed Aug 2, 2023
1 parent d99e1b8 commit c369ec3
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 47 deletions.
4 changes: 2 additions & 2 deletions examples/fichera/mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def set_random_seed(seed):

config = bemppUQ.config.set_case("MC")

precision = 10
precision = 30

h = 2.0 * np.pi / (precision * config["k_int"])

Expand All @@ -142,7 +142,7 @@ def set_random_seed(seed):

Ut, _ = evaluate_far_field(transmission_operators_t, config)

np.savetxt("results/out" + str(seed) + ".txt", Ut.view(float))
np.savetxt("results1/out" + str(seed) + ".txt", Ut.view(float))

t0 = time.time() - t0
print("Execution time: ", t0)
9 changes: 9 additions & 0 deletions examples/fichera/plot_mc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"#for run in {1..20}; do python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py; done"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for run in {1..20}; do python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py&python3 mc.py; done"
]
},
{
"cell_type": "code",
"execution_count": 22,
Expand Down
Binary file modified examples/fichera/plots/fichera0.pdf
Binary file not shown.
Binary file modified examples/fichera/plots/fichera1.pdf
Binary file not shown.
Binary file modified examples/fichera/plots/fichera2.pdf
Binary file not shown.
25 changes: 15 additions & 10 deletions examples/fichera/plots_mc.ipynb

Large diffs are not rendered by default.

Binary file modified examples/fichera/results/full/1_2.txt.npy
Binary file not shown.
Binary file modified examples/fichera/results/full/6_10.txt.npy
Binary file not shown.
9 changes: 8 additions & 1 deletion examples/fichera/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
)

bempp.api.global_parameters.assembly.potential_operator_assembly_type = "dense"
bempp.api.global_parameters.hmat.eps = 1e-4
bempp.api.global_parameters.hmat.eps = 1e-6
print(bempp.api.global_parameters.hmat.eps)

ta = time.time()

Expand Down Expand Up @@ -94,16 +95,22 @@ def get_base_grid(h):
parser.add_argument("--l0", default=0, type=int)
parser.add_argument("--nrank", default=1, type=int)

parser.add_argument("--prec", default=10, type=int)

args = parser.parse_args()
l0 = args.l0
nrank = args.nrank
prec = args.prec

print(l0, "l0")


precision_list = [2, 5, 10]
precision = precision_list[l0]

if prec != 10:
precision = prec

h = 2.0 * np.pi / (precision * config["k_int"])

if l0 == 2:
Expand Down
24 changes: 12 additions & 12 deletions examples/kite/plot_mc.ipynb

Large diffs are not rendered by default.

Binary file modified examples/kite/plots/kite.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -96,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -139,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -225,7 +225,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -275,7 +275,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -336,7 +336,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -352,7 +352,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -394,7 +394,28 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1. , 6.78149363, 9.10193553, 35.3964499 , 33.05938767,\n",
" 27.65405125, 17.87109752, 14.33922143])"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1/compression_hat"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -404,7 +425,7 @@
" 70.99225214, 45.23645742, 37.85853709])"
]
},
"execution_count": 36,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -415,7 +436,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down
43 changes: 32 additions & 11 deletions examples/tp/plots-transmission_problem.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -96,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -139,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -225,7 +225,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -275,7 +275,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -336,7 +336,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -352,7 +352,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -394,7 +394,28 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1. , 6.78149363, 9.10193553, 35.3964499 , 33.05938767,\n",
" 27.65405125, 17.87109752, 14.33922143])"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1/compression_hat"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -404,7 +425,7 @@
" 70.99225214, 45.23645742, 37.85853709])"
]
},
"execution_count": 36,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -415,7 +436,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down
Binary file modified examples/tp/plots/FirstSecond.pdf
Binary file not shown.
Binary file modified examples/tp/plots/SecondDof.pdf
Binary file not shown.
Binary file modified examples/tp/plots/SecondEfficiency.pdf
Binary file not shown.
Binary file modified examples/tp/plots/Secondh.pdf
Binary file not shown.
Binary file modified examples/tp/plots/combVsSym0.pdf
Binary file not shown.

0 comments on commit c369ec3

Please sign in to comment.