示例#1
0
        /// <summary>
        /// Creates a new instance of <see cref="MacroStabilityInwardsSlipPlaneUpliftVan"/>.
        /// </summary>
        /// <param name="leftGrid">The left grid of the result.</param>
        /// <param name="rightGrid">The right grid of the result.</param>
        /// <param name="tangentLines">The tangent lines of the result.</param>
        /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception>
        public MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGrid leftGrid,
                                                       MacroStabilityInwardsGrid rightGrid,
                                                       IEnumerable <RoundedDouble> tangentLines)
        {
            if (leftGrid == null)
            {
                throw new ArgumentNullException(nameof(leftGrid));
            }

            if (rightGrid == null)
            {
                throw new ArgumentNullException(nameof(rightGrid));
            }

            if (tangentLines == null)
            {
                throw new ArgumentNullException(nameof(tangentLines));
            }

            LeftGrid     = leftGrid;
            RightGrid    = rightGrid;
            TangentLines = tangentLines.Select(tangentLine => new RoundedDouble(2, tangentLine)).ToArray();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MacroStabilityInwardsInput"/> class.
        /// </summary>
        /// <param name="properties">The container of the properties for the
        /// <see cref="MacroStabilityInwardsInput"/>.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="properties"/>
        /// is <c>null</c>.</exception>
        /// <exception cref="ArgumentException">Thrown when either:
        /// <list type="bullet">
        /// <item><see cref="ConstructionProperties.LeftGridXRight"/> is smaller than <see cref="ConstructionProperties.LeftGridXLeft"/>;</item>
        /// <item><see cref="ConstructionProperties.LeftGridZBottom"/> is larger than <see cref="ConstructionProperties.LeftGridZTop"/>;</item>
        /// <item><see cref="ConstructionProperties.RightGridXRight"/> is smaller than <see cref="ConstructionProperties.RightGridXLeft"/>;</item>
        /// <item><see cref="ConstructionProperties.RightGridZBottom"/> is larger than <see cref="ConstructionProperties.RightGridZTop"/>;</item>
        /// <item><see cref="ConstructionProperties.TangentLineZBottom"/> is larger than <see cref="ConstructionProperties.TangentLineZTop"/>.</item>
        /// </list>
        /// </exception>
        public MacroStabilityInwardsInput(ConstructionProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            if (!IsSmallerEqualOrNaN(properties.TangentLineZBottom, properties.TangentLineZTop))
            {
                throw new ArgumentException(Resources.MacroStabilityInwardsInput_TangentLineZTop_should_be_larger_than_or_equal_to_TangentLineZBottom);
            }

            assessmentLevel = new RoundedDouble(2, double.NaN);

            slipPlaneMinimumDepth  = new RoundedDouble(2);
            slipPlaneMinimumLength = new RoundedDouble(2);
            maximumSliceWidth      = new RoundedDouble(2, 1);

            MoveGrid         = true;
            DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay;

            waterLevelRiverAverage = new RoundedDouble(2, double.NaN);

            xCoordinateDrainageConstruction = new RoundedDouble(2, double.NaN);
            zCoordinateDrainageConstruction = new RoundedDouble(2, double.NaN);

            minimumLevelPhreaticLineAtDikeTopRiver  = new RoundedDouble(2, double.NaN);
            minimumLevelPhreaticLineAtDikeTopPolder = new RoundedDouble(2, double.NaN);

            LocationInputExtreme = new MacroStabilityInwardsLocationInputExtreme();
            LocationInputDaily   = new MacroStabilityInwardsLocationInputDaily();

            AdjustPhreaticLine3And4ForUplift = true;

            leakageLengthOutwardsPhreaticLine3   = new RoundedDouble(2, double.NaN);
            leakageLengthInwardsPhreaticLine3    = new RoundedDouble(2, double.NaN);
            leakageLengthOutwardsPhreaticLine4   = new RoundedDouble(2, double.NaN);
            leakageLengthInwardsPhreaticLine4    = new RoundedDouble(2, double.NaN);
            piezometricHeadPhreaticLine2Outwards = new RoundedDouble(2, double.NaN);
            piezometricHeadPhreaticLine2Inwards  = new RoundedDouble(2, double.NaN);

            GridDeterminationType        = MacroStabilityInwardsGridDeterminationType.Automatic;
            TangentLineDeterminationType = MacroStabilityInwardsTangentLineDeterminationType.LayerSeparated;

            tangentLineZTop    = new RoundedDouble(2, properties.TangentLineZTop);
            tangentLineZBottom = new RoundedDouble(2, properties.TangentLineZBottom);
            tangentLineNumber  = 1;

            LeftGrid = new MacroStabilityInwardsGrid(properties.LeftGridXLeft,
                                                     properties.LeftGridXRight,
                                                     properties.LeftGridZTop,
                                                     properties.LeftGridZBottom);
            RightGrid = new MacroStabilityInwardsGrid(properties.RightGridXLeft,
                                                      properties.RightGridXRight,
                                                      properties.RightGridZTop,
                                                      properties.RightGridZBottom);

            CreateZones = true;
            ZoningBoundariesDeterminationType = MacroStabilityInwardsZoningBoundariesDeterminationType.Automatic;
            zoneBoundaryLeft  = new RoundedDouble(2, double.NaN);
            zoneBoundaryRight = new RoundedDouble(2, double.NaN);
        }