Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kramer
kirchhoff-circuits
Commits
60d6eeba
Commit
60d6eeba
authored
Aug 30, 2021
by
Felix
Browse files
update notebooks
parent
c675d6ad
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
kirchhoff/init_crystal.py
View file @
60d6eeba
...
...
@@ -3,7 +3,7 @@
# @Email: kramer@mpi-cbg.de
# @Project: go-with-the-flow
# @Last modified by: Felix Kramer
# @Last modified time: 2021-0
5
-2
3T15:14:10
+02:00
# @Last modified time: 2021-0
8
-2
9T23:29:37
+02:00
# @License: MIT
import
networkx
as
nx
import
numpy
as
np
...
...
@@ -103,7 +103,7 @@ class networkx_simple(networkx_crystal,object):
self
.
translation_length
=
1.
self
.
simple_cubic_lattice
(
num_periods
)
#construct full
triangulated hex
grid as skeleton
#construct full
cubic
grid as skeleton
def
simple_unit_cell
(
self
):
D
=
nx
.
Graph
()
...
...
notebook/test_init_graphs.ipynb
View file @
60d6eeba
...
...
@@ -48,7 +48,7 @@
{
"data": {
"text/plain": [
"<kirchhoff.circuit_flow.flow_circuit at 0x
1480007a0c
8>"
"<kirchhoff.circuit_flow.flow_circuit at 0x
2d780f9770
8>"
]
},
"execution_count": 3,
...
...
@@ -80,7 +80,7 @@
{
"data": {
"text/plain": [
"<kirchhoff.circuit_fl
ow
.fl
ow
_circuit at 0x
148031497
88>"
"<kirchhoff.circuit_fl
ux
.fl
ux
_circuit at 0x
2d78407cf
88>"
]
},
"execution_count": 4,
...
...
@@ -89,15 +89,15 @@
}
],
"source": [
"import kirchhoff.circuit_flux as kf
c
\n",
"kf
c
.initialize_circuit_from_networkx(G)\n",
"kf
c
.initialize_fl
ow
_circuit_from_crystal('simple',3)\n",
"kf
c
.initialize_fl
ow
_circuit_from_random(random_type='voronoi_volume')"
"import kirchhoff.circuit_flux as kf
x
\n",
"kf
x
.initialize_circuit_from_networkx(G)\n",
"kf
x
.initialize_fl
ux
_circuit_from_crystal('simple',3)\n",
"kf
x
.initialize_fl
ux
_circuit_from_random(random_type='voronoi_volume')"
]
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
5
,
"metadata": {},
"outputs": [
{
...
...
@@ -111,10 +111,10 @@
{
"data": {
"text/plain": [
"<kirchhoff.circuit_dual.dual_circuit at 0x
1480318654
8>"
"<kirchhoff.circuit_dual.dual_circuit at 0x
2d7840cdb8
8>"
]
},
"execution_count":
7
,
"execution_count":
5
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -148,7 +148,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.
3
"
"version": "3.7.
9
"
}
},
"nbformat": 4,
...
...
notebook/test_plot_networkx.ipynb
View file @
60d6eeba
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment