Finite Element Method implementation