Newer
Older
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import networkx as nx\n",
"import numpy as np\n",
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"circuit(): initialized and ready for (some) action :)\n"
]
}
],
"source": [
"n=3\n",
"G=nx.grid_graph(( n,n,1))\n",
"K = ki.initialize_circuit_from_networkx(G)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"circuit(): initialized and ready for (some) action :)\n",
"circuit(): initialized and ready for (some) action :)\n",
"circuit(): initialized and ready for (some) action :)\n"
]
},
{
"data": {
"text/plain": [
"<kirchhoff.circuit_flow.flow_circuit at 0x1480007a0c8>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import kirchhoff.circuit_flow as kfc\n",
"kfc.initialize_circuit_from_networkx(G)\n",
"kfc.initialize_flow_circuit_from_crystal('simple',3)\n",
"kfc.initialize_flow_circuit_from_random(random_type='voronoi_volume')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"circuit(): initialized and ready for (some) action :)\n",
"circuit(): initialized and ready for (some) action :)\n",
"circuit(): initialized and ready for (some) action :)\n"
]
},
{
"data": {
"text/plain": [
"<kirchhoff.circuit_flow.flow_circuit at 0x14803149788>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import kirchhoff.circuit_flux as kfc\n",
"kfc.initialize_circuit_from_networkx(G)\n",
"kfc.initialize_flow_circuit_from_crystal('simple',3)\n",
"kfc.initialize_flow_circuit_from_random(random_type='voronoi_volume')"
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"circuit(): initialized and ready for (some) action :)\n",
"circuit(): initialized and ready for (some) action :)\n"
]
},
{
"data": {
"text/plain": [
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import kirchhoff.circuit_dual as kid\n",
"kid.initialize_dual_flux_circuit_from_minsurf('simple',3)"
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}