Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsagh-366 #536

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions GsaGH/Parameters/5_Results/GsaNodeDisplacements.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 {
public class GsaNodeDisplacements {
internal Dictionary<string, GsaResultsValues> ACaseResultValues { get; private set; }
= new Dictionary<string, GsaResultsValues>();

internal void AddAnalysisCaseValues(string nodelist, GsaResultsValues values) {
ACaseResultValues.Add(nodelist, values);
}
}
}
10 changes: 5 additions & 5 deletions GsaGH/Parameters/5_Results/GsaResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,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 GsaNodeDisplacements AnalysisCaseNodeDisplacements { get; set; }
= new GsaNodeDisplacements();
/// <summary>
/// Analysis Case Node Footfall Result VALUES Dictionary
/// Append to this dictionary to chache results
Expand Down Expand Up @@ -931,17 +931,17 @@ internal Tuple<List<GsaResultsValues>, List<int>> NodeDisplacementValues(
}

if (Type == CaseType.AnalysisCase) {
if (!ACaseNodeDisplacementValues.ContainsKey(nodelist)) {
if (!AnalysisCaseNodeDisplacements.ACaseResultValues.ContainsKey(nodelist)) {
if (!ACaseNodeResults.ContainsKey(nodelist)) {
ACaseNodeResults.Add(nodelist, AnalysisCaseResult.NodeResults(nodelist));
}

ACaseNodeDisplacementValues.Add(nodelist,
AnalysisCaseNodeDisplacements.AddAnalysisCaseValues(nodelist,
ResultHelper.GetNodeResultValues(ACaseNodeResults[nodelist], lengthUnit));
}

return new Tuple<List<GsaResultsValues>, List<int>>(new List<GsaResultsValues> {
ACaseNodeDisplacementValues[nodelist],
AnalysisCaseNodeDisplacements.ACaseResultValues[nodelist],
}, Model.Model.Nodes(nodelist).Keys.ToList());
}

Expand Down