Table log Entry was added
This commit is contained in:
@@ -19,7 +19,7 @@ namespace StructureHelper.Models.Calculators
|
||||
|
||||
public IResult Result => result;
|
||||
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
<Compile Update="Windows\CalculationWindows\ProgressViews\ShowProgressView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\CalculationWindows\ProgressViews\TraceDocumentView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\Errors\ErrorMessage.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -89,6 +92,9 @@
|
||||
<Page Update="Windows\CalculationWindows\ProgressViews\ShowProgressView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\CalculationWindows\ProgressViews\TraceDocumentView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\Errors\ErrorMessage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
|
||||
public int StepCount => ValidTupleList.Count();
|
||||
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public CrackDiagramLogic(IEnumerable<IForcesTupleResult> tupleList, IEnumerable<INdmPrimitive> ndmPrimitives)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
||||
|
||||
public Action<int> SetProgress { get; set; }
|
||||
public bool Result { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public InteractionDiagramLogic(LimitCurveInputData inputData)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
|
||||
|
||||
public Action<int> SetProgress { get; set; }
|
||||
public bool Result { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public void WorkerDoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:fc="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalculatorViews"
|
||||
d:DataContext ="{d:DesignInstance local:LimitCurveCalculatorViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="Limit Curve Calculator" Height="390" Width="400" MinHeight="300" MinWidth="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||
Title="Interaction Diagram Calculator" Height="390" Width="400" MinHeight="300" MinWidth="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelper.Windows.AddMaterialWindow;
|
||||
using StructureHelper.Windows.ViewModels.Errors;
|
||||
using StructureHelper.Windows.ViewModels.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.ProgressViews
|
||||
{
|
||||
public class TraceDocumentVM : ViewModelBase
|
||||
{
|
||||
IEnumerable<ITraceLoggerEntry> loggerEntries;
|
||||
IEnumerable<ITraceLoggerEntry> selectedLoggerEntries;
|
||||
FlowDocument document;
|
||||
private ICommand rebuildCommand;
|
||||
private ICommand printDocumentCommand;
|
||||
private int maxPriority;
|
||||
private int tabGap;
|
||||
|
||||
public FlowDocumentReader DocumentReader { get; set; }
|
||||
public int MaxPriority
|
||||
{
|
||||
get => maxPriority; set
|
||||
{
|
||||
var oldValue = maxPriority;
|
||||
try
|
||||
{
|
||||
maxPriority = Math.Max(value, 0);
|
||||
OnPropertyChanged(nameof(MaxPriority));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
maxPriority = oldValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
public int TabGap
|
||||
{
|
||||
get => tabGap; set
|
||||
{
|
||||
var oldValue = tabGap;
|
||||
try
|
||||
{
|
||||
tabGap = Math.Max(value, 0);
|
||||
OnPropertyChanged(nameof(TabGap));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
tabGap = oldValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
public TraceDocumentVM(IEnumerable<ITraceLoggerEntry> loggerEntries)
|
||||
{
|
||||
this.loggerEntries = loggerEntries;
|
||||
maxPriority = 350;
|
||||
tabGap = 50;
|
||||
}
|
||||
|
||||
public ICommand RebuildCommand =>
|
||||
rebuildCommand ??= new RelayCommand(o =>
|
||||
{
|
||||
Show();
|
||||
});
|
||||
|
||||
public ICommand PrintDocumentCommand =>
|
||||
printDocumentCommand ??= new RelayCommand(o =>
|
||||
{
|
||||
SafetyProcessor.RunSafeProcess(DocumentReader.Print, "Error of printing document");
|
||||
});
|
||||
|
||||
public void Show()
|
||||
{
|
||||
Prepare();
|
||||
ShowPrepared();
|
||||
}
|
||||
|
||||
public void Prepare()
|
||||
{
|
||||
document = new();
|
||||
selectedLoggerEntries = loggerEntries.Where(x => x.Priority <= MaxPriority);
|
||||
foreach (var item in selectedLoggerEntries)
|
||||
{
|
||||
ProcessLoggerEntries(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessLoggerEntries(ITraceLoggerEntry item)
|
||||
{
|
||||
if (item is StringLoggerEntry stringEntry)
|
||||
{
|
||||
ProcessStringEntry(stringEntry);
|
||||
}
|
||||
else if (item is TableLoggerEntry tableEntry)
|
||||
{
|
||||
ProcessTableEntry(tableEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(item));
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessTableEntry(TableLoggerEntry tableEntry)
|
||||
{
|
||||
var rows = tableEntry.Table.GetAllRows();
|
||||
int rowCount = rows.Count();
|
||||
int columnCount = tableEntry.Table.RowSize;
|
||||
var table = new Table();
|
||||
for (int x = 0; x < columnCount; x++)
|
||||
{
|
||||
var tableColumn = new TableColumn();
|
||||
tableColumn.Width = new GridLength(150);
|
||||
table.Columns.Add(tableColumn);
|
||||
}
|
||||
foreach (var row in rows)
|
||||
{
|
||||
var newRow = new TableRow();
|
||||
foreach (var cell in row.Elements)
|
||||
{
|
||||
TableCell tableCell;
|
||||
if (cell is null)
|
||||
{
|
||||
tableCell = new TableCell(new Paragraph(new Run(string.Empty)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cell is StringLoggerEntry stringEntry)
|
||||
{
|
||||
tableCell = new TableCell(GetParagraphByStringEntry(stringEntry));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(cell));
|
||||
}
|
||||
}
|
||||
newRow.Cells.Add(tableCell);
|
||||
}
|
||||
table.RowGroups.Add(new TableRowGroup());
|
||||
table.RowGroups[0].Rows.Add(newRow);
|
||||
}
|
||||
document.Blocks.Add(table);
|
||||
}
|
||||
|
||||
private void ProcessStringEntry(StringLoggerEntry stringEntry)
|
||||
{
|
||||
var paragraph = GetParagraphByStringEntry(stringEntry);
|
||||
document.Blocks.Add(paragraph);
|
||||
}
|
||||
|
||||
private Paragraph GetParagraphByStringEntry(StringLoggerEntry stringEntry)
|
||||
{
|
||||
var paragraph = new Paragraph(new Run(stringEntry.Message));
|
||||
paragraph.Margin = new Thickness(stringEntry.Priority / tabGap);
|
||||
if (stringEntry.Priority <= LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Fatal))
|
||||
{
|
||||
paragraph.FontSize = 14;
|
||||
paragraph.Background = Brushes.Red;
|
||||
paragraph.Foreground = Brushes.Black;
|
||||
paragraph.FontStyle = FontStyles.Italic;
|
||||
}
|
||||
else if (stringEntry.Priority <= LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Error))
|
||||
{
|
||||
paragraph.FontSize = 14;
|
||||
paragraph.Background = Brushes.Pink;
|
||||
paragraph.Foreground = Brushes.Black;
|
||||
}
|
||||
else if (stringEntry.Priority <= LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Warning))
|
||||
{
|
||||
paragraph.FontSize = 14;
|
||||
paragraph.Background = Brushes.Yellow;
|
||||
paragraph.Foreground = Brushes.Black;
|
||||
}
|
||||
else if (stringEntry.Priority <= LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Debug))
|
||||
{
|
||||
paragraph.FontSize = 12;
|
||||
paragraph.Foreground = Brushes.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
paragraph.FontSize = 8;
|
||||
paragraph.Foreground = Brushes.Gray;
|
||||
|
||||
}
|
||||
|
||||
return paragraph;
|
||||
}
|
||||
|
||||
public void ShowPrepared()
|
||||
{
|
||||
DocumentReader.Document = document;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<Window x:Class="StructureHelper.Windows.CalculationWindows.ProgressViews.TraceDocumentView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.ProgressViews"
|
||||
d:DataContext="{d:DesignInstance local:TraceDocumentVM}"
|
||||
mc:Ignorable="d"
|
||||
Title="Trace Document Viewer" Height="450" Width="800" MinHeight="400" MinWidth="600" WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="90"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<FlowDocumentReader Name="DocumentReader" ViewingMode="Scroll"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<GroupBox Header="Tab gap">
|
||||
<TextBox Text="{Binding TabGap, ValidatesOnExceptions=True}" />
|
||||
</GroupBox>
|
||||
<GroupBox Header="Max priority">
|
||||
<TextBox Text="{Binding MaxPriority, ValidatesOnExceptions=True}" />
|
||||
</GroupBox>
|
||||
<Button Margin="3" Content="Rebuild" ToolTip="Rebuild document" Command="{Binding RebuildCommand}"/>
|
||||
<Button Margin="3" Content="Print" ToolTip="Print document" Command="{Binding PrintDocumentCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,34 @@
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.ProgressViews
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для TraceDocumentView.xaml
|
||||
/// </summary>
|
||||
public partial class TraceDocumentView : Window
|
||||
{
|
||||
TraceDocumentVM viewModel;
|
||||
public TraceDocumentView(TraceDocumentVM viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.viewModel = viewModel;
|
||||
this.DataContext = this.viewModel;
|
||||
this.viewModel.DocumentReader = this.DocumentReader;
|
||||
this.viewModel.Show();
|
||||
}
|
||||
public TraceDocumentView(IEnumerable<ITraceLoggerEntry> loggerEntries) : this(new TraceDocumentVM(loggerEntries)) { }
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using StructureHelper.Infrastructure.Enums;
|
||||
using StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalculatorViews;
|
||||
using StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalculatorViews.ForceResultLogic;
|
||||
using StructureHelper.Windows.CalculationWindows.ProgressViews;
|
||||
using StructureHelper.Windows.ViewModels.Calculations.Calculators;
|
||||
using StructureHelper.Windows.ViewModels.Errors;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
@@ -35,7 +36,7 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
NewItem = new ForceCalculator()
|
||||
{
|
||||
Name = "New force calculator",
|
||||
TraceLogger = new TraceLogger(),
|
||||
TraceLogger = new ShiftTraceLogger(),
|
||||
};
|
||||
}
|
||||
else if (parameterType == CalculatorTypes.LimitCurveCalculator)
|
||||
@@ -45,7 +46,7 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
{
|
||||
Name = "New interaction diagram calculator",
|
||||
InputData = inputData,
|
||||
TraceLogger = new TraceLogger(),
|
||||
TraceLogger = new ShiftTraceLogger(),
|
||||
};
|
||||
}
|
||||
else
|
||||
@@ -132,11 +133,16 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
|
||||
private void RunCalculator()
|
||||
{
|
||||
if (SelectedItem is LimitCurvesCalculator)
|
||||
if (SelectedItem is LimitCurvesCalculator calculator)
|
||||
{
|
||||
var calculator = SelectedItem as LimitCurvesCalculator;
|
||||
if (calculator.TraceLogger is not null) { calculator.TraceLogger.TraceLoggerEntries.Clear(); }
|
||||
var inputData = calculator.InputData;
|
||||
ShowInteractionDiagramByInputData(calculator);
|
||||
if (calculator.TraceLogger is not null)
|
||||
{
|
||||
var wnd = new TraceDocumentView(calculator.TraceLogger.TraceLoggerEntries);
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace StructureHelperCommon.Infrastructures.Interfaces
|
||||
Action<int> SetProgress { get; set; }
|
||||
bool Result { get; set; }
|
||||
|
||||
ITraceLogger? TraceLogger { get; set; }
|
||||
IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
void WorkerDoWork(object sender, DoWorkEventArgs e);
|
||||
void WorkerProgressChanged(object sender, ProgressChangedEventArgs e);
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public FindParameterCalculator()
|
||||
{
|
||||
@@ -48,10 +48,11 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
|
||||
private void FindMinimumValue(double start, double end, Predicate<double> predicate)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Calculating parameter by iterations is started,\nrequired precision {Accuracy.IterationAccuracy}");
|
||||
if (predicate(end) == false)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Predicate for end value must be true", TraceLoggerStatuses.Error);
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": predicate for end value must be true");
|
||||
|
||||
}
|
||||
double precision = Accuracy.IterationAccuracy;
|
||||
int maxIterationCount = Accuracy.MaxIterationCount;
|
||||
@@ -60,18 +61,21 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
int iterationNum = 0;
|
||||
while (step > precision)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Iteration number {iterationNum}", TraceLoggerStatuses.Debug);
|
||||
TraceLogger?.AddMessage($"Iteration number {iterationNum} is started", TraceLoggerStatuses.Debug);
|
||||
if (predicate(current) == true)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Predicate value in {current} is true", TraceLoggerStatuses.Debug, 50);
|
||||
end = current;
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLogger?.AddMessage($"Predicate value in {current} is false", TraceLoggerStatuses.Debug, 50);
|
||||
start = current;
|
||||
}
|
||||
current = (start + end) / 2;
|
||||
TraceLogger?.AddMessage($"Current value {current}", TraceLoggerStatuses.Debug);
|
||||
step = (end - start) / 2;
|
||||
TraceLogger?.AddMessage($"New current value Cur=({start}+{end})/2={current}", TraceLoggerStatuses.Debug);
|
||||
current = (start + end) / 2d;
|
||||
step = (end - start) / 2d;
|
||||
TraceLogger?.AddMessage($"New step S={current}", TraceLoggerStatuses.Debug, 50);
|
||||
iterationNum++;
|
||||
|
||||
result.IsValid = false;
|
||||
@@ -86,7 +90,7 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": violation of iteration count");
|
||||
}
|
||||
}
|
||||
TraceLogger?.AddMessage($"Parameter value {current} was obtained");
|
||||
TraceLogger?.AddMessage($"Parameter value Cur={current} was found,\nCalculation has finished succefully");
|
||||
result.Parameter = current;
|
||||
result.Description = "Parameter was found succefully";
|
||||
result.IsValid = true;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
{
|
||||
public interface ICalculator : ICloneable
|
||||
{
|
||||
ITraceLogger? TraceLogger { get; set; }
|
||||
IShiftTraceLogger? TraceLogger { get; set; }
|
||||
string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Method for calculating
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Models.Tables;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public static class TraceLoggerTableByPointsFactory
|
||||
{
|
||||
public static TableLoggerEntry GetTableByPoint2D(IPoint2D point2D)
|
||||
{
|
||||
var table = new TableLoggerEntry(2);
|
||||
table.Table.AddRow(GetHeaderRow());
|
||||
table.Table.AddRow(GetPointRow(point2D));
|
||||
return table;
|
||||
}
|
||||
public static TableLoggerEntry GetTableByPoint2D(IEnumerable<IPoint2D> points)
|
||||
{
|
||||
var table = new TableLoggerEntry(2);
|
||||
table.Table.AddRow(GetHeaderRow());
|
||||
foreach (var item in points)
|
||||
{
|
||||
table.Table.AddRow(GetPointRow(item));
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
private static ShTableRow<ITraceLoggerEntry> GetHeaderRow()
|
||||
{
|
||||
var headerRow = new ShTableRow<ITraceLoggerEntry>(2);
|
||||
headerRow.Elements[0] = new StringLoggerEntry()
|
||||
{
|
||||
Message = "X",
|
||||
Priority = LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Info)
|
||||
};
|
||||
headerRow.Elements[1] = new StringLoggerEntry()
|
||||
{
|
||||
Message = "Y",
|
||||
Priority = LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Info)
|
||||
};
|
||||
return headerRow;
|
||||
}
|
||||
private static ShTableRow<ITraceLoggerEntry> GetPointRow(IPoint2D point2D)
|
||||
{
|
||||
var pointRow = new ShTableRow<ITraceLoggerEntry>(2);
|
||||
pointRow.Elements[0] = new StringLoggerEntry()
|
||||
{
|
||||
Message = Convert.ToString(point2D.X),
|
||||
Priority = LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Info)
|
||||
};
|
||||
pointRow.Elements[1] = new StringLoggerEntry()
|
||||
{
|
||||
Message = Convert.ToString(point2D.Y),
|
||||
Priority = LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Info)
|
||||
};
|
||||
return pointRow;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
StructureHelperCommon/Models/Loggers/IShiftTraceLogger.cs
Normal file
16
StructureHelperCommon/Models/Loggers/IShiftTraceLogger.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public interface IShiftTraceLogger : ITraceLogger
|
||||
{
|
||||
ITraceLogger Logger { get; set; }
|
||||
int ShiftPriority { get; set; }
|
||||
void AddEntry(ITraceLoggerEntry loggerEntry);
|
||||
IShiftTraceLogger GetSimilarTraceLogger(int shftPriority = 0);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ namespace StructureHelperCommon.Models.Loggers
|
||||
public interface ITraceLogger
|
||||
{
|
||||
List<ITraceLoggerEntry> TraceLoggerEntries { get; }
|
||||
void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info);
|
||||
void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info, int shiftPriority = 0);
|
||||
void AddMessage(string message, int priority);
|
||||
}
|
||||
}
|
||||
|
||||
33
StructureHelperCommon/Models/Loggers/LoggerService.cs
Normal file
33
StructureHelperCommon/Models/Loggers/LoggerService.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public static class LoggerService
|
||||
{
|
||||
const int fatal = 0;
|
||||
const int error = 100;
|
||||
const int warning = 200;
|
||||
const int info = 300;
|
||||
const int service = 400;
|
||||
const int debug = 500;
|
||||
public static int GetPriorityByStatus(TraceLoggerStatuses status)
|
||||
{
|
||||
if (status == TraceLoggerStatuses.Fatal) { return fatal; }
|
||||
else if (status == TraceLoggerStatuses.Error) { return error; }
|
||||
else if (status == TraceLoggerStatuses.Warning) { return warning; }
|
||||
else if (status == TraceLoggerStatuses.Info) { return info; }
|
||||
else if (status == TraceLoggerStatuses.Service) { return service; }
|
||||
else if (status == TraceLoggerStatuses.Debug) { return debug; }
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
55
StructureHelperCommon/Models/Loggers/ShiftTraceLogger.cs
Normal file
55
StructureHelperCommon/Models/Loggers/ShiftTraceLogger.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public class ShiftTraceLogger : IShiftTraceLogger
|
||||
{
|
||||
public ITraceLogger Logger { get; set; }
|
||||
public int ShiftPriority { get; set; }
|
||||
|
||||
public List<ITraceLoggerEntry> TraceLoggerEntries => Logger.TraceLoggerEntries;
|
||||
public ShiftTraceLogger(ITraceLogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
}
|
||||
public ShiftTraceLogger() : this(new TraceLogger()) { }
|
||||
public void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info, int shiftPrioriry = 0)
|
||||
{
|
||||
// if status in (fatal, error, warning) they must be kept as they are
|
||||
if (status <= TraceLoggerStatuses.Warning)
|
||||
{
|
||||
Logger.AddMessage(message, status);
|
||||
}
|
||||
else
|
||||
{
|
||||
var priority = LoggerService.GetPriorityByStatus(status) + shiftPrioriry;
|
||||
this.AddMessage(message, priority);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddMessage(string message, int priority)
|
||||
{
|
||||
priority += ShiftPriority;
|
||||
Logger.AddMessage(message, priority);
|
||||
}
|
||||
|
||||
public IShiftTraceLogger GetSimilarTraceLogger(int shiftPriority = 0)
|
||||
{
|
||||
var newLogger = new ShiftTraceLogger(Logger)
|
||||
{
|
||||
ShiftPriority = shiftPriority
|
||||
};
|
||||
return newLogger;
|
||||
}
|
||||
|
||||
public void AddEntry(ITraceLoggerEntry loggerEntry)
|
||||
{
|
||||
loggerEntry.Priority += ShiftPriority;
|
||||
Logger.TraceLoggerEntries.Add(loggerEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
StructureHelperCommon/Models/Loggers/TableLoggerEntry.cs
Normal file
27
StructureHelperCommon/Models/Loggers/TableLoggerEntry.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using StructureHelperCommon.Models.Tables;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public class TableLoggerEntry : ITraceLoggerEntry
|
||||
{
|
||||
private ListTable<ITraceLoggerEntry> table;
|
||||
public ListTable<ITraceLoggerEntry> Table {get => table;}
|
||||
public DateTime TimeStamp { get; }
|
||||
|
||||
public int Priority { get; set; }
|
||||
public TableLoggerEntry(int rowSize)
|
||||
{
|
||||
if (rowSize <= 0)
|
||||
{
|
||||
throw new ArgumentException("Row size must be greater than 0.", nameof(rowSize));
|
||||
}
|
||||
table = new(rowSize);
|
||||
TimeStamp = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,12 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace StructureHelperCommon.Models.Loggers
|
||||
{
|
||||
public class TraceLogger : ITraceLogger
|
||||
{
|
||||
const int fatal = 0;
|
||||
const int error = 1000;
|
||||
const int warning = 200;
|
||||
const int info = 300;
|
||||
const int service = 400;
|
||||
const int debug = 500;
|
||||
|
||||
{
|
||||
public List<ITraceLoggerEntry> TraceLoggerEntries { get; }
|
||||
|
||||
public TraceLogger()
|
||||
@@ -23,12 +17,15 @@ namespace StructureHelperCommon.Models.Loggers
|
||||
TraceLoggerEntries = new();
|
||||
}
|
||||
|
||||
public void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info)
|
||||
public void AddMessage(string message, TraceLoggerStatuses status = TraceLoggerStatuses.Info, int shiftPrioriry = 0)
|
||||
{
|
||||
if (status == TraceLoggerStatuses.Fatal) { message = $"Fatal error! {message}"; }
|
||||
if (status == TraceLoggerStatuses.Error) { message = $"Error! {message}"; }
|
||||
if (status == TraceLoggerStatuses.Warning) { message = $"Warning! {message}"; }
|
||||
TraceLoggerEntries.Add(new StringLoggerEntry()
|
||||
{
|
||||
Message = message,
|
||||
Priority = GetPriorityByStatus(status)
|
||||
Priority = LoggerService.GetPriorityByStatus(status)
|
||||
});
|
||||
}
|
||||
public void AddMessage(string message, int priority)
|
||||
@@ -39,19 +36,5 @@ namespace StructureHelperCommon.Models.Loggers
|
||||
Priority = priority
|
||||
});
|
||||
}
|
||||
|
||||
public static int GetPriorityByStatus(TraceLoggerStatuses status)
|
||||
{
|
||||
if (status == TraceLoggerStatuses.Fatal) { return fatal; }
|
||||
else if (status == TraceLoggerStatuses.Error) { return error; }
|
||||
else if (status == TraceLoggerStatuses.Warning) { return warning; }
|
||||
else if (status == TraceLoggerStatuses.Info) { return info; }
|
||||
else if (status == TraceLoggerStatuses.Service) { return service; }
|
||||
else if (status == TraceLoggerStatuses.Debug) { return debug; }
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace StructureHelperCommon.Models.Soils
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public AnchorCalculator(SoilAnchor soilAnchor, IAnchorSoilProperties anchorSoilProperties)
|
||||
{
|
||||
|
||||
10
StructureHelperCommon/Models/Tables/IShTableRow.cs
Normal file
10
StructureHelperCommon/Models/Tables/IShTableRow.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelperCommon.Models.Tables
|
||||
{
|
||||
public interface IShTableRow<T>
|
||||
{
|
||||
List<T> Elements { get; }
|
||||
int RowSize { get; }
|
||||
}
|
||||
}
|
||||
77
StructureHelperCommon/Models/Tables/ListTable.cs
Normal file
77
StructureHelperCommon/Models/Tables/ListTable.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Tables
|
||||
{
|
||||
public class ListTable<T>
|
||||
{
|
||||
private List<IShTableRow<T>> table;
|
||||
|
||||
public int RowSize { get; }
|
||||
|
||||
public ListTable(int rowSize)
|
||||
{
|
||||
if (rowSize <= 0)
|
||||
{
|
||||
throw new ArgumentException("Row size must be greater than 0.", nameof(rowSize));
|
||||
}
|
||||
|
||||
RowSize = rowSize;
|
||||
table = new List<IShTableRow<T>>();
|
||||
}
|
||||
|
||||
// Add a new row to the table
|
||||
public void AddRow(IShTableRow<T> tableRow)
|
||||
{
|
||||
table.Add(tableRow);
|
||||
}
|
||||
public void AddRow()
|
||||
{
|
||||
table.Add(new ShTableRow<T>(RowSize));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all rows in the table
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<IShTableRow<T>> GetAllRows()
|
||||
{
|
||||
return table;
|
||||
}
|
||||
|
||||
public List<T> GetElementsFromRow(int rowIndex)
|
||||
{
|
||||
if (rowIndex >= 0 && rowIndex < table.Count)
|
||||
{
|
||||
return table[rowIndex].Elements;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IndexOutOfRangeException("Row index is out of range.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a value at the specified column and row index
|
||||
/// </summary>
|
||||
/// <param name="columnIndex"></param>
|
||||
/// <param name="rowIndex"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <exception cref="IndexOutOfRangeException"></exception>
|
||||
public void SetValue(int columnIndex, int rowIndex, T value)
|
||||
{
|
||||
if (columnIndex >= 0 && columnIndex < RowSize &&
|
||||
rowIndex >= 0 && rowIndex < table.Count)
|
||||
{
|
||||
table[rowIndex].Elements[columnIndex] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IndexOutOfRangeException("Column or row index is out of range.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
38
StructureHelperCommon/Models/Tables/ShTableRow.cs
Normal file
38
StructureHelperCommon/Models/Tables/ShTableRow.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Tables
|
||||
{
|
||||
public class ShTableRow<T> : IShTableRow<T>
|
||||
{
|
||||
private List<T> elements;
|
||||
|
||||
public int RowSize { get; }
|
||||
|
||||
public ShTableRow(int rowSize)
|
||||
{
|
||||
if (rowSize <= 0)
|
||||
{
|
||||
throw new ArgumentException("Row size must be greater than 0.", nameof(rowSize));
|
||||
}
|
||||
|
||||
RowSize = rowSize;
|
||||
elements = new List<T>(rowSize);
|
||||
for (int i = 0; i < rowSize; i++)
|
||||
{
|
||||
elements.Add(default);
|
||||
}
|
||||
}
|
||||
|
||||
// Property to access elements in the row
|
||||
public List<T> Elements => elements;
|
||||
|
||||
internal void Add(object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
public List<IForceCombinationList> ForceCombinationLists { get; private set; }
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IResult Result { get; private set; }
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public ForceTupleCalculator(IForceTupleInputData inputData)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
/// <param name="points"></param>
|
||||
/// <returns></returns>
|
||||
List<IPoint2D> GetPoints(IEnumerable<IPoint2D> points);
|
||||
ITraceLogger? TraceLogger { get; set; }
|
||||
IShiftTraceLogger? TraceLogger { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
Predicate<Point2D> LimitPredicate { get; set; }
|
||||
IPoint2D CurrentPoint { get; set; }
|
||||
double GetParameter();
|
||||
ITraceLogger? TraceLogger { get; set; }
|
||||
IShiftTraceLogger? TraceLogger { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public LimitCurveCalculator(ILimitCurveLogic limitCurveLogic)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
public void Run()
|
||||
{
|
||||
if (TraceLogger is not null) { limitCurveLogic.TraceLogger = TraceLogger; }
|
||||
if (TraceLogger is not null) { limitCurveLogic.TraceLogger = TraceLogger.GetSimilarTraceLogger(50); }
|
||||
TraceLogger?.AddMessage($"Calculator type: {GetType()}", TraceLoggerStatuses.Service);
|
||||
TraceLogger?.AddMessage($"Start solution in calculator {Name}");
|
||||
result = new LimitCurveResult();
|
||||
@@ -58,11 +58,19 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
TraceLogger?.AddMessage($"Point count {PointCount}");
|
||||
surroundList = SurroundProcLogic.GetPoints();
|
||||
TraceLogger?.AddMessage($"There are {surroundList.Count()} point prepared for calculation");
|
||||
if (TraceLogger is not null)
|
||||
{
|
||||
AddTAbleToTraceLoggerByPoints(surroundList);
|
||||
}
|
||||
try
|
||||
{
|
||||
limitCurveLogic.ActionToOutputResults = GetCurrentStepNumber;
|
||||
factoredList = limitCurveLogic.GetPoints(surroundList);
|
||||
TraceLogger?.AddMessage($"Solution was successfully obtained for {factoredList.Count()} point");
|
||||
if (TraceLogger is not null)
|
||||
{
|
||||
AddTAbleToTraceLoggerByPoints(factoredList);
|
||||
}
|
||||
result.Points = factoredList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -73,6 +81,13 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
}
|
||||
}
|
||||
|
||||
private void AddTAbleToTraceLoggerByPoints(IEnumerable<IPoint2D> pointList)
|
||||
{
|
||||
var table = TraceLoggerTableByPointsFactory.GetTableByPoint2D(pointList);
|
||||
table.Priority = LoggerService.GetPriorityByStatus(TraceLoggerStatuses.Info) + TraceLogger.ShiftPriority;
|
||||
TraceLogger.AddEntry(table);
|
||||
}
|
||||
|
||||
private void GetCurrentStepNumber(IResult calcResult)
|
||||
{
|
||||
if (calcResult is not FindParameterResult)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
|
||||
private object lockObject = new object();
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public LimitCurveLogic(ILimitCurveParameterLogic parameterLogic)
|
||||
{
|
||||
@@ -89,7 +89,10 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
var localCurrentPoint = point.Clone() as IPoint2D;
|
||||
var logic = ParameterLogic.Clone() as ILimitCurveParameterLogic;
|
||||
logic.TraceLogger = new TraceLogger();
|
||||
logic.TraceLogger = new ShiftTraceLogger()
|
||||
{
|
||||
ShiftPriority=100
|
||||
};
|
||||
logic.CurrentPoint = localCurrentPoint;
|
||||
logic.LimitPredicate = limitPredicate;
|
||||
double parameter;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public Predicate<Point2D> LimitPredicate { get; set; }
|
||||
public IPoint2D CurrentPoint { get; set; }
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public LimitCurveParameterLogic()
|
||||
{
|
||||
@@ -29,7 +29,10 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
Predicate = GetFactorPredicate,
|
||||
};
|
||||
if (TraceLogger is not null) { parameterCalculator.TraceLogger = TraceLogger; }
|
||||
if (TraceLogger is not null)
|
||||
{
|
||||
parameterCalculator.TraceLogger = TraceLogger;
|
||||
}
|
||||
parameterCalculator.Accuracy.IterationAccuracy = 0.001d;
|
||||
parameterCalculator.Run();
|
||||
if (parameterCalculator.Result.IsValid == false)
|
||||
@@ -38,8 +41,11 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
}
|
||||
result = parameterCalculator.Result as FindParameterResult;
|
||||
var parameter = result.Parameter;
|
||||
if (parameter < 0.1d)
|
||||
var limitparamValue = 0.1d;
|
||||
if (parameter < limitparamValue)
|
||||
{
|
||||
var newAccuracy = limitparamValue / 10d;
|
||||
TraceLogger?.AddMessage($"Since current parameter value {parameter} has a low accuracy (less than {limitparamValue}) new parameter calculatin is started", TraceLoggerStatuses.Warning);
|
||||
parameterCalculator.Accuracy.IterationAccuracy = 0.0001d;
|
||||
parameterCalculator.Run();
|
||||
result = parameterCalculator.Result as FindParameterResult;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public LimitCurvesCalculator()
|
||||
{
|
||||
@@ -90,7 +90,10 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
{
|
||||
string calcName = $"{primitiveSeries.Name}_{predicateEntry.Name}_{limitState}_{calcTerm}";
|
||||
LimitCurveCalculator calculator = GetCalculator(ndms, predicateEntry.PredicateType, calcName);
|
||||
if (TraceLogger is not null) { calculator.TraceLogger = TraceLogger; }
|
||||
if (TraceLogger is not null)
|
||||
{
|
||||
calculator.TraceLogger = TraceLogger.GetSimilarTraceLogger(50);
|
||||
}
|
||||
calculators.Add(calculator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
public class StabLimitCurveLogic : ILimitCurveLogic
|
||||
{
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public List<IPoint2D> GetPoints(IEnumerable<IPoint2D> points)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces.Logics
|
||||
|
||||
public int StepCount => interpolateTuplesResult.StepCount + 1;
|
||||
|
||||
public ITraceLogger? TraceLogger { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public void WorkerDoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Geometry
|
||||
public IResult Result => geometryResult;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public GeometryCalculator(IEnumerable<INdm> ndms, IStrainMatrix strainMatrix)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
private (double EtaAlongX, double EtaAlongY) GetBucklingCoefficients()
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public Accuracy Accuracy {get;set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public CrackForceCalculator(IForceTupleCalculator forceTupleCalculator)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public CrackWidthCalculatorInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public ITraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user