From 9894fc5fdd7a7360404d4dc2e3f85ec5d903775d Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 10:29:09 +0200 Subject: [PATCH 1/6] 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()); } From 29703b86ad1d3cbc545db0127ea55c351888ddf2 Mon Sep 17 00:00:00 2001 From: DominikaLos <83698580+DominikaLos@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:42:15 +0200 Subject: [PATCH 2/6] Update GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs Co-authored-by: Kristjan Nielsen --- GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs index 41b85da29..7e9007236 100644 --- a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs +++ b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace GsaGH.Parameters._5_Results { +namespace GsaGH.Parameters { public class GsaNodeDisplacement { internal Dictionary ACaseResultValues { get; private set; } = new Dictionary(); From 9f0834e0a3337e8f85968e3a0aa9a2cc602b36ca Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 10:43:10 +0200 Subject: [PATCH 3/6] gsagh-366 namespaces update --- GsaGH/Parameters/5_Results/GsaResult.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/GsaGH/Parameters/5_Results/GsaResult.cs b/GsaGH/Parameters/5_Results/GsaResult.cs index b42efacd4..279d43f07 100644 --- a/GsaGH/Parameters/5_Results/GsaResult.cs +++ b/GsaGH/Parameters/5_Results/GsaResult.cs @@ -7,7 +7,6 @@ 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; From 22dea2271efe8e32f0be0712aa836c78999576d7 Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 10:43:52 +0200 Subject: [PATCH 4/6] gsagh-366 renaming --- GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs | 2 +- GsaGH/Parameters/5_Results/GsaResult.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs index 7e9007236..d33ab62d0 100644 --- a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs +++ b/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs @@ -9,7 +9,7 @@ public class GsaNodeDisplacement { internal Dictionary ACaseResultValues { get; private set; } = new Dictionary(); - internal void AddACaseValue(string nodelist, GsaResultsValues values) { + internal void AddAnalysisCaseValue(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 279d43f07..413c678d9 100644 --- a/GsaGH/Parameters/5_Results/GsaResult.cs +++ b/GsaGH/Parameters/5_Results/GsaResult.cs @@ -936,7 +936,7 @@ internal Tuple, List> NodeDisplacementValues( ACaseNodeResults.Add(nodelist, AnalysisCaseResult.NodeResults(nodelist)); } - ACaseNodeDisplacementValues.AddACaseValue(nodelist, + ACaseNodeDisplacementValues.AddAnalysisCaseValue(nodelist, ResultHelper.GetNodeResultValues(ACaseNodeResults[nodelist], lengthUnit)); } From d6154bf911f2b9c391de6a2ae70ae87004e4cf78 Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 10:45:28 +0200 Subject: [PATCH 5/6] gsagh-366 fix --- ...{GsaNodeDisplacement.cs => GsaNodeDisplacements.cs} | 2 +- GsaGH/Parameters/5_Results/GsaResult.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename GsaGH/Parameters/5_Results/{GsaNodeDisplacement.cs => GsaNodeDisplacements.cs} (91%) diff --git a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs b/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs similarity index 91% rename from GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs rename to GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs index d33ab62d0..d2d40160b 100644 --- a/GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs +++ b/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; namespace GsaGH.Parameters { - public class GsaNodeDisplacement { + public class GsaNodeDisplacements { internal Dictionary ACaseResultValues { get; private set; } = new Dictionary(); diff --git a/GsaGH/Parameters/5_Results/GsaResult.cs b/GsaGH/Parameters/5_Results/GsaResult.cs index 413c678d9..a4a833b45 100644 --- a/GsaGH/Parameters/5_Results/GsaResult.cs +++ b/GsaGH/Parameters/5_Results/GsaResult.cs @@ -139,8 +139,8 @@ internal Dictionary> /// Append to this dictionary to chache results /// key = elementList /// - internal GsaNodeDisplacement ACaseNodeDisplacementValues { get; set; } - = new GsaNodeDisplacement(); + internal GsaNodeDisplacements AnalysisCaseNodeDisplacements { get; set; } + = new GsaNodeDisplacements(); /// /// Analysis Case Node Footfall Result VALUES Dictionary /// Append to this dictionary to chache results @@ -931,17 +931,17 @@ internal Tuple, List> NodeDisplacementValues( } if (Type == CaseType.AnalysisCase) { - if (!ACaseNodeDisplacementValues.ACaseResultValues.ContainsKey(nodelist)) { + if (!AnalysisCaseNodeDisplacements.ACaseResultValues.ContainsKey(nodelist)) { if (!ACaseNodeResults.ContainsKey(nodelist)) { ACaseNodeResults.Add(nodelist, AnalysisCaseResult.NodeResults(nodelist)); } - ACaseNodeDisplacementValues.AddAnalysisCaseValue(nodelist, + AnalysisCaseNodeDisplacements.AddAnalysisCaseValue(nodelist, ResultHelper.GetNodeResultValues(ACaseNodeResults[nodelist], lengthUnit)); } return new Tuple, List>(new List { - ACaseNodeDisplacementValues.ACaseResultValues[nodelist], + AnalysisCaseNodeDisplacements.ACaseResultValues[nodelist], }, Model.Model.Nodes(nodelist).Keys.ToList()); } From a750fb2ceba76fa0da80b34964cb6d16d3a1299b Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Oct 2023 12:32:14 +0200 Subject: [PATCH 6/6] gsagh-366 rename --- GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs | 2 +- GsaGH/Parameters/5_Results/GsaResult.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs b/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs index d2d40160b..c9ae36b9d 100644 --- a/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs +++ b/GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs @@ -9,7 +9,7 @@ public class GsaNodeDisplacements { internal Dictionary ACaseResultValues { get; private set; } = new Dictionary(); - internal void AddAnalysisCaseValue(string nodelist, GsaResultsValues values) { + internal void AddAnalysisCaseValues(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 a4a833b45..d76dcc883 100644 --- a/GsaGH/Parameters/5_Results/GsaResult.cs +++ b/GsaGH/Parameters/5_Results/GsaResult.cs @@ -936,7 +936,7 @@ internal Tuple, List> NodeDisplacementValues( ACaseNodeResults.Add(nodelist, AnalysisCaseResult.NodeResults(nodelist)); } - AnalysisCaseNodeDisplacements.AddAnalysisCaseValue(nodelist, + AnalysisCaseNodeDisplacements.AddAnalysisCaseValues(nodelist, ResultHelper.GetNodeResultValues(ACaseNodeResults[nodelist], lengthUnit)); }