Ejemplo n.º 1
0
        public static bool BkDXF_SetArrayReal(ref object ravarArrayDec, ref object ravarArrayDbl, object vavarArray, ref string nrstrErrMsg)
        {
            nrstrErrMsg = null;
            bool flag       = false;
            int  dlngLBound = Information.LBound((Array)ravarArrayDbl);
            int  dlngUBound = Information.UBound((Array)ravarArrayDbl);

            if (BkDXF_CheckVariantForArrayReal(RuntimeHelpers.GetObjectValue(vavarArray), dlngLBound, dlngUBound, ref nrstrErrMsg))
            {
                int num  = dlngLBound;
                int num2 = dlngUBound;
                for (int dlngIdx = num; dlngIdx <= num2; dlngIdx = checked (dlngIdx + 1))
                {
                    bool flag2 = false;
                    NewLateBinding.LateIndexSet(ravarArrayDbl, new object[2]
                    {
                        dlngIdx,
                        NewLateBinding.LateIndexGet(vavarArray, new object[1]
                        {
                            dlngIdx
                        }, null)
                    }, null);
                }
                return(true);
            }
            bool BkDXF_SetArrayReal = default(bool);

            return(BkDXF_SetArrayReal);
        }
Ejemplo n.º 2
0
 public void FillArray(ref Array arr, double x1, double x2, double x3, double x4, double x5)
 {
     arr = Array.CreateInstance(typeof(double), 5);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)0,
         (object)x1
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)1,
         (object)x2
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)2,
         (object)x3
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)3,
         (object)x4
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)4,
         (object)x5
     }, (string[])null);
 }
Ejemplo n.º 3
0
 private void method_3(string string_0, ref BinFileValue binFileValue_0)
 {
     if (binFileValue_0.Value is float[] | binFileValue_0.Value is byte[] | binFileValue_0.Value is ushort[])
     {
         string_0 = string_0.Remove(0, 1);
         string_0 = string_0.Remove(checked (string_0.Length - 1), 1);
         string[] array = string_0.Split(',');
         if (Operators.ConditionalCompareObjectNotEqual(NewLateBinding.LateGet(binFileValue_0.Value, null, "Length", new object[0], null, null, null), array.Length, false))
         {
             throw new Exception("The specified array doesn't have the correct dimension.");
         }
         if (binFileValue_0.Value is float[])
         {
             object obj     = new object();
             object loopObj = new object();
             if (ObjectFlowControl.ForLoopControl.ForLoopInitObj(obj, 0, Operators.SubtractObject(NewLateBinding.LateGet(binFileValue_0.Value, null, "Length", new object[0], null, null, null), 1), 1, ref loopObj, ref obj))
             {
                 do
                 {
                     NewLateBinding.LateIndexSet(binFileValue_0.Value, new object[]
                     {
                         obj,
                         this.method_1(array[Convert.ToInt32(obj)])
                     }, null);
                 }while (ObjectFlowControl.ForLoopControl.ForNextCheckObj(obj, loopObj, ref obj));
             }
         }
         else
         {
             object obj2     = new object();
             object loopObj2 = new object();
             if (ObjectFlowControl.ForLoopControl.ForLoopInitObj(obj2, 0, Operators.SubtractObject(NewLateBinding.LateGet(binFileValue_0.Value, null, "Length", new object[0], null, null, null), 1), 1, ref loopObj2, ref obj2))
             {
                 do
                 {
                     NewLateBinding.LateIndexSet(binFileValue_0.Value, new object[]
                     {
                         obj2,
                         array[Convert.ToInt32(obj2)]
                     }, null);
                 }while (ObjectFlowControl.ForLoopControl.ForNextCheckObj(obj2, loopObj2, ref obj2));
             }
         }
     }
     else
     {
         if (binFileValue_0.Value is float)
         {
             binFileValue_0.Value = this.method_1(string_0);
         }
         else
         {
             binFileValue_0.Value = string_0;
         }
     }
 }
Ejemplo n.º 4
0
        private void CalculateVar()
        {
            int lk1 = this.LK;

            for (this.L = 1; this.L <= lk1; ++this.L)
            {
                int mk = this.MK;
                for (this.M = 1; this.M <= mk; ++this.M)
                {
                    NewLateBinding.LateIndexSet((object)this.UA, new object[3]
                    {
                        (object)this.L,
                        (object)this.M,
                        (object)this.FANv2(this.R0 + this.HX * (double)(this.L - 1), this.Q0 + this.HY * (double)(this.M - 1))
                    }, (string[])null);
                    NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                    {
                        (object)this.L,
                        (object)this.M,
                        (object)this.InitNv2(this.R0 + this.HX * (double)(this.L - 1), this.Q0 + this.HY * (double)(this.M - 1))
                    }, (string[])null);
                }
            }
            this.NumSolverV21();
            this.LJ = (int)Math.Round((double)this.lk1 / 5.0);
            int lk2 = this.LK;

            for (this.L = 1; this.L <= lk2; ++this.L)
            {
                int mk = this.MK;
                for (this.M = 1; this.M <= mk; ++this.M)
                {
                    NewLateBinding.LateIndexSet((object)this.UV, new object[3]
                    {
                        (object)this.L,
                        (object)this.M,
                        Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.UA, new object[2]
                        {
                            (object)this.L,
                            (object)this.M
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.UM, new object[2]
                        {
                            (object)this.L,
                            (object)this.M
                        }, (string[])null))
                    }, (string[])null);
                }
            }
        }
