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;
using Deltares.DamEngine.Data.Geotechnics;
namespace Deltares.DamEngine.Calculators.KernelWrappers.Common
{
///
/// Helper for Pl Lines
///
public class PlLinesHelper
{
///
/// Creates the pl lines.
///
/// The location.
/// The soil profile.
/// The water level.
///
public static PLLines CreatePlLines(Location location, SoilProfile1D soilProfile, double waterLevel)
{
var plLineCreator = new PLLinesCreator
{
WaterLevelRiverHigh = waterLevel,
SurfaceLine = location.SurfaceLine,
WaterLevelPolder = location.PolderLevel,
HeadInPLLine2 = location.HeadPl2,
HeadInPLLine3 = location.HeadPl3,
HeadInPLLine4 = location.HeadPl4,
ModelParametersForPLLines = location.ModelParametersForPLLines,
SoilProfile = soilProfile,
GaugePLLines = null, // TODO: Operational
Gauges = null, // TODO: Operational
IsAdjustPL3AndPL4SoNoUpliftWillOccurEnabled = false, // for piping this must be set to false
PlLineOffsetBelowDikeTopAtRiver = location.PlLineOffsetBelowDikeTopAtRiver,
PlLineOffsetBelowDikeTopAtPolder = location.PlLineOffsetBelowDikeTopAtPolder,
DikeEmbankmentMaterial = location.GetDikeEmbankmentSoil(),
IsHydraulicShortcut = false, // TODO: Regional
XSoilGeometry2DOrigin = location.XSoilGeometry2DOrigin
};
return plLineCreator.CreateAllPLLines(location);
}
}
}