ionicStrPenalty = ionicStrPenalty.pow(2);
DblMatrix resids = (this.AMatrix.dot(concMatrix)).minus(this.BVector);
DblMatrix ONE = new DblMatrix(1.0);
resids = resids.getMap(ONE.minus(DblMatrix.isNaN(resids)));
resids = DblMatrix.sum(resids.pow(2),1);
resids = resids.plus(ionicStrPenalty);
resids = DblMatrix.sqrt(resids);
//resids.show("resids2");