Ejemplo n.º 5
0
        private bool InternReadSection(ref string nrstrErrMsg)
        {
            nrstrErrMsg = null;
            int dlngIdx = mlngSecBeg;

            InternIncreaseIndex(ref dlngIdx, 1);
            AcadSummaryInfo      dobjAcadSummaryInfo = mobjAcadDocument.SummaryInfo;
            bool                 dblnError           = default(bool);
            bool                 dblnTitle           = default(bool);
            bool                 dblnSubject         = default(bool);
            bool                 dblnAuthor          = default(bool);
            bool                 dblnKeywords        = default(bool);
            bool                 dblnComments        = default(bool);
            bool                 dblnLastSavedBy     = default(bool);
            bool                 dblnRevisionNumber  = default(bool);
            AcadSysVar           dobjAcadSysVar;
            AcadSummaryInfoField dobjAcadSummaryInfoField = default(AcadSummaryInfoField);

            while (dlngIdx <= mlngSecEnd && !dblnError)
            {
                string dstrVarName1 = Conversions.ToString(mobjDictReadValues[dlngIdx]);
                string dstrVarName2 = Strings.Mid(dstrVarName1, 2);
                int    dlngCode1    = Conversions.ToInteger(mobjDictReadCodes[dlngIdx]);
                checked
                {
                    if (dlngCode1 != 9)
                    {
                        nrstrErrMsg = "Ungültiger Gruppencode für Variable in Zeile " + Conversions.ToString(dlngIdx * 2 + 1) + ".";
                        dblnError   = true;
                        continue;
                    }
                    if (!LikeOperator.LikeString(dstrVarName1, "$*", CompareMethod.Binary))
                    {
                        nrstrErrMsg = "Ungültiger Variablenprefix in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                        dblnError   = true;
                        continue;
                    }
                    object dvarValue5;
                    if (dobjAcadSummaryInfoField != null)
                    {
                        int dlngCode5 = Conversions.ToInteger(mobjDictReadCodes[dlngIdx + 1]);
                        if (Operators.CompareString(Strings.UCase(dstrVarName2), Strings.UCase("CUSTOMPROPERTY"), TextCompare: false) != 0)
                        {
                            nrstrErrMsg = "Datei-Info: Ungültiger Bezeichner für den Wert einer benutzerdefinierten Eigenschaft in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                            dblnError   = true;
                        }
                        else if (dlngCode5 != 1)
                        {
                            nrstrErrMsg = "Datei-Info: Ungültiger Gruppencode für den Wert einer benutzerdefinierten Eigenschaft in Zeile " + Conversions.ToString(dlngIdx * 2 + 3) + ".";
                            dblnError   = true;
                        }
                        else
                        {
                            dvarValue5 = RuntimeHelpers.GetObjectValue(mobjDictReadValues[dlngIdx + 1]);
                            dobjAcadSummaryInfoField.Value = Conversions.ToString(dvarValue5);
                            InternIncreaseIndex(ref dlngIdx, 2);
                        }
                        dobjAcadSummaryInfoField = null;
                        continue;
                    }
                    if (InternCheckIsSummaryInfo(dstrVarName2))
                    {
                        int dlngCode5 = Conversions.ToInteger(mobjDictReadCodes[dlngIdx + 1]);
                        if (dlngCode5 != 1)
                        {
                            nrstrErrMsg = "Ungültiger Gruppencode für Datei-Info in Zeile " + Conversions.ToString(dlngIdx * 2 + 3) + ".";
                            dblnError   = true;
                            continue;
                        }
                        dvarValue5 = RuntimeHelpers.GetObjectValue(mobjDictReadValues[dlngIdx + 1]);
                        string left = Strings.UCase(dstrVarName2);
                        if (Operators.CompareString(left, Strings.UCase("TITLE"), TextCompare: false) == 0)
                        {
                            if (dblnTitle)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnTitle = true;
                                dobjAcadSummaryInfo.Title = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("SUBJECT"), TextCompare: false) == 0)
                        {
                            if (dblnSubject)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnSubject = true;
                                dobjAcadSummaryInfo.Subject = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("AUTHOR"), TextCompare: false) == 0)
                        {
                            if (dblnAuthor)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnAuthor = true;
                                dobjAcadSummaryInfo.Author = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("KEYWORDS"), TextCompare: false) == 0)
                        {
                            if (dblnKeywords)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnKeywords = true;
                                dobjAcadSummaryInfo.Keywords = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("COMMENTS"), TextCompare: false) == 0)
                        {
                            if (dblnComments)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnComments = true;
                                dobjAcadSummaryInfo.Comments = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("LASTSAVEDBY"), TextCompare: false) == 0)
                        {
                            if (dblnLastSavedBy)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnLastSavedBy = true;
                                dobjAcadSummaryInfo.FriendLetLastSavedBy = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("REVISIONNUMBER"), TextCompare: false) == 0)
                        {
                            if (dblnRevisionNumber)
                            {
                                nrstrErrMsg = "Doppelter Datei-Info-Eintrag in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dblnRevisionNumber = true;
                                dobjAcadSummaryInfo.FriendLetRevisionNumber = Conversions.ToString(dvarValue5);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("CUSTOMPROPERTYTAG"), TextCompare: false) == 0)
                        {
                            dvarValue5 = Strings.Trim(Conversions.ToString(dvarValue5));
                            if (Operators.ConditionalCompareObjectEqual(dvarValue5, null, TextCompare: false))
                            {
                                nrstrErrMsg = "Datei-Info: Ungültiger Name einer benutzerdefinierten Eigenschaft in Zeile " + Conversions.ToString(dlngIdx * 2 + 4) + ".";
                                dblnError   = true;
                            }
                            else if (dobjAcadSummaryInfo.CustomExistsByKey(Conversions.ToString(dvarValue5)) != 0)
                            {
                                nrstrErrMsg = "Datei-Info: Der Name einer benutzerdefinierten Eigenschaft ist bereits vergeben, in Zeile " + Conversions.ToString(dlngIdx * 2 + 4) + ".";
                                dblnError   = true;
                            }
                            else
                            {
                                dobjAcadSummaryInfoField = dobjAcadSummaryInfo.Fields.Add(Conversions.ToString(dvarValue5), null);
                                InternIncreaseIndex(ref dlngIdx, 2);
                            }
                        }
                        else if (Operators.CompareString(left, Strings.UCase("CUSTOMPROPERTY"), TextCompare: false) == 0)
                        {
                            nrstrErrMsg = "Datei-Info: Wert einer benutzerdefinierten Eigenschaft ohne Namen in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                            dblnError   = true;
                        }
                        continue;
                    }
                    dobjAcadSysVar = mobjAcadDocument.FriendFindVariable(dstrVarName2);
                    if (dobjAcadSysVar == null)
                    {
                        nrstrErrMsg = "Ungültiger Variablenname '" + dstrVarName2 + "' in Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                        hwpDxf_Functions.BkDXF_DebugPrint(nrstrErrMsg);
                        dblnError = true;
                        continue;
                    }
                    object dvarHeaderCode = RuntimeHelpers.GetObjectValue(dobjAcadSysVar.HeaderCode);
                    if (dobjAcadSysVar.ArraySize == null)
                    {
                        int dlngCode5 = Conversions.ToInteger(mobjDictReadCodes[dlngIdx + 1]);
                        if (Operators.ConditionalCompareObjectNotEqual(dlngCode5, dvarHeaderCode, TextCompare: false))
                        {
                            nrstrErrMsg = "Ungültiger Gruppencode für Variablenwert in Zeile " + Conversions.ToString(dlngIdx * 2 + 3) + ".";
                            dblnError   = true;
                            continue;
                        }
                        dvarValue5 = RuntimeHelpers.GetObjectValue(mobjDictReadValues[dlngIdx + 1]);
                        switch (dobjAcadSysVar.Name)
                        {
                        case "CECOLOR":
                            dvarValue5 = hwpDxf_Functions.BkDXF_ColorLongToString(unchecked ((Enums.AcColor)Conversions.ToInteger(dvarValue5)));
                            break;

                        case "DIMDSEP":
                            dvarValue5 = Strings.Chr(Conversions.ToInteger(dvarValue5));
                            break;

                        case "FINGERPRINTGUID":
                            dvarValue5 = Strings.Trim(Conversions.ToString(dvarValue5));
                            if (Operators.ConditionalCompareObjectEqual(dvarValue5, null, TextCompare: false))
                            {
                                dvarValue5 = Guid.NewGuid().ToString().ToUpper();
                            }
                            break;

                        case "VERSIONGUID":
                            dvarValue5 = Strings.Trim(Conversions.ToString(dvarValue5));
                            if (Operators.ConditionalCompareObjectEqual(dvarValue5, null, TextCompare: false))
                            {
                                dvarValue5 = Guid.NewGuid().ToString().ToUpper();
                            }
                            break;
                        }
                        if (!dobjAcadSysVar.FriendSetValue(RuntimeHelpers.GetObjectValue(dvarValue5), vblnRaiseEvent: true, ref nrstrErrMsg))
                        {
                            nrstrErrMsg = nrstrErrMsg + " Ab Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                            dblnError   = true;
                        }
                        else
                        {
                            InternIncreaseIndex(ref dlngIdx, 2);
                        }
                        continue;
                    }
                    int         dlngLBound      = Information.LBound((Array)dvarHeaderCode);
                    int         dlngArraySize   = Conversions.ToInteger(dobjAcadSysVar.ArraySize);
                    VariantType varType_Renamed = dobjAcadSysVar.VarType_Renamed;
                    dvarValue5 = ((varType_Renamed != (VariantType)8201) ? new object[dlngArraySize - 1 + 1] : new object[dlngArraySize - 1 + 1]);
                    int dlngCount = 0;
                    while (unchecked (dlngCount < dlngArraySize && !dblnError))
                    {
                        int dlngCode5 = Conversions.ToInteger(mobjDictReadCodes[dlngIdx + dlngCount + 1]);
                        if (Operators.ConditionalCompareObjectNotEqual(dlngCode5, NewLateBinding.LateIndexGet(dvarHeaderCode, new object[1]
                        {
                            dlngLBound
                        }, null), TextCompare: false))
                        {
                            nrstrErrMsg = "Ungültiger Gruppencode für Variablenwert in Zeile " + Conversions.ToString((dlngIdx + dlngCount + 1) * 2 + 1) + ".";
                            dblnError   = true;
                        }
                        else
                        {
                            NewLateBinding.LateIndexSet(dvarValue5, new object[2]
                            {
                                dlngCount,
                                mobjDictReadValues[dlngIdx + dlngCount + 1]
                            }, null);
                            dlngLBound++;
                            dlngCount++;
                        }
                    }
                    if (!dblnError)
                    {
                        if (!dobjAcadSysVar.FriendSetValue(RuntimeHelpers.GetObjectValue(dvarValue5), vblnRaiseEvent: true, ref nrstrErrMsg))
                        {
                            nrstrErrMsg = nrstrErrMsg + " Ab Zeile " + Conversions.ToString(dlngIdx * 2 + 2) + ".";
                            dblnError   = true;
                        }
                        else
                        {
                            InternIncreaseIndex(ref dlngIdx, dlngArraySize + 1);
                        }
                    }
                }
            }
            bool InternReadSection = !dblnError;

            dobjAcadSysVar           = null;
            dobjAcadSummaryInfoField = null;
            dobjAcadSummaryInfo      = null;
            return(InternReadSection);
        }
