There are two mesh files here.
This is an ne x 3 list of triangles. The three values are indices pointing to the thre vertices of the ne triangles.
#!/bin/bash | |
set -e | |
# run latexdiff | |
# --disable-auto-mbox | |
# fixes issue with underling the current citations | |
# --config="PICTUREENV=(?:picture|DIFnomarkup|tabular)[\w\d*@]*" | |
# does not diff tabular environments | |
latexdiff --disable-auto-mbox\ |
# colors from here (MIT): | |
# https://github.com/karthik/wesanderson/blob/master/R/colors.R | |
# example from here: | |
# https://matplotlib.org/3.5.0/gallery/color/custom_cmap.html | |
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import LinearSegmentedColormap |
def totex(A): | |
m, n = A.shape | |
rstr = "".join(['r' for i in range(n)]) | |
print('\\left[\\begin{array}{' + rstr + r'}') | |
for i in range(m): | |
for j in range(n): | |
if A[i,j] == 0: | |
print(' ', end='') | |
else: | |
a = A[i,j] |
import scipy.linalg as sla | |
import numpy as np | |
from pyamg.util.linalg import pinv_array | |
from scipy.linalg.lapack import get_lapack_funcs | |
from scipy.linalg.lapack import _compute_lwork | |
import time | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
nt = 10 |
.*.swp |
def fastspy(A, ax, cmap=None): | |
"""" | |
Parameters | |
---------- | |
A : coo matrix | |
ax : axis | |
""" |