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 1 commit
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/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 {
DominikaLos marked this conversation as resolved.
Show resolved Hide resolved
public class GsaNodeDisplacement {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class GsaNodeDisplacement {
public class GsaNodeDisplacements {

File name should be changed as well

internal Dictionary<string, GsaResultsValues> ACaseResultValues { get; private set; }
= new Dictionary<string, GsaResultsValues>();

internal void AddACaseValue(string nodelist, GsaResultsValues values) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
internal void AddACaseValue(string nodelist, GsaResultsValues values) {
internal void AddAnalysisCaseValues(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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment above

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; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
internal GsaNodeDisplacement ACaseNodeDisplacementValues { get; set; }
internal GsaNodeDisplacement AnalysisCaseNodeDisplacements { 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());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this to a method in the new class?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a 1 step I suppose


Expand Down