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

gsagh-366 #536

wants to merge 6 commits into from

Conversation

DominikaLos
Copy link
Collaborator

No description provided.

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) {

@@ -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

@@ -139,8 +140,8 @@ public class GsaResult {
/// 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; }

using System.Threading.Tasks;

namespace GsaGH.Parameters._5_Results {
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

Comment on lines 934 to 947
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

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

internal void AddAnalysisCaseValue(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 AddAnalysisCaseValue(string nodelist, GsaResultsValues values) {
internal void AddAnalysisCaseValues(string nodelist, GsaResultsValues values) {

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #536 (a750fb2) into main (e807abf) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #536   +/-   ##
=====================================
  Coverage   89.9%   89.9%           
=====================================
  Files        296     297    +1     
  Lines      28277   28281    +4     
=====================================
+ Hits       25430   25434    +4     
  Misses      2847    2847           
Files Coverage Δ
GsaGH/Parameters/5_Results/GsaNodeDisplacements.cs 100.0% <100.0%> (ø)
GsaGH/Parameters/5_Results/GsaResult.cs 95.7% <100.0%> (ø)

@DominikaLos DominikaLos deleted the task/gsagh-366_Refactoring_gsaResults branch October 20, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants