Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs =================================================================== diff -u -r1081 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1081) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1082) @@ -331,31 +331,11 @@ surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; var shoulderDesign = new ShoulderDesign( upliftLocationAndResult.X - surfaceLine.GetDikeToeInward().X, - currentShoulderHeight + CalculateExtraShoulderHeight(soilProfile, plLines, upliftLocationAndResult, upliftCriterion)); + currentShoulderHeight + ShoulderDesignHelper.CalculateExtraShoulderHeight(soilProfile, plLines, upliftLocationAndResult, upliftCriterion)); return shoulderDesign; } } return null; } - - private double CalculateExtraShoulderHeight(SoilProfile1D soilProfile, PLLines plLines, UpliftLocationAndResult upliftLocationAndResult, double upliftCriterion) - { - var calculator = new UpliftCalculator(); - calculator.SoilProfile = soilProfile; - calculator.SurfaceLevel = upliftLocationAndResult.Z; - calculator.PhreaticLevel = plLines.Lines[PLLineType.PL1].ZFromX(upliftLocationAndResult.X); - calculator.TopOfLayerToBeEvaluated = soilProfile.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId).TopLevel; - PLLine plLine; - if (upliftLocationAndResult.LayerWhereUpliftOccuresId == soilProfile.BottomAquiferLayer.Name) - { - plLine = plLines.Lines[PLLineType.PL3]; - } - else - { - plLine = plLines.Lines[PLLineType.PL4]; - } - return calculator.CalculateExtraHeight(plLine.ZFromX(upliftLocationAndResult.X), upliftCriterion); - } - } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesign.cs =================================================================== diff -u -r1040 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesign.cs (.../ShoulderDesign.cs) (revision 1040) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesign.cs (.../ShoulderDesign.cs) (revision 1082) @@ -1,8 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +// Copyright (C) Stichting Deltares 2018. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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 Deltares.DamEngine.Calculators.KernelWrappers.Common { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesignHelper.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesignHelper.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesignHelper.cs (revision 1082) @@ -0,0 +1,50 @@ +// Copyright (C) Stichting Deltares 2018. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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.DamEngine.Calculators.Uplift; +using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.General.PlLines; +using Deltares.DamEngine.Data.Geotechnics; + +namespace Deltares.DamEngine.Calculators.KernelWrappers.Common +{ + public class ShoulderDesignHelper + { + public static double CalculateExtraShoulderHeight(SoilProfile1D soilProfile, PLLines plLines, UpliftLocationAndResult upliftLocationAndResult, double upliftCriterion) + { + var calculator = new UpliftCalculator(); + calculator.SoilProfile = soilProfile; + calculator.SurfaceLevel = upliftLocationAndResult.Z; + calculator.PhreaticLevel = plLines.Lines[PLLineType.PL1].ZFromX(upliftLocationAndResult.X); + calculator.TopOfLayerToBeEvaluated = soilProfile.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId).TopLevel; + PLLine plLine; + if (upliftLocationAndResult.LayerWhereUpliftOccuresId == soilProfile.BottomAquiferLayer.Name) + { + plLine = plLines.Lines[PLLineType.PL3]; + } + else + { + plLine = plLines.Lines[PLLineType.PL4]; + } + return calculator.CalculateExtraHeight(plLine.ZFromX(upliftLocationAndResult.X), upliftCriterion); + } + } +} Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs =================================================================== diff -u -r1028 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs (.../UpliftHelper.cs) (revision 1028) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs (.../UpliftHelper.cs) (revision 1082) @@ -1,8 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +// Copyright (C) Stichting Deltares 2018. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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.DamEngine.Calculators.Uplift; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.PlLines; Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs =================================================================== diff -u -r877 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs (.../SoilSurfaceProfile.cs) (revision 877) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs (.../SoilSurfaceProfile.cs) (revision 1082) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Standard; using Deltares.DamEngine.Data.Standard.Validation; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs =================================================================== diff -u -r1081 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 1081) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 1082) @@ -19,11 +19,6 @@ // 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 System.Text; -using System.Threading.Tasks; using Deltares.DamEngine.Calculators.PlLinesCreator; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.PlLines; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r1069 -r1082 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1069) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1082) @@ -59,6 +59,7 @@ +