public sPointLoad DuplicatePointLoad()
        {
            sPointLoad newload = new sPointLoad();

            newload.location        = this.location;
            newload.loadingBeamName = this.loadingBeamName;
            if (this.forceVector != null)
            {
                newload.forceVector = this.forceVector;
            }
            if (this.momentVector != null)
            {
                newload.momentVector = this.momentVector;
            }
            newload.loadingDirection = this.loadingDirection;
            newload.loadPatternName  = this.loadPatternName;
            return(newload);
        }
        public List <sPointLoad> GetCorrespondingFactoredPointLoads(List <sPointLoad> loadAll)
        {
            List <sPointLoad> factored = new List <sPointLoad>();

            foreach (sPointLoad pl in loadAll)
            {
                for (int i = 0; i < this.patterns.Count; ++i)
                {
                    if (this.patterns[i] == pl.loadPatternName)
                    {
                        sPointLoad factoredLoad = pl.DuplicatePointLoad();
                        if (factoredLoad.forceVector != null)
                        {
                            factoredLoad.forceVector *= this.factors[i];
                        }
                        factored.Add(factoredLoad);
                        break;
                    }
                }
            }

            return(factored);
        }
Beispiel #3
0
        public void UpdatePointElement(sPointLoad pl)
        {
            if (this.pointLoads == null && this.pointLoads.Count == 0)
            {
                this.pointLoads = new List <sPointLoad>();
            }

            int count = 0;

            foreach (sPointLoad epl in this.pointLoads)
            {
                if (epl.loadPatternName == pl.loadPatternName)
                {
                    count++;
                    epl.forceVector += pl.forceVector;

                    //moment?...
                }
            }
            if (count == 0)
            {
                this.pointLoads.Add(pl);
            }
        }
Beispiel #4
0
 public void UpdatePointLoadByPatternFactor_LinearAdditive(string pattern, double factor, ref sPointLoad comboLoad)
 {
     foreach (sPointLoad pl in this.pointLoads)
     {
         if (pl.loadPatternName == pattern)
         {
             if (pl.forceVector != null && pl.forceVector.GetLength() > 0)
             {
                 if (comboLoad.forceVector == null)
                 {
                     comboLoad.forceVector = sXYZ.Zero();
                 }
                 comboLoad.forceVector += pl.forceVector * factor;
             }
             if (pl.momentVector != null && pl.momentVector.GetLength() > 0)
             {
                 if (comboLoad.momentVector == null)
                 {
                     comboLoad.momentVector = sXYZ.Zero();
                 }
                 comboLoad.momentVector += pl.momentVector * factor;
             }
         }
     }
 }