last version before static condensation was started to build in.
first step of algorithm 2.3 implemented.