Parent: MorphoOptimizationProject

Manipulations of related fields should be done in only a few places

Consider three of MRIS's members- max_vertices, nvertices, vertices

There is an obvious rule - nvertices <= max_vertices && max_vertices is the number of elements vertices points to

Maintaining this rule is hard, when code in many places is assigning to nvertices.

To stop this from happening, I changed nvertices to a const int, causing all the assignments to become error messages. Then I wrote a small set of functions for manipulating these three values, and editted all the errors to use these functions.

The same problem and solution was adopted with nfaces. Here is was harder and more important because there are multiple vectors that must be nfaces long, and the original code was changing nfaces in several places without updating all of the relevant vectors.

Sometimes it is better to delay calculations

MorphoOptimizationProject_BetterSerialCode_DeferCalculations