From 9894fc5fdd7a7360404d4dc2e3f85ec5d903775d Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 10:29:09 +0200 Subject: [PATCH] gsagh-366 step1 --- .../Parameters/5_Results/GsaNodeDisplacement.cs | 16 ++++++++++++++++ GsaGH/Parameters/5_Results/GsaResult.cs | 11 ++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs diff --git a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs new file mode 100644 index 000000000..41b85da29 --- /dev/null +++ b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GsaGH.Parameters._5_Results { + public class GsaNodeDisplacement { + internal Dictionary ACaseResultValues { get; private set; } + = new Dictionary(); + + internal void AddACaseValue(string nodelist, GsaResultsValues values) { + ACaseResultValues.Add(nodelist, values); + } + } +} diff --git a/GsaGH/Parameters/5_Results/GsaResult.cs b/GsaGH/Parameters/5_Results/GsaResult.cs index c2ebc201f..b42efacd4 100644 --- a/GsaGH/Parameters/5_Results/GsaResult.cs +++ b/GsaGH/Parameters/5_Results/GsaResult.cs @@ -7,6 +7,7 @@ using GsaAPI; using GsaGH.Helpers; using GsaGH.Helpers.GsaApi; +using GsaGH.Parameters._5_Results; using OasysUnits.Units; using Rhino.Geometry; using EnergyUnit = OasysUnits.Units.EnergyUnit; @@ -139,8 +140,8 @@ internal Dictionary> /// Append to this dictionary to chache results /// key = elementList /// - internal Dictionary ACaseNodeDisplacementValues { get; set; } - = new Dictionary(); + internal GsaNodeDisplacement ACaseNodeDisplacementValues { get; set; } + = new GsaNodeDisplacement(); /// /// Analysis Case Node Footfall Result VALUES Dictionary /// Append to this dictionary to chache results @@ -931,17 +932,17 @@ internal Tuple, List> NodeDisplacementValues( } if (Type == CaseType.AnalysisCase) { - if (!ACaseNodeDisplacementValues.ContainsKey(nodelist)) { + if (!ACaseNodeDisplacementValues.ACaseResultValues.ContainsKey(nodelist)) { if (!ACaseNodeResults.ContainsKey(nodelist)) { ACaseNodeResults.Add(nodelist, AnalysisCaseResult.NodeResults(nodelist)); } - ACaseNodeDisplacementValues.Add(nodelist, + ACaseNodeDisplacementValues.AddACaseValue(nodelist, ResultHelper.GetNodeResultValues(ACaseNodeResults[nodelist], lengthUnit)); } return new Tuple, List>(new List { - ACaseNodeDisplacementValues[nodelist], + ACaseNodeDisplacementValues.ACaseResultValues[nodelist], }, Model.Model.Nodes(nodelist).Keys.ToList()); }