IReport is added
This commit is contained in:
12
Services/Reports/CalculationReports/IIsoFieldReport.cs
Normal file
12
Services/Reports/CalculationReports/IIsoFieldReport.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Services.Reports.CalculationReports
|
||||
{
|
||||
interface IIsoFieldReport : IReport
|
||||
{
|
||||
}
|
||||
}
|
||||
37
Services/Reports/CalculationReports/IsoFieldReport.cs
Normal file
37
Services/Reports/CalculationReports/IsoFieldReport.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.Services.PrimitiveServices;
|
||||
using FieldVisualizer.WindowsOperation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Services.Reports.CalculationReports
|
||||
{
|
||||
public class IsoFieldReport : IIsoFieldReport
|
||||
{
|
||||
private IEnumerable<IPrimitiveSet> primitiveSets;
|
||||
|
||||
public void Prepare()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public void ShowPrepared()
|
||||
{
|
||||
FieldViewerOperation.ShowViewer(primitiveSets);
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
Prepare();
|
||||
ShowPrepared();
|
||||
}
|
||||
|
||||
public IsoFieldReport(IEnumerable<IPrimitiveSet> primitiveSets)
|
||||
{
|
||||
this.primitiveSets = primitiveSets;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Services/Reports/IReport.cs
Normal file
15
Services/Reports/IReport.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Services.Reports
|
||||
{
|
||||
public interface IReport
|
||||
{
|
||||
void Prepare();
|
||||
void ShowPrepared();
|
||||
void Show();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace StructureHelper.Services.ResultViewers
|
||||
List<IResultFunc> resultFuncs = new List<IResultFunc>();
|
||||
IStressLogic stressLogic = new StressLogic();
|
||||
resultFuncs.Add(new ResultFunc() { Name = "Total Strain", ResultFunction = stressLogic.GetTotalStrain });
|
||||
resultFuncs.Add(new ResultFunc() { Name = "Elastic Srtain", ResultFunction = stressLogic.GetElasticStrain });
|
||||
resultFuncs.Add(new ResultFunc() { Name = "Elastic Strain", ResultFunction = stressLogic.GetElasticStrain });
|
||||
resultFuncs.Add(new ResultFunc() { Name = "Plastic Strain", ResultFunction = stressLogic.GetPlasticStrain });
|
||||
resultFuncs.Add(new ResultFunc() { Name = "Stress", ResultFunction = stressLogic.GetStress });
|
||||
return resultFuncs;
|
||||
|
||||
@@ -15,6 +15,12 @@ namespace StructureHelper.Services.ResultViewers
|
||||
public static class ShowIsoFieldResult
|
||||
{
|
||||
public static void ShowResult(IStrainMatrix strainMatrix, IEnumerable<INdm> ndms, IEnumerable<IResultFunc> resultFuncs)
|
||||
{
|
||||
var primitiveSets = GetPrimitiveSets(strainMatrix, ndms, resultFuncs);
|
||||
FieldViewerOperation.ShowViewer(primitiveSets);
|
||||
}
|
||||
|
||||
public static List<IPrimitiveSet> GetPrimitiveSets(IStrainMatrix strainMatrix, IEnumerable<INdm> ndms, IEnumerable<IResultFunc> resultFuncs)
|
||||
{
|
||||
List<IPrimitiveSet> primitiveSets = new List<IPrimitiveSet>();
|
||||
foreach (var valDelegate in resultFuncs)
|
||||
@@ -39,8 +45,7 @@ namespace StructureHelper.Services.ResultViewers
|
||||
primitiveSet.ValuePrimitives = primitives;
|
||||
primitiveSets.Add(primitiveSet);
|
||||
}
|
||||
|
||||
FieldViewerOperation.ShowViewer(primitiveSets);
|
||||
return primitiveSets;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user