FEniCS is a nice numerical toolbox for solving PDEs through finite element type methods. However, ever since they've begun moving to the new syntax breaking version FEniCSx the installation of the older legacy 2019 FEniCS version has gotten more and more arcane, as dependencies are left frozen. Although it's best to eventually learn the newer version, or to transition to another package (e.g. firedrake), chances are if you're inheriting some code you'll need to be able to run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
# Population data from https://data.worldbank.org/indicator/SP.POP.TOTL | |
# Ped. death data estimated from Figure 1 in: | |
# https://international.fhwa.dot.gov/programs/mrp/docs/FHWAPL2-020_GBP_Ped_Safety%20_Desk_Review_final102822.pdf | |
dates = [2000, 2010, 2019] | |
dates = [str(date) for date in dates] | |
AU = [ | |
(19.15, 282.3104149030503), | |
(22.03, 169.25140607847925), | |
(25.37, 155.36721318887794) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <complex.h> | |
#include <math.h> | |
#include <omp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// Adapted from https://batchloaf.wordpress.com/2013/02/10/another-julia-set-animation/ | |
#define BOX_SIZE 2.0 | |
#define NUM_FRAMES 240 |
#C Vector
My personal implementation of the c++ vector in C. I do not guarentee speed, stability or even usability. Sorry.
Please adhere to all license restrictions listed in the main directory.
#Build instructions