Python finite element code