{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import networkx as nx\n", "import numpy as np\n", "import kirchhoff " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "circuit(): initialized and ready for (some) action :)\n" ] } ], "source": [ "import kirchhoff.circuit_init as ki\n", "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')" ] }, { "cell_type": "code", "execution_count": 7, "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": [ "<kirchhoff.circuit_dual.dual_circuit at 0x14803186548>" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import kirchhoff.circuit_dual as kid\n", "kid.initialize_dual_flux_circuit_from_minsurf('simple',3)" ] }, { "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 }