-
Notifications
You must be signed in to change notification settings - Fork 5
/
robtop.cpp
48 lines (30 loc) · 1.03 KB
/
robtop.cpp
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
// robtop.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include <string>
#include "config_parser.h"
#include "optimization.h"
#include "test_utils.h"
extern void version_info(void);
std::string version_hash(void);
extern void init_cuda(void);
config_parser_t parser;
int main(int argc, char** argv)
{
version_info();
init_cuda();
selfTest();
parser.parse(argc, argv);
setParameters(
FLAGS_volume_ratio, FLAGS_vol_reduction, FLAGS_design_step, FLAGS_filter_radius, FLAGS_damp_ratio, FLAGS_power_penalty, FLAGS_min_density,
FLAGS_gridreso, FLAGS_youngs_modulus, FLAGS_poisson_ratio, FLAGS_shell_width,
FLAGS_logdensity, FLAGS_logcompliance);
setOutpurDir(FLAGS_outdir);
setWorkMode(FLAGS_workmode);
setBoundaryCondition(parser.inFixArea, parser.inLoadArea, parser.loadField);
buildGrids(parser.mesh_vertices, parser.mesh_faces);
uploadTemplateMatrix();
logParams("cmdline", version_hash(), argc, argv);
TestSuit::testMain(FLAGS_testname);
optimization();
}