Ejemplo n.º 6
0
 public static bool BkDXFReadBas_XData(ref int rlngIdx, Dictionary <object, object> vobjDictReadCodes, Dictionary <object, object> vobjDictReadValues, ref object rvarXDataType, ref object rvarXDataValue, ref string nrstrErrMsg)
 {
     object[] dadecArrayValue = new object[3];
     double[] dadblArrayValue = new double[3];
     nrstrErrMsg = null;
     checked
     {
         bool dblnError = default(bool);
         if (Operators.ConditionalCompareObjectEqual(vobjDictReadCodes[rlngIdx], 1001, TextCompare: false))
         {
             int   dlngCount      = -1;
             short dintNextCode   = -1;
             bool  dblnIsArray    = false;
             int   dlngArrayCount = 0;
             Dictionary <object, object> dobjDictXDataType  = new Dictionary <object, object>();
             Dictionary <object, object> dobjDictXDataValue = new Dictionary <object, object>();
             short dintArrayCode = default(short);
             while (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectGreaterEqual(vobjDictReadCodes[rlngIdx], 1000, TextCompare: false), !dblnError)))
             {
                 int    dlngCode  = Conversions.ToInteger(vobjDictReadCodes[rlngIdx]);
                 object dvarValue = RuntimeHelpers.GetObjectValue(vobjDictReadValues[rlngIdx]);
                 if (!hwpDxf_XData.BkDXFXData_TypeIsValid(dlngCode))
                 {
                     nrstrErrMsg = "Ungültiger Gruppencode für Erweiterungsdaten in Zeile " + Conversions.ToString(rlngIdx * 2 + 1) + ".";
                     dblnError   = true;
                 }
                 else if (!hwpDxf_XData.BkDXFXData_ValueIsValid(dlngCode, RuntimeHelpers.GetObjectValue(dvarValue)))
                 {
                     nrstrErrMsg = "Ungültiger Wert für Erweiterungsdaten in Zeile " + Conversions.ToString(rlngIdx * 2 + 2) + ".";
                     dblnError   = true;
                 }
                 else
                 {
                     short dintCode = (short)dlngCode;
                     if (dblnIsArray)
                     {
                         if (dintCode != dintNextCode)
                         {
                             nrstrErrMsg = "Ungültiger Gruppencode für Koordinate in Erweiterungsdaten in Zeile " + Conversions.ToString(rlngIdx * 2 + 1) + ".";
                             dblnError   = true;
                         }
                         else if (dlngArrayCount == 1)
                         {
                             dlngArrayCount++;
                             bool flag = false;
                             dadblArrayValue[1] = Conversions.ToDouble(dvarValue);
                             hwpDxf_XData.BkDXFXData_IsArrayCode(dintCode, ref dintNextCode);
                         }
                         else
                         {
                             dblnIsArray    = false;
                             dlngArrayCount = 0;
                             bool flag2 = false;
                             dadblArrayValue[2] = Conversions.ToDouble(dvarValue);
                             dintCode           = dintArrayCode;
                             dvarValue          = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, dadecArrayValue, dadblArrayValue));
                         }
                     }
                     else if (hwpDxf_XData.BkDXFXData_IsArrayCode(dintCode, ref dintNextCode))
                     {
                         dblnIsArray = true;
                         dlngArrayCount++;
                         dintArrayCode = dintCode;
                         bool flag3 = false;
                         dadblArrayValue[0] = Conversions.ToDouble(dvarValue);
                     }
                     if (!dblnIsArray)
                     {
                         dlngCount++;
                         dobjDictXDataType.Add(dlngCount, dintCode);
                         dobjDictXDataValue.Add(dlngCount, RuntimeHelpers.GetObjectValue(dvarValue));
                     }
                 }
                 rlngIdx++;
             }
             if (!dblnError)
             {
                 rvarXDataType  = new object[dlngCount + 1];
                 rvarXDataValue = new object[dlngCount + 1];
                 int num = dlngCount;
                 for (int dlngIndex = 0; dlngIndex <= num; dlngIndex++)
                 {
                     NewLateBinding.LateIndexSet(rvarXDataType, new object[2]
                     {
                         dlngIndex,
                         dobjDictXDataType[dlngIndex]
                     }, null);
                     NewLateBinding.LateIndexSet(rvarXDataValue, new object[2]
                     {
                         dlngIndex,
                         dobjDictXDataValue[dlngIndex]
                     }, null);
                 }
             }
         }
         return(!dblnError);
     }
 }
Ejemplo n.º 7
0
        public double myF1(object X)
        {
            NewLateBinding.LateIndexSet((object)this.PN, new object[2]
            {
                (object)1,
                RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                {
                    (object)2
                }, (string[])null))
            }, (string[])null);
            int num1 = this.NK - 1;

            for (int index = 2; index <= num1; ++index)
            {
                NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                {
                    (object)index,
                    Operators.MultiplyObject(Operators.MultiplyObject((object)index, NewLateBinding.LateIndexGet((object)this.A, new object[1]
                    {
                        (object)(index + 1)
                    }, (string[])null)), Operators.ExponentObject(X, (object)(index - 1)))
                }, (string[])null);
            }
            int num2 = this.NK - 1;

            for (int index1 = 1; index1 <= num2; ++index1)
            {
                double num3 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                {
                    (object)index1
                }, (string[])null));
                int num4 = index1;
                int num5 = this.NK - 1;
                for (int index2 = num4; index2 <= num5; ++index2)
                {
                    if (Operators.ConditionalCompareObjectGreater((object)num3, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)index2
                    }, (string[])null), false))
                    {
                        num3 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                        {
                            (object)index2
                        }, (string[])null));
                        double num6 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                        {
                            (object)index2
                        }, (string[])null));
                        NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                        {
                            (object)index2,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                            {
                                (object)index1
                            }, (string[])null))
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                        {
                            (object)index1,
                            (object)num6
                        }, (string[])null);
                    }
                }
            }
            int num7 = this.NK;
            int num8 = this.NK - 1;

            for (int index = 1; index <= num8; ++index)
            {
                if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectGreater(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                {
                    (object)index
                }, (string[])null), (object)0.0, false), (object)(num7 == this.NK))))
                {
                    num7 = index;
                }
            }
            double num9 = 0.0;

            for (int index = num7 - 1; index >= 1; index += -1)
            {
                num9 = Conversions.ToDouble(Operators.AddObject((object)num9, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                {
                    (object)index
                }, (string[])null)));
            }
            double num10 = 0.0;
            int    num11 = num7;
            int    num12 = this.NK - 1;

            for (int index = num11; index <= num12; ++index)
            {
                num10 = Conversions.ToDouble(Operators.AddObject((object)num10, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                {
                    (object)index
                }, (string[])null)));
            }
            return(num10 + num9);
        }
Ejemplo n.º 8
0
        public double GetValBySpline(double XX)
        {
            int num1 = 0;
            int num2 = this.NK - 1;

            for (int index = 1; index <= num2; ++index)
            {
                if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectLessEqual(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)index
                }, (string[])null), (object)XX, false), Operators.CompareObjectLessEqual((object)XX, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)(index + 1)
                }, (string[])null), false))))
                {
                    num1 = index;
                }
            }
            double num3;

            if (num1 > 0)
            {
                NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                {
                    (object)4,
                    RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.B, new object[2]
                    {
                        (object)4,
                        (object)num1
                    }, (string[])null))
                }, (string[])null);
                int num4 = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                    {
                        (object)num4,
                        Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.B, new object[2]
                        {
                            (object)num4,
                            (object)num1
                        }, (string[])null), (object)Math.Pow(XX, (double)(4 - num4)))
                    }, (string[])null);
                    ++num4;
                }while (num4 <= 3);
                int num5 = 1;
                do
                {
                    double num6 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)num5
                    }, (string[])null));
                    int num7 = 1;
                    do
                    {
                        if (Operators.ConditionalCompareObjectGreater((object)num6, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                        {
                            (object)num7
                        }, (string[])null), false))
                        {
                            num6 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                            {
                                (object)num7
                            }, (string[])null));
                            double num8 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                            {
                                (object)num7
                            }, (string[])null));
                            NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                            {
                                (object)num7,
                                RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                                {
                                    (object)num5
                                }, (string[])null))
                            }, (string[])null);
                            NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                            {
                                (object)num5,
                                (object)num8
                            }, (string[])null);
                        }
                        ++num7;
                    }while (num7 <= 4);
                    ++num5;
                }while (num5 <= 4);
                int num9  = 5;
                int num10 = 1;
                do
                {
                    if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectGreater(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)num10
                    }, (string[])null), (object)0.0, false), (object)(num9 == 5))))
                    {
                        num9 = num10;
                    }
                    ++num10;
                }while (num10 <= 4);
                double num11 = 0.0;
                for (int index = num9 - 1; index >= 1; index += -1)
                {
                    num11 = Conversions.ToDouble(Operators.AddObject((object)num11, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)index
                    }, (string[])null)));
                }
                double num12 = 0.0;
                for (int index = num9; index <= 4; ++index)
                {
                    num12 = Conversions.ToDouble(Operators.AddObject((object)num12, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)index
                    }, (string[])null)));
                }
                num3 = num12 + num11;
            }
            else
            {
                num3 = 0.0;
            }
            return(num3);
        }
