Skip to content

Commit

Permalink
gsagh-366 step1
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikaLos committed Oct 5, 2023
1 parent e807abf commit 9894fc5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
16 changes: 16 additions & 0 deletions GsaGH/Parameters/5_Results/GsaNodeDisplacement.cs
Original file line number Diff line number Diff line change
@@ -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<string, GsaResultsValues> ACaseResultValues { get; private set; }
= new Dictionary<string, GsaResultsValues>();

internal void AddACaseValue(string nodelist, GsaResultsValues values) {
ACaseResultValues.Add(nodelist, values);
}
}
}
11 changes: 6 additions & 5 deletions GsaGH/Parameters/5_Results/GsaResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -139,8 +140,8 @@ internal Dictionary<string, ReadOnlyDictionary<int, Element3DResult>>
/// Append to this dictionary to chache results
/// key = elementList
/// </summary>
internal Dictionary<string, GsaResultsValues> ACaseNodeDisplacementValues { get; set; }
= new Dictionary<string, GsaResultsValues>();
internal GsaNodeDisplacement ACaseNodeDisplacementValues { get; set; }
= new GsaNodeDisplacement();
/// <summary>
/// Analysis Case Node Footfall Result VALUES Dictionary
/// Append to this dictionary to chache results
Expand Down Expand Up @@ -931,17 +932,17 @@ internal Tuple<List<GsaResultsValues>, List<int>> 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<GsaResultsValues>, List<int>>(new List<GsaResultsValues> {
ACaseNodeDisplacementValues[nodelist],
ACaseNodeDisplacementValues.ACaseResultValues[nodelist],
}, Model.Model.Nodes(nodelist).Keys.ToList());
}

Expand Down

0 comments on commit 9894fc5

Please sign in to comment.