コード例 #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            FemDesign.Calculate.Stage stage = FemDesign.Calculate.Stage.Default();
            if (!DA.GetData(0, ref stage))
            {
                // pass
            }


            FemDesign.Calculate.Comb comb = FemDesign.Calculate.Comb.GetDefault();
            if (!DA.GetData(1, ref comb))
            {
                // pass
            }

            FemDesign.Calculate.Freq freq = FemDesign.Calculate.Freq.Default();
            if (!DA.GetData(2, ref freq))
            {
                // pass
            }

            FemDesign.Calculate.Footfall footfall = FemDesign.Calculate.Footfall.Default();
            if (!DA.GetData(3, ref footfall))
            {
                // pass
            }

            bool calcCase = false;

            if (!DA.GetData(4, ref calcCase))
            {
                // pass
            }


            bool calcCstage = false;

            if (!DA.GetData(5, ref calcCstage))
            {
                // pass
            }

            bool calcImpf = false;

            if (!DA.GetData(6, ref calcImpf))
            {
                // pass
            }

            bool calcComb = false;

            if (!DA.GetData(7, ref calcComb))
            {
                // pass
            }

            bool calcGMax = false;

            if (!DA.GetData(8, ref calcGMax))
            {
                // pass
            }

            bool calcStab = false;

            if (!DA.GetData(9, ref calcStab))
            {
                // pass
            }

            bool calcFreq = false;

            if (!DA.GetData(10, ref calcFreq))
            {
                // pass
            }

            bool calcSeis = false;

            if (!DA.GetData(11, ref calcSeis))
            {
                // pass
            }

            bool calcDesign = false;

            if (!DA.GetData(12, ref calcDesign))
            {
                // pass
            }

            bool calcFootfall = false;

            if (!DA.GetData(13, ref calcFootfall))
            {
                // pass
            }

            bool elemFine = false;

            if (!DA.GetData(14, ref elemFine))
            {
                // pass
            }

            bool diaphragm = false;

            if (!DA.GetData(15, ref diaphragm))
            {
                // pass
            }

            bool peakSmoothing = false;

            if (!DA.GetData(16, ref peakSmoothing))
            {
                // pass
            }

            if (stage == null || comb == null || freq == null)
            {
                // pass
            }

            //
            FemDesign.Calculate.Analysis obj = new FemDesign.Calculate.Analysis(stage, comb, freq, footfall, calcCase, calcCstage, calcImpf, calcComb, calcGMax, calcStab, calcFreq, calcSeis, calcDesign, calcFootfall, elemFine, diaphragm, peakSmoothing);

            // return
            DA.SetData(0, obj);
        }
コード例 #2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int  NLEmaxiter          = 30;
            int  PLdefloadstep       = 20;
            int  PLminloadstep       = 2;
            int  PLmaxeqiter         = 30;
            bool NLSMohr             = true;
            int  NLSinitloadstep     = 10;
            int  NLSminloadstep      = 10;
            int  NLSactiveelemratio  = 5;
            int  NLSplasticelemratio = 5;
            int  CRloadstep          = 20;
            int  CRmaxiter           = 30;
            int  CRstifferror        = 2;

            if (!DA.GetData(0, ref NLEmaxiter))
            {
                // pass
            }
            if (!DA.GetData(1, ref PLdefloadstep))
            {
                // pass
            }
            if (!DA.GetData(2, ref PLminloadstep))
            {
                // pass
            }
            if (!DA.GetData(3, ref PLmaxeqiter))
            {
                // pass
            }
            if (!DA.GetData(4, ref NLSMohr))
            {
                // pass
            }
            if (!DA.GetData(5, ref NLSinitloadstep))
            {
                // pass
            }
            if (!DA.GetData(6, ref NLSminloadstep))
            {
                // pass
            }
            if (!DA.GetData(7, ref NLSactiveelemratio))
            {
                // pass
            }
            if (!DA.GetData(8, ref NLSplasticelemratio))
            {
                // pass
            }
            if (!DA.GetData(9, ref CRloadstep))
            {
                // pass
            }
            if (!DA.GetData(10, ref CRmaxiter))
            {
                // pass
            }
            if (!DA.GetData(11, ref CRstifferror))
            {
                // pass
            }

            //
            FemDesign.Calculate.Comb obj = new FemDesign.Calculate.Comb(NLEmaxiter, PLdefloadstep, PLminloadstep, PLmaxeqiter, NLSMohr, NLSinitloadstep, NLSminloadstep, NLSactiveelemratio, NLSplasticelemratio, CRloadstep, CRmaxiter, CRstifferror);

            // return
            DA.SetData(0, obj);
        }