Ejemplo n.º 9
0
        public void BuildInterpolation()
        {
            int num1 = this.NK - 1;

            for (int index1 = 1; index1 <= num1; ++index1)
            {
                int num2 = this.NK - index1;
                for (int index2 = 1; index2 <= num2; ++index2)
                {
                    NewLateBinding.LateIndexSet((object)this.F, new object[3]
                    {
                        (object)(index1 + 1),
                        (object)index2,
                        Operators.DivideObject(Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)index1,
                            (object)(index2 + 1)
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)index1,
                            (object)index2
                        }, (string[])null)), Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)(index2 + index1)
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)index2
                        }, (string[])null)))
                    }, (string[])null);
                }
            }
            int nk1 = this.NK;

            for (int index = 1; index <= nk1; ++index)
            {
                NewLateBinding.LateIndexSet((object)this.A, new object[2]
                {
                    (object)index,
                    (object)0.0
                }, (string[])null);
            }
            int num3 = this.NK - 1;

            for (int index1 = 1; index1 <= num3; ++index1)
            {
                if (index1 >= 6)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1 - 5; ++index2)
                    {
                        for (int index3 = index2 + 1; index3 <= index1 - 4; ++index3)
                        {
                            for (int index4 = index3 + 1; index4 <= index1 - 3; ++index4)
                            {
                                for (int index5 = index4 + 1; index5 <= index1 - 2; ++index5)
                                {
                                    for (int index6 = index5 + 1; index6 <= index1 - 1; ++index6)
                                    {
                                        for (int index7 = index6 + 1; index7 <= index1; ++index7)
                                        {
                                            this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index2
                                            }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index3
                                            }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index4
                                            }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index5
                                            }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index6
                                            }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                            {
                                                (object)index7
                                            }, (string[])null))));
                                        }
                                    }
                                }
                            }
                        }
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)(index1 - 5),
                        Operators.AddObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)(index1 - 5)
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                    int num2 = 1 + 1 + 1 + 1 + 1;
                }
                if (index1 >= 5)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1 - 4; ++index2)
                    {
                        for (int index3 = index2 + 1; index3 <= index1 - 3; ++index3)
                        {
                            for (int index4 = index3 + 1; index4 <= index1 - 2; ++index4)
                            {
                                for (int index5 = index4 + 1; index5 <= index1 - 1; ++index5)
                                {
                                    for (int index6 = index5 + 1; index6 <= index1; ++index6)
                                    {
                                        this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                        {
                                            (object)index2
                                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                        {
                                            (object)index3
                                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                        {
                                            (object)index4
                                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                        {
                                            (object)index5
                                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                        {
                                            (object)index6
                                        }, (string[])null))));
                                    }
                                }
                            }
                        }
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)(index1 - 4),
                        Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)(index1 - 4)
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                }
                if (index1 >= 4)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1 - 3; ++index2)
                    {
                        for (int index3 = index2 + 1; index3 <= index1 - 2; ++index3)
                        {
                            for (int index4 = index3 + 1; index4 <= index1 - 1; ++index4)
                            {
                                for (int index5 = index4 + 1; index5 <= index1; ++index5)
                                {
                                    this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                    {
                                        (object)index2
                                    }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                    {
                                        (object)index3
                                    }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                    {
                                        (object)index4
                                    }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                    {
                                        (object)index5
                                    }, (string[])null))));
                                }
                            }
                        }
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)(index1 - 3),
                        Operators.AddObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)(index1 - 3)
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                }
                if (index1 >= 3)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1 - 2; ++index2)
                    {
                        for (int index3 = index2 + 1; index3 <= index1 - 1; ++index3)
                        {
                            for (int index4 = index3 + 1; index4 <= index1; ++index4)
                            {
                                this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, Operators.MultiplyObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                {
                                    (object)index2
                                }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                {
                                    (object)index3
                                }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                                {
                                    (object)index4
                                }, (string[])null))));
                            }
                        }
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)(index1 - 2),
                        Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)(index1 - 2)
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                }
                if (index1 >= 2)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1 - 1; ++index2)
                    {
                        for (int index3 = index2 + 1; index3 <= index1; ++index3)
                        {
                            this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                            {
                                (object)index2
                            }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                            {
                                (object)index3
                            }, (string[])null))));
                        }
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)(index1 - 1),
                        Operators.AddObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)(index1 - 1)
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                }
                if (index1 >= 1)
                {
                    this.S = 0.0;
                    for (int index2 = 1; index2 <= index1; ++index2)
                    {
                        this.S = Conversions.ToDouble(Operators.AddObject((object)this.S, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)index2
                        }, (string[])null)));
                    }
                    NewLateBinding.LateIndexSet((object)this.A, new object[2]
                    {
                        (object)index1,
                        Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                        {
                            (object)index1
                        }, (string[])null), Operators.MultiplyObject((object)this.S, NewLateBinding.LateIndexGet((object)this.F, new object[2]
                        {
                            (object)(index1 + 1),
                            (object)1
                        }, (string[])null)))
                    }, (string[])null);
                }
            }
            int nk2 = this.NK;

            for (int index = 1; index <= nk2; ++index)
            {
                NewLateBinding.LateIndexSet((object)this.A, new object[2]
                {
                    (object)index,
                    Operators.AddObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                    {
                        (object)index
                    }, (string[])null), NewLateBinding.LateIndexGet((object)this.F, new object[2]
                    {
                        (object)index,
                        (object)1
                    }, (string[])null))
                }, (string[])null);
            }
            int num4 = this.NK - 1;

            for (int index = 1; index <= num4; ++index)
            {
                this.XI = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)index
                }, (string[])null));
                this.XI1 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)(index + 1)
                }, (string[])null));
                this.H  = this.XI1 - this.XI;
                this.FI = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.F, new object[2]
                {
                    (object)1,
                    (object)index
                }, (string[])null));
                this.FI1 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.F, new object[2]
                {
                    (object)1,
                    (object)(index + 1)
                }, (string[])null));
                this.F1I  = this.myF1((object)this.XI);
                this.F1I1 = this.myF1((object)this.XI1);
                this.DFI  = this.FI1 - this.FI;
                this.DH3  = Math.Pow(this.H, 3.0);
                NewLateBinding.LateIndexSet((object)this.B, new object[3]
                {
                    (object)1,
                    (object)index,
                    (object)((this.F1I1 * this.H - 2.0 * this.DFI + this.F1I * this.H) / this.DH3)
                }, (string[])null);
                NewLateBinding.LateIndexSet((object)this.B, new object[3]
                {
                    (object)2,
                    (object)index,
                    (object)((-this.F1I1 * this.H * (this.XI1 + 2.0 * this.XI) + 3.0 * this.DFI * (this.XI1 + this.XI) - this.F1I * this.H * (this.XI + 2.0 * this.XI1)) / this.DH3)
                }, (string[])null);
                NewLateBinding.LateIndexSet((object)this.B, new object[3]
                {
                    (object)3,
                    (object)index,
                    (object)((this.F1I1 * this.XI * (this.XI + 2.0 * this.XI1) * this.H - 6.0 * this.DFI * this.XI * this.XI1 + this.F1I * this.XI1 * (this.XI1 + 2.0 * this.XI) * this.H) / this.DH3)
                }, (string[])null);
                NewLateBinding.LateIndexSet((object)this.B, new object[3]
                {
                    (object)4,
                    (object)index,
                    (object)((-this.F1I1 * this.XI * this.XI * this.XI1 * this.H + this.FI1 * this.XI * this.XI * (3.0 * this.XI1 - this.XI) + this.FI * this.XI1 * this.XI1 * (this.XI1 - 3.0 * this.XI) - this.F1I * this.XI * this.XI1 * this.XI1 * this.H) / this.DH3)
                }, (string[])null);
            }
        }
