-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
104 lines (100 loc) · 3.94 KB
/
Program.cs
File metadata and controls
104 lines (100 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using ALFE.TopOpt;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using static System.Net.Mime.MediaTypeNames;
namespace ALFE
{
class Program
{
//static void Main(string[] args)
//{
// Console.WriteLine("Welcome to use Albert's optimizer!");
// string path = null;
// int type = 0;
// for (int i = 0; i < args.Length; i++)
// {
// switch (args[i])
// {
// case "-h":
// PrintHelp();
// return;
// case "--help":
// PrintHelp();
// return;
// case "-p":
// path = args[++i];
// break;
// case "-t":
// type = Convert.ToInt32(args[++i]);
// break;
// }
// }
// if (path != null)
// {
// BESO beso = null;
// SPBESO spbeso = null;
// SPTO spto = null;
// switch (type)
// {
// case 0:
// beso = FEIO.ReadBESO(path, "beso");
// Console.WriteLine("Read the file successfully!");
// beso.Initialize();
// Console.WriteLine("Initialize the optimization successfully!");
// beso.RunTopOpt();
// break;
// case 1:
// spbeso = FEIO.ReadSPBESO(path, "beso");
// Console.WriteLine("Read the file successfully!");
// spbeso.Initialize();
// Console.WriteLine("Initialize the optimization successfully!");
// spbeso.RunTopOpt();
// break;
// case 2:
// spto = FEIO.ReadSPTO(path, "beso");
// Console.WriteLine("Read the file successfully!");
// spto.Initialize();
// Console.WriteLine("Initialize the optimization successfully!");
// spto.RunTopOpt();
// break;
// default:
// Console.WriteLine("Type number is wrong.");
// break;
// }
// //Console.WriteLine(beso.Model.Elements[0].Ke);
// Console.ReadKey();
// }
// else
// {
// Console.WriteLine("The model path is wrong.");
// }
//}
//static void PrintHelp()
//{
// Console.WriteLine("Usage: ./ALOptimizer.exe -p D://test -t 0");
// Console.WriteLine();
// Console.WriteLine("Options:");
// Console.WriteLine(" -h, --help Show this help message");
// Console.WriteLine(" -p <model_path> The path of the assembled BESO model");
// Console.WriteLine(" -t <optimization_type> The type of optimization(0 = BESO, 1 = SPBESO, 2=SPTO)");
//}
static void Main()
{
Console.WriteLine("Welcome to use Albert's optimizer!");
//TestProgram.Test()
//string path = @"F:\\Teaching\\TO_animation";
string path = @"F:\canti";
//string path = @"F:\OneDrive - RMIT University\Work\AResearch\SPBESO_VR\figs\fig4\DrawnPattern";
BESO beso = FEIO.ReadBESO(path, "beso");
Console.WriteLine("Read the file successfully!");
beso.Initialize();
Console.WriteLine("Initialize the optimization successfully!");
beso.RunTopOpt();
//Console.WriteLine(beso.Model.Elements[0].Ke);
Console.ReadKey();
//FEIO.WriteIsovalues(path, beso);
}
}
}