using System.Diagnostics; // ======================================================================================================================= // Class name: // // Description: // // Copyright (c) 2008-2009 Deltares // // Date ID Modification // 2008-06-11 Best Created // ======================================================================================================================= namespace Deltares.Stability.Calculation.Inner { public class TUnittestInterface { // Private Declarations private TInterfaceData FInterfaceData = null; // ======================================================================================================================= // Date ID Modification // 2008-06-11 Best Created // ======================================================================================================================= //Constructor Create() public TUnittestInterface() : base() {} // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial1a(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 16, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 4, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 8, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 10, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(40); Debug.Assert(LDoubleVal == 5, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 43.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 51.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines.GetLength(1) == 5, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 0, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial1b(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 5, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 4, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 10, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 4, "Number of points in layer 5 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 12, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(50.750, 1); // Berm Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Berm Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.5, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 2.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 32.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(70); Debug.Assert(LDoubleVal == 0, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 43.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 51.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines[FInterfaceData.CurrentWaternet.PhreaticLineNumber].Length == 5, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 0, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial2(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 5, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 4, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 10, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 4, "Number of points in layer 5 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 12, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'mstMeasuredCu' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.mstMeasuredCu, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].CuTop == 6, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].CuBottom == 8, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'mstMeasuredCu' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.mstMeasuredCu, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(50.750, 1); // Berm Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Berm Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.5, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 2.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 32.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(70); Debug.Assert(LDoubleVal == 0, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 15.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 23.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines[FInterfaceData.CurrentWaternet.PhreaticLineNumber].Length == 8, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 0, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial3(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 16, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 4, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 8, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 10, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(40); Debug.Assert(LDoubleVal == 5, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 43.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 51.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines[FInterfaceData.CurrentWaternet.PhreaticLineNumber].Length == 5, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 0, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 1, "Incorrect number of geotextiles"); Debug.Assert(AInterfaceData.Geotextiles[0].ETS == 200, "Incorrect geotextile ETS"); Debug.Assert(AInterfaceData.Geotextiles[0].XCoords[0] == 20, "Incorrect geotextile XCoords"); Debug.Assert(AInterfaceData.Geotextiles[0].XCoords[1] == 48, "Incorrect geotextile XCoords"); Debug.Assert(AInterfaceData.Geotextiles[0].ZCoords[0] == 0.5, "Incorrect geotextile ZCoords"); Debug.Assert(AInterfaceData.Geotextiles[0].ZCoords[1] == 0.5, "Incorrect geotextile ZCoords"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial4a(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 6, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 4, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 6, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 7, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 5, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[5].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 11, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(19.45, -1.5); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "pleistoceen sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 18.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 27.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(54, 7); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "clayey sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 10.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 23.5, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 14); // peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 16.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 11.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 10, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 23); // stiff clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "stiff clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 20.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 30, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 22, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 6 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 7, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(45, 41); Debug.Assert(LDoubleVal == 37, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(45); Debug.Assert(LDoubleVal == 37, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 0.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 0.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 1, "Incorrect slip definition XIntervalCount"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 0, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 0, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 1, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == 0, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == 0, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 0, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines.GetLength(1) == 4, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.GetLength(0) == 1, "Incorrect number of headlines Head lines"); Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.GetLength(1) == 4, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 0, "Incorrect number of Waterlines"); // Assert(Length(AInterfaceData.WaterLines[0]) = 2, 'Incorrect number of Waterline points'); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // (*Assert(AInterfaceData.Geotextiles[0].ETS = 200, 'Incorrect geotextile ETS'); // Assert(AInterfaceData.Geotextiles[0].XCoords[0] = 20, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].XCoords[1] = 48, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[0] = 0.5, 'Incorrect geotextile ZCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[1] = 0.5, 'Incorrect geotextile ZCoords');*) // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial4b(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 6, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 4, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 6, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 7, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 5, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[5].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 11, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(19.45, -1.5); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "pleistoceen sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 18.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 27.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(54, 7); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "clayey sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 10.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 23.5, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 14); // peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 16.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 11.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 10, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 23); // stiff clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "stiff clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 20.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 30, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 22, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 6 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 7, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(45, 41); Debug.Assert(LDoubleVal == 37, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(45); Debug.Assert(LDoubleVal == 37, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Spencer Debug.Assert(AInterfaceData.SpencerPlaneData.BottomLine != null, "Incorrect No spencer plane (BottomLine)"); Debug.Assert(AInterfaceData.SpencerPlaneData.BottomLine.Length == 5, "Incorrect No spencer plane (BottomLine)"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 4, "Incorrect number of Waterlines"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // (*Assert(AInterfaceData.Geotextiles[0].ETS = 200, 'Incorrect geotextile ETS'); // Assert(AInterfaceData.Geotextiles[0].XCoords[0] = 20, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].XCoords[1] = 48, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[0] = 0.5, 'Incorrect geotextile ZCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[1] = 0.5, 'Incorrect geotextile ZCoords');*) // Uniform load Debug.Assert(AInterfaceData.UniformLoad.Length == 1, "Incorrect number of uniform loads"); Debug.Assert(AInterfaceData.UniformLoad[0].Magnitude == 25, "Incorrect number of uniform loads paramter magnitude"); Debug.Assert(AInterfaceData.UniformLoad[0].Xstart == 9, "Incorrect number of uniform loads paramter Xstart"); Debug.Assert(AInterfaceData.UniformLoad[0].Xend == 14, "Incorrect number of uniform loads paramter Xend"); Debug.Assert(AInterfaceData.UniformLoad[0].DistributionAngle == 0, "Incorrect number of uniform loads paramter DistributionAngle"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csSpencer, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial4c(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 6, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 4, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 6, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 7, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 5, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[5].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 11, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(19.45, -1.5); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "pleistoceen sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 18.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 27.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(54, 7); // pleistoceen sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "clayey sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 10.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 23.5, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 14); // peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 16.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 11.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 10, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(33, 23); // stiff clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "stiff clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 20.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 30, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 22, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 6 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, 28); // dike sand 2 Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "dike sand 2", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 25, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 7, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(45, 41); Debug.Assert(LDoubleVal == 37, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(45); Debug.Assert(LDoubleVal == 37, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Spencer Debug.Assert(AInterfaceData.SpencerPlaneData.BottomLine != null, "Incorrect No spencer plane (BottomLine)"); Debug.Assert(AInterfaceData.SpencerPlaneData.BottomLine.Length == 5, "Incorrect No spencer plane (BottomLine)"); // Spencer Debug.Assert(AInterfaceData.SpencerPlaneData.Topline != null, "Incorrect No spencer plane (BottomLine)"); Debug.Assert(AInterfaceData.SpencerPlaneData.Topline.Length == 5, "Incorrect No spencer plane (BottomLine)"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 4, "Incorrect number of Waterlines"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // (*Assert(AInterfaceData.Geotextiles[0].ETS = 200, 'Incorrect geotextile ETS'); // Assert(AInterfaceData.Geotextiles[0].XCoords[0] = 20, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].XCoords[1] = 48, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[0] = 0.5, 'Incorrect geotextile ZCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[1] = 0.5, 'Incorrect geotextile ZCoords');*) // Uniform load Debug.Assert(AInterfaceData.UniformLoad.Length == 1, "Incorrect number of uniform loads"); Debug.Assert(AInterfaceData.UniformLoad[0].Magnitude == 25, "Incorrect number of uniform loads paramter magnitude"); Debug.Assert(AInterfaceData.UniformLoad[0].Xstart == 9, "Incorrect number of uniform loads paramter Xstart"); Debug.Assert(AInterfaceData.UniformLoad[0].Xend == 14, "Incorrect number of uniform loads paramter Xend"); Debug.Assert(AInterfaceData.UniformLoad[0].DistributionAngle == 0, "Incorrect number of uniform loads paramter DistributionAngle"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csSpencer, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial5(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 14, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 4, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 4, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 4, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 8, "Number of points in layer 3 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 6, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(49, -10); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 17.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.1, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 30.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -7.5); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 11.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 11.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 2.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(46, -2); // Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 3.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(13, 2); // Dike sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Dike sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 17.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 17.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(12, -17); Debug.Assert(ZTopPoints.Length == 5, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(12, 10); Debug.Assert(LDoubleVal == 5, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(45); Debug.Assert(LDoubleVal == 0, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 25.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 30.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 6, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 10, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 5, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 6, "Incorrect slip definition ZIntervalCount"); // X passive Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPointPassive == 55.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPointPassive == 60.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCountPassive == 6, "Incorrect slip definition XRightCenterPoint"); // Z passive Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPointPassive == 10, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPointPassive == 5, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCountPassive == 6.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -7, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -9, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 3, "Incorrect slip definition BottomTangentZ"); // waterlines // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines[FInterfaceData.CurrentWaternet.PhreaticLineNumber].Length == 2, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 1, "Incorrect number of headlines Head lines"); Debug.Assert(AInterfaceData.CurrentWaternet.PLLines[0].Length == 2, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 2, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[1].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // (*Assert(AInterfaceData.Geotextiles[0].ETS = 200, 'Incorrect geotextile ETS'); // Assert(AInterfaceData.Geotextiles[0].XCoords[0] = 20, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].XCoords[1] = 48, 'Incorrect geotextile XCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[0] = 0.5, 'Incorrect geotextile ZCoords'); // Assert(AInterfaceData.Geotextiles[0].ZCoords[1] = 0.5, 'Incorrect geotextile ZCoords');*) // Uniform load // (*Assert(Length(AInterfaceData.UniformLoad) = 1, 'Incorrect number of uniform loads'); // Assert(AInterfaceData.UniformLoad[0].Magnitude = 25, 'Incorrect number of uniform loads paramter magnitude'); // Assert(AInterfaceData.UniformLoad[0].Xstart = 9, 'Incorrect number of uniform loads paramter Xstart'); // Assert(AInterfaceData.UniformLoad[0].Xend = 14, 'Incorrect number of uniform loads paramter Xend'); // Assert(AInterfaceData.UniformLoad[0].DistributionAngle = 0, 'Incorrect number of uniform loads paramter DistributionAngle');*) // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csLift, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial6(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 19, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 5, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 4, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 10, "Number of points in layer 4 incorrect"); Debug.Assert(AInterfaceData.Layers[4].NumberOfLayerPoints == 4, "Number of points in layer 5 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 12, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 5 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(50.750, 1); // Berm Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Berm Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 21.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 19.5, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 2.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 32.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(70); Debug.Assert(LDoubleVal == 0, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 43.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 51.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines[FInterfaceData.CurrentWaternet.PhreaticLineNumber].Length == 5, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.GetLength(0) == 2, "Incorrect number of headlines Head lines"); Debug.Assert(AInterfaceData.CurrentWaternet.PLLines[0].Length == 5, "Incorrect number of headlines Head lines"); Debug.Assert(AInterfaceData.CurrentWaternet.PLLines[1].Length == 5, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == false, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } // ======================================================================================================================= // Date ID Modification // 2009-04-21 Mand Created // ======================================================================================================================= public void UnitTestTutorial8(TInterfaceData AInterfaceData) { int LLayer; double[] ZTopPoints; double LDoubleVal; // Geometry // Points Debug.Assert(AInterfaceData.GeometryPoints.Length == 16, "Number of geometry points are incorrect"); // Layers Debug.Assert(AInterfaceData.Layers.Length == 4, "Incorrect number of layers"); Debug.Assert(AInterfaceData.Layers[0].NumberOfLayerPoints == 4, "Number of points in layer 1 incorrect"); Debug.Assert(AInterfaceData.Layers[1].NumberOfLayerPoints == 6, "Number of points in layer 2 incorrect"); Debug.Assert(AInterfaceData.Layers[2].NumberOfLayerPoints == 8, "Number of points in layer 3 incorrect"); Debug.Assert(AInterfaceData.Layers[3].NumberOfLayerPoints == 4, "Number of points in layer 4 incorrect"); // Surface Points Debug.Assert(AInterfaceData.SurfaceLine.Length == 10, "Incorrect number of surface points"); // Soil for layer 1 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(37.250, -5); // Sand Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Sand", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 20.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 18.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 0.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 29.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 2 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(42, -3); // Peat Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Peat", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 12.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 12.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 5.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 15.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 3 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(36, 0); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Soil for layer 4 LLayer = AInterfaceData.InterfaceCalls.DetermineSoilNumberFromPoint(67, -1); // Soft Clay Debug.Assert(AInterfaceData.StabSoilData[LLayer].Name == "Soft Clay", "Incorrect soil Name"); //@ Unsupported property or method(C): 'Default' Debug.Assert(AInterfaceData.StabSoilData[LLayer].MaterialStrength == TMatStrengthTypeSet.Default, "Incorrect material strenght"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamWet == 14.0, "Incorrect soil GamWet"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].GamDry == 14.0, "Incorrect soil GamDry"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Cohesion == 8.0, "Incorrect soil Cohesion"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].Phi == 20.0, "Incorrect soil Friction angle"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].PorePressureFactor == 1, "Incorrect soil PorePressureFactor"); Debug.Assert(AInterfaceData.StabSoilData[LLayer].ExcessPorePressure == 0.0, "Incorrect soil ExcessPorePressure"); // Get ZTop from point ZTopPoints = AInterfaceData.InterfaceCalls.GetZTopFromLayers(40, -7); Debug.Assert(ZTopPoints.Length == 4, "Incorrect number of ZTopPoints"); // Get ZBottom from point LDoubleVal = AInterfaceData.InterfaceCalls.GetZBottomFromLayer(36.250, 0); Debug.Assert(LDoubleVal == -2, "ZBottomFromLayer does not work"); // Definitions // Intersect with ReferenceLevelCuCalculated LDoubleVal = AInterfaceData.InterfaceCalls.DetermineZReferencelevelCuCalculated(40); Debug.Assert(LDoubleVal == 5, "Incorrect ZReferencelevelCuCalculated coordinate "); // Slip circle definition // Fixed point Debug.Assert(AInterfaceData.SlipCircleData.UseFixedpoint == false, "Incorrect slip circle UseFixedpoint"); Debug.Assert(AInterfaceData.SlipCircleData.XFixed == 0, "Incorrect slip circle XFixed"); Debug.Assert(AInterfaceData.SlipCircleData.Zfixed == 0, "Incorrect slip circle ZFixed"); // Grid // X Debug.Assert(AInterfaceData.SlipCircleData.XLeftCenterPoint == 43.0, "Incorrect slip definition XLeftCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XRightCenterPoint == 51.0, "Incorrect slip definition XRightCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.XIntervalCount == 8, "Incorrect slip definition XRightCenterPoint"); // Z Debug.Assert(AInterfaceData.SlipCircleData.ZTopCenterPoint == 9, "Incorrect slip definition ZTopCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZBottomCenterPoint == 6, "Incorrect slip definition ZBottomCenterPoint"); Debug.Assert(AInterfaceData.SlipCircleData.ZIntervalCount == 8.0, "Incorrect slip definition ZIntervalCount"); // Tangent Debug.Assert(AInterfaceData.SlipCircleData.TopTangentZ == -1.5, "Incorrect slip definition TopTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.BottomTangentZ == -4.5, "Incorrect slip definition BottomTangentZ"); Debug.Assert(AInterfaceData.SlipCircleData.TangentIntervalCount == 8, "Incorrect slip definition BottomTangentZ"); // Water // Phreatic line Debug.Assert(FInterfaceData.CurrentWaternet.PLLines.GetLength(1) == 5, "AInterfaceData.FreaticLine"); // Piezo line points / Head line points Debug.Assert(AInterfaceData.CurrentWaternet.PLLines.Length == 0, "Incorrect number of headlines Head lines"); // waterlines Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines.Length == 1, "Incorrect number of Waterlines"); Debug.Assert(AInterfaceData.CurrentWaternet.Waterlines[0].Waterline.Length == 2, "Incorrect number of Waterline points"); // Warning: headline/phreatic line is not connected to the waterline // Geotextiles Debug.Assert(AInterfaceData.Geotextiles.Length == 0, "Incorrect number of geotextiles"); // Zones Debug.Assert(AInterfaceData.ZoneData.SafetyZone1a == 1.19, "Error zones, MinSafetyFactorNew1a"); Debug.Assert(AInterfaceData.ZoneData.SafetyZone1b == 1.11, "Error zones, MinSafetyFactorNew1b"); Debug.Assert(AInterfaceData.ZoneData.SafetyZone2a == 1.05, "Error zones, MinSafetyFactorNew2a"); Debug.Assert(AInterfaceData.ZoneData.SafetyZone2b == 1.02, "Error zones, MinSafetyFactorNew2b"); Debug.Assert(AInterfaceData.ZoneData.SafetyZone3a == 0.93, "Error zones, MinSafetyFactorNew3a"); Debug.Assert(AInterfaceData.ZoneData.SafetyZone3b == 0.90, "Error zones, MinSafetyFactorNew3b"); Debug.Assert(AInterfaceData.ZoneData.DikeTableHeight == 4, "Error zones, DikeTableHeight"); Debug.Assert(AInterfaceData.ZoneData.StabilitySide == TStabilitySideSet.RightSide, "Error zones, StabilitySide"); Debug.Assert(AInterfaceData.ZoneData.XRoadLeft == 52.0, "Error zones, LeftSideMinimalRoad"); Debug.Assert(AInterfaceData.ZoneData.XStart == 32.0, "Error zones, RestProfileStartX"); Debug.Assert(AInterfaceData.ZoneData.XMHWInfluence == 36, "Error zones, DesignLevelInfluenceX"); Debug.Assert(AInterfaceData.ZoneData.YMHWInfluence == -3, "Error zones, DesignLevelInfluenceY"); Debug.Assert(AInterfaceData.ZoneData.StandardOvertopping == true, "Error zones, StandardOvertopping"); // Model Debug.Assert(AInterfaceData.ModelData.CalcType == TCalculationTypeSet.csBishop, "ModelData.CalcType"); Debug.Assert(AInterfaceData.ModelData.HasZonePlot == true, "ModelData.HasZonePlot"); Debug.Assert(AInterfaceData.ModelData.HasGlobalMeasurements == false, "ModelData.HasGlobalMeasurements"); Debug.Assert(AInterfaceData.ModelData.DefaultStrength == TMatStrengthTypeSet.mstCphi, "Incorrect default strength"); } } // end TUnittestInterface }