Ejemplo n.º 10
0
        public void CalculateY(
            double XX,
            ref double Sval,
            ref int Snum,
            ref double Fval,
            ref bool bres)
        {
            int num1 = 0;
            int num2 = this.NK - 1;

            for (int index = 1; index <= num2; ++index)
            {
                if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectLessEqual(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)index
                }, (string[])null), (object)XX, false), Operators.CompareObjectLessEqual((object)XX, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                {
                    (object)(index + 1)
                }, (string[])null), false))))
                {
                    num1 = index;
                }
            }
            if (num1 > 0)
            {
                NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                {
                    (object)4,
                    RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.B, new object[2]
                    {
                        (object)4,
                        (object)num1
                    }, (string[])null))
                }, (string[])null);
                int num3 = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                    {
                        (object)num3,
                        Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.B, new object[2]
                        {
                            (object)num3,
                            (object)num1
                        }, (string[])null), (object)Math.Pow(XX, (double)(4 - num3)))
                    }, (string[])null);
                    ++num3;
                }while (num3 <= 3);
                int num4 = 1;
                do
                {
                    double num5 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)num4
                    }, (string[])null));
                    int num6 = 1;
                    do
                    {
                        if (Operators.ConditionalCompareObjectGreater((object)num5, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                        {
                            (object)num6
                        }, (string[])null), false))
                        {
                            num5 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                            {
                                (object)num6
                            }, (string[])null));
                            double num7 = Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                            {
                                (object)num6
                            }, (string[])null));
                            NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                            {
                                (object)num6,
                                RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                                {
                                    (object)num4
                                }, (string[])null))
                            }, (string[])null);
                            NewLateBinding.LateIndexSet((object)this.PN, new object[2]
                            {
                                (object)num4,
                                (object)num7
                            }, (string[])null);
                        }
                        ++num6;
                    }while (num6 <= 4);
                    ++num4;
                }while (num4 <= 4);
                int num8 = 5;
                int num9 = 1;
                do
                {
                    if (Conversions.ToBoolean(Operators.AndObject(Operators.CompareObjectGreater(NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)num9
                    }, (string[])null), (object)0.0, false), (object)(num8 == 5))))
                    {
                        num8 = num9;
                    }
                    ++num9;
                }while (num9 <= 4);
                double num10 = 0.0;
                for (int index = num8 - 1; index >= 1; index += -1)
                {
                    num10 = Conversions.ToDouble(Operators.AddObject((object)num10, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)index
                    }, (string[])null)));
                }
                double num11 = 0.0;
                for (int index = num8; index <= 4; ++index)
                {
                    num11 = Conversions.ToDouble(Operators.AddObject((object)num11, NewLateBinding.LateIndexGet((object)this.PN, new object[1]
                    {
                        (object)index
                    }, (string[])null)));
                }
                double num12 = num11 + num10;
                Sval = num12;
                Snum = num1;
                double num13 = 0.0;
                int    nk    = this.NK;
                for (int index = 1; index <= nk; ++index)
                {
                    num13 = Conversions.ToDouble(Operators.AddObject((object)num13, Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.A, new object[1]
                    {
                        (object)index
                    }, (string[])null), (object)Math.Pow(XX, (double)(index - 1)))));
                }
                Fval = num13;
                bres = true;
            }
            else
            {
                bres = false;
            }
        }
Ejemplo n.º 11
0
        private void RUNKU4(int Fidx)
        {
            Array instance = Array.CreateInstance(typeof(double), 12);
            int   num1     = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)instance, new object[2]
                {
                    (object)num1,
                    (object)this.Y0
                }, (string[])null);
                ++num1;
            }while (num1 <= 11);
            double num2 = this.EPS / 15.0;
            int    num3;

            do
            {
                double x0   = this.X0;
                double num4 = this.Y0;
                this.N = 2 * this.N;
                double num5 = (this.XN - this.X0) / (double)this.N;
                double num6 = num5 / 2.0;
                double num7 = num5 / 6.0;
                int    num8 = (int)Math.Round((double)this.N / 10.0);
                int    num9 = 0;
                num3 = 0;
                int num10 = 1;
                int n     = this.N;
                for (int index = 1; index <= n; ++index)
                {
                    ++num9;
                    double X1 = x0;
                    double X2 = X1 + num6;
                    x0 += num5;
                    double Y = num4;
                    double num11;
                    double num12;
                    double num13;
                    double num14;
                    switch (Fidx)
                    {
                    case 1:
                        num11 = this.calcF1(X1, Y);
                        num12 = this.calcF1(X2, Y + num11 * num6);
                        num13 = this.calcF1(X2, Y + num12 * num6);
                        num14 = this.calcF1(x0, Y + num13 * num5);
                        break;

                    case 8:
                        num11 = this.calcF8(X1, Y);
                        num12 = this.calcF8(X2, Y + num11 * num6);
                        num13 = this.calcF8(X2, Y + num12 * num6);
                        num14 = this.calcF8(x0, Y + num13 * num5);
                        break;

                    case 10:
                        num11 = this.calcF10(X1, Y);
                        num12 = this.calcF10(X2, Y + num11 * num6);
                        num13 = this.calcF10(X2, Y + num12 * num6);
                        num14 = this.calcF10(x0, Y + num13 * num5);
                        break;

                    case 13:
                        num11 = this.calcF13(X1, Y);
                        num12 = this.calcF13(X2, Y + num11 * num6);
                        num13 = this.calcF13(X2, Y + num12 * num6);
                        num14 = this.calcF13(x0, Y + num13 * num5);
                        break;
                    }
                    num4 = Y + num7 * (num11 + 2.0 * (num12 + num13) + num14);
                    if (num9 == num8)
                    {
                        num9 = 0;
                        ++num10;
                        if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet((object)null, typeof(Math), "Abs", new object[1]
                        {
                            Operators.SubtractObject(NewLateBinding.LateIndexGet((object)instance, new object[1]
                            {
                                (object)num10
                            }, (string[])null), (object)num4)
                        }, (string[])null, (Type[])null, (bool[])null), (object)num2, false))
                        {
                            ++num3;
                        }
                        NewLateBinding.LateIndexSet((object)instance, new object[2]
                        {
                            (object)num10,
                            (object)num4
                        }, (string[])null);
                    }
                }
            }while (num3 > 0 & this.N < 11);
            int num15 = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)this.Y, new object[2]
                {
                    (object)num15,
                    RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance, new object[1]
                    {
                        (object)num15
                    }, (string[])null))
                }, (string[])null);
                ++num15;
            }while (num15 <= 11);
        }
