Skip to content

Instantly share code, notes, and snippets.

View TheBB's full-sized avatar
🏠
Working from home

Eivind Fonn TheBB

🏠
Working from home
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from nutils import mesh, function as fn, log, _, plot
import numpy as np
CASE = 'channel' # 'backstep', or 'channel'
DEGREE = 3
VISCOSITY = 1/20
if CASE == 'backstep':
# Three-patch domain
domain, geom = mesh.multipatch(
from nutils import mesh, function, plot, _
import numpy as np
import scipy as sp
nelems = 40
xs = np.linspace(0, 1, nelems + 1)
domain, geom = mesh.rectilinear([xs])
basis = domain.basis('spline', degree=2)
from nutils import mesh, function, plot, _
import numpy as np
import scipy as sp
nelems = 10
xs = np.linspace(0, 1, nelems + 1)
ys = np.linspace(0, 1, nelems + 1)
domain, grid_geom = mesh.rectilinear([xs, ys])
(evil-define-command evil-substitute
(beg end &optional type register)
"Change a character." :move-point t :motion evil-forward-char :keep-visual t :suppress-operator t
(interactive
(let*
((evil-operator-range-motion
(when
(evil-has-command-property-p 'evil-substitute :motion)
(or
(evil-get-command-property 'evil-substitute :motion)
# fieldtess = displacement.EvaluateGrid(*tesselation_params[-1][0])
@TheBB
TheBB / cylinder.py
Last active December 8, 2016 13:29
import click
from collections import OrderedDict
from math import ceil, log, sqrt, pi
import numpy as np
import xml.etree.ElementTree as xml
from splipy import curve_factory as cf, surface_factory as sf
from splipy.IO import G2
from splipy.utils.refinement import geometric_refine
\documentclass{beamer}
\usetheme{Rochester}
\usecolortheme{crane}
\usepackage{tikz}
\usepackage{ifthen}
\usepackage{tikz-3dplot}
\usepackage{pgfplots}
\documentclass{beamer}
\usetheme{Rochester}
\usecolortheme{crane}
\usepackage{tikz}
\usepackage{ifthen}
\usepackage{tikz-3dplot}
\usepackage{pgfplots}