diff --git a/GSA_Adapter/CRUD/ReadResultsElements.cs b/GSA_Adapter/CRUD/ReadResultsElements.cs index 38eaa71d..cfa64938 100644 --- a/GSA_Adapter/CRUD/ReadResultsElements.cs +++ b/GSA_Adapter/CRUD/ReadResultsElements.cs @@ -38,7 +38,6 @@ using System.Collections.Generic; using System.Linq; using BH.Engine.Adapters.GSA; -using BH.oM.Structure.Results; namespace BH.Adapter.GSA { @@ -219,99 +218,6 @@ private bool GetExtractionParameters(NodeResultRequest request, out ResHeader he /***************************************************/ - private bool GetExtractionParameters(MeshResultRequest request, out ResHeader header, out ForceConverter converter, out string axis, out double unitFactor, out int divisions, out int flags) - { - axis = Output_Axis.Local; - divisions = 0; - flags = 0; - - double[] unitFactors = GetUnitFactors(); - - switch (request.LayerPosition) - { - case -1: - flags = (int)Output_Init_Flags.OP_INIT_2D_BOTTOM; - break; - case 0: - flags = (int)Output_Init_Flags.OP_INIT_2D_MIDDLE; - break; - case 1: - flags = (int)Output_Init_Flags.OP_INIT_2D_TOP; - break; - case 2: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = unitFactors[(int)UnitType.FORCE]; - flags = 0; - Engine.Base.Compute.RecordError("Result of layer position " + request.LayerPosition + " is not yet supported"); - return false; - case 3: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = unitFactors[(int)UnitType.FORCE]; - flags = 0; - Engine.Base.Compute.RecordError("Result of layer position " + request.LayerPosition + " is not yet supported"); - return false; - case 4: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = unitFactors[(int)UnitType.FORCE]; - flags = 0; - Engine.Base.Compute.RecordError("Result of layer position " + request.LayerPosition + " is not yet supported"); - return false; - case 5: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = unitFactors[(int)UnitType.FORCE]; - flags = 0; - Engine.Base.Compute.RecordError("Result of layer position " + request.LayerPosition + " is not yet supported"); - return false; - } - - switch (request.ResultType) - { - case MeshResultType.Forces: - converter = null; - header = ResHeader.REF_FORCE_EL2D_DRV; - unitFactor = unitFactors[(int)UnitType.FORCE]; - Engine.Base.Compute.RecordError("Result of layer position " + request.ResultType + " is not yet supported"); - return false; - case MeshResultType.Displacements: - converter = null; - header = ResHeader.REF_DISP_EL2D; - unitFactor = unitFactors[(int)UnitType.LENGTH]; - Engine.Base.Compute.RecordError("Result of layer position " + request.ResultType + " is not yet supported"); - return false; - case MeshResultType.MeshModeShape: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = 1; - Engine.Base.Compute.RecordError("Result of layer position " + request.ResultType + " is not yet supported"); - return false; - case MeshResultType.Stresses: - converter = Convert.FromGsaMeshStress; - header = ResHeader.REF_STRESS_EL2D_DRV; - unitFactor = unitFactors[(int)UnitType.STRESS]; - break; - case MeshResultType.VonMises: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = 1; - Engine.Base.Compute.RecordError("Result of layer position " + request.ResultType + " is not yet supported"); - return false; - default: - converter = null; - header = ResHeader.REF_ACC; - unitFactor = 1; - Engine.Base.Compute.RecordError("Result of type " + request.ResultType + " is not yet supported"); - return false; - } - - return true; - } - - /***************************************************/ - private bool IGetExtractionParameters(IResultRequest request, out ResHeader header, out ForceConverter converter, out string axis, out double unitFactor, out int divisions, out int flags) { return GetExtractionParameters(request as dynamic, out header, out converter, out axis, out unitFactor, out divisions, out flags); @@ -469,50 +375,6 @@ private List GetAllIds(NodeResultRequest request) } - /***************************************************/ - - private List GetAllIds(MeshResultRequest request) - { - string allBars = m_gsaCom.GwaCommand("GET_ALL, EL.2").ToString(); - string[] barArr = string.IsNullOrWhiteSpace(allBars) ? new string[0] : allBars.Split('\n'); - - List ids = new List(); - bool containsDummies = false; - foreach (string gsaBar in barArr) - { - - string[] arr = gsaBar.Split(','); - - string index = arr[1]; - - //Check that the element type is a mesh - switch (arr[4]) - { - case "TRI3": - case "TRI6": - case "QUAD4": - case "QUAD8": - break; - default: - continue; - } - - //Check if dummy - if (arr.Last().ToUpper() == "DUMMY") - { - containsDummies = true; - continue; - } - - ids.Add(int.Parse(index)); - } - - if (containsDummies) - Engine.Base.Compute.RecordNote("Model contains 'dummy'-elements. The elements with this tag do not contain any results and will not have any results extracted."); - - return ids; - } - /***************************************************/ static public int[] CreateIntSequence(int maxId) diff --git a/GSA_Adapter/Convert/FromGsa/Properties/Material.cs b/GSA_Adapter/Convert/FromGsa/Properties/Material.cs index 6a8a180b..a60a892e 100644 --- a/GSA_Adapter/Convert/FromGsa/Properties/Material.cs +++ b/GSA_Adapter/Convert/FromGsa/Properties/Material.cs @@ -203,13 +203,13 @@ private static void OrthotropicMaterialProperties(string gsaString, out double e v2 = double.Parse(gStr[10]); v3 = double.Parse(gStr[11]); - g1 = double.Parse(gStr[16]); - g2 = double.Parse(gStr[17]); - g3 = double.Parse(gStr[18]); + g1 = double.Parse(gStr[13]); + g2 = double.Parse(gStr[14]); + g3 = double.Parse(gStr[15]); - tC1 = double.Parse(gStr[13]); - tC2 = double.Parse(gStr[14]); - tC3 = double.Parse(gStr[15]); + tC1 = double.Parse(gStr[16]); + tC2 = double.Parse(gStr[17]); + tC3 = double.Parse(gStr[18]); rho = double.Parse(gStr[12]); diff --git a/GSA_Adapter/Convert/FromGsa/Properties/SectionProperty.cs b/GSA_Adapter/Convert/FromGsa/Properties/SectionProperty.cs index c35f5a9f..35f02b76 100644 --- a/GSA_Adapter/Convert/FromGsa/Properties/SectionProperty.cs +++ b/GSA_Adapter/Convert/FromGsa/Properties/SectionProperty.cs @@ -145,16 +145,6 @@ public static ISectionProperty FromGsaSectionProperty(string gsaString, Dictiona Engine.Base.Compute.RecordNote("Section of type: " + secName + " not found in the library. Custom section will be used"); } - else if (desc[1].Contains("CHS")) - { - description = "STD%" + secType + "%"; - string trim = desc[2].TrimStart(secType.ToCharArray()); - string[] arr = trim.Split('x'); - - description += arr[0] + "%" + arr[1]; - - Engine.Base.Compute.RecordNote("Section of type: " + secName + " not found in the library. Custom section will be used"); - } else { message += "Catalogue section of type " + secName + " not found in library\n"; diff --git a/GSA_Adapter/Convert/FromGsa/Results/Results.cs b/GSA_Adapter/Convert/FromGsa/Results/Results.cs index 43f6e5f6..b3e0890b 100644 --- a/GSA_Adapter/Convert/FromGsa/Results/Results.cs +++ b/GSA_Adapter/Convert/FromGsa/Results/Results.cs @@ -189,32 +189,6 @@ public static BarStrain FromGsaBarStrain(GsaResults results, int id, string load /***************************************************/ - public static MeshStress FromGsaMeshStress(GsaResults results, int id, string loadCase, int divisions, double timeStep = 0, int mode = -1) - { - return new MeshStress( - id, - 0, - 0, - loadCase, - mode, - timeStep, - MeshResultLayer.Lower, - -1, - MeshResultSmoothingType.None, - oM.Geometry.Basis.XY, - results.dynaResults[0], - results.dynaResults[1], - results.dynaResults[2], - results.dynaResults[4], - results.dynaResults[3], - results.dynaResults[6], - results.dynaResults[5], - results.dynaResults[7] - ); - } - - /***************************************************/ - public static GlobalReactions FromGsaGlobalReactions(string id, string force, string moment) { string[] fArr = force.Split(','); diff --git a/GSA_Adapter/GSA_Adapter.csproj b/GSA_Adapter/GSA_Adapter.csproj index 4d568288..19ba8d0b 100644 --- a/GSA_Adapter/GSA_Adapter.csproj +++ b/GSA_Adapter/GSA_Adapter.csproj @@ -1,4 +1,4 @@ - + @@ -20,7 +20,7 @@ DEBUG;TRACE;GSA_8_7 prompt 4 - GSA87_Adapter + GSA87_Adapter pdbonly @@ -29,7 +29,7 @@ TRACE;GSA_8_7 prompt 4 - GSA87_Adapter + GSA87_Adapter true @@ -258,4 +258,4 @@ xcopy "$(TargetDir)$(TargetFileName)" "$(ProgramData)\BHoM\Assemblies" /Y - \ No newline at end of file +