Ejemplo n.º 12
0
        public void Calculate(int No)
        {
            int    num1 = this.N + 1;
            double num2 = (this.XN - this.X0) / (double)this.N;
            double num3 = (this.XN - this.X0) / (double)this.N;

            this.L = 1;
            do
            {
                NewLateBinding.LateIndexSet((object)this.X, new object[2]
                {
                    (object)this.L,
                    (object)(num3 * (double)(this.L - 1) * (double)this.N / 10.0 + this.X0)
                }, (string[])null);
                ++this.L;
            }while (this.L <= 11);
            double num4 = 0.0;

            switch (No)
            {
            case 1:
                double num5 = (Math.Pow(this.Y0, 2.0) - Math.Pow(this.X0, 2.0)) * Math.Exp(-1.0 / this.X0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)((double)Math.Sign(this.Y0) * Math.Sqrt(Conversions.ToDouble(Operators.AddObject(Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2), (object)(num5 * Math.Exp(Conversions.ToDouble(Operators.DivideObject((object)1, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)))))))))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU4(this.cF1);
                break;

            case 2:
                double num6 = Math.Pow(this.X0, 2.0) * Math.Pow(this.Y0, 2.0) - 2.0 * (this.X0 + this.Y0);
                double y0_1 = this.Y0;
                this.L = 1;
                do
                {
                    double num7;
                    do
                    {
                        num7 = y0_1;
                        y0_1 = Conversions.ToDouble(Operators.SubtractObject((object)num7, Operators.DivideObject(Operators.SubtractObject(Operators.SubtractObject(Operators.ExponentObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)num7), (object)2), Operators.MultiplyObject((object)2.0, Operators.AddObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)num7))), (object)num6), Operators.MultiplyObject((object)2.0, Operators.SubtractObject(Operators.MultiplyObject((object)num7, Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)), (object)1)))));
                    }while (Math.Abs((y0_1 - num7) / y0_1) > 1E-06);
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)y0_1
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU3(this.cF2);
                break;

            case 3:
                double num8 = 3.0 * this.X0 * Math.Pow(this.Y0, 2.0) + Math.Pow(this.X0, 2.0) * this.Y0 + 3.0 * this.Y0 + Math.Pow(this.X0, 2.0);
                double y0_2 = this.Y0;
                this.L = 1;
                do
                {
                    double x;
                    do
                    {
                        x    = y0_2;
                        y0_2 = Conversions.ToDouble(Operators.SubtractObject((object)x, Operators.DivideObject(Operators.SubtractObject(Operators.AddObject(Operators.AddObject(Operators.MultiplyObject(Operators.MultiplyObject((object)3.0, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), (object)Math.Pow(x, 2.0)), Operators.MultiplyObject(Operators.AddObject(Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2), (object)3.0), (object)x)), Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)), (object)num8), Operators.AddObject(Operators.AddObject(Operators.MultiplyObject((object)(6.0 * x), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)), (object)3.0))));
                    }while (Math.Abs((y0_2 - x) / y0_2) > 1E-06);
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)y0_2
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2R(this.cF3);
                break;

            case 4:
                double num9 = Math.Pow(this.X0, 2.0) * Math.Pow(this.Y0, 2.0) - 2.0 * Math.Pow(this.X0, 3.0) * this.Y0 - Math.Pow(this.X0, 4.0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.AddObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)((double)Math.Sign(this.Y0) * Math.Sqrt(Conversions.ToDouble(Operators.AddObject(Operators.MultiplyObject((object)2.0, Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)), Operators.DivideObject((object)num9, Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)))))))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2M(this.cF4);
                break;

            case 5:
                num4 = (2.0 * this.Y0 + this.X0 * this.X0 * (this.Y0 * this.Y0 * 2.0 * Math.Log(this.Y0) - this.Y0)) / (this.X0 * this.X0);
                double y0_3 = this.Y0;
                this.L = 1;
                do
                {
                    double d;
                    do
                    {
                        d    = y0_3;
                        y0_3 = Conversions.ToDouble(Operators.SubtractObject((object)d, Operators.DivideObject(Operators.SubtractObject(Operators.AddObject((object)(2.0 * d), Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject((object)(d * d), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), (object)(2.0 * Math.Log(d) - 1.0))), Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null))), Operators.AddObject((object)2.0, Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), (object)4), (object)d), (object)Math.Log(d))))));
                    }while (Math.Abs((y0_3 - d) / y0_3) > 1E-06);
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)y0_3
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2R(this.cF5);
                break;

            case 6:
                double num10 = (3.0 / this.Y0 + 1.0) * Math.Exp(1.5 * this.X0 * this.X0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)(3.0 / (num10 * Math.Exp(Conversions.ToDouble(Operators.MultiplyObject((object)-1.5, Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)))) - 1.0))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2M(this.cF6);
                break;

            case 7:
                double num11 = (this.Y0 * this.Y0 + 5.0 * this.X0 * Math.Log(this.X0)) / this.X0;
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)((double)Math.Sign(this.Y0) * Math.Sqrt(Conversions.ToDouble(Operators.SubtractObject(Operators.MultiplyObject((object)num11, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.MultiplyObject(Operators.MultiplyObject((object)5, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), (object)Math.Log(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null))))))))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU3(this.cF7);
                break;

            case 8:
                double num12 = (2.0 * this.X0 - this.X0 * this.X0 * this.Y0) / this.Y0;
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject(Operators.MultiplyObject((object)2, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.AddObject(Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2), (object)num12))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU4(this.cF8);
                break;

            case 9:
                double num13 = (2.0 * this.X0 * this.X0 - this.Y0 * this.X0) / (this.Y0 - 1.0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject(Operators.AddObject(Operators.MultiplyObject(Operators.MultiplyObject((object)2, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), (object)num13), Operators.AddObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)num13))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU3(this.cF9);
                break;

            case 10:
                double num14 = (this.Y0 + this.X0 / 2.0) / Math.Sqrt(this.X0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.SubtractObject((object)(num14 * Math.Sqrt(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)))), Operators.DivideObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2.0))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU4(this.cF10);
                break;

            case 11:
                double num15 = -(Math.Pow(this.X0, 3.0) + 2.0 * this.X0 + this.Y0 * Math.Pow(this.X0, 2.0)) / (this.X0 + this.Y0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject(Operators.NegateObject(Operators.AddObject(Operators.AddObject(Operators.MultiplyObject((object)num15, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)3)), Operators.MultiplyObject((object)2, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)))), Operators.AddObject((object)num15, Operators.ExponentObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)2)))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2M(this.cF11);
                break;

            case 12:
                double num16 = this.X0 * (1.0 + this.X0 * this.Y0) / (2.0 + this.X0 * this.Y0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject(Operators.SubtractObject((object)(2.0 * num16), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)num16)))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2R(this.cF12);
                break;

            case 13:
                double num17 = (this.X0 * this.X0 - this.Y0 + 0.5) * Math.Exp(this.Y0);
                double y0_4  = this.Y0;
                this.L = 1;
                do
                {
                    double num7;
                    do
                    {
                        num7 = y0_4;
                        y0_4 = Conversions.ToDouble(Operators.SubtractObject((object)num7, Operators.DivideObject(Operators.SubtractObject(Operators.SubtractObject((object)(num7 + num17 * Math.Exp(-num7)), Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null))), (object)0.5), (object)(1.0 - num17 * Math.Exp(-num7)))));
                    }while (Math.Abs((y0_4 - num7) / y0_4) > 1E-05);
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)y0_4
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU4(this.cF13);
                break;

            case 14:
                double num18 = (4.0 * this.X0 * this.X0 + this.Y0 * this.Y0) * Math.Exp(2.0 * this.X0);
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        (object)((double)Math.Sign(this.Y0) * Math.Sqrt(Conversions.ToDouble(Operators.SubtractObject((object)(num18 * Math.Exp(Conversions.ToDouble(Operators.MultiplyObject((object)-2, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null))))), Operators.MultiplyObject(Operators.MultiplyObject((object)4, NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null))))))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.RUNKU3(this.cF14);
                break;

            case 15:
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject((object)4.0, Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2M(this.cF15);
                break;

            case 16:
                double num19 = (this.X0 * this.X0 - this.Y0) / (this.Y0 * (this.X0 - 1.0));
                this.L = 1;
                do
                {
                    NewLateBinding.LateIndexSet((object)this.Z, new object[2]
                    {
                        (object)this.L,
                        Operators.DivideObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null)), Operators.AddObject((object)1.0, Operators.MultiplyObject((object)num19, Operators.SubtractObject(NewLateBinding.LateIndexGet((object)this.X, new object[1]
                        {
                            (object)this.L
                        }, (string[])null), (object)1.0))))
                    }, (string[])null);
                    ++this.L;
                }while (this.L <= 11);
                this.EJL2R(this.cF16);
                break;
            }
        }
Ejemplo n.º 13
0
        private void EJL2R(int Fidx)
        {
            Array instance = Array.CreateInstance(typeof(double), 12);
            int   num1     = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)instance, new object[2]
                {
                    (object)num1,
                    (object)this.Y0
                }, (string[])null);
                ++num1;
            }while (num1 <= 11);
            double num2 = this.EPS / 3.0;
            int    num3;

            do
            {
                double x0   = this.X0;
                double num4 = this.Y0;
                this.N = 2 * this.N;
                double num5 = (this.XN - this.X0) / (double)this.N;
                double num6 = num5 / 2.0;
                int    num7 = (int)Math.Round((double)this.N / 10.0);
                int    num8 = 0;
                num3 = 0;
                int num9 = 1;
                int n    = this.N;
                for (int index = 1; index <= n; ++index)
                {
                    ++num8;
                    double X = x0;
                    x0 += num5;
                    double Y = num4;
                    switch (Fidx)
                    {
                    case 3:
                        double num10 = this.calcF3(X, Y);
                        num4 = Y + num6 * (num10 + this.calcF3(x0, Y + num5 * num10));
                        break;

                    case 5:
                        double num11 = this.calcF5(X, Y);
                        num4 = Y + num6 * (num11 + this.calcF5(x0, Y + num5 * num11));
                        break;

                    case 12:
                        double num12 = this.calcF12(X, Y);
                        num4 = Y + num6 * (num12 + this.calcF12(x0, Y + num5 * num12));
                        break;

                    case 16:
                        double num13 = this.calcF16(X, Y);
                        num4 = Y + num6 * (num13 + this.calcF16(x0, Y + num5 * num13));
                        break;
                    }
                    if (num8 == num7)
                    {
                        num8 = 0;
                        ++num9;
                        if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet((object)null, typeof(Math), "Abs", new object[1]
                        {
                            Operators.SubtractObject(NewLateBinding.LateIndexGet((object)instance, new object[1]
                            {
                                (object)num9
                            }, (string[])null), (object)num4)
                        }, (string[])null, (Type[])null, (bool[])null), (object)num2, false))
                        {
                            ++num3;
                        }
                        NewLateBinding.LateIndexSet((object)instance, new object[2]
                        {
                            (object)num9,
                            (object)num4
                        }, (string[])null);
                    }
                }
            }while (num3 > 0 & this.N > 11);
            int num14 = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)this.Y, new object[2]
                {
                    (object)num14,
                    RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance, new object[1]
                    {
                        (object)num14
                    }, (string[])null))
                }, (string[])null);
                ++num14;
            }while (num14 <= 11);
        }
