/// <summary> /// Calculates the safety factor and sets additional result in the lists. /// </summary> /// <param name="inNMM">The acting forces.</param> /// <param name="concreteStresses"> /// Reference to modify object. The list is set after safety factor calculation. Includes stresses on every corner of the cross section. /// </param> /// <param name="steelStresses"> /// Reference to modify object. The list is set after safety factor calculation. Includes stresses on every rebar. /// </param> /// <returns>Safety factor. Resistance forces to acting forces ratio.</returns> public double SafetyFactor(InternalForcesContainer inNMM, ref List <double> concreteStresses, ref List <double> steelStresses) { double safetyFactor = SafetyFactor(inNMM); int no = solverGeometry.Count; double stress = 0; for (int i = 0; i < no; i++) { stress = solver.GetStress(Autodesk.CodeChecking.Concrete.ResultType.Concrete, i); concreteStresses.Add(stress); } no = solver.GetRebars().Count; for (int i = 0; i < no; i++) { stress = solver.GetStress(Autodesk.CodeChecking.Concrete.ResultType.Rebars, i); steelStresses.Add(stress); } return(safetyFactor); }