Change force tuple calculator result
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using StructureHelperCommon.Models.States;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ExtendedForceTupleCalculatorResult : IExtendedForceTupleCalculatorResult
|
||||
{
|
||||
public IStateCalcTermPair StateCalcTermPair { get; set; } = new StateCalcTermPair();
|
||||
public IForceTupleCalculatorResult ForcesTupleResult { get; set; }
|
||||
public bool IsValid { get; set; } = true;
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using StructureHelperCommon.Models.States;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ExtendedForceTupleResult : IExtendedForceTupleResult
|
||||
{
|
||||
public IStateCalcTermPair StateCalcTermPair { get; set; } = new StateCalcTermPair();
|
||||
public IForcesTupleResult ForcesTupleResut { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
checkInputDataLogic.TraceLogger = TraceLogger;
|
||||
if (checkInputDataLogic.Check() != true)
|
||||
{
|
||||
Result = new ForcesResults()
|
||||
Result = new ForceCalculatorResult()
|
||||
{
|
||||
IsValid = false,
|
||||
Description = checkInputDataLogic.CheckResult
|
||||
@@ -72,11 +72,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
Result = forceCalculatorLogic.GetForcesResults();
|
||||
}
|
||||
|
||||
private void GetResult()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
var newCalculator = new ForceCalculator();
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <inheritdoc/>
|
||||
public class ForceCalculatorLogic : IForceCalculatorLogic
|
||||
{
|
||||
private ForcesResults result;
|
||||
private ForceCalculatorResult result;
|
||||
private IProcessorLogic<IForceTuple> eccentricityLogic;
|
||||
private ForceTupleBucklingLogic bucklingLogic;
|
||||
private ITriangulatePrimitiveLogic triangulateLogic;
|
||||
@@ -28,7 +28,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
|
||||
|
||||
public ForcesResults GetForcesResults()
|
||||
public ForceCalculatorResult GetForcesResults()
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||
TraceInputData();
|
||||
@@ -67,7 +67,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
private void CalculateResult()
|
||||
{
|
||||
result = new ForcesResults()
|
||||
result = new ForceCalculatorResult()
|
||||
{
|
||||
IsValid = true
|
||||
};
|
||||
@@ -80,30 +80,30 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
if (InputData.LimitStatesList.Contains(limitState) & InputData.CalcTermsList.Contains(calcTerm))
|
||||
{
|
||||
|
||||
IForcesTupleResult tupleResult;
|
||||
ExtendedForceTupleCalculatorResult extendedResult = new();
|
||||
extendedResult.StateCalcTermPair.LimitState = limitState;
|
||||
extendedResult.StateCalcTermPair.CalcTerm = calcTerm;
|
||||
try
|
||||
{
|
||||
tupleResult = ProcessNdmResult(combination, tuple);
|
||||
IForceTupleCalculatorResult tupleResult = ProcessNdmResult(combination, tuple);
|
||||
extendedResult.IsValid = tupleResult.IsValid;
|
||||
extendedResult.ForcesTupleResult = tupleResult;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
tupleResult = new ForcesTupleResult()
|
||||
{
|
||||
IsValid = false,
|
||||
Description = string.Empty + ex,
|
||||
DesignForceTuple = tuple
|
||||
};
|
||||
extendedResult.IsValid = false;
|
||||
extendedResult.Description += ex.Message;
|
||||
}
|
||||
result.ForcesResultList.Add(tupleResult);
|
||||
result.ForcesResultList.Add(extendedResult);
|
||||
ActionToOutputResults?.Invoke(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IForcesTupleResult ProcessNdmResult(IForceCombinationList combination, IDesignForceTuple tuple)
|
||||
private IForceTupleCalculatorResult ProcessNdmResult(IForceCombinationList combination, IDesignForceTuple tuple)
|
||||
{
|
||||
IForcesTupleResult tupleResult;
|
||||
IForceTupleCalculatorResult tupleResult;
|
||||
LimitStates limitState = tuple.LimitState;
|
||||
CalcTerms calcTerm = tuple.CalcTerm;
|
||||
triangulateLogic = new TriangulatePrimitiveLogic()
|
||||
@@ -130,7 +130,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
if (newTuple.Nz >= 0d)
|
||||
{
|
||||
TraceLogger?.AddMessage(string.Format("Second order effect is not considered as Nz={0} >= 0", newTuple.Nz));
|
||||
tupleResult = GetForceResult(limitState, calcTerm, ndms, newTuple);
|
||||
tupleResult = GetForceResult(ndms, newTuple);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -144,14 +144,14 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
string message = string.Format("Second order effect is not considered, despite force Nz={0}", newTuple.Nz);
|
||||
TraceLogger?.AddMessage(message, TraceLogStatuses.Warning);
|
||||
}
|
||||
tupleResult = GetForceResult(limitState, calcTerm, ndms, newTuple);
|
||||
tupleResult = GetForceResult(ndms, newTuple);
|
||||
}
|
||||
return tupleResult;
|
||||
}
|
||||
|
||||
private IForcesTupleResult ProcessCompressedMember(IForceCombinationList combination, IDesignForceTuple tuple, List<INdm> ndms, IForceTuple newTuple)
|
||||
private IForceTupleCalculatorResult ProcessCompressedMember(IForceCombinationList combination, IDesignForceTuple tuple, List<INdm> ndms, IForceTuple newTuple)
|
||||
{
|
||||
IForcesTupleResult tupleResult;
|
||||
IForceTupleCalculatorResult tupleResult;
|
||||
LimitStates limitState = tuple.LimitState;
|
||||
CalcTerms calcTerm = tuple.CalcTerm;
|
||||
|
||||
@@ -183,27 +183,24 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ForcesTupleResult()
|
||||
return new ForceTupleCalculatorResult()
|
||||
{
|
||||
IsValid = false,
|
||||
DesignForceTuple = tuple,
|
||||
ForceTuple = tuple.ForceTuple,
|
||||
Description = buckResult.Description,
|
||||
};
|
||||
}
|
||||
|
||||
string message = string.Intern("Result of second order was obtained successfully, new force combination was obtained");
|
||||
TraceLogger?.AddMessage(message);
|
||||
tupleResult = GetForceResult(limitState, calcTerm, ndms, newTuple);
|
||||
tupleResult = GetForceResult(ndms, newTuple);
|
||||
return tupleResult;
|
||||
}
|
||||
|
||||
private IForcesTupleResult GetForceResult(LimitStates limitState, CalcTerms calcTerm, List<INdm> ndms, IForceTuple newTuple)
|
||||
private IForceTupleCalculatorResult GetForceResult(List<INdm> ndms, IForceTuple newTuple)
|
||||
{
|
||||
TraceLogger?.AddMessage("Calculation of cross-section is started");
|
||||
var tupleResult = GetPrimitiveStrainMatrix(ndms, newTuple, InputData.Accuracy);
|
||||
tupleResult.DesignForceTuple.LimitState = limitState;
|
||||
tupleResult.DesignForceTuple.CalcTerm = calcTerm;
|
||||
tupleResult.DesignForceTuple.ForceTuple = newTuple;
|
||||
return tupleResult;
|
||||
}
|
||||
|
||||
@@ -217,7 +214,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
}
|
||||
}
|
||||
|
||||
private IForcesTupleResult GetPrimitiveStrainMatrix(IEnumerable<INdm> ndmCollection, IForceTuple tuple, IAccuracy accuracy)
|
||||
private IForceTupleCalculatorResult GetPrimitiveStrainMatrix(IEnumerable<INdm> ndmCollection, IForceTuple tuple, IAccuracy accuracy)
|
||||
{
|
||||
var inputData = new ForceTupleInputData()
|
||||
{
|
||||
@@ -233,7 +230,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
calculator.TraceLogger = TraceLogger.GetSimilarTraceLogger();
|
||||
}
|
||||
calculator.Run();
|
||||
return calculator.Result as IForcesTupleResult;
|
||||
return calculator.Result as IForceTupleCalculatorResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ForceCalculatorResult : IForceCalculatorResult
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public string Description { get; set; }
|
||||
public List<IExtendedForceTupleCalculatorResult> ForcesResultList { get; } = [];
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <inheritdoc/>
|
||||
public class ForceTupleCalculator : IForceTupleCalculator
|
||||
{
|
||||
IForcesTupleResult result;
|
||||
IForceTupleCalculatorResult result;
|
||||
private ICheckInputDataLogic<IForceTupleInputData> checkInputDataLogic;
|
||||
private IForceTupleCalcLogic calcLogic;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
private void PrepareNewResult()
|
||||
{
|
||||
result = new ForcesTupleResult()
|
||||
result = new ForceTupleCalculatorResult()
|
||||
{
|
||||
IsValid = true,
|
||||
Description = string.Empty,
|
||||
|
||||
@@ -9,10 +9,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ForcesTupleResult : IForcesTupleResult
|
||||
public class ForceTupleCalculatorResult : IForceTupleCalculatorResult
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public IDesignForceTuple DesignForceTuple { get; set; }
|
||||
public IForceTuple ForceTuple { get; set; } = new ForceTuple(Guid.NewGuid());
|
||||
/// <summary>
|
||||
/// Text of result of calculations
|
||||
/// </summary>
|
||||
@@ -23,10 +23,5 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public ILoaderResults LoaderResults { get; set; }
|
||||
|
||||
public IForceTupleInputData InputData { get; set; }
|
||||
|
||||
public ForcesTupleResult()
|
||||
{
|
||||
DesignForceTuple = new DesignForceTuple();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ForcesResults : IForcesResults
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public List<IForcesTupleResult> ForcesResultList { get; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public ForcesResults()
|
||||
{
|
||||
ForcesResultList = new List<IForcesTupleResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.States;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IExtendedForceTupleCalculatorResult : IResult
|
||||
{
|
||||
IStateCalcTermPair StateCalcTermPair { get; set; }
|
||||
IForceTupleCalculatorResult ForcesTupleResult { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using StructureHelperCommon.Models.States;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IExtendedForceTupleResult
|
||||
{
|
||||
IStateCalcTermPair StateCalcTermPair { get; set; }
|
||||
IForcesTupleResult ForcesTupleResut { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public interface IForceCalculatorLogic : ILogic, IHasActionByResult
|
||||
{
|
||||
IForceCalculatorInputData InputData { get; set; }
|
||||
ForcesResults GetForcesResults();
|
||||
ForceCalculatorResult GetForcesResults();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForcesResults : IResult
|
||||
public interface IForceCalculatorResult : IResult
|
||||
{
|
||||
string Description { get; set; }
|
||||
List<IForcesTupleResult> ForcesResultList { get; }
|
||||
bool IsValid { get; set; }
|
||||
string Description { get; set; }
|
||||
List<IExtendedForceTupleCalculatorResult> ForcesResultList { get; }
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ using StructureHelperCommon.Models.Forces;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForcesTupleResult : IResult
|
||||
public interface IForceTupleCalculatorResult : IResult
|
||||
{
|
||||
IForceTupleInputData InputData { get; set; }
|
||||
IDesignForceTuple DesignForceTuple { get; set; }
|
||||
IForceTuple ForceTuple { get; set; }
|
||||
ILoaderResults LoaderResults { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ForceTupleCalcLogic : IForceTupleCalcLogic
|
||||
{
|
||||
private IForcesTupleResult result;
|
||||
private IForceTupleCalculatorResult result;
|
||||
private ForceTupleTraceResultLogic forceTupleTraceResultLogic;
|
||||
private LoaderOptions loaderData;
|
||||
private Calculator calculator;
|
||||
@@ -27,7 +27,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public IForceTupleInputData InputData { get; set; }
|
||||
|
||||
public IForcesTupleResult Result => result;
|
||||
public IForceTupleCalculatorResult Result => result;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
@@ -40,7 +40,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
private void PrepareNewResult()
|
||||
{
|
||||
result = new ForcesTupleResult()
|
||||
result = new ForceTupleCalculatorResult()
|
||||
{
|
||||
IsValid = true,
|
||||
Description = string.Empty,
|
||||
@@ -117,6 +117,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
private void ProcessCorrectLoaderResult()
|
||||
{
|
||||
result.IsValid = true;
|
||||
result.ForceTuple = InputData.ForceTuple;
|
||||
result.Description = LoggerStrings.CalculationHasDone;
|
||||
result.LoaderResults = calcResult;
|
||||
forceTupleTraceResultLogic = new ForceTupleTraceResultLogic(InputData.NdmCollection)
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public void TraceResult(IResult result)
|
||||
{
|
||||
if (result is not IForcesTupleResult)
|
||||
if (result is not IForceTupleCalculatorResult)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(result));
|
||||
}
|
||||
calcResult = ((IForcesTupleResult)result).LoaderResults;
|
||||
calcResult = ((IForceTupleCalculatorResult)result).LoaderResults;
|
||||
TraceLogger?.AddMessage($"Analysis of internal forces is done succsesfully");
|
||||
TraceLogger?.AddMessage($"Current accuracy {calcResult.AccuracyRate} has achieved in {calcResult.IterationCounter} iteration", TraceLogStatuses.Debug);
|
||||
var strainMatrix = calcResult.ForceStrainPair.StrainMatrix;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public interface IForceTupleCalcLogic: ILogic, IHasActionByResult
|
||||
{
|
||||
IForceTupleInputData InputData { get; set; }
|
||||
IForcesTupleResult Result { get; }
|
||||
IForceTupleCalculatorResult Result { get; }
|
||||
void Calculate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public interface IProcessTupleLogic : ILogic
|
||||
{
|
||||
IForceTupleInputData InputData { get; set; }
|
||||
IForcesTupleResult ProcessNdmResult();
|
||||
IForceTupleCalculatorResult ProcessNdmResult();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.States;
|
||||
using StructureHelperLogics.Services.NdmCalculations;
|
||||
using System.ComponentModel;
|
||||
|
||||
@@ -9,12 +10,13 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
{
|
||||
public class InterpolationProgressLogic : ILongProcessLogic
|
||||
{
|
||||
private ForceCalculator forceCalculator;
|
||||
private IForceCalculator forceCalculator;
|
||||
private IStateCalcTermPair stateCalcTermPair;
|
||||
private InterpolateTuplesResult interpolateTuplesResult;
|
||||
|
||||
public Action<int> SetProgress { get; set; }
|
||||
|
||||
public ForceCalculator InterpolateCalculator { get; private set; }
|
||||
public IForceCalculator InterpolateCalculator { get; private set; }
|
||||
public bool Result { get; set; }
|
||||
|
||||
public int StepCount => interpolateTuplesResult.StepCount + 1;
|
||||
@@ -23,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
|
||||
public void WorkerDoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
InterpolateCalculator = InterpolateService.InterpolateForceCalculator(forceCalculator, interpolateTuplesResult);
|
||||
InterpolateCalculator = InterpolateService.InterpolateForceCalculator(forceCalculator, stateCalcTermPair, interpolateTuplesResult);
|
||||
InterpolateCalculator.ActionToOutputResults = ShowProgressResult;
|
||||
InterpolateCalculator.Run();
|
||||
}
|
||||
@@ -38,17 +40,18 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
//nothing to do
|
||||
}
|
||||
|
||||
public InterpolationProgressLogic(ForceCalculator forceCalculator, InterpolateTuplesResult interpolateTuplesResult)
|
||||
public InterpolationProgressLogic(IForceCalculator forceCalculator, IStateCalcTermPair stateCalcTermPair, InterpolateTuplesResult interpolateTuplesResult)
|
||||
{
|
||||
this.forceCalculator = forceCalculator;
|
||||
this.stateCalcTermPair = stateCalcTermPair;
|
||||
this.interpolateTuplesResult = interpolateTuplesResult;
|
||||
}
|
||||
|
||||
private void ShowProgressResult(IResult result)
|
||||
{
|
||||
if (result is ForcesResults)
|
||||
if (result is ForceCalculatorResult)
|
||||
{
|
||||
var forceResult = result as ForcesResults;
|
||||
var forceResult = result as ForceCalculatorResult;
|
||||
SetProgress?.Invoke(forceResult.ForcesResultList.Count());
|
||||
Result = forceResult.IsValid;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
IForceTupleInputData IProcessTupleLogic.InputData { get; set; }
|
||||
|
||||
public IForcesTupleResult ProcessNdmResult()
|
||||
public IForceTupleCalculatorResult ProcessNdmResult()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <summary>
|
||||
/// Provides trace logger inforvation for collection of force tuple results
|
||||
/// </summary>
|
||||
public class TraceForcesResultLogic : ITraceCollectionLogic<IForcesTupleResult>
|
||||
public class TraceForcesResultLogic : ITraceCollectionLogic<IExtendedForceTupleCalculatorResult>
|
||||
{
|
||||
const int rowSize = 4;
|
||||
private List<ITraceLoggerEntry> traceLoggerEntries;
|
||||
public IEnumerable<IForcesTupleResult>? Collection { get; set; }
|
||||
public IEnumerable<IExtendedForceTupleCalculatorResult>? Collection { get; set; }
|
||||
public int Priority { get; set; } = LoggerService.GetPriorityByStatus(TraceLogStatuses.Info);
|
||||
|
||||
public List<ITraceLoggerEntry> GetTraceEntries()
|
||||
@@ -51,7 +51,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
traceLoggerEntries.Add(table);
|
||||
}
|
||||
|
||||
private IEnumerable<IShTableRow<ITraceLoggerEntry>> ProcessForceTupleResult(IForcesTupleResult item)
|
||||
private IEnumerable<IShTableRow<ITraceLoggerEntry>> ProcessForceTupleResult(IExtendedForceTupleCalculatorResult item)
|
||||
{
|
||||
List<IShTableRow<ITraceLoggerEntry>> rows = new();
|
||||
int priority = Priority;
|
||||
@@ -63,19 +63,19 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
ndmRow = new(rowSize);
|
||||
ndmRow.Elements[0].Value = new StringLogEntry()
|
||||
{
|
||||
Message = TraceStringService.GetLimitStateAndCalctTerm(item.DesignForceTuple),
|
||||
Message = TraceStringService.GetLimitStateAndCalctTerm(item.StateCalcTermPair),
|
||||
Priority = priority
|
||||
};
|
||||
ndmRow.Elements[1].Value = new StringLogEntry()
|
||||
{
|
||||
Message = TraceStringService.GetForces(item.DesignForceTuple.ForceTuple),
|
||||
Message = TraceStringService.GetForces(item.ForcesTupleResult.ForceTuple),
|
||||
Priority = priority
|
||||
};
|
||||
if (item.LoaderResults is not null)
|
||||
if (item.ForcesTupleResult.LoaderResults is not null)
|
||||
{
|
||||
ndmRow.Elements[2].Value = new StringLogEntry()
|
||||
{
|
||||
Message = TraceStringService.GetCuvatures(item.LoaderResults.ForceStrainPair.StrainMatrix),
|
||||
Message = TraceStringService.GetCuvatures(item.ForcesTupleResult.LoaderResults.ForceStrainPair.StrainMatrix),
|
||||
Priority = priority
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.States;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -10,11 +12,21 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public static class TraceStringService
|
||||
{
|
||||
public static string GetLimitStateAndCalctTerm(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
string s = "Limit state: " + limitState.ToString();
|
||||
s += ", Calculation term: " + calcTerm.ToString();
|
||||
return s;
|
||||
}
|
||||
|
||||
public static string GetLimitStateAndCalctTerm(IDesignForceTuple designForceTuple)
|
||||
{
|
||||
string s = "Limit state: " + designForceTuple.LimitState.ToString();
|
||||
s += ", Calculation term: " + designForceTuple.CalcTerm;
|
||||
return s;
|
||||
return GetLimitStateAndCalctTerm(designForceTuple.LimitState, designForceTuple.CalcTerm);
|
||||
}
|
||||
|
||||
public static string GetLimitStateAndCalctTerm(IStateCalcTermPair stateCalcTermPair)
|
||||
{
|
||||
return GetLimitStateAndCalctTerm(stateCalcTermPair.LimitState, stateCalcTermPair.CalcTerm);
|
||||
}
|
||||
|
||||
public static string GetForces(IForceTuple forceTuple)
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses
|
||||
public class ExportForcesResultToCSVLogic : ExportToCSVLogicBase
|
||||
{
|
||||
private const string errorString = "-error-";
|
||||
IForcesResults results;
|
||||
IForceCalculatorResult results;
|
||||
|
||||
public ExportForcesResultToCSVLogic(IForcesResults results)
|
||||
public ExportForcesResultToCSVLogic(IForceCalculatorResult results)
|
||||
{
|
||||
this.results = results;
|
||||
}
|
||||
@@ -34,11 +34,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses
|
||||
{
|
||||
//if (item.IsValid == true)
|
||||
{
|
||||
var tuple = item.DesignForceTuple.ForceTuple;
|
||||
var tuple = item.ForcesTupleResult.ForceTuple;
|
||||
LoaderCalculator.Data.Matrix.IStrainMatrix strainMatrix = null;
|
||||
try
|
||||
{
|
||||
strainMatrix = item.LoaderResults.StrainMatrix;
|
||||
strainMatrix = item.ForcesTupleResult.LoaderResults.StrainMatrix;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -46,8 +46,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses
|
||||
}
|
||||
string[] newLine =
|
||||
{
|
||||
item.DesignForceTuple.LimitState.ToString() ?? errorString,
|
||||
item.DesignForceTuple.CalcTerm.ToString() ?? errorString,
|
||||
item.StateCalcTermPair.LimitState.ToString() ?? errorString,
|
||||
item.StateCalcTermPair.CalcTerm.ToString() ?? errorString,
|
||||
tuple.Mx.ToString() ?? errorString,
|
||||
tuple.My.ToString() ?? errorString,
|
||||
tuple.Nz.ToString() ?? errorString,
|
||||
|
||||
@@ -8,6 +8,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ValueDiagrams
|
||||
{
|
||||
IValueDiagramCalculatorInputData? InputData { get; set; }
|
||||
List<IPoint2D> Points { get; set; }
|
||||
List<IForcesTupleResult> ForceTupleResults { get; set; }
|
||||
List<IForceTupleCalculatorResult> ForceTupleResults { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ValueDiagrams
|
||||
|
||||
public List<IPoint2D> Points { get; set; } = [];
|
||||
|
||||
public List<IForcesTupleResult> ForceTupleResults { get; set; } = [];
|
||||
public List<IForceTupleCalculatorResult> ForceTupleResults { get; set; } = [];
|
||||
|
||||
public bool IsValid { get; set; } = true;
|
||||
public string? Description { get; set; } = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user