Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 63 additions & 63 deletions Elliptic.ipynb

Large diffs are not rendered by default.

407 changes: 200 additions & 207 deletions FEM.ipynb

Large diffs are not rendered by default.

189 changes: 90 additions & 99 deletions Hyperbolic.ipynb

Large diffs are not rendered by default.

88 changes: 43 additions & 45 deletions NeumannElliptic.ipynb
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "NeumannElliptic.ipynb",
"private_outputs": true,
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
Expand All @@ -35,8 +19,6 @@
},
"source": [
"# Metoda różnic skończonych\n",
"\n",
"\n",
"## Laboratorium V\n",
"### Warunek brzegowy Neumanna\n",
"\n",
Expand All @@ -55,9 +37,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "8gjbWJ3-d2PE"
},
"outputs": [],
"source": [
"import numpy as np\n",
"import scipy as sc\n",
Expand All @@ -69,15 +53,15 @@
"from scipy.sparse import lil_matrix, csr_matrix\n",
"from typing import Optional\n",
"import time"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "NWqt8umcd4bj"
},
"outputs": [],
"source": [
"class SetupElliptic:\n",
" def __init__(self, dx: float, dy: Optional[float] = None):\n",
Expand All @@ -99,15 +83,15 @@
" @staticmethod\n",
" def f(x, y):\n",
" return 0"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Xj3GLJcwd8n0"
},
"outputs": [],
"source": [
"def scheme_elliptic(setup):\n",
" size = (setup.x_num + 1) * (setup.y_num + 1)\n",
Expand All @@ -127,15 +111,15 @@
" w = w.reshape(setup.x_num + 1, setup.y_num + 1)\n",
"\n",
" return w"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Z-iBYkbPeB72"
},
"outputs": [],
"source": [
"def plot_surface(values: float, setup):\n",
" fig = plt.figure()\n",
Expand All @@ -159,53 +143,67 @@
" fig.colorbar(surf, shrink=0.5, aspect=5)\n",
"\n",
" plt.show()"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Mf98GjETd_oN"
},
"outputs": [],
"source": [
"%%time\n",
"# numerical solution\n",
"setup_elliptic = SetupElliptic(0.005)\n",
"numerical_elliptic = scheme_elliptic(setup_elliptic)"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "w6kfztI9fmYJ"
},
"outputs": [],
"source": [
"plot_surface(numerical_elliptic, setup_elliptic)"
],
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"source": [
"# Rozważyć warunki brzegowe (Dirichleta i Neumanna) różne od zera\n",
"\n"
],
"metadata": {
"id": "te9q0l4dnxAF"
}
},
"source": [
"#### Rozważyć warunki brzegowe (Dirichleta i Neumanna) różne od zera\n",
"\n"
]
},
{
"cell_type": "code",
"source": [],
"execution_count": null,
"metadata": {
"id": "_lVkKxp3n3_Z"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": []
}
]
],
"metadata": {
"colab": {
"name": "NeumannElliptic.ipynb",
"private_outputs": true,
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
157 changes: 79 additions & 78 deletions Parabolic.ipynb

Large diffs are not rendered by default.

88 changes: 41 additions & 47 deletions Variational.ipynb

Large diffs are not rendered by default.

Binary file added tmpabe4108_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.