Method of finite elements