Crack func factori has been changed
This commit is contained in:
@@ -37,15 +37,15 @@ namespace StructureHelper.Services.ResultViewers
|
||||
{
|
||||
Name = "Long softening factor",
|
||||
ResultFunction = (RebarCrackResult rebar) => rebar.LongTermResult.SofteningFactor,
|
||||
UnitFactor = unitLength.Multiplyer,
|
||||
UnitName = unitLength.Name
|
||||
UnitFactor = 1,
|
||||
UnitName = "Dimensionless"
|
||||
},
|
||||
new()
|
||||
{
|
||||
Name = "Short softening factor",
|
||||
ResultFunction = (RebarCrackResult rebar) => rebar.ShortTermResult.SofteningFactor,
|
||||
UnitFactor = unitLength.Multiplyer,
|
||||
UnitName = unitLength.Name
|
||||
UnitFactor = 1,
|
||||
UnitName = "Dimensionless"
|
||||
},
|
||||
new()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CheckTupleCalculatorInputData : ICheckInputDataLogic
|
||||
{
|
||||
private string checkResult;
|
||||
private TupleCrackInputData inputData;
|
||||
private bool result;
|
||||
|
||||
public IInputData InputData
|
||||
{
|
||||
get => inputData; set
|
||||
{
|
||||
if (value is TupleCrackInputData data)
|
||||
{
|
||||
inputData = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string CheckResult => checkResult;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public bool Check()
|
||||
{
|
||||
result = true;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
|
||||
public void Run()
|
||||
{
|
||||
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
|
||||
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
|
||||
result = new()
|
||||
{
|
||||
IsValid = true
|
||||
|
||||
@@ -11,6 +11,9 @@ using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.Services.NdmPrimitives;
|
||||
|
||||
//Copyright (c) 2024 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class TupleCrackCalculator : ICalculator
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool IsValid { get; set; }
|
||||
public string TupleName { get; set; }
|
||||
public string TupleName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Force tuple for long term calculations
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user