Skip to content

Instantly share code, notes, and snippets.

View Corwinpro's full-sized avatar

Petr Kungurtsev Corwinpro

View GitHub Profile
@Corwinpro
Corwinpro / meshtagging_mvc.py
Created October 3, 2021 00:21 — forked from michalhabera/meshtagging_mvc.py
Terribly hacky MVC workaround for pygmsh-meshio-dolfin boundary tagging
from pygmsh.built_in.geometry import Geometry
from pygmsh import generate_mesh
import meshio
import dolfin
geom = Geometry()
lc = .1
p0 = geom.add_point([0, 0, 0], lcar=lc)
p1 = geom.add_point([1, 0, 0], lcar=lc)
@Corwinpro
Corwinpro / actors.py
Created August 12, 2021 19:21 — forked from jvkersch/actors.py
Implementation of the actor model in Python
import abc
import asyncio
class MessageBox:
""" A class that can
- send messages of a certain type with some context (== put a message into
an internal queue),
- receive messages from the internal queue
"""