internal PhreaticPotentialData(IMatrix3d Potential, IMatrix3d BottomOfCell, IMatrix3d ThicknessOfCell, double PhreaticFactor, double DeleteValue) { _potential = Potential; _bottomOfCell = BottomOfCell; _thicknessOfCell = ThicknessOfCell; _deletevalue = DeleteValue; _phreaticFactor = PhreaticFactor; }
internal PhreaticPotentialData(IMatrix3d Potential, IMatrix3d BottomOfCell, IMatrix3d ThicknessOfCell, double PhreaticFactor, double DeleteValue) { _potential = Potential; _bottomOfCell = BottomOfCell; _thicknessOfCell = ThicknessOfCell; _deletevalue = DeleteValue; _phreaticFactor = PhreaticFactor; }
/// <summary> /// Sums layers from a DFS3 into a DFS2 /// </summary> /// <param name="OperationData"></param> public static void LayerSummation(XElement OperationData) { string Dfs3File = OperationData.Element("DFS3FileName").Value; string DFS2OutPut = OperationData.Element("DFS2OutputFileName").Value; DFS3.MaxEntriesInBuffer = 1; DFS2.MaxEntriesInBuffer = 1; DFS3 input = new DFS3(Dfs3File); var Items = ParseString(OperationData.Element("Items").Value, 1, input.Items.Count()); var Layers = ParseString(OperationData.Element("Layers").Value, 0, input.NumberOfLayers - 1); DenseMatrix Sumdata = new DenseMatrix(input.NumberOfRows, input.NumberOfColumns); //Create the output file and copy info from input file DFS2 output = new DFS2(DFS2OutPut, Items.Count()); output.CopyFromTemplate(input); int l = 0; //Create the items foreach (int j in Items) { int i = j - 1; output.Items[l].EumItem = input.Items[i].EumItem; output.Items[l].EumUnit = input.Items[i].EumUnit; output.Items[l].Name = input.Items[i].Name; l++; } for (int i = 0; i < input.NumberOfTimeSteps; i++) { foreach (int j in Items) { IMatrix3d data = input.GetData(i, j); Sumdata = data[Layers[0]]; for (int k = 1; k < Layers.Count(); k++) { Sumdata = Sumdata + data[Layers[k]]; } RecreateDeleteValues(data[Layers[0]], Sumdata, input.DeleteValue); output.SetData(i, j, Sumdata); } } input.Dispose(); output.Dispose(); }