Пример #1
0
 public void Clear()
 {
     Timeline.Clear();
     IOTimeline.Clear();
     StressPeriods.Clear();
     Initialized = false;
 }
Пример #2
0
        public void InitSP(int[] steps, bool has_steady_state)
        {
            StressPeriods.Clear();
            if (has_steady_state)
            {
                StressPeriod sp = new StressPeriod()
                {
                    ID         = 1,
                    Length     = 1,
                    Multiplier = 1,
                    State      = ModelState.SS
                };
                sp.Dates.Add(this.Start);
                var op = new StepOption(sp.ID, 1);
                sp.StepOptions.Add(op);
                AddSP(sp);
            }

            int start_index = 0;

            for (int i = 0; i < steps.Length; i++)
            {
                StressPeriod sp = new StressPeriod()
                {
                    Length     = steps[i],
                    Multiplier = 1,
                    State      = ModelState.TR
                };
                if (has_steady_state)
                {
                    sp.ID = i + 2;
                }
                else
                {
                    sp.ID = i + 1;
                }
                sp.Dates = Timeline.GetRange(start_index, steps[i]);
                for (int n = 0; n < steps[i]; n++)
                {
                    var op = new StepOption(sp.ID, n + 1);
                    sp.StepOptions.Add(op);
                }
                AddSP(sp);
                start_index += steps[i];
            }
        }