public double getAdsorbedChargeDensity(){
        if(!this.sternOption || this.nonZeroAssocK==0){
           return 0.0D;
        }

        if(this.psi0set && this.sigmaSet){
            return this.adsorbedChargeDensity;
        }
        else{
            if(this.sigmaSet){
                this.getSurfacePotential();
                return this.sternPotential;
            }
            else{
                if(this.psi0set){
                    this.getSurfaceChargeDensity();
                    return this.adsorbedChargeDensity;
                }
                else{
                    System.out.println("Class: GouyChapmanStern\nMethod: getAdsorbedChargeDensity\nThe value of the adsorbed ion charge density has not been calculated\nzero returned");
                    System.out.println("Neither a surface potential nor a surface charge density have been entered");
                    return 0.0D;
                }
            }
        }
    }