Ejemplo n.º 14
0
        private void EJL2M(int Fidx)
        {
            Array instance = Array.CreateInstance(typeof(double), 12);
            int   num1     = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)instance, new object[2]
                {
                    (object)num1,
                    (object)this.Y0
                }, (string[])null);
                ++num1;
            }while (num1 <= 11);
            double num2 = this.EPS / 3.0;
            int    num3;

            do
            {
                double x0   = this.X0;
                double num4 = this.Y0;
                this.N = 2 * this.N;
                double num5 = (this.XN - this.X0) / (double)this.N;
                double num6 = num5 / 2.0;
                int    num7 = (int)Math.Round((double)this.N / 10.0);
                int    num8 = 0;
                num3 = 0;
                int num9 = 1;
                int n    = this.N;
                for (int index = 1; index <= n; ++index)
                {
                    ++num8;
                    double X = x0;
                    x0 += num5;
                    double Y1 = num4;
                    switch (Fidx)
                    {
                    case 4:
                        double Y2 = Y1 + num6 * this.calcF4(X, Y1);
                        num4 = Y1 + num5 * this.calcF4(X + num6, Y2);
                        break;

                    case 6:
                        double Y3 = Y1 + num6 * this.calcF6(X, Y1);
                        num4 = Y1 + num5 * this.calcF6(X + num6, Y3);
                        break;

                    case 11:
                        double Y4 = Y1 + num6 * this.calcF11(X, Y1);
                        num4 = Y1 + num5 * this.calcF11(X + num6, Y4);
                        break;

                    case 15:
                        double Y5 = Y1 + num6 * this.calcF15(X, Y1);
                        num4 = Y1 + num5 * this.calcF15(X + num6, Y5);
                        break;
                    }
                    if (num8 == num7)
                    {
                        num8 = 0;
                        ++num9;
                        if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet((object)null, typeof(Math), "Abs", new object[1]
                        {
                            Operators.SubtractObject(NewLateBinding.LateIndexGet((object)instance, new object[1]
                            {
                                (object)num9
                            }, (string[])null), (object)num4)
                        }, (string[])null, (Type[])null, (bool[])null), (object)num2, false))
                        {
                            ++num3;
                        }
                        NewLateBinding.LateIndexSet((object)instance, new object[2]
                        {
                            (object)num9,
                            (object)num4
                        }, (string[])null);
                    }
                }
            }while (num3 > 0 & this.N < 11);
            int num10 = 1;

            do
            {
                NewLateBinding.LateIndexSet((object)this.Y, new object[2]
                {
                    (object)num10,
                    RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance, new object[1]
                    {
                        (object)num10
                    }, (string[])null))
                }, (string[])null);
                ++num10;
            }while (num10 <= 11);
        }
