Skip to content

Instantly share code, notes, and snippets.

View MalteWegener99's full-sized avatar

Malte MalteWegener99

View GitHub Profile
@MalteWegener99
MalteWegener99 / makefile
Last active November 14, 2019 09:56
GNU Makefile for p116 of the book Ian Smith, Vaughan Griffiths, and Lee Margetts. Programming the Finite Element Method, 5th Edition . John Wiley Sons, 2013.
GF = gfortran
all: clean chap11
chap11: library p116
echo "Done"
p116: chap11/p116.f03
$(GF) chap11/p116.f03 -o p116 library/arpack/arpacklib.a -I . main.a geom.a
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import math
from scipy.sparse import lil_matrix
from scipy.sparse import csr_matrix
from scipy.sparse.linalg import spsolve
import time
import sys
"""
We basically want to do a binary tree that has quastions as splitting
"""
yes = ["y", "yes", "Y", "Yes"]
def ask(question):
ans = input(question+"? ")
if ans in:
return True
else:
return False