Skip to content

Commit 61b5f85

Browse files
committed
HW 10 and lots of mods
1 parent b1ed7b3 commit 61b5f85

14 files changed

+3858
-443
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ engy5310p*
1010
test*
1111
*.csv
1212
cubit
13+
*vista*
1314
projects/tritium/*.C
1415
projects/tritium/*.c
1516
projects/tritium/*.cxx

notebooks/06-poisson-1d-dirichlet.ipynb

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,10 @@
636636
"n_plot_pts = n_felem + 1\n",
637637
"n_plot_pts = 20\n",
638638
"\n",
639-
"from engy_5310.toolkit import write_engy5310_p1_1d_input_file\n",
639+
"try: \n",
640+
" from engy_5310.toolkit import write_engy5310_p1_1d_input_file \n",
641+
"except ModuleNotFoundError:\n",
642+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
640643
"\n",
641644
"write_engy5310_p1_1d_input_file(x_left, x_right, u_left=u_left, u_right=u_right, \n",
642645
" diff_coeff=diff_coeff, source_s=source_s, n_felem=n_felem, order=order, \n",
@@ -657,7 +660,7 @@
657660
"# Engy-5310 Problem 1: Poisson 1D FEM\r\n",
658661
"# UMass Lowell Nuclear Chemical Engineering\r\n",
659662
"# Prof. Valmor F. de Almeida\r\n",
660-
"# 13Apr21 15:07:57\r\n",
663+
"# 17Apr21 22:16:33\r\n",
661664
"\r\n",
662665
"# Parameters\r\n",
663666
"xmin = 0.00000e+00\r\n",
@@ -770,8 +773,8 @@
770773
"LibMesh Version: 27141d18f3137f77e33cdb3d565fd38ebfbfc46f\n",
771774
"PETSc Version: 3.15.0\n",
772775
"SLEPc Version: 3.14.2\n",
773-
"Current Time: Tue Apr 13 15:07:57 2021\n",
774-
"Executable Timestamp: Tue Apr 13 13:37:48 2021\n",
776+
"Current Time: Sat Apr 17 22:16:33 2021\n",
777+
"Executable Timestamp: Sat Apr 17 21:27:24 2021\n",
775778
"\n",
776779
"Parallelism:\n",
777780
" Num Processors: 1\n",
@@ -970,7 +973,10 @@
970973
"#n_plot_pts = 2*n_felem + 1\n",
971974
"n_plot_pts = 20\n",
972975
"\n",
973-
"from engy_5310.toolkit import write_engy5310_p1_1d_input_file\n",
976+
"try: \n",
977+
" from engy_5310.toolkit import write_engy5310_p1_1d_input_file \n",
978+
"except ModuleNotFoundError:\n",
979+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
974980
"\n",
975981
"write_engy5310_p1_1d_input_file(x_left, x_right, u_left=u_left, u_right=u_right, \n",
976982
" diff_coeff=diff_coeff, source_s=source_s, n_felem=n_felem, order=order, \n",
@@ -991,7 +997,7 @@
991997
"# Engy-5310 Problem 1: Poisson 1D FEM\r\n",
992998
"# UMass Lowell Nuclear Chemical Engineering\r\n",
993999
"# Prof. Valmor F. de Almeida\r\n",
994-
"# 13Apr21 15:07:59\r\n",
1000+
"# 17Apr21 22:16:35\r\n",
9951001
"\r\n",
9961002
"# Parameters\r\n",
9971003
"xmin = 0.00000e+00\r\n",
@@ -1103,8 +1109,8 @@
11031109
"LibMesh Version: 27141d18f3137f77e33cdb3d565fd38ebfbfc46f\n",
11041110
"PETSc Version: 3.15.0\n",
11051111
"SLEPc Version: 3.14.2\n",
1106-
"Current Time: Tue Apr 13 15:07:59 2021\n",
1107-
"Executable Timestamp: Tue Apr 13 13:37:48 2021\n",
1112+
"Current Time: Sat Apr 17 22:16:35 2021\n",
1113+
"Executable Timestamp: Sat Apr 17 21:27:24 2021\n",
11081114
"\n",
11091115
"Parallelism:\n",
11101116
" Num Processors: 1\n",
@@ -1314,7 +1320,10 @@
13141320
"#n_plot_pts = 2*n_felem + 1\n",
13151321
"n_plot_pts = 20\n",
13161322
"\n",
1317-
"from engy_5310.toolkit import write_engy5310_p1_1d_input_file\n",
1323+
"try: \n",
1324+
" from engy_5310.toolkit import write_engy5310_p1_1d_input_file \n",
1325+
"except ModuleNotFoundError:\n",
1326+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
13181327
"\n",
13191328
"write_engy5310_p1_1d_input_file(x_left, x_right, u_left=u_left, u_right=u_right, \n",
13201329
" diff_coeff=diff_coeff, source_s=source_s, n_felem=n_felem, order=order, \n",
@@ -1335,7 +1344,7 @@
13351344
"# Engy-5310 Problem 1: Poisson 1D FEM\r\n",
13361345
"# UMass Lowell Nuclear Chemical Engineering\r\n",
13371346
"# Prof. Valmor F. de Almeida\r\n",
1338-
"# 13Apr21 15:08:00\r\n",
1347+
"# 17Apr21 22:16:36\r\n",
13391348
"\r\n",
13401349
"# Parameters\r\n",
13411350
"xmin = 0.00000e+00\r\n",
@@ -1469,8 +1478,8 @@
14691478
"LibMesh Version: 27141d18f3137f77e33cdb3d565fd38ebfbfc46f\n",
14701479
"PETSc Version: 3.15.0\n",
14711480
"SLEPc Version: 3.14.2\n",
1472-
"Current Time: Tue Apr 13 15:08:00 2021\n",
1473-
"Executable Timestamp: Tue Apr 13 13:37:48 2021\n",
1481+
"Current Time: Sat Apr 17 22:16:36 2021\n",
1482+
"Executable Timestamp: Sat Apr 17 21:27:24 2021\n",
14741483
"\n",
14751484
"Parallelism:\n",
14761485
" Num Processors: 1\n",
@@ -1755,7 +1764,10 @@
17551764
"#n_plot_pts = 2*n_felem + 1\n",
17561765
"n_plot_pts = 20\n",
17571766
"\n",
1758-
"from engy_5310.toolkit import write_engy5310_p1_1d_input_file\n",
1767+
"try: \n",
1768+
" from engy_5310.toolkit import write_engy5310_p1_1d_input_file \n",
1769+
"except ModuleNotFoundError:\n",
1770+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
17591771
"\n",
17601772
"write_engy5310_p1_1d_input_file(x_left, x_right, u_left=u_left, u_right=u_right, \n",
17611773
" diff_coeff=diff_coeff, source_s=source_s, n_felem=n_felem, order=order, \n",
@@ -1776,7 +1788,7 @@
17761788
"# Engy-5310 Problem 1: Poisson 1D FEM\r\n",
17771789
"# UMass Lowell Nuclear Chemical Engineering\r\n",
17781790
"# Prof. Valmor F. de Almeida\r\n",
1779-
"# 13Apr21 15:08:01\r\n",
1791+
"# 17Apr21 22:16:37\r\n",
17801792
"\r\n",
17811793
"# Parameters\r\n",
17821794
"xmin = 0.00000e+00\r\n",
@@ -1916,8 +1928,8 @@
19161928
"LibMesh Version: 27141d18f3137f77e33cdb3d565fd38ebfbfc46f\n",
19171929
"PETSc Version: 3.15.0\n",
19181930
"SLEPc Version: 3.14.2\n",
1919-
"Current Time: Tue Apr 13 15:08:01 2021\n",
1920-
"Executable Timestamp: Tue Apr 13 13:37:48 2021\n",
1931+
"Current Time: Sat Apr 17 22:16:37 2021\n",
1932+
"Executable Timestamp: Sat Apr 17 21:27:24 2021\n",
19211933
"\n",
19221934
"Parallelism:\n",
19231935
" Num Processors: 1\n",
@@ -2164,7 +2176,10 @@
21642176
"#n_plot_pts = 2*n_felem + 1\n",
21652177
"n_plot_pts = 20\n",
21662178
"\n",
2167-
"from engy_5310.toolkit import write_engy5310_p1_1d_input_file\n",
2179+
"try: \n",
2180+
" from engy_5310.toolkit import write_engy5310_p1_1d_input_file \n",
2181+
"except ModuleNotFoundError:\n",
2182+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
21682183
"\n",
21692184
"write_engy5310_p1_1d_input_file(x_left, x_right, u_left=u_left, u_right=u_right, \n",
21702185
" diff_coeff=diff_coeff, source_s=source_s, n_felem=n_felem, order=order, \n",
@@ -2185,7 +2200,7 @@
21852200
"# Engy-5310 Problem 1: Poisson 1D FEM\r\n",
21862201
"# UMass Lowell Nuclear Chemical Engineering\r\n",
21872202
"# Prof. Valmor F. de Almeida\r\n",
2188-
"# 13Apr21 15:08:02\r\n",
2203+
"# 17Apr21 22:16:38\r\n",
21892204
"\r\n",
21902205
"# Parameters\r\n",
21912206
"xmin = 0.00000e+00\r\n",
@@ -2320,8 +2335,8 @@
23202335
"LibMesh Version: 27141d18f3137f77e33cdb3d565fd38ebfbfc46f\n",
23212336
"PETSc Version: 3.15.0\n",
23222337
"SLEPc Version: 3.14.2\n",
2323-
"Current Time: Tue Apr 13 15:08:02 2021\n",
2324-
"Executable Timestamp: Tue Apr 13 13:37:48 2021\n",
2338+
"Current Time: Sat Apr 17 22:16:38 2021\n",
2339+
"Executable Timestamp: Sat Apr 17 21:27:24 2021\n",
23252340
"\n",
23262341
"Parallelism:\n",
23272342
" Num Processors: 1\n",
@@ -2435,7 +2450,10 @@
24352450
"fem_energy_hat = fem_energy/source_s**2/L**3\n",
24362451
"print('FEM energy [] = %10.6e'%(fem_energy_hat))\n",
24372452
"\n",
2438-
"from engy_5310.toolkit import engy5310_p1_exact_solution\n",
2453+
"try: \n",
2454+
" from engy_5310.toolkit import engy5310_p1_exact_solution \n",
2455+
"except ModuleNotFoundError:\n",
2456+
" assert False, 'You need to provide your own code here. Bailing out.'\n",
24392457
"\n",
24402458
"(_, _, energy_hat) = engy5310_p1_exact_solution(x_left, x_right, u_left, u_right, diff_coeff, source_s)\n",
24412459
"\n",
@@ -2510,20 +2528,13 @@
25102528
"│   ├── BoundaryEnergy.h\r\n",
25112529
"│   └── BulkEnergy.h\r\n",
25122530
"├── input.hit\r\n",
2513-
"├── input.hit~\r\n",
2514-
"├── input_in.e\r\n",
25152531
"├── \u001b[01;34mlib\u001b[00m\r\n",
25162532
"│   ├── \u001b[01;32mlibengy5310p1-opt.la\u001b[00m\r\n",
25172533
"│   ├── \u001b[01;36mlibengy5310p1-opt.so\u001b[00m -> \u001b[01;32mlibengy5310p1-opt.so.0.0.0\u001b[00m\r\n",
25182534
"│   ├── \u001b[01;36mlibengy5310p1-opt.so.0\u001b[00m -> \u001b[01;32mlibengy5310p1-opt.so.0.0.0\u001b[00m\r\n",
25192535
"│   └── \u001b[01;32mlibengy5310p1-opt.so.0.0.0\u001b[00m\r\n",
2520-
"├── out-x_x-line_0002.csv\r\n",
2521-
"├── out-y_y-line_0002.csv\r\n",
25222536
"├── out_000.vtk\r\n",
25232537
"├── out_000_0.vtu\r\n",
2524-
"├── out_energy.csv\r\n",
2525-
"├── output_energy.csv\r\n",
2526-
"├── output_x-data_0002.csv\r\n",
25272538
"├── \u001b[01;34msrc\u001b[00m\r\n",
25282539
"│   ├── \u001b[01;34mauxkernels\u001b[00m\r\n",
25292540
"│   │   ├── DiffusionFlux.C\r\n",
@@ -2533,7 +2544,8 @@
25332544
"│   │   ├── Engy5310P1App.x86_64-pc-linux-gnu.opt.lo\r\n",
25342545
"│   │   └── Engy5310P1App.x86_64-pc-linux-gnu.opt.lo.d\r\n",
25352546
"│   ├── \u001b[01;34mbcs\u001b[00m\r\n",
2536-
"│   │   └── NormalFluxBC.C\r\n",
2547+
"│   │   ├── NormalFluxBC.C\r\n",
2548+
"│   │   └── NormalFluxBC.C~\r\n",
25372549
"│   ├── \u001b[01;34mkernels\u001b[00m\r\n",
25382550
"│   │   ├── ConvectionTerm.C\r\n",
25392551
"│   │   ├── ConvectionTerm.C~\r\n",
@@ -2552,9 +2564,11 @@
25522564
"│   ├── \u001b[01;36mlibengy5310p1_test-opt.so\u001b[00m -> \u001b[01;32mlibengy5310p1_test-opt.so.0.0.0\u001b[00m\r\n",
25532565
"│   ├── \u001b[01;36mlibengy5310p1_test-opt.so.0\u001b[00m -> \u001b[01;32mlibengy5310p1_test-opt.so.0.0.0\u001b[00m\r\n",
25542566
"│   └── \u001b[01;32mlibengy5310p1_test-opt.so.0.0.0\u001b[00m\r\n",
2567+
"├── test.e\r\n",
2568+
"├── test.i\r\n",
25552569
"└── vtkviz.py\r\n",
25562570
"\r\n",
2557-
"19 directories, 71 files\r\n"
2571+
"19 directories, 67 files\r\n"
25582572
]
25592573
}
25602574
],

notebooks/06a-poisson-2d-dirichlet.ipynb

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

notebooks/06b-poisson-2d-dirichlet.ipynb

Lines changed: 27 additions & 27 deletions
Large diffs are not rendered by default.

notebooks/06d-poisson-3d-dirichlet.ipynb

Lines changed: 29 additions & 29 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)