Crack Calculator was added
This commit is contained in:
@@ -1,33 +1,26 @@
|
||||
using LoaderCalculator;
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Data.SourceData;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Sections;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Services.Calculations;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperCommon.Services.Sections;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics;
|
||||
using StructureHelperLogics.NdmCalculations.Buckling;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public class ForceCalculator : IForceCalculator
|
||||
{
|
||||
static readonly ForceCalculatorUpdateStrategy updateStrategy = new();
|
||||
public string Name { get; set; }
|
||||
public List<LimitStates> LimitStatesList { get; }
|
||||
public List<CalcTerms> CalcTermsList { get; }
|
||||
public List<IForceAction> ForceActions { get; }
|
||||
public List<INdmPrimitive> Primitives { get; }
|
||||
public INdmResult Result { get; private set; }
|
||||
public IResult Result { get; private set; }
|
||||
public ICompressedMember CompressedMember { get; }
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
public List<IForceCombinationList> ForceCombinationLists { get; private set; }
|
||||
@@ -184,16 +177,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
IForceCalculator target = new ForceCalculator { Name = Name + " copy"};
|
||||
target.LimitStatesList.Clear();
|
||||
target.LimitStatesList.AddRange(LimitStatesList);
|
||||
target.CalcTermsList.Clear();
|
||||
target.CalcTermsList.AddRange(CalcTermsList);
|
||||
AccuracyService.CopyProperties(Accuracy, target.Accuracy);
|
||||
CompressedMemberServices.CopyProperties(CompressedMember, target.CompressedMember);
|
||||
target.Primitives.AddRange(Primitives);
|
||||
target.ForceActions.AddRange(ForceActions);
|
||||
return target;
|
||||
var newCalculator = new ForceCalculator();
|
||||
updateStrategy.Update(newCalculator, this);
|
||||
return newCalculator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public class ForceTupleCalculator : IForceTupleCalculator
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public INdmResult Result { get; private set; }
|
||||
public IResult Result { get; private set; }
|
||||
|
||||
private IForceTupleInputData inputData;
|
||||
|
||||
|
||||
@@ -4,12 +4,10 @@ using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Sections;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForceCalculator : INdmCalculator, IHasPrimitives, IHasForceCombinations
|
||||
public interface IForceCalculator : ICalculator, IHasPrimitives, IHasForceCombinations
|
||||
{
|
||||
List<CalcTerms> CalcTermsList { get; }
|
||||
List<LimitStates> LimitStatesList { get; }
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForceTupleCalculator : INdmCalculator
|
||||
public interface IForceTupleCalculator : ICalculator
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForcesResults : INdmResult
|
||||
public interface IForcesResults : IResult
|
||||
{
|
||||
string Description { get; set; }
|
||||
List<IForcesTupleResult> ForcesResultList { get; }
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using LoaderCalculator.Data.ResultData;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
public interface IForcesTupleResult : INdmResult
|
||||
public interface IForcesTupleResult : IResult
|
||||
{
|
||||
IDesignForceTuple DesignForceTuple { get; set; }
|
||||
ILoaderResults LoaderResults { get; set; }
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Sections;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
{
|
||||
public class ForceCalculatorUpdateStrategy : IUpdateStrategy<IForceCalculator>
|
||||
{
|
||||
static readonly AccuracyUpdateStrategy accuracyUpdateStrategy = new();
|
||||
static readonly CompressedMemberUpdateStrategy compressedMemberUpdateStrategy = new();
|
||||
public void Update(IForceCalculator targetObject, IForceCalculator sourceObject)
|
||||
{
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.LimitStatesList.Clear();
|
||||
targetObject.LimitStatesList.AddRange(sourceObject.LimitStatesList);
|
||||
targetObject.CalcTermsList.Clear();
|
||||
targetObject.CalcTermsList.AddRange(sourceObject.CalcTermsList);
|
||||
accuracyUpdateStrategy.Update(targetObject.Accuracy, sourceObject.Accuracy);
|
||||
compressedMemberUpdateStrategy.Update(targetObject.CompressedMember, sourceObject.CompressedMember);
|
||||
targetObject.Primitives.Clear();
|
||||
targetObject.Primitives.AddRange(sourceObject.Primitives);
|
||||
targetObject.ForceActions.Clear();
|
||||
targetObject.ForceActions.AddRange(sourceObject.ForceActions);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user