Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -97,7 +97,7 @@ {c8383b76-b3f1-4e6e-b56c-527b469fa20a} Ringtoets.Integration.Plugin - + {d64e4f0e-e341-496f-82b2-941ad202b4e3} Ringtoets.Piping.KernelWrapper Index: Ringtoets.sln =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets.sln (.../Ringtoets.sln) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets.sln (.../Ringtoets.sln) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -83,7 +83,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Plugins.ProjectExplorer.Test", "Core\Plugins\test\Core.Plugins.ProjectExplorer.Test\Core.Plugins.ProjectExplorer.Test.csproj", "{07206938-9671-4DC7-BDE4-35B0F6E20DBC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper", "Ringtoets\Piping\src\Ringtoets.Piping.Calculation\Ringtoets.Piping.KernelWrapper.csproj", "{D64E4F0E-E341-496F-82B2-941AD202B4E3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper", "Ringtoets\Piping\src\Ringtoets.Piping.KernelWrapper\Ringtoets.Piping.KernelWrapper.csproj", "{D64E4F0E-E341-496F-82B2-941AD202B4E3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.Data", "Ringtoets\Piping\src\Ringtoets.Piping.Data\Ringtoets.Piping.Data.csproj", "{CE994CC9-6F6A-48AC-B4BE-02C30A21F4DB}" EndProject @@ -98,9 +98,9 @@ {C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.Test", "Ringtoets\Piping\test\Ringtoets.Piping.Calculation.Test\Ringtoets.Piping.KernelWrapper.Test.csproj", "{91389DA2-3FF4-4559-90B3-4061549789DD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.Test", "Ringtoets\Piping\test\Ringtoets.Piping.KernelWrapper.Test\Ringtoets.Piping.KernelWrapper.Test.csproj", "{91389DA2-3FF4-4559-90B3-4061549789DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.TestUtil", "Ringtoets\Piping\test\Ringtoets.Piping.Calculation.TestUtil\Ringtoets.Piping.KernelWrapper.TestUtil.csproj", "{27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.TestUtil", "Ringtoets\Piping\test\Ringtoets.Piping.KernelWrapper.TestUtil\Ringtoets.Piping.KernelWrapper.TestUtil.csproj", "{27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.Data.Test", "Ringtoets\Piping\test\Ringtoets.Piping.Data.Test\Ringtoets.Piping.Data.Test.csproj", "{19EB1C52-D90B-40F2-A7AF-364CC5D89F68}" EndProject @@ -265,7 +265,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Components.Charting.Forms", "Core\Components\src\Core.Components.Charting.Forms\Core.Components.Charting.Forms.csproj", "{2465CCA1-C505-4827-9454-4FD5FD9194CD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.TestUtil.Test", "Ringtoets\Piping\test\Ringtoets.Piping.Calculation.TestUtil.Test\Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj", "{529C4919-27DE-4DDA-ABD6-537F21B3F223}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.KernelWrapper.TestUtil.Test", "Ringtoets\Piping\test\Ringtoets.Piping.KernelWrapper.TestUtil.Test\Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj", "{529C4919-27DE-4DDA-ABD6-537F21B3F223}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.Service.TestUtil", "Ringtoets\Piping\test\Ringtoets.Piping.Service.TestUtil\Ringtoets.Piping.Service.TestUtil.csproj", "{C05B4F73-480E-46A4-B037-40954F8276DC}" EndProject Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorException.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingCalculatorResult.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingProfileCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingProfileCreatorException.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingSemiProbabilisticDesignValueFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/PipingSurfaceLineCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/Properties/AssemblyInfo.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/Properties/Resources.Designer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/Properties/Resources.resx'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/Ringtoets.Piping.KernelWrapper.csproj'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/EffectiveThicknessCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/HeaveCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/IEffectiveThicknessCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/IHeaveCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/IPiezoHeadCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/IPipingSubCalculatorFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/ISellmeijerCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/IUpliftCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/PiezoHeadCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/PipingSubCalculatorFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/SellmeijerCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/src/Ringtoets.Piping.Calculation/SubCalculator/UpliftCalculator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj =================================================================== diff -u -ra9c4c3b9c62339476e2e901bd2b402ed22ac772b -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision a9c4c3b9c62339476e2e901bd2b402ed22ac772b) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -155,7 +155,7 @@ Ringtoets.HydraRing.Data False - + {d64e4f0e-e341-496f-82b2-941ad202b4e3} Ringtoets.Piping.KernelWrapper False Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,335 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using Deltares.WTIPiping; +using Ringtoets.Piping.KernelWrapper.Properties; +using Ringtoets.Piping.KernelWrapper.SubCalculator; +using EffectiveThicknessCalculator = Ringtoets.Piping.KernelWrapper.SubCalculator.EffectiveThicknessCalculator; +using HeaveCalculator = Ringtoets.Piping.KernelWrapper.SubCalculator.HeaveCalculator; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// This class represents a combination of piping sub-calculations, which together can be used + /// to assess based on piping. + /// + public class PipingCalculator + { + private readonly PipingCalculatorInput input; + private readonly IPipingSubCalculatorFactory factory; + + /// + /// Constructs a new . The is used to + /// obtain the parameters used in the different sub calculations. + /// + /// The containing all the values required + /// for performing a piping calculation. + /// + /// or is null. + public PipingCalculator(PipingCalculatorInput input, IPipingSubCalculatorFactory factory) + { + if (input == null) + { + throw new ArgumentNullException("input", "PipingCalculatorInput required for creating a PipingCalculator."); + } + if (factory == null) + { + throw new ArgumentNullException("factory", "IPipingSubCalculatorFactory required for creating a PipingCalculator."); + } + this.input = input; + this.factory = factory; + } + + /// + /// Performs the actual sub calculations and returns a , which + /// contains the results of all sub calculations. + /// + /// A containing the results of the sub calculations. + /// Thrown when any of the invocations of the sub-calculations from the kernel throws an Exception. + public PipingCalculatorResult Calculate() + { + var upliftResult = CalculateUplift(); + var heaveResult = CalculateHeave(); + var sellmeijerResult = CalculateSellmeijer(); + + return new PipingCalculatorResult( + upliftResult.Zu, + upliftResult.FoSu, + heaveResult.Zh, + heaveResult.FoSh, + sellmeijerResult.Zp, + sellmeijerResult.FoSp + ); + } + + /// + /// Returns a list of validation messages. The validation messages are based on the values of the + /// which was provided to this and are determined by the Piping kernel. + /// + public List Validate() + { + List soilProfileValidationResults = ValidateSoilProfile(); + List surfaceLineValidationResults = ValidateSurfaceLine(); + List upliftCalculatorValidationResults = new List(); + if (soilProfileValidationResults.Count == 0 && surfaceLineValidationResults.Count == 0) + { + upliftCalculatorValidationResults = ValidateUpliftCalculator(); + } + List heaveCalculatorValidationResults = CreateHeaveCalculator().Validate(); + List sellmeijerCalculatorValidationResults = CreateSellmeijerCalculator().Validate(); + + return upliftCalculatorValidationResults + .Concat(surfaceLineValidationResults) + .Concat(soilProfileValidationResults) + .Concat(heaveCalculatorValidationResults) + .Concat(sellmeijerCalculatorValidationResults) + .ToList(); + } + + /// + /// Calculates the thickness of the coverage layer based on the values of the . + /// + /// The thickness of the coverage layer. + /// Thrown when: + /// + /// surface at exit point's x-coordinate is higher than the soil profile + /// surface line is null + /// soil profile is null + /// soil profile's aquifer layer + /// + public double CalculateThicknessCoverageLayer() + { + try + { + var calculator = factory.CreateEffectiveThicknessCalculator(); + calculator.ExitPointXCoordinate = input.ExitPointXCoordinate; + calculator.PhreaticLevel = input.PhreaticLevelExit; + calculator.SoilProfile = PipingProfileCreator.Create(input.SoilProfile); + calculator.SurfaceLine = PipingSurfaceLineCreator.Create(input.SurfaceLine); + calculator.VolumicWeightOfWater = input.WaterVolumetricWeight; + calculator.Calculate(); + + return calculator.EffectiveHeight; + } + catch (SoilVolumicMassCalculatorException e) + { + throw new PipingCalculatorException(e.Message, e); + } + catch (NullReferenceException e) + { + throw new PipingCalculatorException(e.Message, e); + } + } + + /// + /// Calculates the piezometric head at the exit point based on the values of the . + /// + /// The piezometric head at the exit point. + public double CalculatePiezometricHeadAtExit() + { + var calculator = factory.CreatePiezometricHeadAtExitCalculator(); + calculator.PhiPolder = input.PhreaticLevelExit; + calculator.HRiver = input.AssessmentLevel; + calculator.RExit = input.DampingFactorExit; + calculator.Calculate(); + + return calculator.PhiExit; + } + + private List ValidateSurfaceLine() + { + var validationResults = new List(); + if (input.SurfaceLine == null) + { + validationResults.Add(Resources.PipingCalculation_Validate_Lacks_surfaceline_uplift); + } + else + { + try + { + PipingSurfaceLineCreator.Create(input.SurfaceLine).Validate(); + } + catch (PipingSurfaceLineException e) + { + validationResults.Add(e.Message); + } + } + return validationResults; + } + + private List ValidateSoilProfile() + { + var validationResults = new List(); + if (input.SoilProfile == null) + { + validationResults.Add(Resources.PipingCalculation_Validate_Lacks_SoilProfile_uplift); + } + else + { + try + { + PipingProfileCreator.Create(input.SoilProfile).Validate(); + } + catch (PipingProfileException e) + { + validationResults.Add(e.Message); + } + } + return validationResults; + } + + private List ValidateUpliftCalculator() + { + try + { + return CreateUpliftCalculator().Validate(); + } + catch (Exception exception) + { + return new List + { + exception.Message + }; + } + } + + private ISellmeijerCalculator CalculateSellmeijer() + { + ISellmeijerCalculator sellmeijerCalculator = CreateSellmeijerCalculator(); + + try + { + sellmeijerCalculator.Calculate(); + } + catch (PipingException e) + { + throw new PipingCalculatorException(e.Message, e); + } + catch (PipingException e) + { + throw new PipingCalculatorException(e.Message, e); + } + + return sellmeijerCalculator; + } + + private IHeaveCalculator CalculateHeave() + { + var heaveCalculator = CreateHeaveCalculator(); + + try + { + heaveCalculator.Calculate(); + } + catch (PipingException e) + { + throw new PipingCalculatorException(e.Message, e); + } + + return heaveCalculator; + } + + private IUpliftCalculator CalculateUplift() + { + IUpliftCalculator upliftCalculator = CreateUpliftCalculator(); + + try + { + upliftCalculator.Calculate(); + } + catch (WTIUpliftCalculatorException e) + { + throw new PipingCalculatorException(e.Message, e); + } + catch (PipingException e) + { + throw new PipingCalculatorException(e.Message, e); + } + + return upliftCalculator; + } + + private IHeaveCalculator CreateHeaveCalculator() + { + var calculator = factory.CreateHeaveCalculator(); + calculator.Ich = input.CriticalHeaveGradient; + calculator.PhiExit = input.PiezometricHeadExit; + calculator.DTotal = input.ThicknessCoverageLayer; + calculator.PhiPolder = input.PhreaticLevelExit; + calculator.RExit = input.DampingFactorExit; + calculator.HExit = input.PhreaticLevelExit; + return calculator; + } + + private IUpliftCalculator CreateUpliftCalculator() + { + var effectiveStress = DetermineEffectiveStressForOneLayerProfile(input.ThicknessCoverageLayer, input.SaturatedVolumicWeightOfCoverageLayer, input.WaterVolumetricWeight); + + var calculator = factory.CreateUpliftCalculator(); + calculator.VolumetricWeightOfWater = input.WaterVolumetricWeight; + calculator.ModelFactorUplift = input.UpliftModelFactor; + calculator.EffectiveStress = effectiveStress; + calculator.HRiver = input.AssessmentLevel; + calculator.PhiExit = input.PiezometricHeadExit; + calculator.RExit = input.DampingFactorExit; + calculator.HExit = input.PhreaticLevelExit; + calculator.PhiPolder = input.PhreaticLevelExit; + return calculator; + } + + private ISellmeijerCalculator CreateSellmeijerCalculator() + { + var calculator = factory.CreateSellmeijerCalculator(); + calculator.ModelFactorPiping = input.SellmeijerModelFactor; + calculator.HRiver = input.AssessmentLevel; + calculator.HExit = input.PhreaticLevelExit; + calculator.Rc = input.SellmeijerReductionFactor; + calculator.DTotal = input.ThicknessCoverageLayer; + calculator.SeepageLength = input.SeepageLength; + calculator.GammaSubParticles = input.SandParticlesVolumicWeight; + calculator.WhitesDragCoefficient = input.WhitesDragCoefficient; + calculator.D70 = input.Diameter70; + calculator.VolumetricWeightOfWater = input.WaterVolumetricWeight; + calculator.DarcyPermeability = input.DarcyPermeability; + calculator.KinematicViscosityWater = input.WaterKinematicViscosity; + calculator.Gravity = input.Gravity; + calculator.DAquifer = input.ThicknessAquiferLayer; + calculator.D70Mean = input.MeanDiameter70; + calculator.BeddingAngle = input.BeddingAngle; + return calculator; + } + + /// + /// Determines the effective stress for a one layer profile. + /// + /// The thickness of aquitard layer. + /// The saturated volumic weight of aquitard layer. + /// + /// + private static double DetermineEffectiveStressForOneLayerProfile(double thicknessOfCoverageLayer, double volumicWeightOfCoverageLayer, double waterVolumetricWeight) + { + return thicknessOfCoverageLayer * (volumicWeightOfCoverageLayer - waterVolumetricWeight); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,56 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// Exception thrown when something went wrong in the + /// + public class PipingCalculatorException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public PipingCalculatorException() + { + } + + /// + /// Initializes a new instance of the class + /// with a specified error message. + /// + /// The message that describes the error. + public PipingCalculatorException(string message) : base (message) + { + } + + /// + /// Initializes a new instance of the System.Exception class with a specified error message + /// and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a + /// null reference if no inner exception is specified. + public PipingCalculatorException(string message, Exception innerException) : base(message, innerException) {} + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,396 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// This class contains all the parameters that are required to perform a piping assessment. + /// + public class PipingCalculatorInput + { + private readonly double waterVolumetricWeight; + private readonly double upliftModelFactor; + private readonly double assessmentLevel; + private readonly double piezometricHeadExit; + private readonly double dampingFactorExit; + private readonly double phreaticLevelExit; + private readonly double criticalHeaveGradient; + private readonly double thicknessCoverageLayer; + private readonly double sellmeijerModelFactor; + private readonly double sellmeijerReductionFactor; + private readonly double seepageLength; + private readonly double sandParticlesVolumicWeight; + private readonly double whitesDragCoefficient; + private readonly double diameter70; + private readonly double darcyPermeability; + private readonly double waterKinematicViscosity; + private readonly double gravity; + private readonly double thicknessAquiferLayer; + private readonly double meanDiameter70; + private readonly double beddingAngle; + private readonly double exitPointXCoordinate; + private readonly RingtoetsPipingSurfaceLine surfaceLine; + private readonly PipingSoilProfile soilProfile; + private readonly double saturatedVolumicWeightOfCoverageLayer; + + /// + /// Constructs a new , which contains values for the parameters used + /// in the piping sub calculations. + /// + /// The volumetric weight of water. [kN/m³] + /// + /// The calculation value used to account for uncertainty in the model for uplift. + /// The outside high water level. [m] + /// The piezometric head at the exit point. [m] + /// The damping factor at the exit point. + /// The phreatic level at the exit point. [m] + /// The piezometric head in the hinterland. [m] + /// The critical exit gradient for heave. + /// The total thickness of the coverage layer at the exit point. [m] + /// The calculation value used to account for uncertainty in the model for Sellmeijer. + /// The reduction factor Sellmeijer. + /// The horizontal distance between entree and exit point. [m] + /// The (lowerbound) volumic weight of sand grain material of a sand layer under water. [kN/m³] + /// The White's drag coefficient. + /// The sieve size through which 70% fraction of the grains of the top part of the aquifer passes. [m] + /// The Darcy-speed with which water flows through the aquifer layer. [m/s] + /// The kinematic viscosity of water at 10 degrees Celsius. [m²/s] + /// The gravitational acceleration. [m/s²] + /// The thickness of the aquifer layer. [m] + /// The mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. [m] + /// The angle of the force balance representing the amount in which sand grains resist rolling. [°] + /// The x coordinate of the exit point. [m] + /// The surface line. + /// The profile which contains a 1 dimensional definition of soil layers with properties. + public PipingCalculatorInput(double waterVolumetricWeight, double saturatedVolumicWeightOfCoverageLayer, double upliftModelFactor, double assessmentLevel, double piezometricHeadExit, double dampingFactorExit, double phreaticLevelExit, double criticalHeaveGradient, double thicknessCoverageLayer, double sellmeijerModelFactor, double sellmeijerReductionFactor, double seepageLength, double sandParticlesVolumicWeight, double whitesDragCoefficient, double diameter70, double darcyPermeability, double waterKinematicViscosity, double gravity, double thicknessAquiferLayer, double meanDiameter70, double beddingAngle, double exitPointXCoordinate, RingtoetsPipingSurfaceLine surfaceLine, PipingSoilProfile soilProfile) + { + this.waterVolumetricWeight = waterVolumetricWeight; + this.saturatedVolumicWeightOfCoverageLayer = saturatedVolumicWeightOfCoverageLayer; + this.upliftModelFactor = upliftModelFactor; + this.assessmentLevel = assessmentLevel; + this.piezometricHeadExit = piezometricHeadExit; + this.dampingFactorExit = dampingFactorExit; + this.phreaticLevelExit = phreaticLevelExit; + this.criticalHeaveGradient = criticalHeaveGradient; + this.thicknessCoverageLayer = thicknessCoverageLayer; + this.sellmeijerModelFactor = sellmeijerModelFactor; + this.sellmeijerReductionFactor = sellmeijerReductionFactor; + this.seepageLength = seepageLength; + this.sandParticlesVolumicWeight = sandParticlesVolumicWeight; + this.whitesDragCoefficient = whitesDragCoefficient; + this.diameter70 = diameter70; + this.darcyPermeability = darcyPermeability; + this.waterKinematicViscosity = waterKinematicViscosity; + this.gravity = gravity; + this.thicknessAquiferLayer = thicknessAquiferLayer; + this.meanDiameter70 = meanDiameter70; + this.beddingAngle = beddingAngle; + this.exitPointXCoordinate = exitPointXCoordinate; + this.surfaceLine = surfaceLine; + this.soilProfile = soilProfile; + } + + #region properties + + /// + /// Gets the volumetric weight of water. + /// [kN/m³] + /// + public double WaterVolumetricWeight + { + get + { + return waterVolumetricWeight; + } + } + + /// + /// Gets the calculation value used to account for uncertainty in the model for uplift. + /// + public double UpliftModelFactor + { + get + { + return upliftModelFactor; + } + } + + /// + /// Gets the outside high water level. + /// [m] + /// + public double AssessmentLevel + { + get + { + return assessmentLevel; + } + } + + /// + /// Gets the piezometric head at the exit point. + /// [m] + /// + public double PiezometricHeadExit + { + get + { + return piezometricHeadExit; + } + } + + /// + /// Gets the damping factor at the exit point. + /// + public double DampingFactorExit + { + get + { + return dampingFactorExit; + } + } + + /// + /// Gets the phreatic level at the exit point. + /// [m] + /// + public double PhreaticLevelExit + { + get + { + return phreaticLevelExit; + } + } + + /// + /// Gets the critical exit gradient for heave. + /// + public double CriticalHeaveGradient + { + get + { + return criticalHeaveGradient; + } + } + + /// + /// Gets the total thickness of the coverage layer at the exit point. + /// [m] + /// + public double ThicknessCoverageLayer + { + get + { + return thicknessCoverageLayer; + } + } + + /// + /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer. + /// + public double SellmeijerModelFactor + { + get + { + return sellmeijerModelFactor; + } + } + + /// + /// Gets the reduction factor Sellmeijer. + /// + public double SellmeijerReductionFactor + { + get + { + return sellmeijerReductionFactor; + } + } + + /// + /// Gets the horizontal distance between entree and exit point. + /// [m] + /// + public double SeepageLength + { + get + { + return seepageLength; + } + } + + /// + /// Gets the (lowerbound) volumic weight of sand grain material of a sand layer under water. + /// [kN/m³] + /// + public double SandParticlesVolumicWeight + { + get + { + return sandParticlesVolumicWeight; + } + } + + /// + /// Gets the White's drag coefficient. + /// + public double WhitesDragCoefficient + { + get + { + return whitesDragCoefficient; + } + } + + /// + /// Gets the sieve size through which 70% fraction of the grains of the top part of the aquifer passes. + /// [m] + /// + public double Diameter70 + { + get + { + return diameter70; + } + } + + /// + /// Gets the Darcy-speed with which water flows through the aquifer layer. + /// [m/s] + /// + public double DarcyPermeability + { + get + { + return darcyPermeability; + } + } + + /// + /// Gets the kinematic viscosity of water at 10 degrees Celsius. + /// [m²/s] + /// + public double WaterKinematicViscosity + { + get + { + return waterKinematicViscosity; + } + } + + /// + /// Gets the gravitational acceleration. + /// [m/s²] + /// + public double Gravity + { + get + { + return gravity; + } + } + + /// + /// Gets the thickness of the aquifer layer. + /// [m] + /// + public double ThicknessAquiferLayer + { + get + { + return thicknessAquiferLayer; + } + } + + /// + /// Gets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. + /// [m] + /// + public double MeanDiameter70 + { + get + { + return meanDiameter70; + } + } + + /// + /// Gets the angle of the force balance representing the amount in which sand grains resist rolling. + /// [°] + /// + public double BeddingAngle + { + get + { + return beddingAngle; + } + } + + /// + /// Gets the x coordinate of the exit point. + /// [m] + /// + public double ExitPointXCoordinate + { + get + { + return exitPointXCoordinate; + } + } + + /// + /// Gets the surface line. + /// + public RingtoetsPipingSurfaceLine SurfaceLine + { + get + { + return surfaceLine; + } + } + + /// + /// Gets the profile which contains a 1 dimensional definition of soil layers with properties. + /// + public PipingSoilProfile SoilProfile + { + get + { + return soilProfile; + } + } + + /// + /// Gets the volumic weight of the coverage layer when saturated. + /// + public double SaturatedVolumicWeightOfCoverageLayer + { + get + { + return saturatedVolumicWeightOfCoverageLayer; + } + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorResult.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorResult.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorResult.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,125 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// This class contains all the results of a complete piping calculation. + /// + public class PipingCalculatorResult + { + private readonly double upliftZValue; + private readonly double upliftFactorOfSafety; + private readonly double heaveZValue; + private readonly double heaveFactorOfSafety; + private readonly double sellmeijerZValue; + private readonly double sellmeijerFactorOfSafety; + + /// + /// Constructs a new . The result will hold all the values which were given. + /// + /// The z-value of the Uplift sub calculation. + /// The factory of safety of the Uplift sub calculation. + /// The z-value of the Heave sub calculation. + /// The factory of safety of the Heave sub calculation. + /// The z-value of the Sellmeijer sub calculation. + /// The factory of safety of the Sellmeijer sub calculation. + public PipingCalculatorResult(double upliftZValue, double upliftFactorOfSafety, double heaveZValue, double heaveFactorOfSafety, double sellmeijerZValue, double sellmeijerFactorOfSafety) + { + this.upliftZValue = upliftZValue; + this.upliftFactorOfSafety = upliftFactorOfSafety; + this.heaveZValue = heaveZValue; + this.heaveFactorOfSafety = heaveFactorOfSafety; + this.sellmeijerZValue = sellmeijerZValue; + this.sellmeijerFactorOfSafety = sellmeijerFactorOfSafety; + } + + #region properties + + /// + /// Gets the z-value of the Uplift sub calculation. + /// + public double UpliftZValue + { + get + { + return upliftZValue; + } + } + + /// + /// Gets the factory of safety of the Uplift sub calculation. + /// + public double UpliftFactorOfSafety + { + get + { + return upliftFactorOfSafety; + } + } + + /// + /// Gets the z-value of the Heave sub calculation. + /// + public double HeaveZValue + { + get + { + return heaveZValue; + } + } + + /// + /// Gets the factory of safety of the Heave sub calculation. + /// + public double HeaveFactorOfSafety + { + get + { + return heaveFactorOfSafety; + } + } + + /// + /// Gets the z-value of the Sellmeijer sub calculation. + /// + public double SellmeijerZValue + { + get + { + return sellmeijerZValue; + } + } + + /// + /// Gets the factory of safety of the Sellmeijer sub calculation. + /// + public double SellmeijerFactorOfSafety + { + get + { + return sellmeijerFactorOfSafety; + } + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,69 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Deltares.WTIPiping; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// Creates instances which are required by the . + /// + internal static class PipingProfileCreator + { + /// + /// Creates a based on information contained in the provided , + /// which can then be used in the . + /// + /// The from which to take the information. + /// A new with information taken from the . + public static PipingProfile Create(PipingSoilProfile soilProfile) + { + var profile = new PipingProfile + { + BottomLevel = soilProfile.Bottom + }; + foreach (PipingSoilLayer layer in soilProfile.Layers) + { + var pipingLayer = new PipingLayer + { + TopLevel = layer.Top, + IsAquifer = layer.IsAquifer + }; + if (layer.AbovePhreaticLevel.HasValue) + { + pipingLayer.AbovePhreaticLevel = layer.AbovePhreaticLevel.Value; + } + if(layer.BelowPhreaticLevel.HasValue) + { + pipingLayer.BelowPhreaticLevel = layer.BelowPhreaticLevel.Value; + } + if(layer.DryUnitWeight.HasValue) + { + pipingLayer.DryUnitWeight = layer.DryUnitWeight.Value; + } + profile.Layers.Add(pipingLayer); + } + + return profile; + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,57 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// Exception thrown when something went wrong in the + /// + public class PipingProfileCreatorException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public PipingProfileCreatorException() + { + } + + /// + /// Initializes a new instance of the class + /// with a specified error message. + /// + /// The message that describes the error. + public PipingProfileCreatorException(string message) + : base(message) + { + } + + /// + /// Initializes a new instance of the class with + /// a specified error message and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a + /// null reference if no inner exception is specified. + public PipingProfileCreatorException(string message, Exception innerException) : base(message, innerException) { } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSemiProbabilisticDesignValueFactory.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSemiProbabilisticDesignValueFactory.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSemiProbabilisticDesignValueFactory.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,120 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Ringtoets.Piping.Data; +using Ringtoets.Piping.Data.Probabilistics; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// Factory for creating design variables based on probabilistic distributions. + /// + public static class PipingSemiProbabilisticDesignValueFactory + { + #region General parameters + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetSaturatedVolumicWeightOfCoverageLayer(PipingInput parameters) + { + return CreateDesignVariable(parameters.SaturatedVolumicWeightOfCoverageLayer, 0.05); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetThicknessCoverageLayer(PipingInput parameters) + { + return CreateDesignVariable(parameters.ThicknessCoverageLayer, 0.05); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetPhreaticLevelExit(PipingInput parameters) + { + return CreateDesignVariable(parameters.PhreaticLevelExit, 0.05); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetDampingFactorExit(PipingInput parameters) + { + return CreateDesignVariable(parameters.DampingFactorExit, 0.95); + } + + #endregion + + #region Piping parameters + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetSeepageLength(PipingInput parameters) + { + return CreateDesignVariable(parameters.SeepageLength, 0.05); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetDiameter70(PipingInput parameters) + { + return CreateDesignVariable(parameters.Diameter70, 0.05); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetDarcyPermeability(PipingInput parameters) + { + return CreateDesignVariable(parameters.DarcyPermeability, 0.95); + } + + /// + /// Creates the design variable for . + /// + public static DesignVariable GetThicknessAquiferLayer(PipingInput parameters) + { + return CreateDesignVariable(parameters.ThicknessAquiferLayer, 0.95); + } + + #endregion + + private static DesignVariable CreateDesignVariable(NormalDistribution distribution, double percentile) + { + return new NormalDistributionDesignVariable(distribution) + { + Percentile = percentile + }; + } + + private static DesignVariable CreateDesignVariable(LognormalDistribution distribution, double percentile) + { + return new LognormalDistributionDesignVariable(distribution) + { + Percentile = percentile + }; + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,97 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Geometry; +using Deltares.WTIPiping; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper +{ + /// + /// Creates instances which are required by the . + /// + internal static class PipingSurfaceLineCreator + { + /// + /// Creates a for the kernel + /// given different surface line. + /// + /// The surface line configured in the Ringtoets application. + /// The surface line to be consumed by the kernel. + public static PipingSurfaceLine Create(RingtoetsPipingSurfaceLine line) + { + var surfaceLine = new PipingSurfaceLine + { + Name = line.Name + }; + if (line.Points.Any()) + { + surfaceLine.Points.AddRange(CreatePoints(line)); + } + + return surfaceLine; + } + + private static IEnumerable CreatePoints(RingtoetsPipingSurfaceLine line) + { + var projectedPoints = line.ProjectGeometryToLZ().ToArray(); + var pipingPoints = new List(); + for (int i = 0; i < line.Points.Length; i++) + { + var pipingPoint = CreatePoint(line, projectedPoints, i); + pipingPoints.Add(pipingPoint); + } + return pipingPoints; + } + + private static PipingPoint CreatePoint(RingtoetsPipingSurfaceLine line, Point2D[] projectedPoints, int index) + { + var surfaceLinePoint = line.Points[index]; + var projectedPoint = projectedPoints[index]; + var pipingPoint = new PipingPoint(projectedPoint.X, 0.0, projectedPoint.Y); + + if (ReferenceEquals(line.DitchPolderSide, surfaceLinePoint)) + { + pipingPoint.Type = PipingCharacteristicPointType.DitchPolderSide; + } + if (ReferenceEquals(line.BottomDitchPolderSide, surfaceLinePoint)) + { + pipingPoint.Type = PipingCharacteristicPointType.BottomDitchPolderSide; + } + if (ReferenceEquals(line.BottomDitchDikeSide, surfaceLinePoint)) + { + pipingPoint.Type = PipingCharacteristicPointType.BottomDitchDikeSide; + } + if (ReferenceEquals(line.DitchDikeSide, surfaceLinePoint)) + { + pipingPoint.Type = PipingCharacteristicPointType.DitchDikeSide; + } + if (ReferenceEquals(line.DikeToeAtPolder, surfaceLinePoint)) + { + pipingPoint.Type = PipingCharacteristicPointType.DikeToeAtPolder; + } + + return pipingPoint; + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/AssemblyInfo.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,31 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Piping.KernelWrapper")] +[assembly: AssemblyProduct("Ringtoets.Piping.KernelWrapper")] +[assembly: Guid("7fb99994-e34b-4c0d-a86c-e668bd789ebb")] +[assembly: InternalsVisibleTo("Ringtoets.Piping.KernelWrapper.Test")] +[assembly: InternalsVisibleTo("Ringtoets.Piping.Service.Test")] +[assembly: InternalsVisibleTo("Ringtoets.Piping.Integration.Test")] \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.Designer.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.Designer.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.Designer.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Ringtoets.Piping.KernelWrapper.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ringtoets.Piping.KernelWrapper.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Een ondergrondschematisering moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren.. + /// + internal static string PipingCalculation_Validate_Lacks_SoilProfile_uplift { + get { + return ResourceManager.GetString("PipingCalculation_Validate_Lacks_SoilProfile_uplift", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Een profielmeting moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren.. + /// + internal static string PipingCalculation_Validate_Lacks_surfaceline_uplift { + get { + return ResourceManager.GetString("PipingCalculation_Validate_Lacks_surfaceline_uplift", resourceCulture); + } + } + } +} Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.resx =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.resx (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Properties/Resources.resx (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Een ondergrondschematisering moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren. + + + Een profielmeting moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren. + + \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Ringtoets.Piping.KernelWrapper.csproj =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Ringtoets.Piping.KernelWrapper.csproj (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/Ringtoets.Piping.KernelWrapper.csproj (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,120 @@ + + + + + + {D64E4F0E-E341-496F-82B2-941AD202B4E3} + Library + Properties + Ringtoets.Piping.KernelWrapper + Ringtoets.Piping.KernelWrapper + v4.0 + 512 + + + true + DEBUG;TRACE + full + false + prompt + MinimumRecommendedRules.ruleset + + + + + none + TRACE + true + none + prompt + MinimumRecommendedRules.ruleset + + + + + TRACE + true + pdbonly + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\..\..\lib\Plugins\Wti\Deltares.WTIPiping.dll + + + + + + + Properties\GlobalAssembly.cs + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + False + + + {c90b77da-e421-43cc-b82e-529651bc21ac} + Core.Common.Version + False + + + {ce994cc9-6f6a-48ac-b4be-02c30a21f4db} + Ringtoets.Piping.Data + False + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + Copying.licenseheader + + + + + + + + + \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/EffectiveThicknessCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/EffectiveThicknessCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/EffectiveThicknessCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,75 @@ +using Deltares.WTIPiping; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + public class EffectiveThicknessCalculator : IEffectiveThicknessCalculator + { + private readonly Deltares.WTIPiping.EffectiveThicknessCalculator wrappedCalculator; + + public EffectiveThicknessCalculator() + { + wrappedCalculator = new Deltares.WTIPiping.EffectiveThicknessCalculator(); + } + + public double ExitPointXCoordinate + { + set + { + wrappedCalculator.ExitPointXCoordinate = value; + } + } + + public double PhreaticLevel + { + set + { + wrappedCalculator.PhreaticLevel = value; + } + } + + public double VolumicWeightOfWater + { + set + { + wrappedCalculator.VolumicWeightOfWater = value; + } + } + + public PipingProfile SoilProfile + { + set + { + wrappedCalculator.SoilProfile = value; + } + } + + public PipingSurfaceLine SurfaceLine + { + set + { + wrappedCalculator.SurfaceLine = value; + } + } + + public double EffectiveHeight + { + get + { + return wrappedCalculator.EffectiveHeight; + } + } + + public double EffectiveStress + { + get + { + return wrappedCalculator.EffectiveStress; + } + } + + public void Calculate() + { + wrappedCalculator.Calculate(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/HeaveCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/HeaveCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/HeaveCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,94 @@ +using System.Collections.Generic; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Class which wraps a . + /// + public class HeaveCalculator : IHeaveCalculator + { + private readonly Deltares.WTIPiping.HeaveCalculator wrappedCalculator; + + /// + /// Creates a new instance of . + /// + public HeaveCalculator() + { + wrappedCalculator = new Deltares.WTIPiping.HeaveCalculator(); + } + + public double DTotal + { + set + { + wrappedCalculator.DTotal = value; + } + } + + public double HExit + { + set + { + wrappedCalculator.HExit = value; + } + } + + public double Ich + { + set + { + wrappedCalculator.Ich = value; + } + } + + public double PhiExit + { + set + { + wrappedCalculator.PhiExit = value; + } + } + + public double PhiPolder + { + set + { + wrappedCalculator.PhiPolder = value; + } + } + + public double RExit + { + set + { + wrappedCalculator.RExit = value; + } + } + + public double Zh + { + get + { + return wrappedCalculator.Zh; + } + } + + public double FoSh + { + get + { + return wrappedCalculator.FoSh; + } + } + + public void Calculate() + { + wrappedCalculator.Calculate(); + } + + public List Validate() + { + return wrappedCalculator.Validate(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IEffectiveThicknessCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IEffectiveThicknessCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IEffectiveThicknessCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,50 @@ +using Deltares.WTIPiping; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Interface with operations for performing an effective thickness sub calculation. + /// + public interface IEffectiveThicknessCalculator + { + /// + /// Sets the ExitPointXCoordinate property of the effective thickness calculation. + /// + double ExitPointXCoordinate { set; } + + /// + /// Sets the PhreaticLevel property of the effective thickness calculation. + /// + double PhreaticLevel { set; } + + /// + /// Sets the VolumicWeightOfWater property of the effective thickness calculation. + /// + double VolumicWeightOfWater { set; } + + /// + /// Sets the SoilProfile property of the effective thickness calculation. + /// + PipingProfile SoilProfile { set; } + + /// + /// Sets the SurfaceLine property of the effective thickness calculation. + /// + PipingSurfaceLine SurfaceLine { set; } + + /// + /// Gets the EffectiveHeight property of the effective thickness calculation. + /// + double EffectiveHeight { get; } + + /// + /// Gets the EffectiveStress property of the effective thickness calculation. + /// + double EffectiveStress { get; } + + /// + /// Performs the effective thickness calculation. + /// + void Calculate(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IHeaveCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IHeaveCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IHeaveCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,60 @@ +using System.Collections.Generic; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Interface with operations for performing a heave sub calculation. + /// + public interface IHeaveCalculator + { + /// + /// Sets the DTotal property to use in the heave calculation. + /// + double DTotal { set; } + + /// + /// Sets the HExit property to use in the heave calculation. + /// + double HExit { set; } + + /// + /// Sets the Ich property to use in the heave calculation. + /// + double Ich { set; } + + /// + /// Sets the PhiExit property to use in the heave calculation. + /// + double PhiExit { set; } + + /// + /// Sets the PhiPolder property to use in the heave calculation. + /// + double PhiPolder { set; } + + /// + /// Sets the RExit property to use in the heave calculation. + /// + double RExit { set; } + + /// + /// Returns the Zh property to use in the heave calculation. + /// + double Zh { get; } + + /// + /// Returns the FoSh property to use in the heave calculation. + /// + double FoSh { get; } + + /// + /// Performs the heave calculation. + /// + void Calculate(); + + /// + /// Performs the heave validation. + /// + List Validate(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPiezoHeadCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPiezoHeadCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPiezoHeadCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,33 @@ +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Interface with operations for performing an piezometric head at exit sub calculation. + /// + public interface IPiezoHeadCalculator + { + /// + /// Sets the piezometric head at polder parameter. + /// + double PhiPolder { set; } + + /// + /// Sets the damping factor at exit parameter. + /// + double RExit { set; } + + /// + /// Sets the assessment level parameter. + /// + double HRiver { set; } + + /// + /// Gets the piezometric head exit result. + /// + double PhiExit { get; } + + /// + /// Performs the piezomteric head at exit calculation. + /// + void Calculate(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPipingSubCalculatorFactory.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPipingSubCalculatorFactory.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IPipingSubCalculatorFactory.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,38 @@ +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Factory responsible for creating the sub calculators required for a piping calculation. + /// + public interface IPipingSubCalculatorFactory + { + /// + /// Creates the uplift calculator. + /// + /// A new . + IUpliftCalculator CreateUpliftCalculator(); + + /// + /// Creates the heave calculator. + /// + /// A new . + IHeaveCalculator CreateHeaveCalculator(); + + /// + /// Creates the Sellmeijer calculator. + /// + /// A new . + ISellmeijerCalculator CreateSellmeijerCalculator(); + + /// + /// Creates the effective thickness calculator. + /// + /// A new . + IEffectiveThicknessCalculator CreateEffectiveThicknessCalculator(); + + /// + /// Creates the piezometric head at exit calculator. + /// + /// A new . + IPiezoHeadCalculator CreatePiezometricHeadAtExitCalculator(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/ISellmeijerCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/ISellmeijerCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/ISellmeijerCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,110 @@ +using System.Collections.Generic; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Interface with operations for performing a sellmeijer sub calculation. + /// + public interface ISellmeijerCalculator + { + /// + /// Sets the BeddingAngle property to use in the Sellmeijer calculation + /// + double BeddingAngle { set; } + + /// + /// Sets the D70 to use in the Sellmeijer calculation + /// + double D70 { set; } + + /// + /// Sets the D70Mean property to use in the Sellmeijer calculation + /// + double D70Mean { set; } + + /// + /// Sets the DAquifer property to use in the Sellmeijer calculation + /// + double DAquifer { set; } + + /// + /// Sets the DarcyPermeability property to use in the Sellmeijer calculation + /// + double DarcyPermeability { set; } + + /// + /// Sets the DTotal property to use in the Sellmeijer calculation + /// + double DTotal { set; } + + /// + /// Sets the GammaSubParticles property to use in the Sellmeijer calculation + /// + double GammaSubParticles { set; } + + /// + /// Sets the Gravity property to use in the Sellmeijer calculation + /// + double Gravity { set; } + + /// + /// Sets the HExit property to use in the Sellmeijer calculation + /// + double HExit { set; } + + /// + /// Sets the HRiver property to use in the Sellmeijer calculation + /// + double HRiver { set; } + + /// + /// Sets the KinematicViscosityWater property to use in the Sellmeijer calculation + /// + double KinematicViscosityWater { set; } + + /// + /// Sets the ModelFactorPiping property to use in the Sellmeijer calculation + /// + double ModelFactorPiping { set; } + + /// + /// Sets the Rc property to use in the Sellmeijer calculation + /// + double Rc { set; } + + /// + /// Sets the SeepageLength property to use in the Sellmeijer calculation + /// + double SeepageLength { set; } + + /// + /// Sets the VolumetricWeightOfWater property to use in the Sellmeijer calculation + /// + double VolumetricWeightOfWater { set; } + + /// + /// Sets the WhitesDragCoefficient property to use in the Sellmeijer calculation + /// + double WhitesDragCoefficient { set; } + + /// + /// Gets the Zp property of the Sellmeijer calculation. + /// + double Zp { get; } + + /// + /// Gets the FoSp property of the Sellmeijer calculation. + /// + double FoSp { get; } + + /// + /// Performs the Sellmeijer calculation. + /// + void Calculate(); + + /// + /// Performs the Sellmeijer validation. + /// + List Validate(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IUpliftCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IUpliftCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/IUpliftCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,67 @@ +using System.Collections.Generic; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + public interface IUpliftCalculator + { + /// + /// Sets the EffectiveStress property to use in the uplift calculation + /// + double EffectiveStress { set; } + + /// + /// Sets the HExit property to use in the uplift calculation + /// + double HExit { set; } + + /// + /// Sets the HRiver property to use in the uplift calculation + /// + double HRiver { set; } + + /// + /// Sets the ModelFactorUplift property to use in the uplift calculation + /// + double ModelFactorUplift { set; } + + /// + /// Sets the PhiExit property to use in the uplift calculation + /// + double PhiExit { set; } + + /// + /// Sets the PhiPolder property to use in the uplift calculation + /// + double PhiPolder { set; } + + /// + /// Sets the RExit property to use in the uplift calculation + /// + double RExit { set; } + + /// + /// Sets the VolumetricWeightOfWater property to use in the uplift calculation + /// + double VolumetricWeightOfWater { set; } + + /// + /// Gets the Zu property of the uplift calculation + /// + double Zu { get; } + + /// + /// Gets the FoSu property of the uplift calculation + /// + double FoSu { get; } + + /// + /// Performs the uplift validation. + /// + void Calculate(); + + /// + /// Performs the uplift validation. + /// + List Validate(); + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PiezoHeadCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PiezoHeadCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PiezoHeadCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,21 @@ +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Class which wraps the . + /// + public class PiezoHeadCalculator : IPiezoHeadCalculator { + + public double PhiPolder { private get; set; } + + public double RExit { private get; set; } + + public double HRiver { private get; set; } + + public double PhiExit { get; private set; } + + public void Calculate() + { + PhiExit = Deltares.WTIPiping.PiezoHeadCalculator.CalculatePhiExit(PhiPolder, RExit, HRiver); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PipingSubCalculatorFactory.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PipingSubCalculatorFactory.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/PipingSubCalculatorFactory.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,33 @@ +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Factory which creates the sub calculators from the piping kernel. + /// + public class PipingSubCalculatorFactory : IPipingSubCalculatorFactory + { + public IUpliftCalculator CreateUpliftCalculator() + { + return new UpliftCalculator(); + } + + public IHeaveCalculator CreateHeaveCalculator() + { + return new HeaveCalculator(); + } + + public ISellmeijerCalculator CreateSellmeijerCalculator() + { + return new SellmeijerCalculator(); + } + + public IEffectiveThicknessCalculator CreateEffectiveThicknessCalculator() + { + return new EffectiveThicknessCalculator(); + } + + public IPiezoHeadCalculator CreatePiezometricHeadAtExitCalculator() + { + return new PiezoHeadCalculator(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/SellmeijerCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/SellmeijerCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/SellmeijerCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,175 @@ +using System.Collections.Generic; +using Deltares.WTIPiping; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Class which wraps a . + /// + public class SellmeijerCalculator : ISellmeijerCalculator + { + private readonly Sellmeijer2011Calculator wrappedCalculator; + + /// + /// Creates a new instance of + /// + public SellmeijerCalculator() + { + wrappedCalculator = new Sellmeijer2011Calculator(); + } + + public double BeddingAngle + { + set + { + wrappedCalculator.BeddingAngle = value; + } + } + + public double D70 + { + set + { + wrappedCalculator.D70 = value; + } + } + + public double D70Mean + { + set + { + wrappedCalculator.D70Mean = value; + } + } + + public double DAquifer + { + set + { + wrappedCalculator.DAquifer = value; + } + } + + public double DarcyPermeability + { + set + { + wrappedCalculator.DarcyPermeability = value; + } + } + + public double DTotal + { + set + { + wrappedCalculator.DTotal = value; + } + } + + public double GammaSubParticles + { + set + { + wrappedCalculator.GammaSubParticles = value; + } + } + + public double Gravity + { + set + { + wrappedCalculator.Gravity = value; + } + } + + public double HExit + { + set + { + wrappedCalculator.HExit = value; + } + } + + public double HRiver + { + set + { + wrappedCalculator.HRiver = value; + } + } + + public double KinematicViscosityWater + { + set + { + wrappedCalculator.KinematicViscosityWater = value; + } + } + + public double ModelFactorPiping + { + set + { + wrappedCalculator.ModelFactorPiping = value; + } + } + + public double Rc + { + set + { + wrappedCalculator.Rc = value; + } + } + + public double SeepageLength + { + set + { + wrappedCalculator.SeepageLength = value; + } + } + + public double VolumetricWeightOfWater + { + set + { + wrappedCalculator.VolumetricWeightOfWater = value; + } + } + + public double WhitesDragCoefficient + { + set + { + wrappedCalculator.WhitesDragCoefficient = value; + } + } + + public double Zp + { + get + { + return wrappedCalculator.Zp; + } + } + + public double FoSp + { + get + { + return wrappedCalculator.FoSp; + } + } + + public void Calculate() + { + wrappedCalculator.Calculate(); + } + + public List Validate() + { + return wrappedCalculator.Validate(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/UpliftCalculator.cs =================================================================== diff -u --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/UpliftCalculator.cs (revision 0) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/SubCalculator/UpliftCalculator.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,111 @@ +using System.Collections.Generic; +using Deltares.WTIPiping; + +namespace Ringtoets.Piping.KernelWrapper.SubCalculator +{ + /// + /// Class which wraps a . + /// + public class UpliftCalculator : IUpliftCalculator + { + private readonly WTIUpliftCalculator wrappedCalculator; + + /// + /// Creates a new instance of + /// + public UpliftCalculator() + { + wrappedCalculator = new WTIUpliftCalculator(); + } + + public double EffectiveStress + { + set + { + wrappedCalculator.EffectiveStress = value; + } + } + + public double HExit + { + set + { + wrappedCalculator.HExit = value; + } + } + + public double HRiver + { + set + { + wrappedCalculator.HRiver = value; + } + } + + public double ModelFactorUplift + { + set + { + wrappedCalculator.ModelFactorUplift = value; + } + } + + public double PhiExit + { + set + { + wrappedCalculator.PhiExit = value; + } + } + + public double PhiPolder + { + set + { + wrappedCalculator.PhiPolder = value; + } + } + + public double RExit + { + set + { + wrappedCalculator.RExit = value; + } + } + + public double VolumetricWeightOfWater + { + set + { + wrappedCalculator.VolumetricWeightOfWater = value; + } + } + + public double Zu + { + get + { + return wrappedCalculator.Zu; + } + } + + public double FoSu + { + get + { + return wrappedCalculator.FoSu; + } + } + + public void Calculate() + { + wrappedCalculator.Calculate(); + } + + public List Validate() + { + return wrappedCalculator.Validate(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/Ringtoets.Piping.Service.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/src/Ringtoets.Piping.Service/Ringtoets.Piping.Service.csproj (.../Ringtoets.Piping.Service.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/src/Ringtoets.Piping.Service/Ringtoets.Piping.Service.csproj (.../Ringtoets.Piping.Service.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -91,7 +91,7 @@ Ringtoets.Piping.Data False - + {d64e4f0e-e341-496f-82b2-941ad202b4e3} Ringtoets.Piping.KernelWrapper False Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorExceptionTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorInputTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorResultTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingProfileCreatorExceptionTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingProfileCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/PipingSurfaceLineCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/Properties/AssemblyInfo.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/Ringtoets.Piping.KernelWrapper.Test.csproj'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/EffectiveThicknessCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/HeaveCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/PiezoHeadCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/SellmeijerCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/SubCalculator/UpliftCalculatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.Test/packages.config'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/Properties/AssemblyInfo.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/SubCalculator/EffectiveThicknessCalculatorStubTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/SubCalculator/HeaveCalculatorStubTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/SubCalculator/SellmeijerCalculatorStubTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/SubCalculator/TestPipingSubCalculatorFactoryTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/SubCalculator/UpliftCalculatorStubTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil.Test/packages.config'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/Properties/AssemblyInfo.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/Ringtoets.Piping.KernelWrapper.TestUtil.csproj'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/EffectiveThicknessCalculatorStub.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/HeaveCalculatorStub.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/PiezoHeadCalculatorStub.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/SellmeijerCalculatorStub.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/TestPipingSubCalculatorFactory.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/SubCalculator/UpliftCalculatorStub.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingOutput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/TestPipingSoilProfile.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c2fe76d04e1517a4e0aaf62184bccd413de0e472 refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Calculation.TestUtil/packages.config'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/Ringtoets.Piping.Data.Test.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/Ringtoets.Piping.Data.Test.csproj (.../Ringtoets.Piping.Data.Test.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/Ringtoets.Piping.Data.Test.csproj (.../Ringtoets.Piping.Data.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -103,15 +103,15 @@ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data - + {D64E4F0E-E341-496F-82B2-941AD202B4E3} Ringtoets.Piping.KernelWrapper {ce994cc9-6f6a-48ac-b4be-02c30a21f4db} Ringtoets.Piping.Data - + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} Ringtoets.Piping.KernelWrapper.TestUtil Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj =================================================================== diff -u -ra9c4c3b9c62339476e2e901bd2b402ed22ac772b -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision a9c4c3b9c62339476e2e901bd2b402ed22ac772b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -155,7 +155,7 @@ {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data - + {d64e4f0e-e341-496f-82b2-941ad202b4e3} Ringtoets.Piping.KernelWrapper @@ -175,7 +175,7 @@ {10B8D63D-87E8-46DF-ACA9-A8CF22EE8FB5} Ringtoets.Piping.Service - + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} Ringtoets.Piping.KernelWrapper.TestUtil Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj (.../Ringtoets.Piping.Integration.Test.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/Ringtoets.Piping.Integration.Test.csproj (.../Ringtoets.Piping.Integration.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -73,7 +73,7 @@ {d4200f43-3f72-4f42-af0a-8ced416a38ec} Ringtoets.Common.Data - + {D64E4F0E-E341-496F-82B2-941AD202B4E3} Ringtoets.Piping.KernelWrapper Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorExceptionTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorExceptionTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorExceptionTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,51 @@ +using System; +using NUnit.Framework; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingCalculatorExceptionTest + { + [Test] + public void DefaultConstructor_InnerExceptionNullAndMessageDefault() + { + // Setup + var expectedMessage = String.Format("Exception of type '{0}' was thrown.", typeof(PipingCalculatorException).FullName); + + // Call + var exception = new PipingCalculatorException(); + + // Assert + Assert.IsNull(exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void Constructor_WithCustomMessage_InnerExceptionNullAndMessageSetToCustom() + { + // Setup + var expectedMessage ="Some exception message"; + + // Call + var exception = new PipingCalculatorException(expectedMessage); + + // Assert + Assert.IsNull(exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void Constructor_WithCustomMessageAndInnerException_InnerExceptionSetAndMessageSetToCustom() + { + // Setup + var expectedMessage = "Some exception message"; + var expectedInnerException = new Exception(); + + // Call + var exception = new PipingCalculatorException(expectedMessage, expectedInnerException); + + // Assert + Assert.AreSame(expectedInnerException, exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,97 @@ +using System; +using NUnit.Framework; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingCalculatorInputTest + { + [Test] + public void GivenSomeRandomValues_WhenPipingCalculationInputConstructedFromInput_ThenPropertiesAreSet() + { + var random = new Random(22); + + double volumetricWeightOfWaterValue = random.NextDouble(); + double saturatedVolumicWeightOfCoverageLayer = random.NextDouble(); + double modelFactorUpliftValue = random.NextDouble(); + double hRiverValue = random.NextDouble(); + double phiExit = random.NextDouble(); + double rExitValue = random.NextDouble(); + double hExitValue = random.NextDouble(); + double ichValue = random.NextDouble(); + double dTotalValue = random.NextDouble(); + double sellmeijerModelFactorValue = random.NextDouble(); + double reductionFactorValue = random.NextDouble(); + double seepageLengthValue = random.NextDouble(); + double sandParticlesVolumicWeightValue = random.NextDouble(); + double whitesDragCoefficientValue = random.NextDouble(); + double diameter70Value = random.NextDouble(); + double darcyPermeabilityValue = random.NextDouble(); + double waterKinematicViscosityValue = random.NextDouble(); + double gravityValue = random.NextDouble(); + double thicknessAquiferLayerValue = random.NextDouble(); + double meanDiameter70Value = random.NextDouble(); + double beddingAngleValue = random.NextDouble(); + double exitPointXCoordinate = random.NextDouble(); + var surfaceLine = new RingtoetsPipingSurfaceLine(); + var soilProfile = new PipingSoilProfile(string.Empty, random.NextDouble(), new[] + { + new PipingSoilLayer(random.NextDouble()) + { + IsAquifer = true + } + }, 0); + + var input = new PipingCalculatorInput( + volumetricWeightOfWaterValue, + saturatedVolumicWeightOfCoverageLayer, + modelFactorUpliftValue, + hRiverValue, + phiExit, + rExitValue, + hExitValue, + ichValue, + dTotalValue, + sellmeijerModelFactorValue, + reductionFactorValue, + seepageLengthValue, + sandParticlesVolumicWeightValue, + whitesDragCoefficientValue, + diameter70Value, + darcyPermeabilityValue, + waterKinematicViscosityValue, + gravityValue, + thicknessAquiferLayerValue, + meanDiameter70Value, + beddingAngleValue, + exitPointXCoordinate, + surfaceLine, + soilProfile); + + Assert.AreEqual(volumetricWeightOfWaterValue, input.WaterVolumetricWeight); + Assert.AreEqual(saturatedVolumicWeightOfCoverageLayer, input.SaturatedVolumicWeightOfCoverageLayer); + Assert.AreEqual(modelFactorUpliftValue, input.UpliftModelFactor); + Assert.AreEqual(hRiverValue, input.AssessmentLevel); + Assert.AreEqual(phiExit, input.PiezometricHeadExit); + Assert.AreEqual(rExitValue, input.DampingFactorExit); + Assert.AreEqual(hExitValue, input.PhreaticLevelExit); + Assert.AreEqual(ichValue, input.CriticalHeaveGradient); + Assert.AreEqual(dTotalValue, input.ThicknessCoverageLayer); + Assert.AreEqual(sellmeijerModelFactorValue, input.SellmeijerModelFactor); + Assert.AreEqual(reductionFactorValue, input.SellmeijerReductionFactor); + Assert.AreEqual(seepageLengthValue, input.SeepageLength); + Assert.AreEqual(sandParticlesVolumicWeightValue, input.SandParticlesVolumicWeight); + Assert.AreEqual(whitesDragCoefficientValue, input.WhitesDragCoefficient); + Assert.AreEqual(diameter70Value, input.Diameter70); + Assert.AreEqual(darcyPermeabilityValue, input.DarcyPermeability); + Assert.AreEqual(waterKinematicViscosityValue, input.WaterKinematicViscosity); + Assert.AreEqual(gravityValue, input.Gravity); + Assert.AreEqual(thicknessAquiferLayerValue, input.ThicknessAquiferLayer); + Assert.AreEqual(meanDiameter70Value, input.MeanDiameter70); + Assert.AreEqual(beddingAngleValue, input.BeddingAngle); + Assert.AreEqual(exitPointXCoordinate, input.ExitPointXCoordinate); + Assert.AreSame(surfaceLine, input.SurfaceLine); + Assert.AreSame(soilProfile, input.SoilProfile); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorResultTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorResultTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorResultTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,29 @@ +using System; +using NUnit.Framework; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingCalculatorResultTest + { + [Test] + public void GivenSomeValues_WhenConstructedWithValues_ThenPropertiesAreSet() + { + var random = new Random(22); + var zuValue = random.NextDouble(); + var foSuValue = random.NextDouble(); + var zhValue = random.NextDouble(); + var foShValue = random.NextDouble(); + var zsValue = random.NextDouble(); + var foSsValue = random.NextDouble(); + + var actual = new PipingCalculatorResult(zuValue, foSuValue, zhValue, foShValue, zsValue, foSsValue); + + Assert.That(actual.UpliftZValue, Is.EqualTo(zuValue)); + Assert.That(actual.UpliftFactorOfSafety, Is.EqualTo(foSuValue)); + Assert.That(actual.HeaveZValue, Is.EqualTo(zhValue)); + Assert.That(actual.HeaveFactorOfSafety, Is.EqualTo(foShValue)); + Assert.That(actual.SellmeijerZValue, Is.EqualTo(zsValue)); + Assert.That(actual.SellmeijerFactorOfSafety, Is.EqualTo(foSsValue)); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,416 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Piping.Data; +using Ringtoets.Piping.KernelWrapper.SubCalculator; +using Ringtoets.Piping.KernelWrapper.TestUtil; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + [TestFixture] + public class PipingCalculatorTest + { + [Test] + public void Constructor_WithoutInput_ArgumentNullException() + { + // Call + TestDelegate call = () => new PipingCalculator(null, null); + + // Assert + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "PipingCalculatorInput required for creating a PipingCalculator."); + } + + [Test] + public void Constructor_FactoryNull_ArgumentNullException() + { + // Call + TestDelegate call = () => new PipingCalculator(new TestPipingInput().AsRealInput(), null); + + // Assert + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "IPipingSubCalculatorFactory required for creating a PipingCalculator."); + } + + [Test] + public void Calculate_CompleteValidInput_ReturnsResultWithNoNaN() + { + // Setup + PipingCalculatorInput input = new TestPipingInput().AsRealInput(); + + // Call + PipingCalculatorResult actual = new PipingCalculator(input, new PipingSubCalculatorFactory()).Calculate(); + + // Assert + Assert.IsNotNull(actual); + Assert.IsFalse(double.IsNaN(actual.UpliftZValue)); + Assert.IsFalse(double.IsNaN(actual.UpliftFactorOfSafety)); + Assert.IsFalse(double.IsNaN(actual.HeaveZValue)); + Assert.IsFalse(double.IsNaN(actual.HeaveFactorOfSafety)); + Assert.IsFalse(double.IsNaN(actual.SellmeijerZValue)); + Assert.IsFalse(double.IsNaN(actual.SellmeijerFactorOfSafety)); + } + + [Test] + public void Validate_CompleteValidInput_ReturnsNoValidationMessages() + { + // Setup + PipingCalculatorInput input = new TestPipingInput().AsRealInput(); + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(0, validationMessages.Count); + } + + [Test] + [TestCase(0)] + [TestCase(-1e-6)] + [TestCase(-100)] + public void Validate_ZeroOrNegativeSeepageLength_ValidationMessageForPipingLength(double seepageLength) + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + SeepageLength = seepageLength + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("Piping length"))); + } + + [Test] + [TestCase(0)] + [TestCase(-1e-6)] + [TestCase(-100)] + public void Validate_ZeroOrNegativeAquiferThickness_ValidationMessageForDAquifer(double aquiferThickness) + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + ThicknessAquiferLayer = aquiferThickness + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("DAquifer"))); + } + + [Test] + [TestCase(-1e-6)] + [TestCase(-100)] + public void Validate_NegativeBeddingAngle_ValidationMessageForBeddingAngle(double beddingAngle) + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + BeddingAngle = beddingAngle + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("Bedding angle"))); + } + + [Test] + [TestCase(-1e-6)] + [TestCase(-100)] + public void Validate_PiezometricHeadExitSameAsPhreaticLevelExit_ValidationMessageForPhiExitAndHExit(double level) + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + PhreaticLevelExit = level, + PiezometricHeadExit = (RoundedDouble)level + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(2, validationMessages.Count); + Assert.AreEqual(1, validationMessages.Count(message => message.Contains("PhiExit - HExit"))); + Assert.AreEqual(1, validationMessages.Count(message => message.Contains("phiExit - hExit"))); + } + + [Test] + public void Validate_DampingFactorExitZero_TwoValidationMessageForRExit() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + AssessmentLevel = (RoundedDouble) 0.1, + DampingFactorExit = 0 + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(2, validationMessages.Count); + Assert.AreEqual(2, validationMessages.Count(message => message.Contains("Rexit"))); + } + + [Test] + public void Validate_ThicknessCoverageLayerZero_ValidationMessageForDTotal() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + ThicknessCoverageLayer = 0 + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("Dtotal"))); + } + + [Test] + public void Validate_ThicknessAquiferLayerZero_ValidationMessageForDAquifer() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + ThicknessAquiferLayer = 0 + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("DAquifer"))); + } + + [Test] + public void Validate_VolumetricWeightWaterZero_ValidationMessageForVolumetricWeightWater() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + WaterVolumetricWeight = 0 + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("Volumetric weight water"))); + } + + [Test] // Validate_DifferenceAssessmentLevelAndPhreaticLevelExitEqualToSellmeijerReductionFactorTimesThicknessCoverageLayer_ValidationMessageForHRiverHExitRcDTotal + [TestCase(2, 1, 2, 0.5, TestName = "AssessmntLvlPhreaticLevelExitEqualsSellmeijerReductionFactorTimesThicknessCoverageLayer_ValidateMsgHRiverHExitRcDTotal(2,1,2,0.5)")] + [TestCase(2, 1.5, 0.5, 1, TestName = "AssessmntLvlPhreaticLevelExitEqualsSellmeijerReductionFactorTimesThicknessCoverageLayer_ValidateMsgHRiverHExitRcDTotal(2,1.5,0.5,1)")] + [TestCase(8, 4, 2, 2, TestName = "AssessmntLvlPhreaticLevelExitEqualsSellmeijerReductionFactorTimesThicknessCoverageLayer_ValidateMsgHRiverHExitRcDTotal(8,4,2,2)")] + public void Validate_DifferenceAssessmentLevelAndPhreaticLevelExitEqualToSellmeijerReductionFactorTimesThicknessCoverageLayer_ValidationMessageForHRiverHExitRcDTotal( + double assessmentLevel, double phreaticLevelExit, double sellmeijerReductionFactor, double thicknessCoverageLayer) + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + AssessmentLevel = (RoundedDouble)assessmentLevel, + PhreaticLevelExit = phreaticLevelExit, + SellmeijerReductionFactor = sellmeijerReductionFactor, + ThicknessCoverageLayer = thicknessCoverageLayer + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(message => message.Contains("HRiver - HExit - (Rc*DTotal)"))); + } + + [Test] + public void Validate_NoSurfaceLineSet_ValidationMessageForHavingNoSurfaceLineSelected() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + SurfaceLine = null, + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.AreEqual("Een profielmeting moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren.", validationMessages[0]); + } + + [Test] + public void Validate_NoSoilProfileSet_ValidationMessageForHavingNoSoilProfileSelected() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + SoilProfile = null, + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + Assert.AreEqual(1, validationMessages.Count); + Assert.AreEqual("Een ondergrondschematisering moet geselecteerd zijn om een Uplift berekening uit te kunnen voeren.", validationMessages[0]); + } + + [Test] + [TestCase(-1e-8)] + [TestCase(0)] + public void Validate_SoilProfileBottomAtTopLevel_ValidationMessageForHavingTooHighBottom(double bottom) + { + // Setup + var top = 0; + PipingCalculatorInput input = new TestPipingInput + { + SoilProfile = new PipingSoilProfile(String.Empty, bottom, new[] + { + new PipingSoilLayer(top) + }, 0) + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + List validationMessages = calculation.Validate(); + + // Assert + var message = string.Format("The bottomlevel ({0}) of the profile is not deep enough. It must be below at least {1} m below the toplevel of the deepest layer ({2}).", bottom, 0.001, top); + Assert.AreEqual(1, validationMessages.Count); + Assert.IsTrue(validationMessages.Any(vm => vm.Contains(message))); + } + + [Test] + public void CalculateThicknessCoverageLayer_SoilProfileWithoutAquiferSet_ThrowsPipingCalculatorException() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + SoilProfile = new PipingSoilProfile(String.Empty, -1.0, new[] + { + new PipingSoilLayer(0) + }, 0) + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + TestDelegate call = () => calculation.CalculateThicknessCoverageLayer(); + + // Assert + var exception = Assert.Throws(call); + Assert.IsInstanceOf(exception.InnerException); + } + + [Test] + public void CalculateThicknessCoverageLayer_WithValidInput_ReturnsSomeThickness() + { + // Setup + PipingCalculatorInput input = new TestPipingInput().AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + var result = calculation.CalculateThicknessCoverageLayer(); + + // Assert + Assert.AreEqual(1.0, result); + } + + [Test] + public void CalculateThicknessCoverageLayer_WithValidInputWithAquiferAboveSurfaceLine_ReturnsNegativeThickness() + { + // Setup + PipingCalculatorInput input = new TestPipingInput().AsRealInput(); + input.SurfaceLine.SetGeometry(new [] + { + new Point3D(0, 0, 0.5), + new Point3D(1, 0, 1.5), + new Point3D(2, 0, -1) + }); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + var result = calculation.CalculateThicknessCoverageLayer(); + + // Assert + Assert.AreEqual(result, -3.0); + } + + [Test] + public void CalculateThicknessCoverageLayer_WithExitPointLBeyondSurfaceLineInput_ReturnsNaN() + { + // Setup + PipingCalculatorInput input = new TestPipingInput + { + ExitPointXCoordinate = (RoundedDouble)2.1 + }.AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + var result = calculation.CalculateThicknessCoverageLayer(); + + // Assert + Assert.IsNaN(result); + } + + [Test] + public void CalculatePiezometricHeadAtExit_WithValidInput_ReturnsSomeValue() + { + // Setup + PipingCalculatorInput input = new TestPipingInput().AsRealInput(); + + var calculation = new PipingCalculator(input, new PipingSubCalculatorFactory()); + + // Call + var result = calculation.CalculatePiezometricHeadAtExit(); + + // Assert + Assert.IsFalse(double.IsNaN(result)); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorExceptionTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorExceptionTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorExceptionTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,51 @@ +using System; +using NUnit.Framework; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingProfileCreatorExceptionTest + { + [Test] + public void DefaultConstructor_InnerExceptionNullAndMessageDefault() + { + // Setup + var expectedMessage = String.Format("Exception of type '{0}' was thrown.", typeof(PipingProfileCreatorException).FullName); + + // Call + var exception = new PipingProfileCreatorException(); + + // Assert + Assert.IsNull(exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void Constructor_WithCustomMessage_InnerExceptionNullAndMessageSetToCustom() + { + // Setup + var expectedMessage ="Some exception message"; + + // Call + var exception = new PipingProfileCreatorException(expectedMessage); + + // Assert + Assert.IsNull(exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + + [Test] + public void Constructor_WithCustomMessageAndInnerException_InnerExceptionSetAndMessageSetToCustom() + { + // Setup + var expectedMessage = "Some exception message"; + var expectedInnerException = new Exception(); + + // Call + var exception = new PipingProfileCreatorException(expectedMessage, expectedInnerException); + + // Assert + Assert.AreSame(expectedInnerException, exception.InnerException); + Assert.AreEqual(expectedMessage, exception.Message); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingProfileCreatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,260 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Deltares.WTIPiping; +using NUnit.Framework; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingProfileCreatorTest + { + [Test] + public void Create_ProfileWithOneLayer_ReturnsProfileWithSingleLayer() + { + // Setup + var random = new Random(22); + var expectedTop = random.NextDouble(); + var expectedBottom = expectedTop - random.NextDouble(); + var belowPhreaticLevel = random.NextDouble(); + var abovePhreaticLevel = random.NextDouble(); + var dryUnitWeight = random.NextDouble(); + const long pipingSoilProfileId = 1234L; + IEnumerable layers = new[] + { + new PipingSoilLayer(expectedTop) + { + IsAquifer = true, + BelowPhreaticLevel = belowPhreaticLevel, + AbovePhreaticLevel = abovePhreaticLevel, + DryUnitWeight = dryUnitWeight + }, + }; + var soilProfile = new PipingSoilProfile(String.Empty, expectedBottom, layers, pipingSoilProfileId); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + // Assert + Assert.IsNotNull(actual.Layers); + Assert.IsNotNull(actual.BottomAquiferLayer); + Assert.IsNotNull(actual.TopAquiferLayer); + Assert.AreEqual(1, actual.Layers.Count); + Assert.AreEqual(expectedTop, actual.Layers[0].TopLevel); + Assert.AreEqual(expectedTop, actual.TopLevel); + Assert.AreEqual(expectedBottom, actual.BottomLevel); + + PipingLayer pipingLayer = actual.Layers.First(); + Assert.IsTrue(pipingLayer.IsAquifer); + Assert.AreEqual(belowPhreaticLevel, pipingLayer.BelowPhreaticLevel); + Assert.AreEqual(abovePhreaticLevel, pipingLayer.AbovePhreaticLevel); + Assert.AreEqual(dryUnitWeight, pipingLayer.DryUnitWeight); + Assert.AreEqual(pipingSoilProfileId, soilProfile.PipingSoilProfileId); + } + + [Test] + public void Create_ProfileWithDecreasingTops_ReturnsProfileWithMultipleLayers() + { + // Setup + var random = new Random(22); + var expectedTopA = random.NextDouble(); + var expectedTopB = expectedTopA - random.NextDouble(); + var expectedTopC = expectedTopB - random.NextDouble(); + var expectedBottom = expectedTopC - random.NextDouble(); + const long pipingSoilProfileId = 1234L; + IEnumerable layers = new[] + { + new PipingSoilLayer(expectedTopA) + { + IsAquifer = true + }, + new PipingSoilLayer(expectedTopB), + new PipingSoilLayer(expectedTopC) + }; + + var soilProfile = new PipingSoilProfile(String.Empty, expectedBottom, layers, pipingSoilProfileId); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + // Assert + Assert.AreEqual(3, actual.Layers.Count); + IEnumerable expectedAquifers = new[] + { + true, + false, + false, + }; + CollectionAssert.AreEqual(expectedAquifers, actual.Layers.Select(l => l.IsAquifer)); + CollectionAssert.AreEqual(new[] + { + expectedTopA, + expectedTopB, + expectedTopC + }, actual.Layers.Select(l => l.TopLevel)); + Assert.AreEqual(expectedBottom, actual.BottomLevel); + Assert.AreEqual(pipingSoilProfileId, soilProfile.PipingSoilProfileId); + } + + [Test] + public void Create_ProfileWithMultipleLayers_ReturnsProfileWithOrderedMultipleLayers() + { + // Setup + var random = new Random(22); + var expectedTopA = random.NextDouble(); + var expectedTopB = random.NextDouble() + expectedTopA; + var expectedTopC = random.NextDouble() + expectedTopB; + var expectedBottom = expectedTopA - random.NextDouble(); + const long pipingSoilProfileId = 1234L; + IEnumerable layers = new[] + { + new PipingSoilLayer(expectedTopA) + { + IsAquifer = true + }, + new PipingSoilLayer(expectedTopB), + new PipingSoilLayer(expectedTopC) + }; + var soilProfile = new PipingSoilProfile(string.Empty, expectedBottom, layers, pipingSoilProfileId); + + // Precondition + CollectionAssert.AreNotEqual(layers, layers.OrderByDescending(l => l.Top), "Layer collection should not be in descending order by the Top property."); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + // Assert + IEnumerable ordered = actual.Layers.OrderByDescending(l => l.TopLevel); + CollectionAssert.AreEqual(ordered, actual.Layers); + + Assert.AreEqual(3, actual.Layers.Count); + IEnumerable expectedAquifers = new[] + { + false, + false, + true, + }; + CollectionAssert.AreEqual(expectedAquifers, actual.Layers.Select(l => l.IsAquifer)); + CollectionAssert.AreEqual(new[] + { + expectedTopC, + expectedTopB, + expectedTopA + }, actual.Layers.Select(l => l.TopLevel)); + Assert.AreEqual(expectedBottom, actual.BottomLevel); + Assert.AreEqual(pipingSoilProfileId, soilProfile.PipingSoilProfileId); + } + + [Test] + public void Create_ProfileWithLayerBelowPhreaticLevelSet_ReturnsLayersWithBelowPhreaticLevel() + { + // Setup + var random = new Random(22); + var levelA = random.NextDouble(); + var levelB = random.NextDouble(); + var levelC = random.NextDouble(); + + IEnumerable layers = new[] + { + new PipingSoilLayer(1) + { + BelowPhreaticLevel = levelA + }, + new PipingSoilLayer(0) + { + BelowPhreaticLevel = levelB + }, + new PipingSoilLayer(-1) + { + BelowPhreaticLevel = levelC + } + }; + var soilProfile = new PipingSoilProfile(string.Empty, -2, layers, 0); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + CollectionAssert.AreEqual(new[] + { + levelA, + levelB, + levelC + }, actual.Layers.Select(l => l.BelowPhreaticLevel)); + } + + [Test] + public void Create_ProfileWithLayerAbovePhreaticLevelSet_ReturnsLayersWithBelowPhreaticLevel() + { + // Setup + var random = new Random(22); + var levelA = random.NextDouble(); + var levelB = random.NextDouble(); + var levelC = random.NextDouble(); + + IEnumerable layers = new[] + { + new PipingSoilLayer(1) + { + AbovePhreaticLevel = levelA + }, + new PipingSoilLayer(0) + { + AbovePhreaticLevel = levelB + }, + new PipingSoilLayer(-1) + { + AbovePhreaticLevel = levelC + } + }; + var soilProfile = new PipingSoilProfile(string.Empty, -2, layers, 0); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + CollectionAssert.AreEqual(new[] + { + levelA, + levelB, + levelC + }, actual.Layers.Select(l => l.AbovePhreaticLevel)); + } + + [Test] + public void Create_ProfileWithLayerDryUnitWeightSet_ReturnsLayersWithBelowPhreaticLevel() + { + // Setup + var random = new Random(22); + var weightA = random.NextDouble(); + var weightB = random.NextDouble(); + var weightC = random.NextDouble(); + + IEnumerable layers = new[] + { + new PipingSoilLayer(1) + { + DryUnitWeight = weightA + }, + new PipingSoilLayer(0) + { + DryUnitWeight = weightB + }, + new PipingSoilLayer(-1) + { + DryUnitWeight = weightC + } + }; + var soilProfile = new PipingSoilProfile(string.Empty, -2, layers, 0); + + // Call + PipingProfile actual = PipingProfileCreator.Create(soilProfile); + + CollectionAssert.AreEqual(new[] + { + weightA, + weightB, + weightC + }, actual.Layers.Select(l => l.DryUnitWeight)); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSemiProbabilisticDesignValueFactoryTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,129 @@ +using NUnit.Framework; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + [TestFixture] + public class PipingSemiProbabilisticDesignValueFactoryTest + { + #region General parameters + + [Test] + public void GetThicknessCoverageLayer_ValidPipingCalculation_CreateDesignVariableForThicknessCoverageLayer() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var thicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters); + + // Assert + Assert.AreSame(inputParameters.ThicknessCoverageLayer, thicknessCoverageLayer.Distribution); + Assert.AreEqual(0.05, thicknessCoverageLayer.Percentile); + } + + [Test] + public void GetSaturatedVolumicWeightOfCoverageLayer_ValidPipingCalculation_CreateDesignVariableForThicknessCoverageLayer() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var saturatedVolumicWeightOfCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetSaturatedVolumicWeightOfCoverageLayer(inputParameters); + + // Assert + Assert.AreSame(inputParameters.SaturatedVolumicWeightOfCoverageLayer, saturatedVolumicWeightOfCoverageLayer.Distribution); + Assert.AreEqual(0.05, saturatedVolumicWeightOfCoverageLayer.Percentile); + } + + [Test] + public void GetPhreaticLevelExit_ValidPipingCalculation_CreateDesignVariableForPhreaticLevelExit() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var freaticLevelExit = PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters); + + // Assert + Assert.AreSame(inputParameters.PhreaticLevelExit, freaticLevelExit.Distribution); + Assert.AreEqual(0.05, freaticLevelExit.Percentile); + } + + [Test] + public void GetDampingFactorExit_ValidPipingCalculation_CreateDesignVariableForDampingFactorExit() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var dampingFactorExit = PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(inputParameters); + + // Assert + Assert.AreSame(inputParameters.DampingFactorExit, dampingFactorExit.Distribution); + Assert.AreEqual(0.95, dampingFactorExit.Percentile); + } + + #endregion + + #region Piping parameters + + [Test] + public void GetSeepageLength_ValidPipingCalculation_CreateDesignVariableForSeepageLength() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var seepageLength = PipingSemiProbabilisticDesignValueFactory.GetSeepageLength(inputParameters); + + // Assert + Assert.AreSame(inputParameters.SeepageLength, seepageLength.Distribution); + Assert.AreEqual(0.05, seepageLength.Percentile); + } + + [Test] + public void GetDiameter70_ValidPipingCalculation_CreateDesignVariableForDiameter70() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var d70 = PipingSemiProbabilisticDesignValueFactory.GetDiameter70(inputParameters); + + // Assert + Assert.AreSame(inputParameters.Diameter70, d70.Distribution); + Assert.AreEqual(0.05, d70.Percentile); + } + + [Test] + public void GetDarcyPermeability_ValidPipingCalculation_CreateDesignVariableForDarcyPermeability() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var darcyPermeability = PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters); + + // Assert + Assert.AreSame(inputParameters.DarcyPermeability, darcyPermeability.Distribution); + Assert.AreEqual(0.95, darcyPermeability.Percentile); + } + + [Test] + public void GetThicknessAquiferLayer_ValidPipingCalculation_CreateDesignVariableForThicknessAquiferLayer() + { + // Setup + var inputParameters = new PipingInput(new GeneralPipingInput()); + + // Call + var thicknessAquiferLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessAquiferLayer(inputParameters); + + // Assert + Assert.AreSame(inputParameters.ThicknessAquiferLayer, thicknessAquiferLayer.Distribution); + Assert.AreEqual(0.95, thicknessAquiferLayer.Percentile); + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSurfaceLineCreatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSurfaceLineCreatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingSurfaceLineCreatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,291 @@ +using System; +using System.Linq; +using Core.Common.Base.Geometry; +using Deltares.WTIPiping; +using NUnit.Framework; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.Test +{ + public class PipingSurfaceLineCreatorTest + { + [Test] + public void Create_NormalizedLocalSurfaceLine_ReturnsSurfaceLineWithIdenticalPoints() + { + // Setup + const string name = "Local coordinate surfaceline"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + surfaceLine.SetGeometry(new[] + { + new Point3D (0.0, 0.0, 1.1), + new Point3D (2.2, 0.0, 3.3), + new Point3D (4.4, 0.0, 5.5) + }); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.X).ToArray(), actual.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Y).ToArray(), actual.Points.Select(p => p.Y).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(PipingCharacteristicPointType.None, surfaceLine.Points.Count()), actual.Points.Select(p => p.Type)); + } + + [Test] + public void Create_LocalSurfaceLineNotNormalized_TranslateAllPointsToMakeFirstCoordinateZeroX() + { + // Setup + const string name = "Local coordinate surfaceline"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + const double firstX = 4.6; + surfaceLine.SetGeometry(new[] + { + new Point3D (firstX, 0.0, 1.1), + new Point3D (7.8, 0.0, 3.3), + new Point3D (9.9, 0.0, 5.5) + }); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + var expectedCoordinatesX = surfaceLine.Points.Select(p => p.X - firstX).ToArray(); + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Y).ToArray(), actual.Points.Select(p => p.Y).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(PipingCharacteristicPointType.None, surfaceLine.Points.Count()), actual.Points.Select(p => p.Type)); + } + + [Test] + public void Create_GlobalSurfaceLine_ProjectSurfaceLineIntoLZPlaneSpannedByFirstAndLastPoint() + { + // Setup + const string name = "Global coordinate surfaceline"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + surfaceLine.SetGeometry(new[] + { + new Point3D (1.0, 1.0, 2.2), + new Point3D (2.0, 3.0, 4.4), // Outlier from line specified by extrema + new Point3D (3.0, 4.0, 7.7), + }); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + var length = Math.Sqrt(2 * 2 + 3 * 3); + const double secondCoordinateFactor = (2.0 * 1.0 + 3.0 * 2.0) / (2.0 * 2.0 + 3.0 * 3.0); + var expectedCoordinatesX = new[] + { + 0.0, + secondCoordinateFactor * length, + length + }; + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(0, surfaceLine.Points.Count()).ToArray(), actual.Points.Select(p => p.Y).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(PipingCharacteristicPointType.None, surfaceLine.Points.Count()), actual.Points.Select(p => p.Type)); + } + + [Test] + public void Create_SurfaceLineWithOnlyOnePoint_CreatePipingSurfaceLineWithOnePoint() + { + // Setup + const string name = "Global coordinate surfaceline"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + surfaceLine.SetGeometry(new[] + { + new Point3D (1.0, 1.0, 2.2), + }); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + var expectedCoordinatesX = new[] + { + 0.0, + }; + Assert.AreEqual(name, actual.Name); + CollectionAssert.AreEqual(expectedCoordinatesX, actual.Points.Select(p => p.X).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(0, surfaceLine.Points.Count()).ToArray(), actual.Points.Select(p => p.Y).ToArray()); + CollectionAssert.AreEqual(surfaceLine.Points.Select(p => p.Z).ToArray(), actual.Points.Select(p => p.Z).ToArray()); + CollectionAssert.AreEqual(Enumerable.Repeat(PipingCharacteristicPointType.None, surfaceLine.Points.Count()), actual.Points.Select(p => p.Type)); + } + + [Test] + public void Create_SurfaceLineWithoutPoints_CreateSurfaceLineWithoutPoints() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + CollectionAssert.IsEmpty(actual.Points); + } + + [Test] + public void Create_SurfaceLineWithDikeToePolderSide_CreateSurfaceLineWithDikeToePolderSideSet() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + var point = new Point3D (1.0, 1.0, 2.2); + surfaceLine.SetGeometry(new[] + { + point, + }); + surfaceLine.SetDikeToeAtPolderAt(point); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + Assert.AreEqual(1, actual.Points.Count); + AssertPointsAreEqual(new Point3D(0.0, 0.0, 2.2), actual.DikeToeAtPolder); + } + + [Test] + public void Create_SurfaceLineWithDitchDikeSide_CreateSurfaceLineWithDitchDikeSideSet() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + var point = new Point3D(1.0, 1.0, 2.2); + surfaceLine.SetGeometry(new[] + { + point, + }); + surfaceLine.SetDitchDikeSideAt(point); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + Assert.AreEqual(1, actual.Points.Count); + AssertPointsAreEqual(new Point3D(0.0, 0.0, 2.2), actual.DitchDikeSide); + } + + [Test] + public void Create_SurfaceLineWithBottomDitchDikeSide_CreateSurfaceLineWithBottomDitchDikeSideSet() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + var point = new Point3D(1.0, 1.0, 2.2); + surfaceLine.SetGeometry(new[] + { + point, + }); + surfaceLine.SetBottomDitchDikeSideAt(point); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + Assert.AreEqual(1, actual.Points.Count); + AssertPointsAreEqual(new Point3D(0.0, 0.0, 2.2), actual.BottomDitchDikeSide); + } + + [Test] + public void Create_SurfaceLineWithBottomPolderDikeSide_CreateSurfaceLineWithBottomDitchPolderSideSet() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + var point = new Point3D(1.0, 1.0, 2.2); + surfaceLine.SetGeometry(new[] + { + point, + }); + surfaceLine.SetBottomDitchPolderSideAt(point); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + Assert.AreEqual(1, actual.Points.Count); + AssertPointsAreEqual(new Point3D(0.0, 0.0, 2.2), actual.BottomDitchPolderSide); + } + + [Test] + public void Create_SurfaceLineWithPolderDikeSide_CreateSurfaceLineWithDitchPolderSideSet() + { + // Setup + const string name = "Surfaceline without points"; + var surfaceLine = new RingtoetsPipingSurfaceLine + { + Name = name + }; + var point = new Point3D(1.0, 1.0, 2.2); + surfaceLine.SetGeometry(new[] + { + point, + }); + surfaceLine.SetDitchPolderSideAt(point); + + // Call + PipingSurfaceLine actual = PipingSurfaceLineCreator.Create(surfaceLine); + + // Assert + Assert.AreEqual(name, actual.Name); + Assert.AreEqual(1, actual.Points.Count); + AssertPointsAreEqual(new Point3D(0.0, 0.0, 2.2), actual.DitchPolderSide); + } + + private void AssertPointsAreEqual(Point3D point, PipingPoint otherPoint) + { + if (point == null) + { + Assert.IsNull(otherPoint); + return; + } + if (otherPoint == null) + { + Assert.Fail("Expected value for otherPoint."); + } + Assert.AreEqual(point.X, otherPoint.X); + Assert.AreEqual(point.Y, otherPoint.Y); + Assert.AreEqual(point.Z, otherPoint.Z); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Properties/AssemblyInfo.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,13 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Piping.KernelWrapper.Test")] +[assembly: AssemblyProduct("Ringtoets.Piping.KernelWrapper.Test")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("49535e18-f522-49a4-b2ee-c7e801313c38")] \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Ringtoets.Piping.KernelWrapper.Test.csproj =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Ringtoets.Piping.KernelWrapper.Test.csproj (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/Ringtoets.Piping.KernelWrapper.Test.csproj (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,105 @@ + + + + + Debug + x86 + {91389DA2-3FF4-4559-90B3-4061549789DD} + Library + Properties + Ringtoets.Piping.KernelWrapper.Test + Ringtoets.Piping.KernelWrapper.Test + v4.0 + 512 + + + true + bin\Debug\ + 4 + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + 4 + TRACE + true + none + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\ReleaseForCodeCoverage\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\..\..\lib\Plugins\Wti\Deltares.WTIPiping.dll + + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + + + + + + + + + + + + + + + + + + + + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + + + {D749EE4C-CE50-4C17-BF01-9A953028C126} + Core.Common.TestUtil + + + {ce994cc9-6f6a-48ac-b4be-02c30a21f4db} + Ringtoets.Piping.Data + + + {d64e4f0e-e341-496f-82b2-941ad202b4e3} + Ringtoets.Piping.KernelWrapper + + + {27e0a5c9-3abf-426a-a3da-7d0b83a218c8} + Ringtoets.Piping.KernelWrapper.TestUtil + + + + + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/EffectiveThicknessCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/EffectiveThicknessCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/EffectiveThicknessCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,23 @@ +using System; +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + [TestFixture] + public class EffectiveThicknessCalculatorTest + { + [Test] + public void Constructor_WithInput_PropertiesThrowNullReferenceException() + { + // Call + var calculator = new EffectiveThicknessCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + + Assert.Throws(() => { var x = calculator.EffectiveHeight; }); + Assert.Throws(() => { var x = calculator.EffectiveStress; }); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/HeaveCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/HeaveCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/HeaveCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,20 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + [TestFixture] + public class HeaveCalculatorTest + { + [Test] + public void Constructor_WithInput_PropertiesSet() + { + // Call + var calculator = new HeaveCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + Assert.AreEqual(0.0, calculator.Zh); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PiezoHeadCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PiezoHeadCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PiezoHeadCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,19 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + public class PiezoHeadCalculatorTest + { + [Test] + public void Constructor_WithInput_PropertiesSet() + { + // Call + var calculator = new PiezoHeadCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + Assert.AreEqual(0.0, calculator.PhiExit); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/PipingSubCalculatorFactoryTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,84 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + [TestFixture] + public class PipingSubCalculatorFactoryTest + { + [Test] + public void Constructor_ReturnsNewInstance() + { + // Call + var factory = new PipingSubCalculatorFactory(); + + // Assert + Assert.IsInstanceOf(factory); + } + + [Test] + public void CreateHeaveCalculator_Always_NewHeaveCalculator() + { + // Setup + var factory = new PipingSubCalculatorFactory(); + + // Call + var calculator = factory.CreateHeaveCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + } + + [Test] + public void CreateUpliftCalculator_Always_NewUpliftCalculator() + { + // Setup + var factory = new PipingSubCalculatorFactory(); + + // Call + var calculator = factory.CreateUpliftCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + } + + [Test] + public void CreateSellmeijerCalculator_Always_NewSellmeijerCalculator() + { + // Setup + var factory = new PipingSubCalculatorFactory(); + + // Call + var calculator = factory.CreateSellmeijerCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + } + + [Test] + public void CreateEffectiveThicknessCalculator_Always_NewSellmeijerCalculator() + { + // Setup + var factory = new PipingSubCalculatorFactory(); + + // Call + var calculator = factory.CreateEffectiveThicknessCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + } + + [Test] + public void CreatPiezometricHeadAtExitCalculator_Always_NewPizometricHeadAtExitCalculator() + { + // Setup + var factory = new PipingSubCalculatorFactory(); + + // Call + var calculator = factory.CreatePiezometricHeadAtExitCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/SellmeijerCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/SellmeijerCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/SellmeijerCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,20 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + [TestFixture] + public class SellmeijerCalculatorTest + { + [Test] + public void Constructor_DefaultValues() + { + // Call + var calculator = new SellmeijerCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + Assert.AreEqual(0.0, calculator.Zp); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/UpliftCalculatorTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/UpliftCalculatorTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/SubCalculator/UpliftCalculatorTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,20 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.Test.SubCalculator +{ + [TestFixture] + public class UpliftCalculatorTest + { + [Test] + public void Constructor_DefaultValues() + { + // Call + var calculator = new UpliftCalculator(); + + // Assert + Assert.IsInstanceOf(calculator); + Assert.AreEqual(double.NaN, calculator.Zu); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/packages.config =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/packages.config (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/packages.config (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Properties/AssemblyInfo.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Ringtoets.Piping.KernelWrapper.TestUtil.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Deltares")] +[assembly: AssemblyProduct("Ringtoets.Piping.KernelWrapper.TestUtil.Test")] +[assembly: AssemblyCopyright("Copyright © Deltares 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d243257d-83f9-4096-b066-db65e0c69d24")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/Ringtoets.Piping.KernelWrapper.TestUtil.Test.csproj (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,80 @@ + + + + + Debug + x86 + {529C4919-27DE-4DDA-ABD6-537F21B3F223} + Library + Properties + Ringtoets.Piping.KernelWrapper.TestUtil.Test + Ringtoets.Piping.KernelWrapper.TestUtil.Test + v4.0 + 512 + + + + true + bin\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + TRACE + true + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\ReleaseForCodeCoverage\ + x86 + TRACE + true + pdbonly + + + + False + ..\..\..\..\lib\Plugins\Wti\Deltares.WTIPiping.dll + + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + + + + + + + + + + + + + + + + {D64E4F0E-E341-496F-82B2-941AD202B4E3} + Ringtoets.Piping.KernelWrapper + + + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} + Ringtoets.Piping.KernelWrapper.TestUtil + + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/EffectiveThicknessCalculatorStubTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/EffectiveThicknessCalculatorStubTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/EffectiveThicknessCalculatorStubTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,40 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.Test.SubCalculator +{ + [TestFixture] + public class EffectiveThicknessCalculatorStubTest + { + + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Call + var stub = new EffectiveThicknessCalculatorStub(); + + // Assert + Assert.AreEqual(0, stub.ExitPointXCoordinate); + Assert.AreEqual(0, stub.PhreaticLevel); + Assert.IsNull(stub.SoilProfile); + Assert.IsNull(stub.SurfaceLine); + Assert.AreEqual(0, stub.VolumicWeightOfWater); + + Assert.AreEqual(0, stub.EffectiveHeight); + Assert.AreEqual(0, stub.EffectiveStress); + } + + [Test] + public void Calculate_Always_DoesNotThrow() + { + // Setup + var stub = new EffectiveThicknessCalculatorStub(); + + // Call + TestDelegate call = () => stub.Calculate(); + + // Assert + Assert.DoesNotThrow(call); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/HeaveCalculatorStubTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/HeaveCalculatorStubTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/HeaveCalculatorStubTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,53 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.Test.SubCalculator +{ + [TestFixture] + public class HeaveCalculatorStubTest + { + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Call + var stub = new HeaveCalculatorStub(); + + // Assert + Assert.AreEqual(0, stub.DTotal); + Assert.AreEqual(0, stub.HExit); + Assert.AreEqual(0, stub.Ich); + Assert.AreEqual(0, stub.PhiExit); + Assert.AreEqual(0, stub.PhiPolder); + Assert.AreEqual(0, stub.RExit); + + Assert.AreEqual(0, stub.FoSh); + Assert.AreEqual(0, stub.Zh); + } + + [Test] + public void Validate_Always_EmptyList() + { + // Setup + var stub = new HeaveCalculatorStub(); + + // Call + var result = stub.Validate(); + + // Assert + Assert.IsEmpty(result); + } + + [Test] + public void Calculate_Always_DoesNotThrow() + { + // Setup + var stub = new HeaveCalculatorStub(); + + // Call + TestDelegate call = () => stub.Calculate(); + + // Assert + Assert.DoesNotThrow(call); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/SellmeijerCalculatorStubTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/SellmeijerCalculatorStubTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/SellmeijerCalculatorStubTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,64 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.Test.SubCalculator +{ + [TestFixture] + public class SellmeijerCalculatorStubTest + { + + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Call + var stub = new SellmeijerCalculatorStub(); + + // Assert + Assert.AreEqual(0, stub.BeddingAngle); + Assert.AreEqual(0, stub.D70); + Assert.AreEqual(0, stub.D70Mean); + Assert.AreEqual(0, stub.DAquifer); + Assert.AreEqual(0, stub.DTotal); + Assert.AreEqual(0, stub.DarcyPermeability); + Assert.AreEqual(0, stub.GammaSubParticles); + Assert.AreEqual(0, stub.Gravity); + Assert.AreEqual(0, stub.HExit); + Assert.AreEqual(0, stub.HRiver); + Assert.AreEqual(0, stub.KinematicViscosityWater); + Assert.AreEqual(0, stub.ModelFactorPiping); + Assert.AreEqual(0, stub.Rc); + Assert.AreEqual(0, stub.SeepageLength); + Assert.AreEqual(0, stub.VolumetricWeightOfWater); + Assert.AreEqual(0, stub.WhitesDragCoefficient); + + Assert.AreEqual(0, stub.FoSp); + Assert.AreEqual(0, stub.Zp); + } + + [Test] + public void Validate_Always_EmptyList() + { + // Setup + var stub = new SellmeijerCalculatorStub(); + + // Call + var result = stub.Validate(); + + // Assert + Assert.IsEmpty(result); + } + + [Test] + public void Calculate_Always_DoesNotThrow() + { + // Setup + var stub = new SellmeijerCalculatorStub(); + + // Call + TestDelegate call = () => stub.Calculate(); + + // Assert + Assert.DoesNotThrow(call); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/TestPipingSubCalculatorFactoryTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/TestPipingSubCalculatorFactoryTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/TestPipingSubCalculatorFactoryTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,89 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.SubCalculator; +using Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.Test.SubCalculator +{ + [TestFixture] + public class TestPipingSubCalculatorFactoryTest + { + [Test] + public void DefaultConstructor_SetDefaultProperties() + { + // Call + var factory = new TestPipingSubCalculatorFactory(); + + // Assert + Assert.IsInstanceOf(factory); + Assert.IsNull(factory.LastCreatedEffectiveThicknessCalculator); + Assert.IsNull(factory.LastCreatedUpliftCalculator); + Assert.IsNull(factory.LastCreatedSellmeijerCalculator); + Assert.IsNull(factory.LastCreatedHeaveCalculator); + } + + [Test] + public void CreateEffectiveThicknessCalculator_Always_LastCreatedEffectiveThicknessCalculatorSetToReturnValue() + { + // Setup + var factory = new TestPipingSubCalculatorFactory(); + + // Call + var subCalculator = factory.CreateEffectiveThicknessCalculator(); + + // Assert + Assert.AreSame(factory.LastCreatedEffectiveThicknessCalculator, subCalculator); + } + + [Test] + public void CreateUpliftCalculator_Always_LastCreatedUpliftCalculatorSetToReturnValue() + { + // Setup + var factory = new TestPipingSubCalculatorFactory(); + + // Call + var subCalculator = factory.CreateUpliftCalculator(); + + // Assert + Assert.AreSame(factory.LastCreatedUpliftCalculator, subCalculator); + } + + [Test] + public void CreateHeaveCalculator_Always_LastCreatedHeaveCalculatorSetToReturnValue() + { + // Setup + var factory = new TestPipingSubCalculatorFactory(); + + // Call + var subCalculator = factory.CreateHeaveCalculator(); + + // Assert + Assert.AreSame(factory.LastCreatedHeaveCalculator, subCalculator); + } + + [Test] + public void CreateSellmeijerCalculator_Always_LastCreatedSellmeijerCalculatorSetToReturnValue() + { + // Setup + var factory = new TestPipingSubCalculatorFactory(); + + // Call + var subCalculator = factory.CreateSellmeijerCalculator(); + + // Assert + Assert.AreSame(factory.LastCreatedSellmeijerCalculator, subCalculator); + } + + [Test] + public void CreatePiezometricHeadAtExitCalculator_Always_LastCreatedPiezometricHeadAtExitSetToReturnValue() + { + // Setup + var factory = new TestPipingSubCalculatorFactory(); + + // Call + var subCalculator = factory.CreatePiezometricHeadAtExitCalculator(); + + // Assert + Assert.AreSame(factory.LastCreatedPiezometricHeadAtExitCalculator, subCalculator); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/UpliftCalculatorStubTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/UpliftCalculatorStubTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/SubCalculator/UpliftCalculatorStubTest.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,55 @@ +using NUnit.Framework; +using Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.Test.SubCalculator +{ + [TestFixture] + public class UpliftCalculatorStubTest + { + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Call + var stub = new UpliftCalculatorStub(); + + // Assert + Assert.AreEqual(0, stub.EffectiveStress); + Assert.AreEqual(0, stub.HExit); + Assert.AreEqual(0, stub.HRiver); + Assert.AreEqual(0, stub.ModelFactorUplift); + Assert.AreEqual(0, stub.PhiExit); + Assert.AreEqual(0, stub.PhiPolder); + Assert.AreEqual(0, stub.RExit); + Assert.AreEqual(0, stub.VolumetricWeightOfWater); + + Assert.AreEqual(0, stub.FoSu); + Assert.AreEqual(0, stub.Zu); + } + + [Test] + public void Validate_Always_EmptyList() + { + // Setup + var stub = new UpliftCalculatorStub(); + + // Call + var result = stub.Validate(); + + // Assert + Assert.IsEmpty(result); + } + + [Test] + public void Calculate_Always_DoesNotThrow() + { + // Setup + var stub = new UpliftCalculatorStub(); + + // Call + TestDelegate call = () => stub.Calculate(); + + // Assert + Assert.DoesNotThrow(call); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/packages.config =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/packages.config (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil.Test/packages.config (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Properties/AssemblyInfo.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,13 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Piping.KernelWrapper.TestUtil")] +[assembly: AssemblyProduct("Ringtoets.Piping.KernelWrapper.TestUtil")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ea719e81-b4d3-44bb-a184-c75224f6cb56")] \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Ringtoets.Piping.KernelWrapper.TestUtil.csproj =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Ringtoets.Piping.KernelWrapper.TestUtil.csproj (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/Ringtoets.Piping.KernelWrapper.TestUtil.csproj (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,93 @@ + + + + + Debug + x86 + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} + Library + Properties + Ringtoets.Piping.KernelWrapper.TestUtil + Ringtoets.Piping.KernelWrapper.TestUtil + v4.0 + 512 + + + true + bin\Debug\ + 4 + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + 4 + TRACE + true + none + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\ReleaseForCodeCoverage\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + False + ..\..\..\..\lib\Plugins\Wti\Deltares.WTIPiping.dll + + + + + + + + + + + + + + + + + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + + + {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} + Ringtoets.HydraRing.Data + + + {ce994cc9-6f6a-48ac-b4be-02c30a21f4db} + Ringtoets.Piping.Data + + + {d64e4f0e-e341-496f-82b2-941ad202b4e3} + Ringtoets.Piping.KernelWrapper + + + + + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/EffectiveThicknessCalculatorStub.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/EffectiveThicknessCalculatorStub.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/EffectiveThicknessCalculatorStub.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,18 @@ +using Deltares.WTIPiping; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + public class EffectiveThicknessCalculatorStub : IEffectiveThicknessCalculator { + public double ExitPointXCoordinate { get; set; } + public double PhreaticLevel { get; set; } + public double VolumicWeightOfWater { get; set; } + public PipingProfile SoilProfile { get; set; } + public PipingSurfaceLine SurfaceLine { get; set; } + public double EffectiveHeight { get; private set; } + public double EffectiveStress { get; private set; } + public void Calculate() + { + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/HeaveCalculatorStub.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/HeaveCalculatorStub.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/HeaveCalculatorStub.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + /// + /// Stub for the real heave sub calculator of piping. + /// + public class HeaveCalculatorStub : IHeaveCalculator { + public double DTotal { get; set; } + public double HExit { get; set; } + public double Ich { get; set; } + public double PhiExit { get; set; } + public double PhiPolder { get; set; } + public double RExit { get; set; } + public double Zh { get; private set; } + public double FoSh { get; private set; } + public void Calculate() + { + } + + public List Validate() + { + return new List(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/PiezoHeadCalculatorStub.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/PiezoHeadCalculatorStub.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/PiezoHeadCalculatorStub.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,17 @@ +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + /// + /// Stub for the real piezometric head at exit sub calculator of piping. + /// + public class PiezoHeadCalculatorStub : IPiezoHeadCalculator { + public double PhiPolder { get; set; } + public double RExit { get; set; } + public double HRiver { get; set; } + public double PhiExit { get; private set; } + public void Calculate() + { + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/SellmeijerCalculatorStub.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/SellmeijerCalculatorStub.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/SellmeijerCalculatorStub.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + /// + /// Stub for the real Sellmeijer sub calculator of piping. + /// + public class SellmeijerCalculatorStub : ISellmeijerCalculator { + public double BeddingAngle { get; set; } + public double D70 { get; set; } + public double D70Mean { get; set; } + public double DAquifer { get; set; } + public double DarcyPermeability { get; set; } + public double DTotal { get; set; } + public double GammaSubParticles { get; set; } + public double Gravity { get; set; } + public double HExit { get; set; } + public double HRiver { get; set; } + public double KinematicViscosityWater { get; set; } + public double ModelFactorPiping { get; set; } + public double Rc { get; set; } + public double SeepageLength { get; set; } + public double VolumetricWeightOfWater { get; set; } + public double WhitesDragCoefficient { get; set; } + public double Zp { get; private set; } + public double FoSp { get; private set; } + public void Calculate() + { + } + + public List Validate() + { + return new List(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/TestPipingSubCalculatorFactory.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/TestPipingSubCalculatorFactory.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/TestPipingSubCalculatorFactory.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,47 @@ +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + /// + /// This class allows for retrieving the created sub calculators, so that + /// tests can be performed upon them. + /// + public class TestPipingSubCalculatorFactory : IPipingSubCalculatorFactory + { + public IUpliftCalculator CreateUpliftCalculator() + { + LastCreatedUpliftCalculator = new UpliftCalculatorStub(); + return LastCreatedUpliftCalculator; + } + + public IHeaveCalculator CreateHeaveCalculator() + { + LastCreatedHeaveCalculator = new HeaveCalculatorStub(); + return LastCreatedHeaveCalculator; + } + + public ISellmeijerCalculator CreateSellmeijerCalculator() + { + LastCreatedSellmeijerCalculator = new SellmeijerCalculatorStub(); + return LastCreatedSellmeijerCalculator; + } + + public IEffectiveThicknessCalculator CreateEffectiveThicknessCalculator() + { + LastCreatedEffectiveThicknessCalculator = new EffectiveThicknessCalculatorStub(); + return LastCreatedEffectiveThicknessCalculator; + } + + public IPiezoHeadCalculator CreatePiezometricHeadAtExitCalculator() + { + LastCreatedPiezometricHeadAtExitCalculator = new PiezoHeadCalculatorStub(); + return LastCreatedPiezometricHeadAtExitCalculator; + } + + public EffectiveThicknessCalculatorStub LastCreatedEffectiveThicknessCalculator { get; private set; } + public UpliftCalculatorStub LastCreatedUpliftCalculator { get; private set; } + public SellmeijerCalculatorStub LastCreatedSellmeijerCalculator { get; private set; } + public HeaveCalculatorStub LastCreatedHeaveCalculator { get; private set; } + public PiezoHeadCalculatorStub LastCreatedPiezometricHeadAtExitCalculator { get; private set; } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/SubCalculator/UpliftCalculatorStub.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using Ringtoets.Piping.KernelWrapper.SubCalculator; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil.SubCalculator +{ + /// + /// Stub for the real uplift sub calculator of piping. + /// + public class UpliftCalculatorStub : IUpliftCalculator { + public double EffectiveStress { get; set; } + public double HExit { get; set; } + public double HRiver { get; set; } + public double ModelFactorUplift { get; set; } + public double PhiExit { get; set; } + public double PhiPolder { get; set; } + public double RExit { get; set; } + public double VolumetricWeightOfWater { get; set; } + public double Zu { get; private set; } + public double FoSu { get; private set; } + public void Calculate() + { + } + + public List Validate() + { + return new List(); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,131 @@ +using System; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil +{ + public class TestPipingInput + { + private readonly Random random = new Random(22); + public double WaterVolumetricWeight; + public double SaturatedVolumicWeightOfCoverageLayer; + public double UpliftModelFactor; + public RoundedDouble AssessmentLevel; + public RoundedDouble PiezometricHeadExit; + public double DampingFactorExit; + public double PhreaticLevelExit; + public double CriticalHeaveGradient; + public double ThicknessCoverageLayer; + public double SellmeijerModelFactor; + public double SellmeijerReductionFactor; + public double SeepageLength; + public double SandParticlesVolumicWeight; + public double WhitesDragCoefficient; + public double Diameter70; + public double DarcyPermeability; + public double WaterKinematicViscosity; + public double Gravity; + public RoundedDouble ExitPointXCoordinate; + public double BeddingAngle; + public double MeanDiameter70; + public double ThicknessAquiferLayer; + public RingtoetsPipingSurfaceLine SurfaceLine; + public PipingSoilProfile SoilProfile; + private double last; + + public TestPipingInput() + { + WaterVolumetricWeight = NextIncrementalDouble(); + SaturatedVolumicWeightOfCoverageLayer = NextIncrementalDouble(); + UpliftModelFactor = NextIncrementalDouble(); + AssessmentLevel = (RoundedDouble) NextIncrementalDouble(); + PiezometricHeadExit = (RoundedDouble) NextIncrementalDouble(); + PhreaticLevelExit = NextIncrementalDouble(); + DampingFactorExit = NextIncrementalDouble(); + CriticalHeaveGradient = NextIncrementalDouble(); + ThicknessCoverageLayer = NextIncrementalDouble(); + SellmeijerModelFactor = NextIncrementalDouble(); + SellmeijerReductionFactor = NextIncrementalDouble(); + SeepageLength = NextIncrementalDouble(); + SandParticlesVolumicWeight = NextIncrementalDouble(); + WhitesDragCoefficient = NextIncrementalDouble(); + Diameter70 = NextIncrementalDouble(); + DarcyPermeability = NextIncrementalDouble(); + WaterKinematicViscosity = NextIncrementalDouble(); + Gravity = NextIncrementalDouble(); + ExitPointXCoordinate = (RoundedDouble) 0.5; + BeddingAngle = NextIncrementalDouble(); + MeanDiameter70 = NextIncrementalDouble(); + ThicknessAquiferLayer = NextIncrementalDouble(); + SurfaceLine = CreateValidSurfaceLine(); + SoilProfile = CreateValidSoilProfile(); + } + + /// + /// Returns the current set value as a + /// + public PipingCalculatorInput AsRealInput() + { + return new PipingCalculatorInput( + WaterVolumetricWeight, + SaturatedVolumicWeightOfCoverageLayer, + UpliftModelFactor, + AssessmentLevel, + PiezometricHeadExit, + DampingFactorExit, + PhreaticLevelExit, + CriticalHeaveGradient, + ThicknessCoverageLayer, + SellmeijerModelFactor, + SellmeijerReductionFactor, + SeepageLength, + SandParticlesVolumicWeight, + WhitesDragCoefficient, + Diameter70, + DarcyPermeability, + WaterKinematicViscosity, + Gravity, + ThicknessAquiferLayer, + MeanDiameter70, + BeddingAngle, + ExitPointXCoordinate, + SurfaceLine, + SoilProfile); + } + + private PipingSoilProfile CreateValidSoilProfile() + { + return new PipingSoilProfile(String.Empty, -2, new[] + { + new PipingSoilLayer(9), + new PipingSoilLayer(4) + { + IsAquifer = true + }, + new PipingSoilLayer(2), + new PipingSoilLayer(-1), + }, 1234L); + } + + private RingtoetsPipingSurfaceLine CreateValidSurfaceLine() + { + var ringtoetsPipingSurfaceLine = new RingtoetsPipingSurfaceLine(); + ringtoetsPipingSurfaceLine.SetGeometry(new[] + { + new Point3D(0, 0, 2), + new Point3D(1, 0, 8), + new Point3D(2, 0, -1) + }); + return ringtoetsPipingSurfaceLine; + } + + /// + /// The returned double is sure to be different from the last time it was called. + /// + private double NextIncrementalDouble() + { + return last += random.NextDouble() + 1e-6; + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingOutput.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingOutput.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingOutput.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,9 @@ +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil +{ + public class TestPipingOutput : PipingOutput + { + public TestPipingOutput() : base(0, 0, 0, 0, 0, 0) {} + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingSoilProfile.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingSoilProfile.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingSoilProfile.cs (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,26 @@ +using System.Collections.ObjectModel; +using Ringtoets.Piping.Data; + +namespace Ringtoets.Piping.KernelWrapper.TestUtil +{ + public class TestPipingSoilProfile : PipingSoilProfile + { + /// + /// Creates a new instance of , which is a + /// which has: + /// + /// set to + /// set to 0.0 + /// set to a collection with a single + /// with set to 0.0. + /// + /// + public TestPipingSoilProfile() : base("", 0.0, new Collection + { + new PipingSoilLayer(0.0) + { + IsAquifer = true + } + }, 0) {} + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/packages.config =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/packages.config (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/packages.config (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj (.../Ringtoets.Piping.Service.Test.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/Ringtoets.Piping.Service.Test.csproj (.../Ringtoets.Piping.Service.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -86,7 +86,7 @@ {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} Ringtoets.HydraRing.Data - + {D64E4F0E-E341-496F-82B2-941AD202B4E3} Ringtoets.Piping.KernelWrapper @@ -98,7 +98,7 @@ {CE994CC9-6F6A-48AC-B4BE-02C30A21F4DB} Ringtoets.Piping.Data - + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} Ringtoets.Piping.KernelWrapper.TestUtil Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil.Test/Ringtoets.Piping.Service.TestUtil.Test.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil.Test/Ringtoets.Piping.Service.TestUtil.Test.csproj (.../Ringtoets.Piping.Service.TestUtil.Test.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil.Test/Ringtoets.Piping.Service.TestUtil.Test.csproj (.../Ringtoets.Piping.Service.TestUtil.Test.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -52,15 +52,15 @@ - + {D64E4F0E-E341-496F-82B2-941AD202B4E3} Ringtoets.Piping.KernelWrapper {10B8D63D-87E8-46DF-ACA9-A8CF22EE8FB5} Ringtoets.Piping.Service - + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} Ringtoets.Piping.KernelWrapper.TestUtil Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil/Ringtoets.Piping.Service.TestUtil.csproj =================================================================== diff -u -r65ea41e01d41d77df1e30bf8e850a44de46e870f -rc2fe76d04e1517a4e0aaf62184bccd413de0e472 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil/Ringtoets.Piping.Service.TestUtil.csproj (.../Ringtoets.Piping.Service.TestUtil.csproj) (revision 65ea41e01d41d77df1e30bf8e850a44de46e870f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.TestUtil/Ringtoets.Piping.Service.TestUtil.csproj (.../Ringtoets.Piping.Service.TestUtil.csproj) (revision c2fe76d04e1517a4e0aaf62184bccd413de0e472) @@ -50,15 +50,15 @@ - + {D64E4F0E-E341-496F-82B2-941AD202B4E3} Ringtoets.Piping.KernelWrapper {10B8D63D-87E8-46DF-ACA9-A8CF22EE8FB5} Ringtoets.Piping.Service - + {27E0A5C9-3ABF-426A-A3DA-7D0B83A218C8} Ringtoets.Piping.KernelWrapper.TestUtil