You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ShFunc_Compliance_constraint.m
    path of file: ./repos/Swan/Topology Optimization/Shape Functions
    
    the code of the file until where you have to start completion: classdef ShFunc_Compliance_constraint < ShFunWithElasticPdes
    
    properties (Access = private)
        compliance
        fieldToPrint
        adjointProblem
        targetConstraint
        loadCase
        name
        isFirstIter
    end
    
    methods (Access = public)
        
        function obj = ShFunc_Compliance_constraint(cParams)
            cParams.filterParams.quadratureOrder = 'LINEAR';
            obj.name                             = cParams.type;
            obj.loadCase.number                  = cParams.shNumber;
            obj.init(cParams);
            obj.physicalProblem = cParams.femSettings.physicalProblem;
            obj.createOrientationUpdater();
            obj.isFirstIter = true;
        end

        function t = getTitlesToPlot(obj)
            t{1} = 'Compliance non scaled';
        end

        function v = getVariablesToPlot(obj)
            v{1} = obj.value*obj.value0;
        end
        
    end

    methods (Access = private)

        function c = computeCompliance(obj,n,nv)
            obj.physicalProblem.boundaryConditions.changeBoundaryConditions(n,nv);
            obj.physicalProblem.setC(obj.homogenizedVariablesComputer.C);
            obj.physicalProblem.computeStiffnessMatrix();
            obj.physicalProblem.solve();
            c = obj.computeInitialCompliance();
        end

    end
    
    methods (Access = private)

        function computeTargetConstraint(obj)
            switch obj.name
                case 'complianceConstraintC1'
                    obj.computeMaxComplianceCone();
                    obj.saveLoadCaseCone();
                case 'complianceConstraintC2'
                    obj.computeMaxComplianceCtwo();
                    obj.saveLoadCaseCtwo();
                case 'complianceConstraintC3'
                    obj.computeMaxComplianceCthree();
                    obj.saveLoadCaseCthree();
                case 'complianceConstraintC4'
                    obj.computeMaxComlianceCfour();
                    obj.saveLoadCasefour();
                otherwise
                    
            end
        end

        function computeMaxComplianceCone(obj)
            run("bridgeLoadCasesInformation.m");
            obj.physicalProblem.boundaryConditions.changeBoundaryConditions(g.four',g.fourv');
            obj.physicalProblem.setC(obj.homogenizedVariablesComputer.C);
            obj.physicalProblem.computeStiffnessMatrix();
         
    
function saveLoadCaseCone(obj)
            run("bridgeLoadCasesInformation.m");
            obj.loadCase.neumann       = g.four;
            obj.loadCase.neumann_values = g.fourv;
        end

        function saveLoadCaseCtwo(obj)
            load = obj.loadCase.number;
            run("bridgeLoadCasesInformation.m");
            if load == 1
                obj.loadCase.neumann       = g.zero;
                obj.loadCase.neumann_values = g.zerov;
            elseif load == 2
                obj.loadCase.neumann = g.four;
                obj.loadCase.neumann_values = g.fourv;
            elseif load == 3
                obj.loadCase.neumann = g.eight;
                obj.loadCase.neumann_values = g.eightv;
            end
        end

        function saveLoadCaseCthree(obj)
            l = obj.loadCase.number;
            run("bridgeLoadCasesInformation.m");
            if l == 1
                obj.loadCase.neumann = g.zero;
                obj.loadCase.neumann_values = g.zerov;
            elseif l == 2
                obj.loadCase.neumann = g.one;
                obj.loadCase.neumann_values = g.onev;
            elseif l == 3
                obj.loadCase.neumann = g.two;
                obj.loadCase.neumann_values = g.twov;
            elseif l == 4
                obj.loadCase.neumann = g.three;
                obj.loadCase.neumann_values = g.threev;
            elseif l == 5
                obj.loadCase.neumann = g.four;
                obj.loadCase.neumann_values = g.fourv;
            elseif l == 6
                obj.loadCase.neumann = g.five;
                obj.loadCase.neumann_values = g.fivev;
            elseif l == 7
                obj.loadCase.neumann = g.six;
                obj.loadCase.neumann_values = g.sixv;
            elseif l == 8
                obj.loadCase.neumann = g.seven;
                obj.loadCase.neumann_values = g.sevenv;
            elseif l == 9
                obj.loadCase.neumann = g.eight;
                obj.loadCase.neumann_values = g.eightv;
            end
        end

        function saveLoadCaseCfour(obj)
            l = obj.loadCase.number;
            run("bridgeLoadCasesInformation.m");
            if l == 1
                obj.loadCase.neumann = g.zero;
                obj.loadCase.neumann_values = g.zerov;
            elseif l == 2
                obj.loadCase.neumann = g.one;
                obj.loadCase.neumann_values = g.onev;
            elseif l == 3
                obj.loadCase.neumann = g.two;
                obj.loadCase.neumann_values = g.twov;
            elseif l == 4
                obj.loadCase.neumann = g.three;
                obj.loadCase.neumann_values = g.threev;
            end
        end

        function c = computeInitialCompliance(obj)
            phy    = obj.physicalProblem;
            dvolum = phy.getDvolume()';
            stress = phy.variables.stress;
            strain = phy.variables.strain;
            ngaus  = size(strain,1);
            nelem  = size(strain,3);
            c      = zeros(nelem,ngaus);
            for igaus = 1:ngaus
                stressG    = squeeze(stress(igaus,:,:));
                strainG    = squeeze(strain(igaus,:,:));
                e          = stressG.*strainG;
                c(:,igaus) = c(:,igaus) + sum(e)';
            end