Seems that the CG is now working. Keep in mind that the tolerance for the CG must be pretty close to the overall error sought in the jump discontinuity. A parameter should be added later to take care of this coefficient so that it can be set in a script.