Ejemplo n.º 1
0
        private void AddToBuffer(int TimeStep, PhreaticPotentialData PC)
        {
            if (AccessList.Count > DFS3.MaxEntriesInBuffer)
            {
                _bufferedData.Remove(AccessList.First());
                AccessList.RemoveFirst();
            }

            _bufferedData.Add(TimeStep, PC);
        }
Ejemplo n.º 2
0
    private void AddToBuffer(int TimeStep, PhreaticPotentialData PC)
    {
      if (AccessList.Count > DFS3.MaxEntriesInBuffer)
      {
        _bufferedData.Remove(AccessList.First());
        AccessList.RemoveFirst();
      }

      _bufferedData.Add(TimeStep, PC);

    }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns the phreatic potential.
 /// Note that it returns a reference to a matrix
 /// </summary>
 /// <param name="TimeStep"></param>
 /// <returns></returns>
 public IMatrix3d TimeData(int TimeStep)
 {
   PhreaticPotentialData PC;
   lock (_lock)
   {
     if (!_bufferedData.TryGetValue(TimeStep, out PC))
     {
       count++;
       PC = new PhreaticPotentialData(_potential.TimeData(TimeStep), _bottomOfCell.Data, _thicknessOfCell.Data, _phreaticFactor, _deleteValue);
       AccessList.AddLast(TimeStep);
       AddToBuffer(TimeStep, PC);
     }
   AccessList.Remove(TimeStep);
   AccessList.AddLast(TimeStep);
   }
   return PC;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns the phreatic potential.
        /// Note that it returns a reference to a matrix
        /// </summary>
        /// <param name="TimeStep"></param>
        /// <returns></returns>
        public IMatrix3d TimeData(int TimeStep)
        {
            PhreaticPotentialData PC;

            lock (_lock)
            {
                if (!_bufferedData.TryGetValue(TimeStep, out PC))
                {
                    count++;
                    PC = new PhreaticPotentialData(_potential.TimeData(TimeStep), _bottomOfCell.Data, _thicknessOfCell.Data, _phreaticFactor, _deleteValue);
                    AccessList.AddLast(TimeStep);
                    AddToBuffer(TimeStep, PC);
                }
                AccessList.Remove(TimeStep);
                AccessList.AddLast(TimeStep);
            }
            return(PC);
        }