{ "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 0x2d780f97708>" ] }, "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_flux.flux_circuit at 0x2d78407cf88>" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import kirchhoff.circuit_flux as kfx\n", "kfx.initialize_circuit_from_networkx(G)\n", "kfx.initialize_flux_circuit_from_crystal('simple',3)\n", "kfx.initialize_flux_circuit_from_random(random_type='voronoi_volume')" ] }, { "cell_type": "code", "execution_count": 5, "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 0x2d7840cdb88>" ] }, "execution_count": 5, "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 }