Ejemplo n.º 15
0
        private void NumSolverV21()
        {
            Array  instance1 = Array.CreateInstance(typeof(double), 801);
            Array  instance2 = Array.CreateInstance(typeof(double), 801);
            Array  instance3 = Array.CreateInstance(typeof(double), 801, 801);
            Array  instance4 = Array.CreateInstance(typeof(double), 801);
            object instance5 = (object)Array.CreateInstance(typeof(double), 801, 801);

            this.UV = Array.CreateInstance(typeof(double), 801, 801);
            double num1 = this.HX / 2.0;
            double num2 = this.HY / 2.0;

            this.T = this.DT;
            while (true)
            {
                int num3 = 0;
                int mk1  = this.MK;
                for (this.M = 1; this.M <= mk1; ++this.M)
                {
                    int lk = this.LK;
                    for (this.L = 1; this.L <= lk; ++this.L)
                    {
                        NewLateBinding.LateIndexSet(instance5, new object[3]
                        {
                            (object)this.L,
                            (object)this.M,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)this.UM, new object[2]
                            {
                                (object)this.L,
                                (object)this.M
                            }, (string[])null))
                        }, (string[])null);
                    }
                }
                double num4 = this.DT / (this.HX * this.HX);
                double num5 = this.DT / (this.HY * this.HY);
                int    num6;
                do
                {
                    ++num3;
                    num6 = 0;
                    double q0    = this.Q0;
                    int    mk1_1 = this.MK1;
                    for (this.M = 2; this.M <= mk1_1; ++this.M)
                    {
                        q0 += this.HY;
                        int lk1 = this.LK;
                        for (this.L = 1; this.L <= lk1; ++this.L)
                        {
                            NewLateBinding.LateIndexSet((object)instance4, new object[2]
                            {
                                (object)this.L,
                                RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                                {
                                    (object)this.L,
                                    (object)this.M
                                }, (string[])null))
                            }, (string[])null);
                        }
                        NewLateBinding.LateIndexSet((object)instance1, new object[2]
                        {
                            (object)1,
                            (object)0.0
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance2, new object[2]
                        {
                            (object)1,
                            (object)this.G0Nv2(this.T, q0)
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance4, new object[2]
                        {
                            (object)1,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance2, new object[1]
                            {
                                (object)1
                            }, (string[])null))
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance4, new object[2]
                        {
                            (object)this.LK,
                            (object)this.G1Nv2(this.T, q0)
                        }, (string[])null);
                        double num7 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                        {
                            (object)1
                        }, (string[])null)));
                        double num8 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                        {
                            (object)2
                        }, (string[])null)));
                        double num9  = num4 * (num8 + num7) * this.HNv2(this.R0 + num1) / 2.0;
                        int    lk1_1 = this.lk1;
                        for (this.L = 2; this.L <= lk1_1; ++this.L)
                        {
                            double Xin1  = this.R0 + this.HX * (double)(this.L - 1);
                            double Xin2  = Xin1 + num1;
                            double num10 = num8;
                            num8 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)(this.L + 1)
                            }, (string[])null)));
                            double num11 = num9;
                            num9 = num4 * (num8 + num10) * this.HNv2(Xin2) / 2.0;
                            double num12 = Conversions.ToDouble(Operators.SubtractObject((object)(this.HNv2(Xin1) + num9 + num11), Operators.MultiplyObject((object)num11, NewLateBinding.LateIndexGet((object)instance1, new object[1]
                            {
                                (object)(this.L - 1)
                            }, (string[])null))));
                            NewLateBinding.LateIndexSet((object)instance1, new object[2]
                            {
                                (object)this.L,
                                (object)(num9 / num12)
                            }, (string[])null);
                            NewLateBinding.LateIndexSet((object)instance2, new object[2]
                            {
                                (object)this.L,
                                Operators.DivideObject(Operators.AddObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)this.UM, new object[2]
                                {
                                    (object)this.L,
                                    (object)this.M
                                }, (string[])null), (object)this.HNv2(Xin1)), Operators.MultiplyObject((object)num11, NewLateBinding.LateIndexGet((object)instance2, new object[1]
                                {
                                    (object)(this.L - 1)
                                }, (string[])null))), (object)num12)
                            }, (string[])null);
                        }
                        NewLateBinding.LateIndexSet((object)instance3, new object[3]
                        {
                            (object)1,
                            (object)this.M,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)1
                            }, (string[])null))
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance3, new object[3]
                        {
                            (object)this.LK,
                            (object)this.M,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)this.LK
                            }, (string[])null))
                        }, (string[])null);
                        int lk2   = this.LK;
                        int lk1_2 = this.lk1;
                        for (this.L = 2; this.L <= lk1_2; ++this.L)
                        {
                            --lk2;
                            NewLateBinding.LateIndexSet((object)instance3, new object[3]
                            {
                                (object)lk2,
                                (object)this.M,
                                Operators.AddObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)instance1, new object[1]
                                {
                                    (object)lk2
                                }, (string[])null), NewLateBinding.LateIndexGet((object)instance3, new object[2]
                                {
                                    (object)(lk2 + 1),
                                    (object)this.M
                                }, (string[])null)), NewLateBinding.LateIndexGet((object)instance2, new object[1]
                                {
                                    (object)lk2
                                }, (string[])null))
                            }, (string[])null);
                        }
                    }
                    double r0    = this.R0;
                    int    lk1_3 = this.lk1;
                    for (this.L = 2; this.L <= lk1_3; ++this.L)
                    {
                        r0 += this.HX;
                        int mk2 = this.MK;
                        for (this.M = 1; this.M <= mk2; ++this.M)
                        {
                            NewLateBinding.LateIndexSet((object)instance4, new object[2]
                            {
                                (object)this.M,
                                RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                                {
                                    (object)this.L,
                                    (object)this.M
                                }, (string[])null))
                            }, (string[])null);
                        }
                        NewLateBinding.LateIndexSet((object)instance1, new object[2]
                        {
                            (object)1,
                            (object)0.0
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance2, new object[2]
                        {
                            (object)1,
                            (object)this.D0Nv2(this.T, r0)
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance4, new object[2]
                        {
                            (object)1,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance2, new object[1]
                            {
                                (object)1
                            }, (string[])null))
                        }, (string[])null);
                        NewLateBinding.LateIndexSet((object)instance4, new object[2]
                        {
                            (object)this.MK,
                            (object)this.D1Nv2(this.T, r0)
                        }, (string[])null);
                        double num7 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                        {
                            (object)1
                        }, (string[])null)));
                        double num8 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                        {
                            (object)2
                        }, (string[])null)));
                        double num9  = num5 * (num8 + num7) * this.HNv2(this.Q0 + num2) / 2.0;
                        int    mk1_2 = this.MK1;
                        for (this.M = 2; this.M <= mk1_2; ++this.M)
                        {
                            double Xin1  = this.Q0 + this.HY * (double)(this.M - 1);
                            double Xin2  = Xin1 + num2;
                            double num10 = num8;
                            num8 = this.FNv2(Conversions.ToDouble(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)(this.M + 1)
                            }, (string[])null)));
                            double num11 = num9;
                            num9 = num5 * (num8 + num10) * this.HNv2(Xin2) / 2.0;
                            double num12 = Conversions.ToDouble(Operators.SubtractObject((object)(this.HNv2(Xin1) + num9 + num11), Operators.MultiplyObject((object)num11, NewLateBinding.LateIndexGet((object)instance1, new object[1]
                            {
                                (object)(this.M - 1)
                            }, (string[])null))));
                            NewLateBinding.LateIndexSet((object)instance1, new object[2]
                            {
                                (object)this.M,
                                (object)(num9 / num12)
                            }, (string[])null);
                            NewLateBinding.LateIndexSet((object)instance2, new object[2]
                            {
                                (object)this.M,
                                Operators.DivideObject(Operators.AddObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)instance3, new object[2]
                                {
                                    (object)this.L,
                                    (object)this.M
                                }, (string[])null), (object)this.HNv2(Xin1)), Operators.MultiplyObject((object)num11, NewLateBinding.LateIndexGet((object)instance2, new object[1]
                                {
                                    (object)(this.M - 1)
                                }, (string[])null))), (object)num12)
                            }, (string[])null);
                        }
                        NewLateBinding.LateIndexSet(instance5, new object[3]
                        {
                            (object)this.L,
                            (object)1,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)1
                            }, (string[])null))
                        }, (string[])null);
                        NewLateBinding.LateIndexSet(instance5, new object[3]
                        {
                            (object)this.L,
                            (object)this.MK,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet((object)instance4, new object[1]
                            {
                                (object)this.MK
                            }, (string[])null))
                        }, (string[])null);
                        int mk3   = this.MK;
                        int mk1_3 = this.MK1;
                        for (this.M = 2; this.M <= mk1_3; ++this.M)
                        {
                            --mk3;
                            double num10 = Conversions.ToDouble(Operators.AddObject(Operators.MultiplyObject(NewLateBinding.LateIndexGet((object)instance1, new object[1]
                            {
                                (object)mk3
                            }, (string[])null), NewLateBinding.LateIndexGet(instance5, new object[2]
                            {
                                (object)this.L,
                                (object)(mk3 + 1)
                            }, (string[])null)), NewLateBinding.LateIndexGet((object)instance2, new object[1]
                            {
                                (object)mk3
                            }, (string[])null)));
                            if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateGet((object)null, typeof(Math), "Abs", new object[1]
                            {
                                Operators.DivideObject(Operators.SubtractObject(NewLateBinding.LateIndexGet(instance5, new object[2]
                                {
                                    (object)this.L,
                                    (object)mk3
                                }, (string[])null), (object)num10), (object)num10)
                            }, (string[])null, (Type[])null, (bool[])null), (object)0.0001, false))
                            {
                                num6 = 1;
                            }
                            NewLateBinding.LateIndexSet(instance5, new object[3]
                            {
                                (object)this.L,
                                (object)mk3,
                                (object)num10
                            }, (string[])null);
                        }
                    }
                }while (num6 == 1 & num3 < 100);
                int mk1_4 = this.MK1;
                for (this.M = 2; this.M <= mk1_4; ++this.M)
                {
                    int lk1 = this.lk1;
                    for (this.L = 2; this.L <= lk1; ++this.L)
                    {
                        NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                        {
                            (object)this.L,
                            (object)this.M,
                            RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                            {
                                (object)this.L,
                                (object)this.M
                            }, (string[])null))
                        }, (string[])null);
                    }
                }
                int mk4 = this.MK;
                for (this.M = 1; this.M <= mk4; ++this.M)
                {
                    double Yin = this.Q0 + this.HY * (double)(this.M - 1);
                    NewLateBinding.LateIndexSet(instance5, new object[3]
                    {
                        (object)1,
                        (object)this.M,
                        (object)this.G0Nv2(this.T, Yin)
                    }, (string[])null);
                    NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                    {
                        (object)1,
                        (object)this.M,
                        RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                        {
                            (object)1,
                            (object)this.M
                        }, (string[])null))
                    }, (string[])null);
                    NewLateBinding.LateIndexSet(instance5, new object[3]
                    {
                        (object)this.LK,
                        (object)this.M,
                        (object)this.G1Nv2(this.T, Yin)
                    }, (string[])null);
                    NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                    {
                        (object)this.LK,
                        (object)this.M,
                        RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                        {
                            (object)this.LK,
                            (object)this.M
                        }, (string[])null))
                    }, (string[])null);
                }
                int lk1_4 = this.lk1;
                for (this.L = 2; this.L <= lk1_4; ++this.L)
                {
                    double Xin = this.R0 + this.HX * (double)(this.L - 1);
                    NewLateBinding.LateIndexSet(instance5, new object[3]
                    {
                        (object)this.L,
                        (object)1,
                        (object)this.D0Nv2(this.T, Xin)
                    }, (string[])null);
                    NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                    {
                        (object)this.L,
                        (object)1,
                        RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                        {
                            (object)this.L,
                            (object)1
                        }, (string[])null))
                    }, (string[])null);
                    NewLateBinding.LateIndexSet(instance5, new object[3]
                    {
                        (object)this.L,
                        (object)this.MK,
                        (object)this.D1Nv2(this.T, Xin)
                    }, (string[])null);
                    NewLateBinding.LateIndexSet((object)this.UM, new object[3]
                    {
                        (object)this.L,
                        (object)this.MK,
                        RuntimeHelpers.GetObjectValue(NewLateBinding.LateIndexGet(instance5, new object[2]
                        {
                            (object)this.L,
                            (object)this.MK
                        }, (string[])null))
                    }, (string[])null);
                }
                if (this.T != this.TK)
                {
                    double num7 = this.T + this.DT;
                    if (num7 > this.TK)
                    {
                        this.DT = this.TK - this.T;
                        this.T  = this.TK;
                    }
                    else
                    {
                        this.T = num7;
                    }
                }
                else
                {
                    break;
                }
            }
        }
Ejemplo n.º 16
0
 public void FillArray(
     ref Array arr,
     double x1,
     double x2,
     double x3,
     double x4,
     double x5,
     double x6,
     double x7,
     double x8,
     double x9,
     double x10)
 {
     arr = Array.CreateInstance(typeof(double), 10);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)0,
         (object)x1
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)1,
         (object)x2
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)2,
         (object)x3
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)3,
         (object)x4
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)4,
         (object)x5
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)5,
         (object)x6
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)6,
         (object)x7
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)7,
         (object)x8
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)8,
         (object)x9
     }, (string[])null);
     NewLateBinding.LateIndexSet((object)arr, new object[2]
     {
         (object)9,
         (object)x10
     }, (string[])null);
 }