private void CreateData(object d) { RiverSimulationProfile.TwoInOne o = d as RiverSimulationProfile.TwoInOne; RiverSimulationProfile.TwoInOne _d = null; Debug.Assert(o != null); if (formType == FormType.FlowQuantity || formType == FormType.WaterLevel) { _data = new RiverSimulationProfile.TwoInOne(d as RiverSimulationProfile.TwoInOne); _d = _data as RiverSimulationProfile.TwoInOne; Debug.Assert(_d != null); if (o.ValueNull() || o.ArrayNull() || (o.valueType == RiverSimulationProfile.TwoInOne.ValueType.TwoDim && (o.Value2D().GetLength(0) != colCount || o.Value2D().GetLength(1) != rowCount)) || (o.valueType == RiverSimulationProfile.TwoInOne.ValueType.ThreeDim && (o.Value3D().GetLength(0) != colCount || o.Value3D().GetLength(1) != rowCount))) { //rowCount : Q1 ~ Q5, colCount : J1 ~ J15 //_data = new RiverSimulationProfile.TwoInOne(colCount, rowCount); _d.Create2D(colCount, rowCount); _d.type = RiverSimulationProfile.TwoInOne.Type.UseValue; } } else if (formType == FormType.BottomBedLoadFlux) { _data = new RiverSimulationProfile.TwoInOne(d as RiverSimulationProfile.TwoInOne); _d = _data as RiverSimulationProfile.TwoInOne; Debug.Assert(_d != null); if (o.ValueNull() || o.ArrayNull()) { //rowCount : Q1 ~ Q5, colCount : J1 ~ J15 // _data = new RiverSimulationProfile.TwoInOne(p.boundaryTimeNumber, p.sedimentParticlesNumber, p.inputGrid.GetJ); //[T, K, J] //_data = new RiverSimulationProfile.TwoInOne(p.sedimentParticlesNumber, p.inputGrid.GetJ, p.boundaryTimeNumber); //[K, J, T] //_d.Create3D(p.sedimentParticlesNumber, p.inputGrid.GetJ, p.boundaryTimeNumber); _d.Create3D(p.sedimentParticlesNumber, p.inputGrid.GetJ, rowCount); _d.type = RiverSimulationProfile.TwoInOne.Type.UseValue; } } else if (formType == FormType.DepthAverageConcentration) { _data = new RiverSimulationProfile.TwoInOne(d as RiverSimulationProfile.TwoInOne); _d = _data as RiverSimulationProfile.TwoInOne; Debug.Assert(_d != null); if (o.ValueNull() || o.ArrayNull()) { //rowCount : Q1 ~ Q5, colCount : J1 ~ J15 _d.Create3D(p.sedimentParticlesNumber, p.inputGrid.GetJ, p.inputGrid.GetI); } } }