Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
b92f48a4f8 | |||
3789f373ce | |||
5f4d6267b6 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
.DS_Store
|
||||
build/
|
||||
.vscode/
|
||||
data/
|
||||
bin/
|
212
CMakeLists.txt
212
CMakeLists.txt
@ -1,187 +1,75 @@
|
||||
cmake_minimum_required(VERSION 3.15.2)
|
||||
# 设置项目名称与语言
|
||||
project(GCTL_EXAMPLES VERSION 1.0)
|
||||
project(GCTL_TUTORIALS VERSION 2.0.1)
|
||||
|
||||
# 设置编译选项
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
||||
if(WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -O3")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# ExprTK库在macOS 15.4中编译会有错误 添加以下命令对应检查项
|
||||
add_compile_options(-Wno-missing-template-arg-list-after-template-kw)
|
||||
endif()
|
||||
|
||||
# 设置可执行文件的输出地址
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
||||
|
||||
find_package(GCTL)
|
||||
find_package(GCTL_MESH)
|
||||
find_package(GCTL_POTENTIAL)
|
||||
find_package(GCTL_SEISMIC)
|
||||
find_package(GCTL_ELECMAG)
|
||||
find_package(GCTL_GRAPHIC)
|
||||
find_package(GCTL_OPTIMIZATION)
|
||||
find_package(PkgConfig)
|
||||
pkg_search_module(EDITLINE QUIET libeditline)
|
||||
|
||||
if(GCT_FOUND)
|
||||
include_directories(${GCTL_INC_DIR})
|
||||
endif()
|
||||
find_package(GCTL QUIET)
|
||||
find_package(GCTL_MESH QUIET)
|
||||
find_package(GCTL_OPTIMIZATION QUIET)
|
||||
find_package(GCTL_POTENTIAL QUIET)
|
||||
include_directories(${GCTL_INC_DIR})
|
||||
include_directories(${GCTL_MESH_INC_DIR})
|
||||
include_directories(${GCTL_OPTIMIZATION_INC_DIR})
|
||||
include_directories(${GCTL_POTENTIAL_INC_DIR})
|
||||
|
||||
if(GCTL_OPENMP)
|
||||
message(STATUS "GCTL is compiled with OpenMP support.")
|
||||
find_package(OpenMP REQUIRED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
||||
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
|
||||
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
|
||||
message(STATUS "Processor: " ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
|
||||
if(GCTL_FOUND)
|
||||
message(STATUS "GCTL Version: " ${GCTL_VERSION})
|
||||
endif()
|
||||
|
||||
if(GCTL_MESH_FOUND)
|
||||
include_directories(${GCTL_MESH_INC_DIR})
|
||||
endif()
|
||||
|
||||
if(GCTL_POTENTIAL_FOUND)
|
||||
include_directories(${GCTL_POTENTIAL_INC_DIR})
|
||||
endif()
|
||||
|
||||
if(GCTL_SEISMIC_FOUND)
|
||||
include_directories(${GCTL_SEISMIC_INC_DIR})
|
||||
endif()
|
||||
|
||||
if(GCTL_ELECMAG_FOUND)
|
||||
include_directories(${GCTL_ELECMAG_INC_DIR})
|
||||
endif()
|
||||
|
||||
if(GCTL_GRAPHIC_FOUND)
|
||||
include_directories(${GCTL_GRAPHIC_INC_DIR})
|
||||
message(STATUS "GCTL_MESH Version: " ${GCTL_MESH_VERSION})
|
||||
endif()
|
||||
|
||||
if(GCTL_OPTIMIZATION_FOUND)
|
||||
include_directories(${GCTL_OPTIMIZATION_INC_DIR})
|
||||
message(STATUS "GCTL_OPTIMIZATION Version: " ${GCTL_OPTIMIZATION_VERSION})
|
||||
endif()
|
||||
|
||||
find_package(LibLCG)
|
||||
if(LibLCG_FOUND)
|
||||
include_directories(${LibLCG_INC_DIR})
|
||||
if(GCTL_POTENTIAL_FOUND)
|
||||
message(STATUS "GCTL_POTENTIAL Version: " ${GCTL_POTENTIAL_VERSION})
|
||||
endif()
|
||||
|
||||
macro(add_example name switch)
|
||||
if(${switch})
|
||||
# 添加可执行程序名称
|
||||
add_executable(${name} examples/${name}.cpp)
|
||||
# 设置安装后的动态库调用地址
|
||||
set_target_properties(${name} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
target_link_libraries(${name} PUBLIC OpenMP::OpenMP_CXX)
|
||||
macro(add_toolkit ex_dir name lib1 lib2 lib3 lib4)
|
||||
#aux_source_directory(${name} src/${ex_dir}/${name}.cpp)
|
||||
add_executable(${name} src/${ex_dir}/${name}.cpp)
|
||||
set_target_properties(${name} PROPERTIES INSTALL_RPATH /usr/local/lib)
|
||||
set_target_properties(${name} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# 链接动态库
|
||||
if(GCTL_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_LIB})
|
||||
endif()
|
||||
if(${lib1})
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_MESH_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_MESH_LIB})
|
||||
endif()
|
||||
if(${lib2})
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_MESH_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_POTENTIAL_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_POTENTIAL_LIB})
|
||||
endif()
|
||||
if(${lib3})
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_OPTIMIZATION_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_SEISMIC_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_SEISMIC_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_ELECMAG_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_ELECMAG_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_GRAPHIC_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_GRAPHIC_LIB})
|
||||
endif()
|
||||
|
||||
if(GCTL_OPTIMIZATION_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_OPTIMIZATION_LIB})
|
||||
endif()
|
||||
|
||||
if(LibLCG_FOUND)
|
||||
target_link_libraries(${name} PUBLIC ${LibLCG_LIB})
|
||||
endif()
|
||||
endif()
|
||||
if(${lib4})
|
||||
target_link_libraries(${name} PUBLIC ${GCTL_POTENTIAL_LIB})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
add_example(array_ex ON)
|
||||
add_example(sparray_ex ON)
|
||||
add_example(sparray2d_ex ON)
|
||||
add_example(spmat_ex ON)
|
||||
add_example(spmat_ex2 ON)
|
||||
add_example(spmat_ex3 ON)
|
||||
add_example(spmat_ex4 ON)
|
||||
add_example(spmat_ex5 ON)
|
||||
add_example(spmat_ex6 ON)
|
||||
add_example(spmat_ex7 ON)
|
||||
add_example(sptr_ex ON)
|
||||
add_example(stream_ex ON)
|
||||
add_example(stream_template_ex ON)
|
||||
add_example(vector_ex ON)
|
||||
add_example(spmat_inversion_ex ON)
|
||||
add_example(find_index_ex ON)
|
||||
add_example(difference_1d_ex ON)
|
||||
add_example(dynamic_stddev_ex ON)
|
||||
add_example(ellipse_filter_ex ON)
|
||||
add_example(gaussian_hill_ex ON)
|
||||
add_example(mat_inverse_ex ON)
|
||||
add_example(svd_ex ON)
|
||||
add_example(track_ellipse_ex ON)
|
||||
add_example(frac_model_ex ON)
|
||||
add_example(difference_2d_ex ON)
|
||||
add_example(geometry2d_ex ON)
|
||||
add_example(point2d_rotate_ex ON)
|
||||
add_example(point_ex ON)
|
||||
add_example(tensor_ex ON)
|
||||
add_example(entity_ex ON)
|
||||
add_example(cut_2d_tri_mesh_ex ON)
|
||||
add_example(cut_3d_tri_mesh_ex ON)
|
||||
add_example(tetra_neighbor_ex ON)
|
||||
add_example(gobser_tri2d_ex ON)
|
||||
add_example(gobser_rect2d_ex ON)
|
||||
add_example(gobser_polygon_ex ON)
|
||||
add_example(gobser_tricone_ex ON)
|
||||
add_example(gobser_block_ex ON)
|
||||
add_example(gobser_tesseroid_ex ON)
|
||||
add_example(gobser_tetra_sph_ex ON)
|
||||
add_example(mobser_tesseroid_ex ON)
|
||||
add_example(rtp_ex ON)
|
||||
add_example(drtp_ex ON)
|
||||
add_example(gobser_sphere_ex ON)
|
||||
add_example(grav_gradient_ex ON)
|
||||
add_example(mobser_block_ex ON)
|
||||
add_example(mobser_tetra_ex ON)
|
||||
add_example(gobser_tri_ex ON)
|
||||
add_example(gobser_tri_sph_ex ON)
|
||||
add_example(gobser_tetra_ex ON)
|
||||
add_example(getoption_ex ON)
|
||||
add_example(heap_sort_ex ON)
|
||||
add_example(flags_parser_ex ON)
|
||||
add_example(progressbar_ex ON)
|
||||
add_example(basic_io_ex ON)
|
||||
add_example(gmsh_io_ex ON)
|
||||
add_example(surfer_io_ex ON)
|
||||
add_example(triangle_io_ex ON)
|
||||
add_example(xyz_io_ex ON)
|
||||
add_example(text_io_ex ON)
|
||||
add_example(read_netcdf_ex ON)
|
||||
add_example(save_netcdf_ex ON)
|
||||
add_example(griding_ex ON)
|
||||
add_example(mesh_sample1_ex ON)
|
||||
add_example(mesh_sample4_ex ON)
|
||||
add_example(mesh_sample6_ex ON)
|
||||
add_example(mesh_sample7_ex ON)
|
||||
add_example(mesh_sample8_ex ON)
|
||||
add_example(mesh_sample9_ex ON)
|
||||
add_example(mesh_sample10_ex ON)
|
||||
add_example(mesh_sample2_ex ON)
|
||||
add_example(mesh_sample3_ex ON)
|
||||
add_example(mesh_sample5_ex ON)
|
||||
add_example(wavelet_ex ON)
|
||||
add_example(traveltime_tri2d_ex ON)
|
||||
add_example(traveltime_tri2d_ex2 ON)
|
||||
add_example(traveltime_tri2d_ex3 ON)
|
||||
add_example(traveltime_tet3d_ex ON)
|
||||
add_example(traveltime_tet3d_ex2 ON)
|
||||
add_example(gmt_plot_grid_ex ON)
|
||||
add_example(parse_string ON)
|
||||
if(GCTL_FOUND AND GCTL_MESH_FOUND)
|
||||
add_toolkit(mesh create_tin_ex1 ON ON OFF OFF)
|
||||
add_toolkit(mesh create_tin_ex2 ON ON OFF OFF)
|
||||
add_toolkit(mesh create_tin_ex3 ON ON OFF OFF)
|
||||
add_toolkit(mesh create_tin_ex4 ON ON OFF OFF)
|
||||
endif()
|
11
config.sh
11
config.sh
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cmd=${1}
|
||||
|
||||
if [[ ${cmd} == "configure" && ! -d "build/" ]]; then
|
||||
mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
elif [[ ${cmd} == "configure" ]]; then
|
||||
cd build && rm -rf * && cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
elif [[ ${cmd} == "build" ]]; then
|
||||
cd build && make
|
||||
fi
|
@ -1,24 +0,0 @@
|
||||
//+
|
||||
Point(1) = {40, 40, -20, 5};
|
||||
//+
|
||||
Point(2) = {60, 40, -20, 5};
|
||||
//+
|
||||
Point(3) = {60, 60, -20, 5};
|
||||
//+
|
||||
Point(4) = {40, 60, -20, 5};
|
||||
//+
|
||||
Line(1) = {4, 1};
|
||||
//+
|
||||
Line(2) = {1, 2};
|
||||
//+
|
||||
Line(3) = {2, 3};
|
||||
//+
|
||||
Line(4) = {3, 4};
|
||||
//+
|
||||
Curve Loop(1) = {1, 2, 3, 4};
|
||||
//+
|
||||
Plane Surface(1) = {1};
|
||||
//+
|
||||
Extrude {0, 0, -40} {
|
||||
Surface{1};
|
||||
}
|
@ -1,725 +0,0 @@
|
||||
$MeshFormat
|
||||
2.2 0 8
|
||||
$EndMeshFormat
|
||||
$Nodes
|
||||
216
|
||||
1 40 40 -20
|
||||
2 60 40 -20
|
||||
3 60 60 -20
|
||||
4 40 60 -20
|
||||
5 40 60 -60
|
||||
6 40 40 -60
|
||||
7 60 40 -60
|
||||
8 60 60 -60
|
||||
9 40 55 -20
|
||||
10 40 50 -20
|
||||
11 40 45 -20
|
||||
12 45 40 -20
|
||||
13 50 40 -20
|
||||
14 55 40 -20
|
||||
15 60 45 -20
|
||||
16 60 50 -20
|
||||
17 60 55 -20
|
||||
18 55 60 -20
|
||||
19 50 60 -20
|
||||
20 45 60 -20
|
||||
21 40 55 -60
|
||||
22 40 50 -60
|
||||
23 40 45 -60
|
||||
24 45 40 -60
|
||||
25 50 40 -60
|
||||
26 55 40 -60
|
||||
27 60 45 -60
|
||||
28 60 50 -60
|
||||
29 60 55 -60
|
||||
30 55 60 -60
|
||||
31 50 60 -60
|
||||
32 45 60 -60
|
||||
33 40 60 -25
|
||||
34 40 60 -30
|
||||
35 40 60 -35
|
||||
36 40 60 -40
|
||||
37 40 60 -45
|
||||
38 40 60 -50
|
||||
39 40 60 -55
|
||||
40 40 40 -25
|
||||
41 40 40 -30
|
||||
42 40 40 -35
|
||||
43 40 40 -40
|
||||
44 40 40 -45
|
||||
45 40 40 -50
|
||||
46 40 40 -55
|
||||
47 60 40 -25
|
||||
48 60 40 -30
|
||||
49 60 40 -35
|
||||
50 60 40 -40
|
||||
51 60 40 -45
|
||||
52 60 40 -50
|
||||
53 60 40 -55
|
||||
54 60 60 -25
|
||||
55 60 60 -30
|
||||
56 60 60 -35
|
||||
57 60 60 -40
|
||||
58 60 60 -45
|
||||
59 60 60 -50
|
||||
60 60 60 -55
|
||||
61 44.33012701892219 52.5 -20
|
||||
62 52.47881315359561 44.23386022527915 -20
|
||||
63 55.90776374537427 52.7192820837686 -20
|
||||
64 47.5198999874148 44.22801311682172 -20
|
||||
65 49.99999999999999 48.66025403784437 -20
|
||||
66 44.25171350736355 47.34142019875174 -20
|
||||
67 49.59311491861806 54.16545355279478 -20
|
||||
68 55.26848172135622 47.98009581137518 -20
|
||||
69 46.20627653014991 56.4630216184953 -20
|
||||
70 52.5 56.89419619426319 -20
|
||||
71 56.33974596215563 43.66025403784438 -20
|
||||
72 43.6602540378444 43.6602540378444 -20
|
||||
73 56.43804438938708 56.50081586651419 -20
|
||||
74 52.33556481836142 51.7680829920907 -20
|
||||
75 42.91853012842775 57.0303908070383 -20
|
||||
76 40 55.66987299394737 -32.50000000471823
|
||||
77 40 55.66987300554797 -42.5
|
||||
78 40 44.33012701892219 -37.5
|
||||
79 40 44.28061564207835 -46.95381401949891
|
||||
80 40 47.1646564400433 -24.04676791925302
|
||||
81 40 52.64173424177071 -55.52838173624344
|
||||
82 40 55.88256244894759 -27.64857958872926
|
||||
83 40 51.69103170086368 -29.98028879029709
|
||||
84 40 51.55648142627755 -35.0291993408116
|
||||
85 40 47.00961894323343 -32.49999995441897
|
||||
86 40 55.6945272771427 -37.50154334149975
|
||||
87 40 51.52774062327615 -39.98544079704492
|
||||
88 40 51.51954163111677 -44.80860071953228
|
||||
89 40 47.05043578512948 -42.40161663732587
|
||||
90 40 55.71493013374685 -47.40769188154377
|
||||
91 40 51.20181102679781 -50.31013430041553
|
||||
92 40 43.97444316881442 -52.20072988807124
|
||||
93 40 52.1196001177427 -24.59321271221484
|
||||
94 40 47.74246748223494 -54.97591875371555
|
||||
95 40 55.95773343429519 -52.37793612776303
|
||||
96 40 44.07198146385511 -27.90290659461775
|
||||
97 40 47.05530885890934 -50.1705338945121
|
||||
98 40 48.28075255656525 -37.49999999665486
|
||||
99 40 43.05899356297641 -32.5
|
||||
100 40 43.05899354713785 -42.5
|
||||
101 40 48.21201035577964 -27.83535444102185
|
||||
102 40 56.33974588991858 -56.33974599979055
|
||||
103 40 43.52928566691691 -56.32866992217807
|
||||
104 40 56.3397459891188 -23.66025403149145
|
||||
105 40 43.57256574063302 -23.61422920812387
|
||||
106 40 48.08334292753518 -46.92602593271548
|
||||
107 44.33012700605263 40 -32.50000000471823
|
||||
108 44.33012699445203 40 -42.5
|
||||
109 55.66987298107781 40 -37.5
|
||||
110 55.71938435792165 40 -46.95381401949891
|
||||
111 52.8353435599567 40 -24.04676791925302
|
||||
112 47.35826575822929 40 -55.52838173624344
|
||||
113 44.11743755105241 40 -27.64857958872926
|
||||
114 48.30896829913632 40 -29.98028879029709
|
||||
115 48.44351857372245 40 -35.0291993408116
|
||||
116 52.99038105676657 40 -32.49999995441897
|
||||
117 44.3054727228573 40 -37.50154334149975
|
||||
118 48.47225937672385 40 -39.98544079704492
|
||||
119 48.48045836888323 40 -44.80860071953228
|
||||
120 52.94956421487052 40 -42.40161663732587
|
||||
121 44.28506986625315 40 -47.40769188154377
|
||||
122 48.79818897320219 40 -50.31013430041553
|
||||
123 56.02555683118558 40 -52.20072988807124
|
||||
124 47.8803998822573 40 -24.59321271221484
|
||||
125 52.25753251776506 40 -54.97591875371555
|
||||
126 44.04226656570481 40 -52.37793612776303
|
||||
127 55.92801853614489 40 -27.90290659461775
|
||||
128 52.94469114109066 40 -50.1705338945121
|
||||
129 51.71924744343475 40 -37.49999999665486
|
||||
130 56.94100643702359 40 -32.5
|
||||
131 56.94100645286215 40 -42.5
|
||||
132 51.78798964422036 40 -27.83535444102185
|
||||
133 43.66025411008142 40 -56.33974599979055
|
||||
134 56.47071433308309 40 -56.32866992217807
|
||||
135 43.6602540108812 40 -23.66025403149145
|
||||
136 56.42743425936698 40 -23.61422920812387
|
||||
137 51.91665707246482 40 -46.92602593271548
|
||||
138 60 44.33012699815075 -32.5000000113757
|
||||
139 60 44.37829129004609 -42.90931182020138
|
||||
140 60 55.71938435694304 -36.95381400428283
|
||||
141 60 55.66987301532021 -47.49999995820747
|
||||
142 60 52.8353435599567 -24.04676791925302
|
||||
143 60 47.16465644381281 -55.95323209459164
|
||||
144 60 44.11743755008194 -27.64857961057699
|
||||
145 60 48.30896831042488 -29.9802887870698
|
||||
146 60 48.44164342774016 -34.81330442472456
|
||||
147 60 52.95625840378454 -32.37826512039101
|
||||
148 60 55.72313767061564 -42.44414598262877
|
||||
149 60 51.29478995268745 -44.60371484044391
|
||||
150 60 51.66168758431645 -49.95002364727866
|
||||
151 60 47.00961894323341 -47.49999999999999
|
||||
152 60 55.91455461300396 -52.33925909231164
|
||||
153 60 44.33012699614927 -37.50000003944386
|
||||
154 60 48.66025402645792 -40
|
||||
155 60 52.11826364787132 -55.39941370770136
|
||||
156 60 47.88039988292511 -24.59321271353804
|
||||
157 60 44.0719814689928 -52.09709342192372
|
||||
158 60 55.92805014414041 -27.88440185934383
|
||||
159 60 52.61087942752256 -40
|
||||
160 60 56.94100643702359 -32.5
|
||||
161 60 43.05899354713782 -47.5
|
||||
162 60 48.21015397133992 -52.15065348669999
|
||||
163 60 51.77945187712652 -27.80171904995707
|
||||
164 60 56.33974587422675 -56.33974592196372
|
||||
165 60 43.6602540108812 -23.66025403149145
|
||||
166 60 56.36520366887994 -23.63479631400501
|
||||
167 60 43.57256575001217 -56.38577081329036
|
||||
168 60 47.82745914694526 -43.75578226254463
|
||||
169 60 51.82742975072789 -36.82230670823676
|
||||
170 44.46206424749587 60 -32.48789080703315
|
||||
171 44.33012701892219 60 -42.5
|
||||
172 55.6199673212738 60 -37.89146707015256
|
||||
173 55.66987298107781 60 -47.5
|
||||
174 52.02088862391027 60 -24.95514565917194
|
||||
175 47.97911138856856 60 -55.04485433888402
|
||||
176 44.2966062193063 60 -47.44036854247502
|
||||
177 48.52431380902681 60 -45.01579854858471
|
||||
178 48.56890279381967 60 -40.14258303064003
|
||||
179 52.99038105676658 60 -42.50000000000001
|
||||
180 48.19074011671948 60 -49.82846375730144
|
||||
181 55.66987298107781 60 -32.5
|
||||
182 51.57493326491522 60 -34.74517167891557
|
||||
183 51.82707365273258 60 -30.10345732057259
|
||||
184 47.18753302798585 60 -24.16408364786284
|
||||
185 44.22276174709118 60 -37.71218780888231
|
||||
186 52.81246698787066 60 -55.83591635732334
|
||||
187 43.95323898121627 60 -27.32379942312101
|
||||
188 56.07724696086309 60 -52.66898975647958
|
||||
189 44.03835678540032 60 -52.19999920591307
|
||||
190 55.95850183821808 60 -27.77495325321397
|
||||
191 48.64661910259962 60 -32.32408655934266
|
||||
192 51.5879556047819 60 -47.38956127281753
|
||||
193 56.9410064370236 60 -42.5
|
||||
194 56.47467781803796 60 -23.65265408612403
|
||||
195 43.52449106203885 60 -56.33991178118794
|
||||
196 56.33974590004345 60 -56.33974600991542
|
||||
197 43.66025409222772 60 -23.66025398859716
|
||||
198 47.97979653840487 60 -28.47334348142905
|
||||
199 52.06925431676402 60 -51.46187696894305
|
||||
200 51.80899230528527 60 -38.49257909191297
|
||||
201 48.04214553204288 60 -36.14555599380719
|
||||
202 44.33012701892219 52.5 -60
|
||||
203 52.47881315359561 44.23386022527915 -60
|
||||
204 55.90776374537427 52.7192820837686 -60
|
||||
205 47.5198999874148 44.22801311682172 -60
|
||||
206 49.99999999999999 48.66025403784437 -60
|
||||
207 44.25171350736355 47.34142019875174 -60
|
||||
208 49.59311491861806 54.16545355279478 -60
|
||||
209 55.26848172135622 47.98009581137518 -60
|
||||
210 46.20627653014991 56.4630216184953 -60
|
||||
211 52.5 56.89419619426319 -60
|
||||
212 56.33974596215563 43.66025403784438 -60
|
||||
213 43.6602540378444 43.6602540378444 -60
|
||||
214 56.43804438938708 56.50081586651419 -60
|
||||
215 52.33556481836142 51.7680829920907 -60
|
||||
216 42.91853012842775 57.0303908070383 -60
|
||||
$EndNodes
|
||||
$Elements
|
||||
500
|
||||
1 15 2 0 1 1
|
||||
2 15 2 0 2 2
|
||||
3 15 2 0 3 3
|
||||
4 15 2 0 4 4
|
||||
5 15 2 0 5 5
|
||||
6 15 2 0 6 6
|
||||
7 15 2 0 10 7
|
||||
8 15 2 0 14 8
|
||||
9 1 2 0 1 4 9
|
||||
10 1 2 0 1 9 10
|
||||
11 1 2 0 1 10 11
|
||||
12 1 2 0 1 11 1
|
||||
13 1 2 0 2 1 12
|
||||
14 1 2 0 2 12 13
|
||||
15 1 2 0 2 13 14
|
||||
16 1 2 0 2 14 2
|
||||
17 1 2 0 3 2 15
|
||||
18 1 2 0 3 15 16
|
||||
19 1 2 0 3 16 17
|
||||
20 1 2 0 3 17 3
|
||||
21 1 2 0 4 3 18
|
||||
22 1 2 0 4 18 19
|
||||
23 1 2 0 4 19 20
|
||||
24 1 2 0 4 20 4
|
||||
25 1 2 0 6 5 21
|
||||
26 1 2 0 6 21 22
|
||||
27 1 2 0 6 22 23
|
||||
28 1 2 0 6 23 6
|
||||
29 1 2 0 7 6 24
|
||||
30 1 2 0 7 24 25
|
||||
31 1 2 0 7 25 26
|
||||
32 1 2 0 7 26 7
|
||||
33 1 2 0 8 7 27
|
||||
34 1 2 0 8 27 28
|
||||
35 1 2 0 8 28 29
|
||||
36 1 2 0 8 29 8
|
||||
37 1 2 0 9 8 30
|
||||
38 1 2 0 9 30 31
|
||||
39 1 2 0 9 31 32
|
||||
40 1 2 0 9 32 5
|
||||
41 1 2 0 11 4 33
|
||||
42 1 2 0 11 33 34
|
||||
43 1 2 0 11 34 35
|
||||
44 1 2 0 11 35 36
|
||||
45 1 2 0 11 36 37
|
||||
46 1 2 0 11 37 38
|
||||
47 1 2 0 11 38 39
|
||||
48 1 2 0 11 39 5
|
||||
49 1 2 0 12 1 40
|
||||
50 1 2 0 12 40 41
|
||||
51 1 2 0 12 41 42
|
||||
52 1 2 0 12 42 43
|
||||
53 1 2 0 12 43 44
|
||||
54 1 2 0 12 44 45
|
||||
55 1 2 0 12 45 46
|
||||
56 1 2 0 12 46 6
|
||||
57 1 2 0 16 2 47
|
||||
58 1 2 0 16 47 48
|
||||
59 1 2 0 16 48 49
|
||||
60 1 2 0 16 49 50
|
||||
61 1 2 0 16 50 51
|
||||
62 1 2 0 16 51 52
|
||||
63 1 2 0 16 52 53
|
||||
64 1 2 0 16 53 7
|
||||
65 1 2 0 20 3 54
|
||||
66 1 2 0 20 54 55
|
||||
67 1 2 0 20 55 56
|
||||
68 1 2 0 20 56 57
|
||||
69 1 2 0 20 57 58
|
||||
70 1 2 0 20 58 59
|
||||
71 1 2 0 20 59 60
|
||||
72 1 2 0 20 60 8
|
||||
73 2 2 0 1 61 65 67
|
||||
74 2 2 0 1 65 61 66
|
||||
75 2 2 0 1 65 62 68
|
||||
76 2 2 0 1 64 65 66
|
||||
77 2 2 0 1 67 19 69
|
||||
78 2 2 0 1 65 68 74
|
||||
79 2 2 0 1 19 67 70
|
||||
80 2 2 0 1 9 10 61
|
||||
81 2 2 0 1 13 14 62
|
||||
82 2 2 0 1 16 17 63
|
||||
83 2 2 0 1 64 62 65
|
||||
84 2 2 0 1 12 13 64
|
||||
85 2 2 0 1 13 62 64
|
||||
86 2 2 0 1 19 20 69
|
||||
87 2 2 0 1 63 70 74
|
||||
88 2 2 0 1 10 11 66
|
||||
89 2 2 0 1 15 16 68
|
||||
90 2 2 0 1 61 10 66
|
||||
91 2 2 0 1 16 63 68
|
||||
92 2 2 0 1 67 65 74
|
||||
93 2 2 0 1 61 67 69
|
||||
94 2 2 0 1 11 1 72
|
||||
95 2 2 0 1 1 12 72
|
||||
96 2 2 0 1 14 2 71
|
||||
97 2 2 0 1 2 15 71
|
||||
98 2 2 0 1 17 3 73
|
||||
99 2 2 0 1 3 18 73
|
||||
100 2 2 0 1 68 63 74
|
||||
101 2 2 0 1 70 63 73
|
||||
102 2 2 0 1 9 61 75
|
||||
103 2 2 0 1 70 67 74
|
||||
104 2 2 0 1 15 68 71
|
||||
105 2 2 0 1 66 11 72
|
||||
106 2 2 0 1 18 19 70
|
||||
107 2 2 0 1 63 17 73
|
||||
108 2 2 0 1 62 14 71
|
||||
109 2 2 0 1 12 64 72
|
||||
110 2 2 0 1 61 69 75
|
||||
111 2 2 0 1 20 4 75
|
||||
112 2 2 0 1 4 9 75
|
||||
113 2 2 0 1 68 62 71
|
||||
114 2 2 0 1 64 66 72
|
||||
115 2 2 0 1 18 70 73
|
||||
116 2 2 0 1 69 20 75
|
||||
117 2 2 0 13 91 94 81
|
||||
118 2 2 0 13 91 97 94
|
||||
119 2 2 0 13 93 101 83
|
||||
120 2 2 0 13 82 93 83
|
||||
121 2 2 0 13 81 95 91
|
||||
122 2 2 0 13 80 101 93
|
||||
123 2 2 0 13 96 99 85
|
||||
124 2 2 0 13 94 97 92
|
||||
125 2 2 0 13 78 98 85
|
||||
126 2 2 0 13 89 98 78
|
||||
127 2 2 0 13 85 99 78
|
||||
128 2 2 0 13 89 100 79
|
||||
129 2 2 0 13 78 100 89
|
||||
130 2 2 0 13 85 101 96
|
||||
131 2 2 0 13 88 91 90
|
||||
132 2 2 0 13 88 90 77
|
||||
133 2 2 0 13 84 87 86
|
||||
134 2 2 0 13 11 80 10
|
||||
135 2 2 0 13 21 81 22
|
||||
136 2 2 0 13 84 86 76
|
||||
137 2 2 0 13 82 83 76
|
||||
138 2 2 0 13 83 84 76
|
||||
139 2 2 0 13 34 76 35
|
||||
140 2 2 0 13 35 86 36
|
||||
141 2 2 0 13 76 86 35
|
||||
142 2 2 0 13 36 77 37
|
||||
143 2 2 0 13 43 78 42
|
||||
144 2 2 0 13 45 79 44
|
||||
145 2 2 0 13 46 92 45
|
||||
146 2 2 0 13 86 87 77
|
||||
147 2 2 0 13 87 89 88
|
||||
148 2 2 0 13 36 86 77
|
||||
149 2 2 0 13 45 92 79
|
||||
150 2 2 0 13 87 88 77
|
||||
151 2 2 0 13 83 85 84
|
||||
152 2 2 0 13 34 82 76
|
||||
153 2 2 0 13 33 82 34
|
||||
154 2 2 0 13 77 90 37
|
||||
155 2 2 0 13 37 90 38
|
||||
156 2 2 0 13 79 106 89
|
||||
157 2 2 0 13 38 95 39
|
||||
158 2 2 0 13 22 94 23
|
||||
159 2 2 0 13 10 93 9
|
||||
160 2 2 0 13 91 95 90
|
||||
161 2 2 0 13 81 94 22
|
||||
162 2 2 0 13 80 93 10
|
||||
163 2 2 0 13 90 95 38
|
||||
164 2 2 0 13 41 96 40
|
||||
165 2 2 0 13 85 98 84
|
||||
166 2 2 0 13 78 99 42
|
||||
167 2 2 0 13 79 100 44
|
||||
168 2 2 0 13 43 100 78
|
||||
169 2 2 0 13 87 98 89
|
||||
170 2 2 0 13 39 102 5
|
||||
171 2 2 0 13 6 103 46
|
||||
172 2 2 0 13 5 102 21
|
||||
173 2 2 0 13 9 104 4
|
||||
174 2 2 0 13 23 103 6
|
||||
175 2 2 0 13 4 104 33
|
||||
176 2 2 0 13 88 106 91
|
||||
177 2 2 0 13 40 105 1
|
||||
178 2 2 0 13 1 105 11
|
||||
179 2 2 0 13 41 99 96
|
||||
180 2 2 0 13 91 106 97
|
||||
181 2 2 0 13 83 101 85
|
||||
182 2 2 0 13 93 104 9
|
||||
183 2 2 0 13 95 102 39
|
||||
184 2 2 0 13 94 103 23
|
||||
185 2 2 0 13 92 97 79
|
||||
186 2 2 0 13 42 99 41
|
||||
187 2 2 0 13 44 100 43
|
||||
188 2 2 0 13 84 98 87
|
||||
189 2 2 0 13 11 105 80
|
||||
190 2 2 0 13 46 103 92
|
||||
191 2 2 0 13 21 102 81
|
||||
192 2 2 0 13 33 104 82
|
||||
193 2 2 0 13 89 106 88
|
||||
194 2 2 0 13 82 104 93
|
||||
195 2 2 0 13 92 103 94
|
||||
196 2 2 0 13 81 102 95
|
||||
197 2 2 0 13 96 101 80
|
||||
198 2 2 0 13 80 105 96
|
||||
199 2 2 0 13 96 105 40
|
||||
200 2 2 0 13 97 106 79
|
||||
201 2 2 0 17 122 125 112
|
||||
202 2 2 0 17 122 128 125
|
||||
203 2 2 0 17 124 132 114
|
||||
204 2 2 0 17 113 124 114
|
||||
205 2 2 0 17 112 126 122
|
||||
206 2 2 0 17 111 132 124
|
||||
207 2 2 0 17 127 130 116
|
||||
208 2 2 0 17 125 128 123
|
||||
209 2 2 0 17 109 129 116
|
||||
210 2 2 0 17 120 129 109
|
||||
211 2 2 0 17 116 130 109
|
||||
212 2 2 0 17 120 131 110
|
||||
213 2 2 0 17 109 131 120
|
||||
214 2 2 0 17 116 132 127
|
||||
215 2 2 0 17 119 122 121
|
||||
216 2 2 0 17 119 121 108
|
||||
217 2 2 0 17 115 118 117
|
||||
218 2 2 0 17 14 111 13
|
||||
219 2 2 0 17 24 112 25
|
||||
220 2 2 0 17 115 117 107
|
||||
221 2 2 0 17 113 114 107
|
||||
222 2 2 0 17 114 115 107
|
||||
223 2 2 0 17 41 107 42
|
||||
224 2 2 0 17 42 117 43
|
||||
225 2 2 0 17 107 117 42
|
||||
226 2 2 0 17 43 108 44
|
||||
227 2 2 0 17 50 109 49
|
||||
228 2 2 0 17 52 110 51
|
||||
229 2 2 0 17 53 123 52
|
||||
230 2 2 0 17 117 118 108
|
||||
231 2 2 0 17 118 120 119
|
||||
232 2 2 0 17 43 117 108
|
||||
233 2 2 0 17 52 123 110
|
||||
234 2 2 0 17 118 119 108
|
||||
235 2 2 0 17 114 116 115
|
||||
236 2 2 0 17 41 113 107
|
||||
237 2 2 0 17 40 113 41
|
||||
238 2 2 0 17 108 121 44
|
||||
239 2 2 0 17 44 121 45
|
||||
240 2 2 0 17 110 137 120
|
||||
241 2 2 0 17 45 126 46
|
||||
242 2 2 0 17 25 125 26
|
||||
243 2 2 0 17 13 124 12
|
||||
244 2 2 0 17 122 126 121
|
||||
245 2 2 0 17 112 125 25
|
||||
246 2 2 0 17 111 124 13
|
||||
247 2 2 0 17 121 126 45
|
||||
248 2 2 0 17 48 127 47
|
||||
249 2 2 0 17 116 129 115
|
||||
250 2 2 0 17 109 130 49
|
||||
251 2 2 0 17 110 131 51
|
||||
252 2 2 0 17 50 131 109
|
||||
253 2 2 0 17 118 129 120
|
||||
254 2 2 0 17 46 133 6
|
||||
255 2 2 0 17 7 134 53
|
||||
256 2 2 0 17 6 133 24
|
||||
257 2 2 0 17 12 135 1
|
||||
258 2 2 0 17 26 134 7
|
||||
259 2 2 0 17 1 135 40
|
||||
260 2 2 0 17 119 137 122
|
||||
261 2 2 0 17 47 136 2
|
||||
262 2 2 0 17 2 136 14
|
||||
263 2 2 0 17 48 130 127
|
||||
264 2 2 0 17 122 137 128
|
||||
265 2 2 0 17 114 132 116
|
||||
266 2 2 0 17 124 135 12
|
||||
267 2 2 0 17 126 133 46
|
||||
268 2 2 0 17 125 134 26
|
||||
269 2 2 0 17 123 128 110
|
||||
270 2 2 0 17 49 130 48
|
||||
271 2 2 0 17 51 131 50
|
||||
272 2 2 0 17 115 129 118
|
||||
273 2 2 0 17 14 136 111
|
||||
274 2 2 0 17 53 134 123
|
||||
275 2 2 0 17 24 133 112
|
||||
276 2 2 0 17 40 135 113
|
||||
277 2 2 0 17 120 137 119
|
||||
278 2 2 0 17 113 135 124
|
||||
279 2 2 0 17 123 134 125
|
||||
280 2 2 0 17 112 133 126
|
||||
281 2 2 0 17 127 132 111
|
||||
282 2 2 0 17 111 136 127
|
||||
283 2 2 0 17 127 136 47
|
||||
284 2 2 0 17 128 137 110
|
||||
285 2 2 0 21 155 162 150
|
||||
286 2 2 0 21 156 163 145
|
||||
287 2 2 0 21 144 156 145
|
||||
288 2 2 0 21 152 155 150
|
||||
289 2 2 0 21 143 162 155
|
||||
290 2 2 0 21 142 163 156
|
||||
291 2 2 0 21 157 161 151
|
||||
292 2 2 0 21 158 160 147
|
||||
293 2 2 0 21 147 160 140
|
||||
294 2 2 0 21 154 159 149
|
||||
295 2 2 0 21 151 161 139
|
||||
296 2 2 0 21 151 162 157
|
||||
297 2 2 0 21 147 163 158
|
||||
298 2 2 0 21 146 153 138
|
||||
299 2 2 0 21 146 154 153
|
||||
300 2 2 0 21 17 142 16
|
||||
301 2 2 0 21 27 143 28
|
||||
302 2 2 0 21 138 153 49
|
||||
303 2 2 0 21 150 151 149
|
||||
304 2 2 0 21 141 150 149
|
||||
305 2 2 0 21 144 145 138
|
||||
306 2 2 0 21 145 146 138
|
||||
307 2 2 0 21 48 138 49
|
||||
308 2 2 0 21 50 139 51
|
||||
309 2 2 0 21 57 140 56
|
||||
310 2 2 0 21 58 148 57
|
||||
311 2 2 0 21 59 141 58
|
||||
312 2 2 0 21 141 148 58
|
||||
313 2 2 0 21 141 149 148
|
||||
314 2 2 0 21 57 148 140
|
||||
315 2 2 0 21 145 147 146
|
||||
316 2 2 0 21 48 144 138
|
||||
317 2 2 0 21 49 153 50
|
||||
318 2 2 0 21 47 144 48
|
||||
319 2 2 0 21 153 154 139
|
||||
320 2 2 0 21 50 153 139
|
||||
321 2 2 0 21 141 152 150
|
||||
322 2 2 0 21 60 152 59
|
||||
323 2 2 0 21 59 152 141
|
||||
324 2 2 0 21 140 169 147
|
||||
325 2 2 0 21 139 168 151
|
||||
326 2 2 0 21 149 168 154
|
||||
327 2 2 0 21 28 155 29
|
||||
328 2 2 0 21 16 156 15
|
||||
329 2 2 0 21 143 155 28
|
||||
330 2 2 0 21 142 156 16
|
||||
331 2 2 0 21 55 158 54
|
||||
332 2 2 0 21 52 157 53
|
||||
333 2 2 0 21 140 160 56
|
||||
334 2 2 0 21 149 159 148
|
||||
335 2 2 0 21 139 161 51
|
||||
336 2 2 0 21 8 164 60
|
||||
337 2 2 0 21 29 164 8
|
||||
338 2 2 0 21 15 165 2
|
||||
339 2 2 0 21 2 165 47
|
||||
340 2 2 0 21 146 169 154
|
||||
341 2 2 0 21 53 167 7
|
||||
342 2 2 0 21 54 166 3
|
||||
343 2 2 0 21 3 166 17
|
||||
344 2 2 0 21 7 167 27
|
||||
345 2 2 0 21 55 160 158
|
||||
346 2 2 0 21 52 161 157
|
||||
347 2 2 0 21 154 169 159
|
||||
348 2 2 0 21 150 162 151
|
||||
349 2 2 0 21 145 163 147
|
||||
350 2 2 0 21 156 165 15
|
||||
351 2 2 0 21 155 164 29
|
||||
352 2 2 0 21 56 160 55
|
||||
353 2 2 0 21 148 159 140
|
||||
354 2 2 0 21 51 161 52
|
||||
355 2 2 0 21 17 166 142
|
||||
356 2 2 0 21 27 167 143
|
||||
357 2 2 0 21 60 164 152
|
||||
358 2 2 0 21 47 165 144
|
||||
359 2 2 0 21 154 168 139
|
||||
360 2 2 0 21 147 169 146
|
||||
361 2 2 0 21 151 168 149
|
||||
362 2 2 0 21 144 165 156
|
||||
363 2 2 0 21 152 164 155
|
||||
364 2 2 0 21 157 162 143
|
||||
365 2 2 0 21 158 163 142
|
||||
366 2 2 0 21 143 167 157
|
||||
367 2 2 0 21 142 166 158
|
||||
368 2 2 0 21 157 167 53
|
||||
369 2 2 0 21 158 166 54
|
||||
370 2 2 0 21 159 169 140
|
||||
371 2 2 0 25 174 198 183
|
||||
372 2 2 0 25 175 199 180
|
||||
373 2 2 0 25 183 190 174
|
||||
374 2 2 0 25 180 189 175
|
||||
375 2 2 0 25 184 198 174
|
||||
376 2 2 0 25 186 199 175
|
||||
377 2 2 0 25 179 192 173
|
||||
378 2 2 0 25 179 193 172
|
||||
379 2 2 0 25 173 193 179
|
||||
380 2 2 0 25 19 174 18
|
||||
381 2 2 0 25 31 175 32
|
||||
382 2 2 0 25 35 185 170
|
||||
383 2 2 0 25 36 185 35
|
||||
384 2 2 0 25 176 180 177
|
||||
385 2 2 0 25 35 170 34
|
||||
386 2 2 0 25 37 171 36
|
||||
387 2 2 0 25 38 176 37
|
||||
388 2 2 0 25 55 181 56
|
||||
389 2 2 0 25 56 172 57
|
||||
390 2 2 0 25 58 173 59
|
||||
391 2 2 0 25 176 177 171
|
||||
392 2 2 0 25 181 182 172
|
||||
393 2 2 0 25 177 179 178
|
||||
394 2 2 0 25 37 176 171
|
||||
395 2 2 0 25 56 181 172
|
||||
396 2 2 0 25 177 178 171
|
||||
397 2 2 0 25 171 185 36
|
||||
398 2 2 0 25 178 185 171
|
||||
399 2 2 0 25 181 183 182
|
||||
400 2 2 0 25 31 186 175
|
||||
401 2 2 0 25 19 184 174
|
||||
402 2 2 0 25 30 186 31
|
||||
403 2 2 0 25 20 184 19
|
||||
404 2 2 0 25 170 198 187
|
||||
405 2 2 0 25 173 199 188
|
||||
406 2 2 0 25 192 199 173
|
||||
407 2 2 0 25 191 198 170
|
||||
408 2 2 0 25 172 200 179
|
||||
409 2 2 0 25 59 188 60
|
||||
410 2 2 0 25 176 189 180
|
||||
411 2 2 0 25 39 189 38
|
||||
412 2 2 0 25 34 187 33
|
||||
413 2 2 0 25 181 190 183
|
||||
414 2 2 0 25 54 190 55
|
||||
415 2 2 0 25 173 188 59
|
||||
416 2 2 0 25 170 187 34
|
||||
417 2 2 0 25 38 189 176
|
||||
418 2 2 0 25 55 190 181
|
||||
419 2 2 0 25 172 193 57
|
||||
420 2 2 0 25 58 193 173
|
||||
421 2 2 0 25 177 192 179
|
||||
422 2 2 0 25 5 195 39
|
||||
423 2 2 0 25 3 194 54
|
||||
424 2 2 0 25 60 196 8
|
||||
425 2 2 0 25 33 197 4
|
||||
426 2 2 0 25 18 194 3
|
||||
427 2 2 0 25 32 195 5
|
||||
428 2 2 0 25 8 196 30
|
||||
429 2 2 0 25 4 197 20
|
||||
430 2 2 0 25 185 201 170
|
||||
431 2 2 0 25 170 201 191
|
||||
432 2 2 0 25 39 195 189
|
||||
433 2 2 0 25 188 196 60
|
||||
434 2 2 0 25 54 194 190
|
||||
435 2 2 0 25 187 197 33
|
||||
436 2 2 0 25 183 191 182
|
||||
437 2 2 0 25 57 193 58
|
||||
438 2 2 0 25 180 192 177
|
||||
439 2 2 0 25 174 194 18
|
||||
440 2 2 0 25 175 195 32
|
||||
441 2 2 0 25 30 196 186
|
||||
442 2 2 0 25 20 197 184
|
||||
443 2 2 0 25 179 200 178
|
||||
444 2 2 0 25 182 200 172
|
||||
445 2 2 0 25 178 201 185
|
||||
446 2 2 0 25 184 197 187
|
||||
447 2 2 0 25 190 194 174
|
||||
448 2 2 0 25 186 196 188
|
||||
449 2 2 0 25 189 195 175
|
||||
450 2 2 0 25 182 201 200
|
||||
451 2 2 0 25 200 201 178
|
||||
452 2 2 0 25 187 198 184
|
||||
453 2 2 0 25 188 199 186
|
||||
454 2 2 0 25 183 198 191
|
||||
455 2 2 0 25 180 199 192
|
||||
456 2 2 0 25 191 201 182
|
||||
457 2 2 0 26 202 206 208
|
||||
458 2 2 0 26 206 202 207
|
||||
459 2 2 0 26 206 203 209
|
||||
460 2 2 0 26 205 206 207
|
||||
461 2 2 0 26 208 31 210
|
||||
462 2 2 0 26 206 209 215
|
||||
463 2 2 0 26 31 208 211
|
||||
464 2 2 0 26 21 22 202
|
||||
465 2 2 0 26 25 26 203
|
||||
466 2 2 0 26 28 29 204
|
||||
467 2 2 0 26 205 203 206
|
||||
468 2 2 0 26 24 25 205
|
||||
469 2 2 0 26 25 203 205
|
||||
470 2 2 0 26 31 32 210
|
||||
471 2 2 0 26 204 211 215
|
||||
472 2 2 0 26 22 23 207
|
||||
473 2 2 0 26 27 28 209
|
||||
474 2 2 0 26 202 22 207
|
||||
475 2 2 0 26 28 204 209
|
||||
476 2 2 0 26 208 206 215
|
||||
477 2 2 0 26 202 208 210
|
||||
478 2 2 0 26 23 6 213
|
||||
479 2 2 0 26 6 24 213
|
||||
480 2 2 0 26 26 7 212
|
||||
481 2 2 0 26 7 27 212
|
||||
482 2 2 0 26 29 8 214
|
||||
483 2 2 0 26 8 30 214
|
||||
484 2 2 0 26 209 204 215
|
||||
485 2 2 0 26 211 204 214
|
||||
486 2 2 0 26 21 202 216
|
||||
487 2 2 0 26 211 208 215
|
||||
488 2 2 0 26 27 209 212
|
||||
489 2 2 0 26 207 23 213
|
||||
490 2 2 0 26 30 31 211
|
||||
491 2 2 0 26 204 29 214
|
||||
492 2 2 0 26 203 26 212
|
||||
493 2 2 0 26 24 205 213
|
||||
494 2 2 0 26 202 210 216
|
||||
495 2 2 0 26 32 5 216
|
||||
496 2 2 0 26 5 21 216
|
||||
497 2 2 0 26 209 203 212
|
||||
498 2 2 0 26 205 207 213
|
||||
499 2 2 0 26 30 211 214
|
||||
500 2 2 0 26 210 32 216
|
||||
$EndElements
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,572 +0,0 @@
|
||||
0 2 1 1
|
||||
564 1
|
||||
0 1 4641 1
|
||||
1 2 4676 1
|
||||
2 3 2984 1
|
||||
3 0 2198 1
|
||||
4 5 480 0
|
||||
5 704 309 0
|
||||
6 7 602 0
|
||||
7 1407 8 0
|
||||
8 1368 1375 0
|
||||
9 10 1807 0
|
||||
10 1889 1811 0
|
||||
11 12 3358 0
|
||||
12 13 3142 0
|
||||
13 14 3118 0
|
||||
14 3089 15 0
|
||||
15 2476 3073 0
|
||||
16 2473 1920 0
|
||||
17 1912 1710 0
|
||||
18 1769 1754 0
|
||||
19 2060 1270 0
|
||||
20 21 716 0
|
||||
21 22 545 0
|
||||
22 405 201 0
|
||||
23 870 23 0
|
||||
24 24 458 0
|
||||
25 511 478 0
|
||||
26 27 390 0
|
||||
27 28 274 0
|
||||
28 219 258 0
|
||||
29 212 29 0
|
||||
30 31 134 0
|
||||
31 71 32 0
|
||||
32 804 33 0
|
||||
33 109 34 0
|
||||
34 35 847 0
|
||||
35 36 295 0
|
||||
36 875 37 0
|
||||
37 954 38 0
|
||||
38 39 981 0
|
||||
39 39 980 0
|
||||
40 1152 1195 0
|
||||
41 1175 41 0
|
||||
42 1245 1198 0
|
||||
43 1242 1219 0
|
||||
44 1642 45 0
|
||||
45 46 1640 0
|
||||
46 1657 47 0
|
||||
47 1617 48 0
|
||||
48 1590 1283 0
|
||||
49 50 1224 0
|
||||
50 1171 1530 0
|
||||
51 1529 2310 0
|
||||
52 1565 2311 0
|
||||
53 53 3005 1
|
||||
54 54 3242 1
|
||||
55 55 2988 1
|
||||
56 56 89 0
|
||||
57 57 4140 1
|
||||
58 58 3059 1
|
||||
59 59 3810 1
|
||||
60 60 1989 1
|
||||
61 61 2162 1
|
||||
62 62 2257 1
|
||||
63 63 2730 1
|
||||
64 64 3419 1
|
||||
65 65 2314 1
|
||||
66 67 528 0
|
||||
67 68 86 0
|
||||
68 71 68 0
|
||||
69 75 80 0
|
||||
70 76 803 0
|
||||
71 80 32 0
|
||||
72 85 101 0
|
||||
73 86 31 0
|
||||
74 89 76 0
|
||||
75 101 56 0
|
||||
76 109 85 0
|
||||
77 110 131 0
|
||||
78 111 183 0
|
||||
79 131 135 0
|
||||
80 134 111 0
|
||||
81 135 34 0
|
||||
82 175 110 0
|
||||
83 183 30 0
|
||||
84 222 205 0
|
||||
85 201 300 0
|
||||
86 205 30 0
|
||||
87 212 197 0
|
||||
88 219 228 0
|
||||
89 222 197 0
|
||||
90 228 29 0
|
||||
91 312 866 0
|
||||
92 253 451 0
|
||||
93 258 28 0
|
||||
94 896 290 0
|
||||
95 305 27 0
|
||||
96 274 262 0
|
||||
97 285 308 0
|
||||
98 290 36 0
|
||||
99 294 323 0
|
||||
100 295 318 0
|
||||
101 300 342 0
|
||||
102 305 262 0
|
||||
103 308 249 0
|
||||
104 309 313 0
|
||||
105 312 891 0
|
||||
106 313 661 0
|
||||
107 318 294 0
|
||||
108 323 35 0
|
||||
109 342 23 0
|
||||
110 346 978 0
|
||||
111 885 37 0
|
||||
112 385 1335 0
|
||||
113 550 22 0
|
||||
114 390 385 0
|
||||
115 742 6 0
|
||||
116 405 389 0
|
||||
117 443 461 0
|
||||
118 444 465 0
|
||||
119 451 25 0
|
||||
120 458 253 0
|
||||
121 460 629 0
|
||||
122 461 26 0
|
||||
123 465 38 0
|
||||
124 478 4 0
|
||||
125 480 557 0
|
||||
126 484 516 0
|
||||
127 495 2919 1
|
||||
128 511 25 0
|
||||
129 512 525 0
|
||||
130 516 618 0
|
||||
131 518 651 0
|
||||
132 525 4 0
|
||||
133 528 512 0
|
||||
134 545 518 0
|
||||
135 550 389 0
|
||||
136 557 67 0
|
||||
137 597 1078 1
|
||||
138 1091 346 0
|
||||
139 602 601 0
|
||||
140 618 7 0
|
||||
141 620 994 0
|
||||
142 628 21 0
|
||||
143 629 628 0
|
||||
144 635 3433 1
|
||||
145 651 460 0
|
||||
146 659 2843 1
|
||||
147 661 5 0
|
||||
148 673 1941 0
|
||||
149 1012 6 0
|
||||
150 704 688 0
|
||||
151 716 673 0
|
||||
152 734 2567 1
|
||||
153 742 404 0
|
||||
154 792 2246 1
|
||||
155 803 33 0
|
||||
156 804 75 0
|
||||
157 829 837 0
|
||||
158 837 20 0
|
||||
159 847 175 0
|
||||
160 860 1983 1
|
||||
161 866 24 0
|
||||
162 870 285 0
|
||||
163 875 876 0
|
||||
164 876 261 0
|
||||
165 885 368 0
|
||||
166 891 249 0
|
||||
167 896 261 0
|
||||
168 928 3441 1
|
||||
169 954 368 0
|
||||
170 978 404 0
|
||||
171 980 443 0
|
||||
172 981 444 0
|
||||
173 994 484 0
|
||||
174 2455 9 0
|
||||
175 1012 688 0
|
||||
176 1030 2602 1
|
||||
177 1040 2176 1
|
||||
178 1051 1062 1
|
||||
179 1053 1058 1
|
||||
180 1058 61 1
|
||||
181 1062 1053 1
|
||||
182 1063 1066 1
|
||||
183 1066 1051 1
|
||||
184 1078 1063 1
|
||||
185 1080 1086 1
|
||||
186 1086 1087 1
|
||||
187 1087 597 1
|
||||
188 1091 601 0
|
||||
189 1152 1156 0
|
||||
190 1155 1189 0
|
||||
191 1156 41 0
|
||||
192 1166 1207 0
|
||||
193 1167 1179 0
|
||||
194 1171 1166 0
|
||||
195 1175 1155 0
|
||||
196 1179 51 0
|
||||
197 1189 42 0
|
||||
198 1195 40 0
|
||||
199 1198 1215 0
|
||||
200 1207 50 0
|
||||
201 1215 43 0
|
||||
202 2651 44 0
|
||||
203 1223 1236 0
|
||||
204 1224 1229 0
|
||||
205 1229 1223 0
|
||||
206 1236 1569 0
|
||||
207 1242 43 0
|
||||
208 1245 42 0
|
||||
209 1253 3238 1
|
||||
210 1270 1931 0
|
||||
211 1283 1284 0
|
||||
212 1284 1574 0
|
||||
213 1335 26 0
|
||||
214 2039 1001 0
|
||||
215 1375 8 0
|
||||
216 1394 2045 0
|
||||
217 1407 620 0
|
||||
218 1440 1040 1
|
||||
219 1480 2274 1
|
||||
220 1500 2643 1
|
||||
221 1529 2286 0
|
||||
222 1530 51 0
|
||||
223 1536 2647 1
|
||||
224 2326 40 0
|
||||
225 1569 49 0
|
||||
226 1574 49 0
|
||||
227 1588 48 0
|
||||
228 1590 1588 0
|
||||
229 1603 1656 0
|
||||
230 1604 1636 0
|
||||
231 1611 2338 0
|
||||
232 1616 2347 0
|
||||
233 1617 1616 0
|
||||
234 1636 2348 0
|
||||
235 2667 1604 0
|
||||
236 1642 1611 0
|
||||
237 1648 1650 0
|
||||
238 1650 46 0
|
||||
239 1656 47 0
|
||||
240 1657 1648 0
|
||||
241 1737 1760 0
|
||||
242 1710 1733 0
|
||||
243 1913 17 0
|
||||
244 1733 1703 0
|
||||
245 1775 1703 0
|
||||
246 1844 19 0
|
||||
247 1760 18 0
|
||||
248 1762 2448 0
|
||||
249 1766 1801 0
|
||||
250 1782 18 0
|
||||
251 1775 1737 0
|
||||
252 1782 1769 0
|
||||
253 1786 2462 0
|
||||
254 1801 1762 0
|
||||
255 1807 1766 0
|
||||
256 1811 1860 0
|
||||
257 1815 1826 0
|
||||
258 1826 10 0
|
||||
259 1830 1754 0
|
||||
260 1833 2411 1
|
||||
261 1844 1830 0
|
||||
262 1852 3685 1
|
||||
263 1860 1815 0
|
||||
264 4942 11 0
|
||||
265 1889 1886 0
|
||||
266 1906 2468 0
|
||||
267 1912 17 0
|
||||
268 1913 1906 0
|
||||
269 1920 1922 0
|
||||
270 1922 1731 0
|
||||
271 1931 829 0
|
||||
272 1941 20 0
|
||||
273 1955 2525 1
|
||||
274 1962 1986 1
|
||||
275 1963 1987 1
|
||||
276 1974 860 1
|
||||
277 1982 2540 1
|
||||
278 1983 2537 1
|
||||
279 1986 1974 1
|
||||
280 1987 1962 1
|
||||
281 1989 1963 1
|
||||
282 2027 2036 1
|
||||
283 2036 55 1
|
||||
284 2039 1368 0
|
||||
285 2045 1001 0
|
||||
286 2060 19 0
|
||||
287 2073 2114 1
|
||||
288 2101 2128 1
|
||||
289 2104 2140 1
|
||||
290 2107 2104 1
|
||||
291 2114 2107 1
|
||||
292 2117 2126 1
|
||||
293 2126 2073 1
|
||||
294 2128 2117 1
|
||||
295 2130 2101 1
|
||||
296 2136 2264 1
|
||||
297 2140 2136 1
|
||||
298 2162 1440 1
|
||||
299 2166 2172 1
|
||||
300 2171 2191 1
|
||||
301 2172 1030 1
|
||||
302 2174 2171 1
|
||||
303 2176 2166 1
|
||||
304 2185 2605 1
|
||||
305 2191 2197 1
|
||||
306 2194 2185 1
|
||||
307 2197 0 1
|
||||
308 2198 2194 1
|
||||
309 2225 2254 1
|
||||
310 2228 3056 1
|
||||
311 2233 792 1
|
||||
312 2239 2244 1
|
||||
313 2244 2228 1
|
||||
314 2246 2239 1
|
||||
315 2254 2233 1
|
||||
316 2257 2258 1
|
||||
317 2258 2225 1
|
||||
318 2264 62 1
|
||||
319 2274 1500 1
|
||||
320 2286 1167 0
|
||||
321 2289 2292 1
|
||||
322 2292 54 1
|
||||
323 2296 2302 1
|
||||
324 2302 2312 1
|
||||
325 2310 52 0
|
||||
326 2311 52 0
|
||||
327 2312 65 1
|
||||
328 2313 2320 1
|
||||
329 2314 2313 1
|
||||
330 2320 1536 1
|
||||
331 2326 1565 0
|
||||
332 2338 44 0
|
||||
333 2347 1603 0
|
||||
334 2348 45 0
|
||||
335 2398 2434 1
|
||||
336 2405 2438 1
|
||||
337 2411 2425 1
|
||||
338 2424 3806 1
|
||||
339 2425 2405 1
|
||||
340 2432 2727 1
|
||||
341 2434 2432 1
|
||||
342 2435 2734 1
|
||||
343 2438 2424 1
|
||||
344 2448 1786 0
|
||||
345 2455 1394 0
|
||||
346 2462 9 0
|
||||
347 2468 1731 0
|
||||
348 2473 16 0
|
||||
349 3081 15 0
|
||||
350 2493 3240 1
|
||||
351 2525 2528 1
|
||||
352 2528 60 1
|
||||
353 2532 2533 1
|
||||
354 2533 1955 1
|
||||
355 2537 1982 1
|
||||
356 2540 64 1
|
||||
357 2561 2895 1
|
||||
358 2562 3445 1
|
||||
359 2563 2562 1
|
||||
360 2567 2570 1
|
||||
361 2570 2027 1
|
||||
362 2573 2993 1
|
||||
363 2602 2174 1
|
||||
364 2605 1480 1
|
||||
365 2619 2628 1
|
||||
366 2628 58 1
|
||||
367 2643 659 1
|
||||
368 2647 2289 1
|
||||
369 2651 1219 0
|
||||
370 2667 1640 0
|
||||
371 2704 2476 0
|
||||
372 2719 3378 1
|
||||
373 2723 63 1
|
||||
374 2727 1833 1
|
||||
375 2730 2435 1
|
||||
376 2734 2398 1
|
||||
377 2759 3030 1
|
||||
378 2781 3019 1
|
||||
379 2843 3306 1
|
||||
380 2889 2903 1
|
||||
381 2895 2900 1
|
||||
382 2900 2889 1
|
||||
383 2903 3309 1
|
||||
384 2912 2955 1
|
||||
385 2916 2933 1
|
||||
386 2919 2916 1
|
||||
387 2933 2953 1
|
||||
388 2938 3614 1
|
||||
389 2951 2964 1
|
||||
390 2953 2912 1
|
||||
391 2955 2960 1
|
||||
392 2960 2951 1
|
||||
393 2964 3 1
|
||||
394 2965 3456 1
|
||||
395 2973 3457 1
|
||||
396 2984 2973 1
|
||||
397 2988 2563 1
|
||||
398 2993 3323 1
|
||||
399 3005 2130 1
|
||||
400 3007 53 1
|
||||
401 3019 3007 1
|
||||
402 3021 2781 1
|
||||
403 3030 3021 1
|
||||
404 3033 3463 1
|
||||
405 3035 2759 1
|
||||
406 3056 2619 1
|
||||
407 3059 3342 1
|
||||
408 3073 16 0
|
||||
409 3081 2704 0
|
||||
410 3088 3099 0
|
||||
411 3089 3088 0
|
||||
412 3098 3110 0
|
||||
413 3099 14 0
|
||||
414 3109 3141 0
|
||||
415 3110 13 0
|
||||
416 3118 3098 0
|
||||
417 3490 3350 0
|
||||
418 3136 3474 0
|
||||
419 3141 12 0
|
||||
420 3142 3109 0
|
||||
421 3174 4743 1
|
||||
422 3231 3235 1
|
||||
423 3235 1253 1
|
||||
424 3238 2719 1
|
||||
425 3240 3231 1
|
||||
426 3242 2493 1
|
||||
427 3253 3259 1
|
||||
428 3259 2296 1
|
||||
429 3269 3612 1
|
||||
430 3271 3610 1
|
||||
431 3276 3290 1
|
||||
432 3287 3434 1
|
||||
433 3290 3287 1
|
||||
434 3292 3435 1
|
||||
435 3302 928 1
|
||||
436 3306 2573 1
|
||||
437 3308 2561 1
|
||||
438 3309 495 1
|
||||
439 3323 734 1
|
||||
440 3342 1080 1
|
||||
441 3350 3628 0
|
||||
442 3358 3136 0
|
||||
443 3378 2723 1
|
||||
444 3419 3253 1
|
||||
445 3433 3271 1
|
||||
446 3434 635 1
|
||||
447 3435 3276 1
|
||||
448 3441 2532 1
|
||||
449 3445 3308 1
|
||||
450 3452 4961 1
|
||||
451 3456 3452 1
|
||||
452 3457 2965 1
|
||||
453 3463 3035 1
|
||||
454 3474 3123 0
|
||||
455 3490 3123 0
|
||||
456 3544 4781 1
|
||||
457 3610 3269 1
|
||||
458 3612 3302 1
|
||||
459 3614 3292 1
|
||||
460 3618 3699 1
|
||||
461 3628 11 0
|
||||
462 3658 4064 1
|
||||
463 3685 3618 1
|
||||
464 3687 3837 1
|
||||
465 3688 3689 1
|
||||
466 3689 3817 1
|
||||
467 3699 3033 1
|
||||
468 3805 4170 1
|
||||
469 3806 59 1
|
||||
470 3808 4245 1
|
||||
471 3809 4138 1
|
||||
472 3810 3809 1
|
||||
473 3817 1852 1
|
||||
474 3837 3850 1
|
||||
475 3850 3688 1
|
||||
476 3856 3861 1
|
||||
477 3861 3864 1
|
||||
478 3864 3687 1
|
||||
479 3871 3856 1
|
||||
480 3916 4926 1
|
||||
481 3966 4751 1
|
||||
482 4048 4058 1
|
||||
483 4054 4060 1
|
||||
484 4058 4054 1
|
||||
485 4060 3658 1
|
||||
486 4062 4180 1
|
||||
487 4063 4072 1
|
||||
488 4064 4069 1
|
||||
489 4069 4063 1
|
||||
490 4072 4172 1
|
||||
491 4080 4086 1
|
||||
492 4086 57 1
|
||||
493 4138 3808 1
|
||||
494 4140 3871 1
|
||||
495 4164 4818 1
|
||||
496 4170 4256 1
|
||||
497 4172 4062 1
|
||||
498 4175 4516 1
|
||||
499 4180 4297 1
|
||||
500 4243 3805 1
|
||||
501 4245 4243 1
|
||||
502 4256 4048 1
|
||||
503 4280 4672 1
|
||||
504 4297 4175 1
|
||||
505 4379 4973 1
|
||||
506 4396 4422 1
|
||||
507 4397 4788 1
|
||||
508 4402 3544 1
|
||||
509 4414 4776 1
|
||||
510 4422 4402 1
|
||||
511 4423 4426 1
|
||||
512 4426 4396 1
|
||||
513 4451 4810 1
|
||||
514 4467 4805 1
|
||||
515 4505 4881 1
|
||||
516 4508 4975 1
|
||||
517 4515 4508 1
|
||||
518 4516 4675 1
|
||||
519 4550 4576 1
|
||||
520 4567 4575 1
|
||||
521 4575 4747 1
|
||||
522 4576 4567 1
|
||||
523 4593 4777 1
|
||||
524 4623 4625 1
|
||||
525 4625 4379 1
|
||||
526 4634 4643 1
|
||||
527 4638 4649 1
|
||||
528 4641 4644 1
|
||||
529 4643 1 1
|
||||
530 4644 4414 1
|
||||
531 4649 4634 1
|
||||
532 4652 4397 1
|
||||
533 4672 4505 1
|
||||
534 4675 2 1
|
||||
535 4676 4515 1
|
||||
536 4724 4737 1
|
||||
537 4737 4738 1
|
||||
538 4738 4550 1
|
||||
539 4743 4724 1
|
||||
540 4747 3966 1
|
||||
541 4750 4855 1
|
||||
542 4751 4750 1
|
||||
543 4776 4623 1
|
||||
544 4777 4638 1
|
||||
545 4781 4652 1
|
||||
546 4787 3916 1
|
||||
547 4788 4787 1
|
||||
548 4798 4164 1
|
||||
549 4804 4822 1
|
||||
550 4805 4451 1
|
||||
551 4810 4819 1
|
||||
552 4818 4467 1
|
||||
553 4819 4804 1
|
||||
554 4822 3174 1
|
||||
555 4854 4593 1
|
||||
556 4855 4854 1
|
||||
557 4881 4798 1
|
||||
558 4920 4080 1
|
||||
559 4926 4920 1
|
||||
560 4942 1886 0
|
||||
561 4961 2938 1
|
||||
562 4973 4423 1
|
||||
563 4975 4280 1
|
||||
0
|
||||
3
|
||||
0 103 40 1 1
|
||||
1 62 58 2 2
|
||||
2 130 73 3 3
|
||||
# Generated by triangle -pq30a4ADn forward_mesh.poly
|
File diff suppressed because it is too large
Load Diff
@ -1,117 +0,0 @@
|
||||
# vectice
|
||||
53 2 1 1
|
||||
0 0 0 0 1
|
||||
1 240 0 0 1
|
||||
2 240 100 0 1
|
||||
3 0 100 0 1
|
||||
4 41.9 27.5 1 0
|
||||
5 56.4 27.1 1 0
|
||||
6 71.4 27.5 1 0
|
||||
7 86.8 28.8 1 0
|
||||
8 101.4 30.1 1 0
|
||||
9 117.6 32.2 1 0
|
||||
10 135.6 34.4 1 0
|
||||
11 155.3 36.1 1 0
|
||||
12 171.1 39.1 1 0
|
||||
13 178.9 44.6 1 0
|
||||
14 179.7 51.9 1 0
|
||||
15 171.1 54.9 1 0
|
||||
16 159.2 52.4 1 0
|
||||
17 143.8 47.6 1 0
|
||||
18 127.1 42.9 1 0
|
||||
19 113.4 45.5 1 0
|
||||
20 103.1 51.5 1 0
|
||||
21 94.5 48.1 1 0
|
||||
22 82.5 40.8 1 0
|
||||
23 68.4 36.1 1 0
|
||||
24 53 35.2 1 0
|
||||
25 43.2 33.9 1 0
|
||||
26 28.6 58.8 2 0
|
||||
27 36.7 54.9 2 0
|
||||
28 46.6 53.6 2 0
|
||||
29 56.9 51.9 2 0
|
||||
30 68 51.5 2 0
|
||||
31 77.4 56.6 2 0
|
||||
32 85.5 60.9 2 0
|
||||
33 92 66.1 2 0
|
||||
34 77 67.3 2 0
|
||||
35 62.4 65.6 2 0
|
||||
36 52.2 62.6 2 0
|
||||
37 40.2 63.1 2 0
|
||||
38 29.9 65.6 2 0
|
||||
39 22.2 62.6 2 0
|
||||
40 96.7 82.3 3 0
|
||||
41 106.5 79.3 3 0
|
||||
42 115.1 76.3 3 0
|
||||
43 122.8 69.9 3 0
|
||||
44 130.9 64.8 3 0
|
||||
45 141.2 66.9 3 0
|
||||
46 152.3 70.8 3 0
|
||||
47 154.9 78.5 3 0
|
||||
48 143.3 78.5 3 0
|
||||
49 128.8 79.7 3 0
|
||||
50 117.2 83.2 3 0
|
||||
51 106.9 87.9 3 0
|
||||
52 94.5 89.2 3 0
|
||||
# segments
|
||||
53 1
|
||||
0 0 1 1
|
||||
1 1 2 1
|
||||
2 2 3 1
|
||||
3 3 0 1
|
||||
4 4 5 0
|
||||
5 5 6 0
|
||||
6 6 7 0
|
||||
7 7 8 0
|
||||
8 8 9 0
|
||||
9 9 10 0
|
||||
10 10 11 0
|
||||
11 11 12 0
|
||||
12 12 13 0
|
||||
13 13 14 0
|
||||
14 14 15 0
|
||||
15 15 16 0
|
||||
16 16 17 0
|
||||
17 17 18 0
|
||||
18 18 19 0
|
||||
19 19 20 0
|
||||
20 20 21 0
|
||||
21 21 22 0
|
||||
22 22 23 0
|
||||
23 23 24 0
|
||||
24 24 25 0
|
||||
25 25 4 0
|
||||
26 26 27 0
|
||||
27 27 28 0
|
||||
28 28 29 0
|
||||
29 29 30 0
|
||||
30 30 31 0
|
||||
31 31 32 0
|
||||
32 32 33 0
|
||||
33 33 34 0
|
||||
34 34 35 0
|
||||
35 35 36 0
|
||||
36 36 37 0
|
||||
37 37 38 0
|
||||
38 38 39 0
|
||||
39 39 26 0
|
||||
40 40 41 0
|
||||
41 41 42 0
|
||||
42 42 43 0
|
||||
43 43 44 0
|
||||
44 44 45 0
|
||||
45 45 46 0
|
||||
46 46 47 0
|
||||
47 47 48 0
|
||||
48 48 49 0
|
||||
49 49 50 0
|
||||
50 50 51 0
|
||||
51 51 52 0
|
||||
52 52 40 0
|
||||
# holes
|
||||
0
|
||||
# attributes
|
||||
3
|
||||
0 103 40 1
|
||||
1 62 58 2
|
||||
2 130 73 3
|
File diff suppressed because it is too large
Load Diff
@ -1,514 +0,0 @@
|
||||
512 1
|
||||
0 281 408 -1
|
||||
1 232 488 -1
|
||||
2 277 402 -1
|
||||
3 280 411 -1
|
||||
4 84 413 -1
|
||||
5 85 414 -1
|
||||
6 10 458 -1
|
||||
7 3 455 -1
|
||||
8 23 375 -1
|
||||
9 8 489 -1
|
||||
10 18 371 -1
|
||||
11 9 363 -1
|
||||
12 21 374 -1
|
||||
13 91 421 -1
|
||||
14 17 370 -1
|
||||
15 383 492 -1
|
||||
16 20 373 -1
|
||||
17 11 364 -1
|
||||
18 16 369 -1
|
||||
19 14 491 -1
|
||||
20 19 372 -1
|
||||
21 13 366 -1
|
||||
22 15 368 -1
|
||||
23 332 443 -1
|
||||
24 22 246 -1
|
||||
25 25 376 -1
|
||||
26 24 248 -1
|
||||
27 27 377 -1
|
||||
28 26 250 -1
|
||||
29 269 501 -1
|
||||
30 28 252 -1
|
||||
31 29 253 -1
|
||||
32 30 254 -1
|
||||
33 31 255 -1
|
||||
34 32 256 -1
|
||||
35 33 257 -1
|
||||
36 34 258 -1
|
||||
37 36 259 -1
|
||||
38 35 116 -1
|
||||
39 38 260 -1
|
||||
40 37 118 -1
|
||||
41 40 261 -1
|
||||
42 39 120 -1
|
||||
43 264 390 -1
|
||||
44 41 122 -1
|
||||
45 42 123 -1
|
||||
46 43 124 -1
|
||||
47 44 125 -1
|
||||
48 45 126 -1
|
||||
49 46 127 -1
|
||||
50 47 128 -1
|
||||
51 49 129 -1
|
||||
52 48 61 -1
|
||||
53 51 130 -1
|
||||
54 50 63 -1
|
||||
55 53 131 -1
|
||||
56 52 65 -1
|
||||
57 401 481 -1
|
||||
58 54 67 -1
|
||||
59 55 68 -1
|
||||
60 56 69 -1
|
||||
61 57 70 -1
|
||||
62 58 71 -1
|
||||
63 59 72 -1
|
||||
64 60 73 -1
|
||||
65 62 74 -1
|
||||
66 61 2 -1
|
||||
67 64 75 -1
|
||||
68 63 0 -1
|
||||
69 66 76 -1
|
||||
70 65 6 -1
|
||||
71 1 392 -1
|
||||
72 67 4 -1
|
||||
73 68 5 -1
|
||||
74 69 0 -1
|
||||
75 70 6 -1
|
||||
76 71 7 -1
|
||||
77 72 8 -1
|
||||
78 73 1 -1
|
||||
79 74 3 -1
|
||||
80 75 5 -1
|
||||
81 76 7 -1
|
||||
82 394 477 -1
|
||||
83 134 396 -1
|
||||
84 283 404 -1
|
||||
85 276 469 -1
|
||||
86 353 436 -1
|
||||
87 144 313 -1
|
||||
88 86 415 -1
|
||||
89 87 416 -1
|
||||
90 286 417 -1
|
||||
91 89 420 -1
|
||||
92 150 319 -1
|
||||
93 90 287 -1
|
||||
94 93 422 -1
|
||||
95 92 289 -1
|
||||
96 95 423 -1
|
||||
97 94 291 -1
|
||||
98 307 424 -1
|
||||
99 96 293 -1
|
||||
100 97 294 -1
|
||||
101 98 295 -1
|
||||
102 99 296 -1
|
||||
103 100 297 -1
|
||||
104 101 298 -1
|
||||
105 102 299 -1
|
||||
106 104 300 -1
|
||||
107 103 165 -1
|
||||
108 106 301 -1
|
||||
109 105 167 -1
|
||||
110 108 302 -1
|
||||
111 107 169 -1
|
||||
112 7 303 -1
|
||||
113 109 171 -1
|
||||
114 110 172 -1
|
||||
115 111 173 -1
|
||||
116 112 174 -1
|
||||
117 113 175 -1
|
||||
118 114 176 -1
|
||||
119 115 177 -1
|
||||
120 117 178 -1
|
||||
121 116 48 -1
|
||||
122 119 179 -1
|
||||
123 118 50 -1
|
||||
124 121 180 -1
|
||||
125 120 52 -1
|
||||
126 142 435 -1
|
||||
127 122 54 -1
|
||||
128 123 55 -1
|
||||
129 124 56 -1
|
||||
130 125 57 -1
|
||||
131 126 58 -1
|
||||
132 127 59 -1
|
||||
133 128 60 -1
|
||||
134 129 62 -1
|
||||
135 130 64 -1
|
||||
136 131 66 -1
|
||||
137 275 399 -1
|
||||
138 348 466 -1
|
||||
139 279 506 -1
|
||||
140 397 479 -1
|
||||
141 382 494 -1
|
||||
142 398 504 -1
|
||||
143 137 393 -1
|
||||
144 262 388 -1
|
||||
145 181 308 -1
|
||||
146 143 312 -1
|
||||
147 183 431 -1
|
||||
148 145 314 -1
|
||||
149 146 315 -1
|
||||
150 147 316 -1
|
||||
151 148 317 -1
|
||||
152 149 318 -1
|
||||
153 192 220 -1
|
||||
154 151 320 -1
|
||||
155 153 321 -1
|
||||
156 152 196 -1
|
||||
157 155 322 -1
|
||||
158 154 198 -1
|
||||
159 157 323 -1
|
||||
160 156 200 -1
|
||||
161 233 324 -1
|
||||
162 158 202 -1
|
||||
163 159 203 -1
|
||||
164 160 204 -1
|
||||
165 161 205 -1
|
||||
166 162 206 -1
|
||||
167 163 207 -1
|
||||
168 164 208 -1
|
||||
169 166 209 -1
|
||||
170 165 35 -1
|
||||
171 168 210 -1
|
||||
172 167 37 -1
|
||||
173 170 211 -1
|
||||
174 169 39 -1
|
||||
175 185 212 -1
|
||||
176 171 41 -1
|
||||
177 172 42 -1
|
||||
178 173 43 -1
|
||||
179 174 44 -1
|
||||
180 175 45 -1
|
||||
181 176 46 -1
|
||||
182 177 47 -1
|
||||
183 178 49 -1
|
||||
184 179 51 -1
|
||||
185 180 53 -1
|
||||
186 140 309 -1
|
||||
187 306 426 -1
|
||||
188 305 428 -1
|
||||
189 311 432 -1
|
||||
190 186 213 -1
|
||||
191 187 214 -1
|
||||
192 188 215 -1
|
||||
193 189 216 -1
|
||||
194 190 217 -1
|
||||
195 191 218 -1
|
||||
196 0 219 -1
|
||||
197 193 221 -1
|
||||
198 194 222 -1
|
||||
199 195 223 -1
|
||||
200 197 224 -1
|
||||
201 196 22 -1
|
||||
202 199 225 -1
|
||||
203 198 24 -1
|
||||
204 201 226 -1
|
||||
205 200 26 -1
|
||||
206 236 459 -1
|
||||
207 202 28 -1
|
||||
208 203 29 -1
|
||||
209 204 30 -1
|
||||
210 205 31 -1
|
||||
211 206 32 -1
|
||||
212 207 33 -1
|
||||
213 208 34 -1
|
||||
214 209 36 -1
|
||||
215 210 38 -1
|
||||
216 211 40 -1
|
||||
217 212 143 -1
|
||||
218 213 83 -1
|
||||
219 214 15 -1
|
||||
220 215 16 -1
|
||||
221 216 17 -1
|
||||
222 217 18 -1
|
||||
223 218 19 -1
|
||||
224 219 192 -1
|
||||
225 220 149 -1
|
||||
226 221 88 -1
|
||||
227 222 20 -1
|
||||
228 223 21 -1
|
||||
229 224 23 -1
|
||||
230 225 25 -1
|
||||
231 226 27 -1
|
||||
232 330 456 -1
|
||||
233 358 474 -1
|
||||
234 327 447 -1
|
||||
235 326 449 -1
|
||||
236 325 451 -1
|
||||
237 12 490 -1
|
||||
238 328 453 -1
|
||||
239 235 334 -1
|
||||
240 238 460 -1
|
||||
241 237 336 -1
|
||||
242 351 461 -1
|
||||
243 239 338 -1
|
||||
244 240 339 -1
|
||||
245 241 340 -1
|
||||
246 242 341 -1
|
||||
247 243 342 -1
|
||||
248 244 343 -1
|
||||
249 245 344 -1
|
||||
250 247 345 -1
|
||||
251 246 103 -1
|
||||
252 249 346 -1
|
||||
253 248 105 -1
|
||||
254 251 347 -1
|
||||
255 250 107 -1
|
||||
256 273 468 -1
|
||||
257 252 109 -1
|
||||
258 253 110 -1
|
||||
259 254 111 -1
|
||||
260 255 112 -1
|
||||
261 256 113 -1
|
||||
262 257 114 -1
|
||||
263 258 115 -1
|
||||
264 259 117 -1
|
||||
265 260 119 -1
|
||||
266 261 121 -1
|
||||
267 139 389 -1
|
||||
268 5 387 -1
|
||||
269 138 391 -1
|
||||
270 263 386 -1
|
||||
271 265 385 -1
|
||||
272 266 384 -1
|
||||
273 381 496 -1
|
||||
274 380 498 -1
|
||||
275 395 502 -1
|
||||
276 270 379 -1
|
||||
277 349 464 -1
|
||||
278 337 439 -1
|
||||
279 367 470 -1
|
||||
280 79 400 -1
|
||||
281 284 354 -1
|
||||
282 77 403 -1
|
||||
283 81 407 -1
|
||||
284 83 412 -1
|
||||
285 82 507 -1
|
||||
286 278 406 -1
|
||||
287 282 405 -1
|
||||
288 288 355 -1
|
||||
289 88 419 -1
|
||||
290 285 418 -1
|
||||
291 287 152 -1
|
||||
292 290 356 -1
|
||||
293 289 154 -1
|
||||
294 292 357 -1
|
||||
295 291 156 -1
|
||||
296 136 476 -1
|
||||
297 293 158 -1
|
||||
298 294 159 -1
|
||||
299 295 160 -1
|
||||
300 296 161 -1
|
||||
301 297 162 -1
|
||||
302 298 163 -1
|
||||
303 299 164 -1
|
||||
304 300 166 -1
|
||||
305 301 168 -1
|
||||
306 302 170 -1
|
||||
307 303 185 -1
|
||||
308 184 430 -1
|
||||
309 304 429 -1
|
||||
310 182 427 -1
|
||||
311 6 425 -1
|
||||
312 308 13 -1
|
||||
313 309 181 -1
|
||||
314 141 434 -1
|
||||
315 310 433 -1
|
||||
316 312 186 -1
|
||||
317 313 187 -1
|
||||
318 314 188 -1
|
||||
319 315 189 -1
|
||||
320 316 190 -1
|
||||
321 317 191 -1
|
||||
322 318 193 -1
|
||||
323 319 194 -1
|
||||
324 320 195 -1
|
||||
325 321 197 -1
|
||||
326 322 199 -1
|
||||
327 323 201 -1
|
||||
328 324 90 -1
|
||||
329 231 452 -1
|
||||
330 230 450 -1
|
||||
331 2 448 -1
|
||||
332 229 454 -1
|
||||
333 4 446 -1
|
||||
334 227 457 -1
|
||||
335 329 445 -1
|
||||
336 331 444 -1
|
||||
337 234 442 -1
|
||||
338 334 92 -1
|
||||
339 333 441 -1
|
||||
340 336 94 -1
|
||||
341 335 440 -1
|
||||
342 338 96 -1
|
||||
343 339 97 -1
|
||||
344 340 98 -1
|
||||
345 341 99 -1
|
||||
346 342 100 -1
|
||||
347 343 101 -1
|
||||
348 344 102 -1
|
||||
349 345 104 -1
|
||||
350 346 106 -1
|
||||
351 347 108 -1
|
||||
352 4 467 -1
|
||||
353 272 465 -1
|
||||
354 132 463 -1
|
||||
355 350 462 -1
|
||||
356 274 438 -1
|
||||
357 352 437 -1
|
||||
358 354 148 -1
|
||||
359 355 153 -1
|
||||
360 356 155 -1
|
||||
361 357 157 -1
|
||||
362 228 475 -1
|
||||
363 1 473 -1
|
||||
364 3 487 -1
|
||||
365 360 486 -1
|
||||
366 361 485 -1
|
||||
367 363 233 -1
|
||||
368 364 235 -1
|
||||
369 359 472 -1
|
||||
370 366 237 -1
|
||||
371 365 471 -1
|
||||
372 368 239 -1
|
||||
373 369 240 -1
|
||||
374 370 241 -1
|
||||
375 371 242 -1
|
||||
376 372 243 -1
|
||||
377 373 244 -1
|
||||
378 374 245 -1
|
||||
379 375 247 -1
|
||||
380 376 249 -1
|
||||
381 377 251 -1
|
||||
382 271 500 -1
|
||||
383 379 11 -1
|
||||
384 378 499 -1
|
||||
385 268 497 -1
|
||||
386 2 495 -1
|
||||
387 267 493 -1
|
||||
388 384 9 -1
|
||||
389 385 138 -1
|
||||
390 386 139 -1
|
||||
391 387 263 -1
|
||||
392 388 81 -1
|
||||
393 389 262 -1
|
||||
394 390 77 -1
|
||||
395 391 264 -1
|
||||
396 392 265 -1
|
||||
397 393 266 -1
|
||||
398 133 478 -1
|
||||
399 135 503 -1
|
||||
400 396 270 -1
|
||||
401 78 480 -1
|
||||
402 80 505 -1
|
||||
403 399 134 -1
|
||||
404 400 275 -1
|
||||
405 409 482 -1
|
||||
406 402 137 -1
|
||||
407 403 277 -1
|
||||
408 404 147 -1
|
||||
409 405 146 -1
|
||||
410 406 140 -1
|
||||
411 407 278 -1
|
||||
412 408 145 -1
|
||||
413 410 483 -1
|
||||
414 362 484 -1
|
||||
415 411 144 -1
|
||||
416 412 280 -1
|
||||
417 413 281 -1
|
||||
418 414 282 -1
|
||||
419 415 283 -1
|
||||
420 416 284 -1
|
||||
421 417 151 -1
|
||||
422 418 150 -1
|
||||
423 419 285 -1
|
||||
424 420 286 -1
|
||||
425 421 288 -1
|
||||
426 422 290 -1
|
||||
427 423 292 -1
|
||||
428 424 182 -1
|
||||
429 425 307 -1
|
||||
430 426 141 -1
|
||||
431 427 306 -1
|
||||
432 428 82 -1
|
||||
433 429 14 -1
|
||||
434 430 304 -1
|
||||
435 431 305 -1
|
||||
436 432 184 -1
|
||||
437 433 183 -1
|
||||
438 434 310 -1
|
||||
439 435 311 -1
|
||||
440 436 135 -1
|
||||
441 437 132 -1
|
||||
442 438 352 -1
|
||||
443 439 95 -1
|
||||
444 440 93 -1
|
||||
445 441 91 -1
|
||||
446 442 333 -1
|
||||
447 443 234 -1
|
||||
448 444 227 -1
|
||||
449 445 229 -1
|
||||
450 446 329 -1
|
||||
451 447 230 -1
|
||||
452 448 327 -1
|
||||
453 449 86 -1
|
||||
454 450 326 -1
|
||||
455 451 87 -1
|
||||
456 452 325 -1
|
||||
457 453 85 -1
|
||||
458 454 328 -1
|
||||
459 455 331 -1
|
||||
460 456 79 -1
|
||||
461 457 330 -1
|
||||
462 458 332 -1
|
||||
463 459 335 -1
|
||||
464 460 337 -1
|
||||
465 461 12 -1
|
||||
466 462 273 -1
|
||||
467 463 350 -1
|
||||
468 464 133 -1
|
||||
469 465 349 -1
|
||||
470 466 272 -1
|
||||
471 467 348 -1
|
||||
472 468 351 -1
|
||||
473 469 353 -1
|
||||
474 470 238 -1
|
||||
475 471 236 -1
|
||||
476 472 228 -1
|
||||
477 473 359 -1
|
||||
478 474 84 -1
|
||||
479 475 358 -1
|
||||
480 476 394 -1
|
||||
481 477 267 -1
|
||||
482 478 397 -1
|
||||
483 479 271 -1
|
||||
484 480 401 -1
|
||||
485 481 276 -1
|
||||
486 482 142 -1
|
||||
487 483 279 -1
|
||||
488 484 232 -1
|
||||
489 485 89 -1
|
||||
490 486 231 -1
|
||||
491 487 360 -1
|
||||
492 488 361 -1
|
||||
493 489 362 -1
|
||||
494 490 365 -1
|
||||
495 491 367 -1
|
||||
496 492 78 -1
|
||||
497 493 383 -1
|
||||
498 494 268 -1
|
||||
499 495 382 -1
|
||||
500 496 136 -1
|
||||
501 497 381 -1
|
||||
502 498 10 -1
|
||||
503 499 80 -1
|
||||
504 500 378 -1
|
||||
505 501 380 -1
|
||||
506 502 269 -1
|
||||
507 503 395 -1
|
||||
508 504 274 -1
|
||||
509 505 398 -1
|
||||
510 506 409 -1
|
||||
511 507 410 -1
|
||||
# Generated by tetgen -pa4000 cube.poly
|
124671
data/fmm3d/cube.1.ele
124671
data/fmm3d/cube.1.ele
File diff suppressed because it is too large
Load Diff
15576
data/fmm3d/cube.1.face
15576
data/fmm3d/cube.1.face
File diff suppressed because it is too large
Load Diff
295307
data/fmm3d/cube.1.msh
295307
data/fmm3d/cube.1.msh
File diff suppressed because it is too large
Load Diff
23512
data/fmm3d/cube.1.node
23512
data/fmm3d/cube.1.node
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
||||
8 3 0 1
|
||||
0 0 0 0 1
|
||||
1 1000 0 0 1
|
||||
2 1000 500 0 1
|
||||
3 0 500 0 1
|
||||
4 0 0 500 1
|
||||
5 1000 0 500 1
|
||||
6 1000 500 500 1
|
||||
7 0 500 500 1
|
||||
6 1
|
||||
1
|
||||
4 0 1 2 3 1
|
||||
1
|
||||
4 4 5 6 7 1
|
||||
1
|
||||
4 0 1 5 4 1
|
||||
1
|
||||
4 1 2 6 5 1
|
||||
1
|
||||
4 2 3 7 6 1
|
||||
1
|
||||
4 3 0 4 7 1
|
||||
0
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
tetgen -pa4000 cube.poly
|
@ -1,12 +0,0 @@
|
||||
# this is an annotation
|
||||
range = 100/1000/200/2000/full_range
|
||||
interval = 10/10
|
||||
weight = 120.12
|
||||
model-file = test.txt
|
||||
# you can insert empty lines too
|
||||
|
||||
model-tag = model1
|
||||
model-tag = model2
|
||||
model-tag = model3
|
||||
|
||||
out-model = example.msh
|
Binary file not shown.
@ -1,129 +0,0 @@
|
||||
# ori o1 o2 o3 o4
|
||||
0.198669 0.217042 -0.0103312 -0.0109239 0.000616416
|
||||
0.406085 0.19779 -0.0192517 -0.0101277 0.00113673
|
||||
0.59425 0.174078 -0.0281722 -0.0082527 0.00133559
|
||||
0.754242 0.142114 -0.0357571 -0.00673732 0.00169517
|
||||
0.878477 0.103412 -0.0416468 -0.00490254 0.00197439
|
||||
0.961065 0.0598071 -0.0455622 -0.00283534 0.00216001
|
||||
0.998091 0.0133673 -0.0473175 -0.000633718 0.00224323
|
||||
0.9878 -0.0337062 -0.0468296 0.00159794 0.0022201
|
||||
0.930679 -0.0791818 -0.0441216 0.00375385 0.00209172
|
||||
0.829436 -0.120904 -0.0393219 0.00573179 0.00186417
|
||||
0.688871 -0.156894 -0.032658 0.007438 0.00154825
|
||||
0.515649 -0.185445 -0.0244459 0.0087916 0.00115893
|
||||
0.317981 -0.205206 -0.0150748 0.00972839 0.000714667
|
||||
0.105237 -0.215238 -0.00498909 0.010204 0.000236523
|
||||
-0.112495 -0.215066 0.00533316 0.0101958 -0.000252834
|
||||
-0.324894 -0.204698 0.0154026 0.00970431 -0.000730205
|
||||
-0.521891 -0.184626 0.0247418 0.00875273 -0.00117296
|
||||
-0.694145 -0.155801 0.032908 0.0073862 -0.0015601
|
||||
-0.833492 -0.11959 0.0395142 0.0056695 -0.00187329
|
||||
-0.933325 -0.077709 0.044247 0.00368403 -0.00209766
|
||||
-0.98891 -0.0321444 0.0468822 0.0015239 -0.00222259
|
||||
-0.997614 0.0149441 0.0472948 -0.000708472 -0.00224215
|
||||
-0.959022 0.0613242 0.0454653 -0.00290726 -0.00215542
|
||||
-0.874965 0.104797 0.0414803 -0.00496822 -0.0019665
|
||||
-0.749428 0.143302 0.0355289 -0.00679364 -0.00168435
|
||||
-0.588362 0.175013 0.027893 -0.00829699 -0.00132235
|
||||
-0.399403 0.198427 0.0189349 -0.009407 -0.000897664
|
||||
-0.191509 0.212434 0.00907904 -0.010071 -0.000430419
|
||||
0.0254643 0.216369 -0.00120721 -0.0102576 5.72315e-05
|
||||
0.24123 0.210048 -0.0114362 -0.00995794 0.000542169
|
||||
0.44556 0.193768 -0.0211231 -0.00918615 0.0010014
|
||||
0.628766 0.168302 -0.0298085 -0.00797887 0.00141316
|
||||
0.782164 0.134858 -0.0370808 -0.00639332 0.00175793
|
||||
0.898481 0.0950195 -0.0425952 -0.00450468 0.00201935
|
||||
0.972203 0.0506768 -0.0460902 -0.00240249 0.00218504
|
||||
0.999835 0.00393166 -0.0474002 -0.000186392 0.00224715
|
||||
0.980067 -0.0429999 -0.046463 0.00203854 0.00220272
|
||||
0.913835 -0.0878929 -0.0433231 0.00416683 0.00205386
|
||||
0.804281 -0.128619 -0.0381293 0.00609757 0.00180763
|
||||
0.656597 -0.163248 -0.0311279 0.00773925 0.00147571
|
||||
0.477785 -0.190137 -0.0226508 0.00901402 0.00107383
|
||||
0.276323 -0.208013 -0.0130999 0.00986146 0.00062104
|
||||
0.0617601 -0.216026 -0.00292792 0.0102414 0.000138807
|
||||
-0.15573 -0.213799 0.00738286 0.0101358 -0.000350007
|
||||
-0.365838 -0.201436 0.0173436 0.00954966 -0.000822227
|
||||
-0.558602 -0.179523 0.0264822 0.00851081 -0.00125547
|
||||
-0.724883 -0.149099 0.0343653 0.00706849 -0.00162919
|
||||
-0.8568 -0.111607 0.0406192 0.00529106 -0.00192567
|
||||
-0.948097 -0.0688236 0.0449474 0.00326279 -0.00213086
|
||||
-0.994447 -0.0227775 0.0471447 0.00107984 -0.00223504
|
||||
-0.993652 0.0243484 0.0471071 -0.00115431 -0.00223325
|
||||
-0.94575 0.0703199 0.0448361 -0.00333373 -0.00212559
|
||||
-0.853012 0.112958 0.0404396 -0.0053551 -0.00191716
|
||||
-0.719835 0.150241 0.0341259 -0.0071226 -0.00161784
|
||||
-0.552531 0.180401 0.0261944 -0.00855243 -0.00124182
|
||||
-0.359033 0.202008 0.017021 -0.00957681 -0.000806934
|
||||
-0.148514 0.214039 0.00704077 -0.0101472 -0.000333789
|
||||
0.0690453 0.215923 -0.0032733 -0.0102365 0.000155181
|
||||
0.283332 0.20757 -0.0134322 -0.00984049 0.000636793
|
||||
0.484186 0.189377 -0.0229543 -0.00897799 0.00108822
|
||||
0.662086 0.162206 -0.0313882 -0.00768985 0.00148805
|
||||
0.808598 0.127345 -0.038334 -0.00603716 0.00181734
|
||||
0.916776 0.0864466 -0.0434625 -0.00409826 0.00206047
|
||||
0.981491 0.0414501 -0.0465305 -0.00196506 0.00220592
|
||||
0.999676 -0.00551149 -0.0473926 0.000261289 0.00224679
|
||||
0.970468 -0.0522118 -0.0460079 0.00247525 0.00218114
|
||||
0.895252 -0.0964368 -0.0424421 0.00457187 0.00201209
|
||||
0.777594 -0.13609 -0.0368642 0.00645175 0.00174766
|
||||
0.623072 -0.169291 -0.0295386 0.00802576 0.00140037
|
||||
0.439012 -0.194467 -0.0208127 0.00921929 0.000986686
|
||||
0.234138 -0.210423 -0.0111 0.00997574 0.00052623
|
||||
0.0181652 -0.216404 -0.000861174 0.0102593 4.08265e-05
|
||||
-0.198669 -0.212125 0.00941851 0.0100564 -0.000446513
|
||||
-0.406085 -0.19779 0.0192517 0.00937683 -0.000912684
|
||||
-0.59425 -0.174078 0.0281722 0.0082527 -0.00133559
|
||||
-0.754242 -0.142114 0.0357571 0.00673732 -0.00169517
|
||||
-0.878477 -0.103412 0.0416468 0.00490254 -0.00197439
|
||||
-0.961065 -0.0598071 0.0455622 0.00283534 -0.00216001
|
||||
-0.998091 -0.0133673 0.0473175 0.000633718 -0.00224323
|
||||
-0.9878 0.0337062 0.0468296 -0.00159794 -0.0022201
|
||||
-0.930679 0.0791818 0.0441216 -0.00375385 -0.00209172
|
||||
-0.829436 0.120904 0.0393219 -0.00573179 -0.00186417
|
||||
-0.688871 0.156894 0.032658 -0.007438 -0.00154825
|
||||
-0.515649 0.185445 0.0244459 -0.0087916 -0.00115893
|
||||
-0.317981 0.205206 0.0150748 -0.00972839 -0.000714667
|
||||
-0.105237 0.215238 0.00498909 -0.010204 -0.000236523
|
||||
0.112495 0.215066 -0.00533316 -0.0101958 0.000252834
|
||||
0.324894 0.204698 -0.0154026 -0.00970431 0.000730205
|
||||
0.521891 0.184626 -0.0247418 -0.00875273 0.00117296
|
||||
0.694145 0.155801 -0.032908 -0.0073862 0.0015601
|
||||
0.833492 0.11959 -0.0395142 -0.0056695 0.00187329
|
||||
0.933325 0.077709 -0.044247 -0.00368403 0.00209766
|
||||
0.98891 0.0321444 -0.0468822 -0.0015239 0.00222259
|
||||
0.997614 -0.0149441 -0.0472948 0.000708472 0.00224215
|
||||
0.959022 -0.0613242 -0.0454653 0.00290726 0.00215542
|
||||
0.874965 -0.104797 -0.0414803 0.00496822 0.0019665
|
||||
0.749428 -0.143302 -0.0355289 0.00679364 0.00168435
|
||||
0.588362 -0.175013 -0.027893 0.00829699 0.00132235
|
||||
0.399403 -0.198427 -0.0189349 0.009407 0.000897664
|
||||
0.191509 -0.212434 -0.00907904 0.010071 0.000430419
|
||||
-0.0254643 -0.216369 0.00120721 0.0102576 -5.72315e-05
|
||||
-0.24123 -0.210048 0.0114362 0.00995794 -0.000542169
|
||||
-0.44556 -0.193768 0.0211231 0.00918615 -0.0010014
|
||||
-0.628766 -0.168302 0.0298085 0.00797887 -0.00141316
|
||||
-0.782164 -0.134858 0.0370808 0.00639332 -0.00175793
|
||||
-0.898481 -0.0950195 0.0425952 0.00450468 -0.00201935
|
||||
-0.972203 -0.0506768 0.0460902 0.00240249 -0.00218504
|
||||
-0.999835 -0.00393166 0.0474002 0.000186392 -0.00224715
|
||||
-0.980067 0.0429999 0.046463 -0.00203854 -0.00220272
|
||||
-0.913835 0.0878929 0.0433231 -0.00416683 -0.00205386
|
||||
-0.804281 0.128619 0.0381293 -0.00609757 -0.00180763
|
||||
-0.656597 0.163248 0.0311279 -0.00773925 -0.00147571
|
||||
-0.477785 0.190137 0.0226508 -0.00901402 -0.00107383
|
||||
-0.276323 0.208013 0.0130999 -0.00986146 -0.00062104
|
||||
-0.0617601 0.216026 0.00292792 -0.0102414 -0.000138807
|
||||
0.15573 0.213799 -0.00738286 -0.0101358 0.000350007
|
||||
0.365838 0.201436 -0.0173436 -0.00954966 0.000822227
|
||||
0.558602 0.179523 -0.0264822 -0.00851081 0.00125547
|
||||
0.724883 0.149099 -0.0343653 -0.00706849 0.00162919
|
||||
0.8568 0.111607 -0.0406192 -0.00529106 0.00192567
|
||||
0.948097 0.0688236 -0.0449474 -0.00326279 0.00213086
|
||||
0.994447 0.0227775 -0.0471447 -0.00107984 0.00223504
|
||||
0.993652 -0.0243484 -0.0471071 0.00115431 0.00223325
|
||||
0.94575 -0.0703199 -0.0448361 0.00333373 0.00212559
|
||||
0.853012 -0.112958 -0.0404396 0.0053551 0.00191716
|
||||
0.719835 -0.150241 -0.0341259 0.0071226 0.00161784
|
||||
0.552531 -0.180401 -0.0261944 0.00918942 0.0015003
|
||||
0.359033 -0.206595 -0.0182629 0.0103583 0.0010192
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
@ -1,5 +0,0 @@
|
||||
#!/bin/zsh
|
||||
|
||||
xyz2nc -t prism_mag_pot.txt -o prism_V -r -30/30/-30/30 -i 0.75/0.75 -c 0,1,3 -l x,y,V
|
||||
xyz2nc -t prism_mag_grad.txt -o prism_B -r -30/30/-30/30 -i 0.75/0.75 -c 0,1,3,4,5 -l x,y,Bx,By,Bz
|
||||
xyz2nc -t prism_mag_tensor.txt -o prism_T -r -30/30/-30/30 -i 0.75/0.75 -c 0,1,3,4,5,6,7,8,9,10,11 -l x,y,Txx,Txy,Txz,Tyx,Tyy,Tyz,Tzx,Tzy,Tzz
|
@ -1,14 +0,0 @@
|
||||
12 1
|
||||
0 0 1 -1
|
||||
1 1 2 -1
|
||||
2 2 3 -1
|
||||
3 3 0 -1
|
||||
4 4 5 -1
|
||||
5 5 6 -1
|
||||
6 6 7 -1
|
||||
7 7 4 -1
|
||||
8 0 4 -1
|
||||
9 5 1 -1
|
||||
10 6 2 -1
|
||||
11 7 3 -1
|
||||
# Generated by tetgen -pq prism.poly
|
@ -1,8 +0,0 @@
|
||||
6 4 0
|
||||
0 2 0 3 7
|
||||
1 2 0 7 6
|
||||
2 5 4 0 6
|
||||
3 0 4 7 6
|
||||
4 0 2 1 6
|
||||
5 5 0 1 6
|
||||
# Generated by tetgen -pq prism.poly
|
@ -1,14 +0,0 @@
|
||||
12 1
|
||||
0 0 2 1 -1
|
||||
1 6 4 5 -1
|
||||
2 2 0 3 -1
|
||||
3 0 5 4 -1
|
||||
4 4 6 7 -1
|
||||
5 1 6 5 -1
|
||||
6 5 0 1 -1
|
||||
7 2 7 6 -1
|
||||
8 6 1 2 -1
|
||||
9 7 0 4 -1
|
||||
10 7 2 3 -1
|
||||
11 0 7 3 -1
|
||||
# Generated by tetgen -pq prism.poly
|
@ -1,10 +0,0 @@
|
||||
8 3 0 0
|
||||
0 -5 5 0
|
||||
1 -5 -5 0
|
||||
2 5 -5 0
|
||||
3 5 5 0
|
||||
4 -5 5 -10
|
||||
5 -5 -5 -10
|
||||
6 5 -5 -10
|
||||
7 5 5 -10
|
||||
# Generated by tetgen -pq prism.poly
|
@ -1,32 +0,0 @@
|
||||
# Part 1 - the node list.
|
||||
# A bar with 8 nodes in 3d, no attributes, no boundary marker.
|
||||
8 3 0 0
|
||||
0 -5 5 0
|
||||
1 -5 -5 0
|
||||
2 5 -5 0
|
||||
3 5 5 0
|
||||
4 -5 5 -10
|
||||
5 -5 -5 -10
|
||||
6 5 -5 -10
|
||||
7 5 5 -10
|
||||
# Part 2 - the facet list.
|
||||
# Six facets without boundary markers.
|
||||
6 0
|
||||
1
|
||||
4 0 1 2 3
|
||||
1
|
||||
4 4 5 6 7
|
||||
1
|
||||
4 0 4 5 1
|
||||
1
|
||||
4 1 5 6 2
|
||||
1
|
||||
4 2 6 7 3
|
||||
1
|
||||
4 3 7 4 0
|
||||
# Part 3 - the hole list.
|
||||
# There is no hole in bar.
|
||||
0
|
||||
# Part 4 - the region list.
|
||||
# There is no region defined.
|
||||
0
|
5005
data/random_topo.txt
5005
data/random_topo.txt
File diff suppressed because it is too large
Load Diff
@ -1,65 +0,0 @@
|
||||
$MeshFormat
|
||||
2.2 0 8
|
||||
$EndMeshFormat
|
||||
$Nodes
|
||||
24
|
||||
1 -0.9 -0.9 -0
|
||||
2 -0 -1 0
|
||||
3 0.2 -0.8 0
|
||||
4 0.4 -0.6 0
|
||||
5 0.4 -0.3 0
|
||||
6 0.2 -0.1 0
|
||||
7 -0.1 -0.1 0
|
||||
8 -0.3 -0 0
|
||||
9 -0.6 -0 -0
|
||||
10 -0.8 -0.3 -0
|
||||
11 -1 -0.4 -0
|
||||
12 -0.7 -0.5 -0
|
||||
13 -0.4 -0.6 -0
|
||||
14 -0.6 -0.8 -0
|
||||
15 0.05000000000000002 -0.3192990707943443 0
|
||||
16 -0.3234241541417823 -0.2328534994349195 0
|
||||
17 -0.5506180658400093 -0.2582432415759687 0
|
||||
18 -0.1258025445242781 -0.6785469613365849 0
|
||||
19 0.1514088145278976 -0.5514088145278978 0
|
||||
20 -0.4656780986675711 -0.4168904058736227 0
|
||||
21 -0.05422077983979526 -0.4758537298998016 0
|
||||
22 -0.2480354552006746 -0.4463582505235376 0
|
||||
23 -0.4435105549954478 -0.122774185252722 0
|
||||
24 -0.1351360778364504 -0.3148729101305205 0
|
||||
$EndNodes
|
||||
$Elements
|
||||
32
|
||||
1 2 0 5 15 19
|
||||
2 2 0 10 12 17
|
||||
3 2 0 12 13 20
|
||||
4 2 0 5 6 15
|
||||
5 2 0 16 17 20
|
||||
6 2 0 4 5 19
|
||||
7 2 0 6 7 15
|
||||
8 2 0 16 20 22
|
||||
9 2 0 17 12 20
|
||||
10 2 0 8 9 23
|
||||
11 2 0 18 3 19
|
||||
12 2 0 13 18 22
|
||||
13 2 0 18 21 22
|
||||
14 2 0 7 8 16
|
||||
15 2 0 15 7 24
|
||||
16 2 0 17 16 23
|
||||
17 2 0 3 4 19
|
||||
18 2 0 18 19 21
|
||||
19 2 0 2 3 18
|
||||
20 2 0 9 17 23
|
||||
21 2 0 19 15 21
|
||||
22 2 0 20 13 22
|
||||
23 2 0 22 21 24
|
||||
24 2 0 16 8 23
|
||||
25 2 0 7 16 24
|
||||
26 2 0 21 15 24
|
||||
27 2 0 16 22 24
|
||||
28 2 0 2 14 1
|
||||
29 2 0 14 2 18
|
||||
30 2 0 9 10 17
|
||||
31 2 0 12 10 11
|
||||
32 2 0 13 14 18
|
||||
$EndElements
|
@ -1,903 +0,0 @@
|
||||
$MeshFormat
|
||||
2.2 0 8
|
||||
$EndMeshFormat
|
||||
$Nodes
|
||||
354
|
||||
0 313.926183 8243.35375 174.61
|
||||
1 311.351438 8244.494357 174.61
|
||||
2 309.423145 8245.025100000001 174.61
|
||||
3 307.494853 8245.555843 174.61
|
||||
4 305.56656 8246.086585999999 174.61
|
||||
5 303.638268 8246.617329000001 174.61
|
||||
6 301.681003 8247.028560999999 174.61
|
||||
7 299.723737 8247.439793 174.61
|
||||
8 297.766471 8247.851025 174.61
|
||||
9 295.809206 8248.262257 174.61
|
||||
10 293.85194 8248.673489000001 174.61
|
||||
11 291.894675 8249.084720999999 174.61
|
||||
12 289.937409 8249.495953 174.61
|
||||
13 287.980144 8249.907185 174.61
|
||||
14 286.022878 8250.318417 174.61
|
||||
15 284.065613 8250.729649000001 174.61
|
||||
16 282.146435 8251.292459 174.61
|
||||
17 280.227256 8251.855269 174.61
|
||||
18 278.308078 8252.418078000001 174.61
|
||||
19 276.3889 8252.980888 174.61
|
||||
20 274.469722 8253.543697999999 174.61
|
||||
21 272.550544 8254.106508000001 174.61
|
||||
22 270.631365 8254.669318 174.61
|
||||
23 268.712187 8255.232128 174.61
|
||||
24 266.793009 8255.794937999999 174.61
|
||||
25 264.793706 8255.847739999999 174.61
|
||||
26 262.794403 8255.900541999999 174.61
|
||||
27 260.795101 8255.953344 174.61
|
||||
28 258.795798 8256.006146 174.61
|
||||
29 256.796495 8256.058949 174.61
|
||||
30 254.797192 8256.111751 174.61
|
||||
31 252.797889 8256.164553000001 174.61
|
||||
32 250.798586 8256.217355000001 174.61
|
||||
33 250.115306 8254.337692999999 174.61
|
||||
34 249.432026 8252.458031 174.61
|
||||
35 248.748746 8250.578369999999 174.61
|
||||
36 248.065465 8248.698708 174.61
|
||||
37 247.382185 8246.819046000001 174.61
|
||||
38 246.698905 8244.939383999999 174.61
|
||||
39 246.015625 8243.059723 174.61
|
||||
40 245.332345 8241.180060999999 174.61
|
||||
41 243.50226 8240.373345 174.61
|
||||
42 241.672176 8239.566629000001 174.61
|
||||
43 239.842091 8238.759913 174.61
|
||||
44 238.012007 8237.953197000001 174.61
|
||||
45 236.181922 8237.146481 174.61
|
||||
46 234.351838 8236.339765000001 174.61
|
||||
47 232.521753 8235.533049 174.61
|
||||
48 230.931851 8234.319702000001 174.61
|
||||
49 229.341948 8233.106355 174.61
|
||||
50 227.752046 8231.893008999999 174.61
|
||||
51 226.162143 8230.679662 174.61
|
||||
52 224.572241 8229.466315 174.61
|
||||
53 222.982338 8228.252968999999 174.61
|
||||
54 221.392436 8227.039622 174.61
|
||||
55 219.802533 8225.826276 174.61
|
||||
56 218.212631 8224.612929000001 174.61
|
||||
57 216.622728 8223.399582 174.61
|
||||
58 215.032826 8222.186236 174.61
|
||||
59 213.442923 8220.972889000001 174.61
|
||||
60 211.853021 8219.759542 174.61
|
||||
61 210.263118 8218.546195999999 174.61
|
||||
62 209.064308 8216.945304000001 174.61
|
||||
63 207.865498 8215.344413000001 174.61
|
||||
64 206.666687 8213.743521 174.61
|
||||
65 205.467877 8212.142629 174.61
|
||||
66 204.269067 8210.541738 174.61
|
||||
67 203.070256 8208.940846 174.61
|
||||
68 201.871446 8207.339954999999 174.61
|
||||
69 199.473825 8204.138172000001 174.61
|
||||
70 194.464261 8238.589733000001 145.66
|
||||
71 195.890157 8239.992167 145.66
|
||||
72 197.316053 8241.394601 145.66
|
||||
73 198.741949 8242.797035 145.66
|
||||
74 200.167845 8244.199468999999 145.66
|
||||
75 201.59374 8245.601903000001 145.66
|
||||
76 203.019636 8247.004337 145.66
|
||||
77 204.445532 8248.406771 145.66
|
||||
78 206.285084 8249.191659 145.66
|
||||
79 208.124636 8249.976547 145.66
|
||||
80 209.964188 8250.761434 145.66
|
||||
81 211.80374 8251.546322 145.66
|
||||
82 213.643291 8252.33121 145.66
|
||||
83 215.482843 8253.116098 145.66
|
||||
84 217.322395 8253.900986000001 145.66
|
||||
85 217.960095 8255.796596 145.66
|
||||
86 218.597795 8257.692207 145.66
|
||||
87 219.235494 8259.587817 145.66
|
||||
88 219.873194 8261.483428 145.66
|
||||
89 220.510894 8263.379037999999 145.66
|
||||
90 222.359262 8264.142934 145.66
|
||||
91 224.20763 8264.906829 145.66
|
||||
92 226.055998 8265.670724 145.66
|
||||
93 227.904366 8266.43462 145.66
|
||||
94 229.752733 8267.198515 145.66
|
||||
95 231.601101 8267.96241 145.66
|
||||
96 233.449469 8268.726306 145.66
|
||||
97 235.297837 8269.490201000001 145.66
|
||||
98 237.018434 8268.470619 145.66
|
||||
99 238.73903 8267.451037000001 145.66
|
||||
100 240.459627 8266.431455 145.66
|
||||
101 242.180224 8265.411872999999 145.66
|
||||
102 243.90082 8264.392292 145.66
|
||||
103 245.621417 8263.37271 145.66
|
||||
104 247.601823 8263.093441000001 145.66
|
||||
105 249.582229 8262.814172 145.66
|
||||
106 251.562636 8262.534903 145.66
|
||||
107 253.543042 8262.255635 145.66
|
||||
108 255.523448 8261.976366000001 145.66
|
||||
109 257.503854 8261.697097 145.66
|
||||
110 259.484261 8261.417829 145.66
|
||||
111 261.464667 8261.138559999999 145.66
|
||||
112 263.445073 8260.859291000001 145.66
|
||||
113 265.363134 8260.292684 145.66
|
||||
114 267.281194 8259.726076999999 145.66
|
||||
115 269.199255 8259.159470000001 145.66
|
||||
116 271.117315 8258.592862 145.66
|
||||
117 273.035376 8258.026255000001 145.66
|
||||
118 274.953437 8257.459648 145.66
|
||||
119 276.881907 8257.989743 145.66
|
||||
120 278.810378 8258.519838 145.66
|
||||
121 280.738849 8259.049933 145.66
|
||||
122 282.667319 8259.580028 145.66
|
||||
123 283.883839 8261.167503999999 145.66
|
||||
124 285.100358 8262.754981 145.66
|
||||
125 286.316877 8264.342457000001 145.66
|
||||
126 287.533397 8265.929932999999 145.66
|
||||
127 288.749916 8267.517409 145.66
|
||||
128 289.966435 8269.104885999999 145.66
|
||||
129 291.949883 8269.36166 145.66
|
||||
130 293.933331 8269.618435 145.66
|
||||
131 295.91678 8269.87521 145.66
|
||||
132 297.900228 8270.131984 145.66
|
||||
133 299.883676 8270.388758999999 145.66
|
||||
134 301.867124 8270.645533999999 145.66
|
||||
135 303.850572 8270.902308000001 145.66
|
||||
136 304.927279 8269.21687 145.66
|
||||
137 306.003985 8267.531430999999 145.66
|
||||
138 307.080691 8265.845992 145.66
|
||||
139 308.157398 8264.160554 145.66
|
||||
140 308.080255 8262.162042 145.66
|
||||
141 308.003113 8260.16353 145.66
|
||||
142 307.925971 8258.165018 145.66
|
||||
143 307.848828 8256.166507 145.66
|
||||
144 307.771686 8254.167995 145.66
|
||||
145 307.694544 8252.169483 145.66
|
||||
146 307.617401 8250.170972 145.66
|
||||
147 307.540259 8248.17246 145.66
|
||||
148 309.13674 8246.967782 145.66
|
||||
149 310.733221 8245.763105 145.66
|
||||
150 312.329702 8244.558427 145.66
|
||||
151 313.011881313963 8243.758783858966 174.61
|
||||
152 197.1714950382996 8219.971657931641 167.1326825363388
|
||||
153 313.127942326152 8243.956088631183 145.66
|
||||
154 312.1816596569819 8244.126570429482 174.61
|
||||
155 198.3226600191497 8212.054914965822 171.511706200758
|
||||
156 311.5314614999995 8245.160766000001 145.66
|
||||
157 311.766548828491 8244.310463714741 174.61
|
||||
158 312.7288221630755 8244.257257815592 145.66
|
||||
159 310.3872914999997 8244.759728500001 174.61
|
||||
160 202.0305338890445 8213.467342918595 172.8094853580749
|
||||
161 205.6269648890445 8218.270017918596 172.4736790876283
|
||||
162 213.676849263398 8225.611366645451 171.8260766878229
|
||||
163 226.396069263398 8235.318139645451 171.0487149742466
|
||||
164 237.4969640778441 8241.600789073307 170.7492766615007
|
||||
165 222.2770380948837 8257.50954759273 148.6470887700369
|
||||
166 222.274113329071 8261.730806429581 147.0775379066513
|
||||
167 245.7582655823208 8252.729467446003 167.5701427137334
|
||||
168 246.1165531039372 8259.722361989483 154.9707564940292
|
||||
169 198.898242509575 8208.09654348291 172.9655190022536
|
||||
170 236.0712943824225 8264.910685946632 148.9794557326485
|
||||
171 235.1379787866611 8267.258843141719 147.2434974556395
|
||||
172 278.1225256679723 8255.338942399028 160.5568337874227
|
||||
173 284.1037308696277 8254.413227157265 163.746463012873
|
||||
174 274.0266093132985 8255.586283465878 161.3579692445111
|
||||
175 261.8614257854493 8258.451488142155 160.1545176599392
|
||||
176 270.1894300182401 8256.715919431155 160.8363594930652
|
||||
177 305.175334236154 8248.433487558827 161.6641334996602
|
||||
178 297.5168393909073 8251.526331901341 166.4179553244652
|
||||
179 265.7248578889732 8257.987398845493 159.6887053347512
|
||||
180 254.1182495922608 8259.173105314845 159.7573530580744
|
||||
181 290.9558135167043 8264.567118409723 150.0459593802406
|
||||
182 304.9284567128553 8263.28444697108 148.8113997826581
|
||||
183 210.4970424906732 8223.184673145452 172.0142834422122
|
||||
184 216.8566524906765 8228.038060145451 171.6238845218464
|
||||
185 229.5758724906765 8237.744833145451 170.7778055986207
|
||||
186 214.1149053997695 8248.677749547322 149.0796672981306
|
||||
187 223.2162624906732 8232.891446145451 171.2392832006383
|
||||
188 241.1571330778441 8243.214221073307 170.8326683350127
|
||||
189 233.8367950778441 8239.987357073307 170.7631837987159
|
||||
190 221.0016385948837 8253.718324820007 149.3345873237841
|
||||
191 226.4859891020328 8262.012129938634 148.5151545150298
|
||||
192 223.963769700017 8262.878727831298 147.0381160334391
|
||||
193 248.28541631274 8260.77951696444 152.4898134362761
|
||||
194 241.2330861551472 8261.851940446631 151.1784104213179
|
||||
195 200.8089539423332 8209.384894229866 173.6305121571324
|
||||
196 232.0310921020328 8264.303815938634 148.7787492268117
|
||||
197 279.8081435522726 8253.979697880626 166.3247893678882
|
||||
198 282.4145498328289 8256.726688751096 155.5300146002253
|
||||
199 285.471401416754 8252.557088125586 168.8251491052046
|
||||
200 275.9175367823709 8254.927139361223 163.792297292365
|
||||
201 268.2408893943114 8257.178603097462 161.4906657898475
|
||||
202 304.9942219086736 8251.272971705994 155.7451797752991
|
||||
203 303.0487185759312 8248.6747918568 166.6743147206707
|
||||
204 304.3445908190449 8257.302515757838 151.9243399785707
|
||||
205 293.6023083909041 8252.348795901342 167.0179052599145
|
||||
206 256.2356785635421 8259.865519940555 155.472406712622
|
||||
207 252.2748676582121 8260.424058144819 154.1567152780841
|
||||
208 293.318656438655 8266.577544510996 148.8737200794329
|
||||
209 288.5227745167043 8261.392166409723 151.8222114213268
|
||||
210 301.3305912394036 8267.001040362667 148.5454383834011
|
||||
211 220.0364574906765 8230.46475314545 171.4279641120949
|
||||
212 203.366921097577 8242.372967521527 148.7257097985029
|
||||
213 210.4358001270448 8247.107972274596 148.8339484911673
|
||||
214 243.6451594869822 8244.985437366791 171.1246075530364
|
||||
215 229.667230729892 8264.78724317028 147.5697738103074
|
||||
216 289.6877773909073 8253.171259901341 166.5288184498691
|
||||
217 291.2122578718165 8267.270488998878 147.7708154155297
|
||||
218 299.1738655043491 8268.082742149889 147.7857639788016
|
||||
219 297.1371642831866 8268.237313103005 147.5177713752924
|
||||
220 204.3096622292636 8214.259248831437 173.5052739655773
|
||||
221 207.9060932292637 8219.061923831438 173.2358193674899
|
||||
222 212.9057404543121 8223.325117494278 173.0245707919301
|
||||
223 216.0855456392754 8225.751810251912 172.8935786508372
|
||||
224 228.8047656392754 8235.458583251911 172.3897480931193
|
||||
225 225.6249604543121 8233.031890494278 172.519751841196
|
||||
226 236.2112707600957 8239.559089873903 172.2351882023952
|
||||
227 220.3601373623933 8256.044270318287 147.6542405973609
|
||||
228 221.2425720613906 8259.967687921255 147.0644541436803
|
||||
229 247.7099844981616 8254.148035327213 169.0054729826114
|
||||
230 244.3917028095993 8248.970143946002 169.2435156613031
|
||||
231 246.3434245006209 8250.388713242462 170.5746523974396
|
||||
232 238.4799287108291 8265.052201353226 148.2644353029432
|
||||
233 233.1937475173908 8266.726906506154 147.2312850695726
|
||||
234 272.0791801987115 8256.052759943424 161.7072910956356
|
||||
235 259.8444674876201 8257.83576957677 164.488868547548
|
||||
236 299.1965957573373 8249.794292029326 168.6500474157657
|
||||
237 263.9038935566198 8258.882691822029 156.1429491331224
|
||||
238 304.8011203130221 8265.57637250056 147.7260164521207
|
||||
239 305.9770326615911 8261.242480959823 148.4249971803805
|
||||
240 209.7259366288135 8220.898423893903 173.1267279994175
|
||||
241 217.7940088997695 8250.247523774597 149.5270435796658
|
||||
242 215.4247957738045 8250.70400929998 147.7789391031023
|
||||
243 211.7456930232013 8249.134232715465 147.6289750595905
|
||||
244 222.4451566288135 8230.605196893903 172.6410458911713
|
||||
245 239.8714397600957 8241.172521873903 172.172675850896
|
||||
246 232.5511017600957 8237.945657873903 172.2399700831135
|
||||
247 224.4854580313409 8260.293354733078 148.7562784497157
|
||||
248 243.6417193146052 8261.993457372129 150.0205005281902
|
||||
249 202.2604160107508 8210.796590542444 173.8102649425752
|
||||
250 281.6768586990891 8253.244806309865 168.2039288870571
|
||||
251 280.2784563673854 8256.951919034915 153.6082752933255
|
||||
252 287.3635519318007 8251.835941238165 170.106041404697
|
||||
253 305.8395402708042 8253.241830450919 151.5059340698077
|
||||
254 301.0599021214895 8248.935857475493 168.8672169768372
|
||||
255 295.2820647573377 8250.616756029327 169.6022020909191
|
||||
256 255.8437965364 8257.863186948094 165.7414154087156
|
||||
257 258.2498577278492 8259.825739572449 154.6872900174976
|
||||
258 250.3282319264178 8260.942814590098 152.1255332146419
|
||||
259 251.8515666761752 8258.210218079283 164.8970216222584
|
||||
260 288.6680273616915 8263.800577338501 149.1169086831441
|
||||
261 286.2349899379212 8260.625625953009 150.4795867150306
|
||||
262 219.2653516288138 8228.178503893902 172.7651140204012
|
||||
263 206.2187125975738 8245.177833748803 148.4541047626427
|
||||
264 203.8464206784078 8244.737628385272 147.4252800490487
|
||||
265 200.9946304746424 8241.932759575715 147.4812360903842
|
||||
266 208.0665888042696 8247.564458228579 147.4850677327471
|
||||
267 243.5786499122906 8242.679238118901 172.4720606239788
|
||||
268 245.1959706720016 8246.549740204444 171.7603190764186
|
||||
269 227.6604395683543 8264.40668050233 147.1678516350345
|
||||
270 291.3675337573373 8251.439220029326 169.6662647926144
|
||||
271 287.2272800713428 8255.282827334266 161.9446587473132
|
||||
272 295.1475154232627 8268.02843904236 147.5617448049912
|
||||
273 297.8815032348254 8264.54951821877 150.9991722135544
|
||||
274 205.8404799584432 8215.611521836026 173.6671975118965
|
||||
275 248.7830858959678 8255.885992507574 168.5974992515517
|
||||
276 240.411976213827 8264.389452939055 148.1560724931977
|
||||
277 303.9832304774628 8267.427150570767 147.2679730871997
|
||||
278 302.2432263665554 8264.284759154523 150.0080183789812
|
||||
279 306.2067820637887 8259.232123038184 148.5364942133951
|
||||
280 200.2778651293144 8211.382965308912 172.7459088262896
|
||||
281 306.072495396461 8255.234328108178 149.9229067848555
|
||||
282 301.9266376769696 8253.755917339577 158.3732906523234
|
||||
283 257.8418912496609 8257.764600891482 165.585617588144
|
||||
284 249.4812034886728 8258.679720110491 161.0814206205042
|
||||
285 284.6892452860924 8259.290440450286 150.6172965527058
|
||||
286 206.0527538675582 8247.188039366587 147.0185421112836
|
||||
287 199.2778843553139 8240.82604146805 147.1323529296793
|
||||
288 243.0090867936295 8247.16689348573 169.1832062623778
|
||||
289 229.1170689100535 8262.206959920337 149.3772637998786
|
||||
290 296.3495243321339 8266.159321477237 149.5438512857817
|
||||
291 203.4645709476748 8216.758524720712 172.1192291777782
|
||||
292 245.701093897865 8256.588696262086 161.9001026438997
|
||||
293 238.6566475821676 8262.419841598368 151.022478836895
|
||||
294 302.4435311888182 8260.71819392587 152.0323715939707
|
||||
295 302.2884848721959 8256.106761253357 155.4414015387319
|
||||
296 304.0100983678824 8254.465588663066 154.4018490759173
|
||||
297 301.0754341021852 8251.421021980936 163.1354580286252
|
||||
298 287.129121281438 8258.028142559975 156.0267135907007
|
||||
299 197.818120583935 8239.458041829837 147.1347617785995
|
||||
300 202.0981633135229 8238.336083244893 151.233530687906
|
||||
301 241.3952172988316 8245.512857028158 169.1655320897779
|
||||
302 294.4141484259911 8262.783649342746 152.7559137669651
|
||||
303 240.5037291917727 8250.519515494871 164.6209150512442
|
||||
304 304.3500667064324 8260.038239511079 150.6349563451401
|
||||
305 197.7470775287246 8216.013286448731 169.5840761175503
|
||||
306 195.8178780191498 8229.280695465821 158.5862528259621
|
||||
307 199.9049346836927 8238.694087694144 149.2338724051603
|
||||
308 238.3303130060812 8244.668660573485 168.2451889317608
|
||||
309 240.5559372392456 8247.946113043732 166.7807704982223
|
||||
310 302.7888209866092 8258.673497179356 152.9795554915347
|
||||
311 199.9041950419229 8213.4762322721 171.7929861807117
|
||||
312 298.9914928192845 8259.083741994984 155.4553463414398
|
||||
313 200.9774497953317 8215.884204722212 171.3003887711282
|
||||
314 195.1410695095747 8233.935214232912 152.3633822701954
|
||||
315 200.3669058714845 8234.627096146927 154.0774754614462
|
||||
316 197.8835955937096 8236.404749463667 150.1261787470227
|
||||
317 196.3917525628544 8238.056087747587 147.2767348264982
|
||||
318 194.8026652547874 8236.262473616456 148.6575676390163
|
||||
319 205.3626983359229 8222.706236687283 169.6578735636612
|
||||
320 230.8898676831124 8240.417426985407 168.8392761188105
|
||||
321 208.815668643367 8245.075789272367 149.8294237752952
|
||||
322 228.0974826031021 8258.112842129814 151.8518362986938
|
||||
323 242.6375531092147 8258.516118199594 156.383447404928
|
||||
324 299.352308260146 8253.371804396282 161.7817777882186
|
||||
325 290.6480569221984 8256.779549712814 159.7504221475794
|
||||
326 235.9679005849229 8249.140263803578 163.153875842859
|
||||
327 201.0195572172153 8219.739060254797 169.2703677902785
|
||||
328 207.9460419057149 8222.771910433821 171.024322425639
|
||||
329 207.3614676018552 8241.1637764813 152.3971714787335
|
||||
330 213.22823423714 8243.219834592768 154.0662719678526
|
||||
331 239.2670085463485 8259.060601734442 154.9069666833876
|
||||
332 296.1454035207044 8254.72582970576 161.9552443127924
|
||||
333 208.4898277778386 8227.500512091408 167.4340257143654
|
||||
334 206.5886669152632 8225.323575930755 168.2677462298901
|
||||
335 234.1891286088608 8244.146441370447 166.7816894650607
|
||||
336 225.4950984875067 8241.410481054489 164.4951534037054
|
||||
337 203.6801400772652 8229.782277754017 162.0894723612487
|
||||
338 202.3291183615592 8225.722966592532 165.4159744695053
|
||||
339 234.6204253049797 8260.817621124561 152.3056667863168
|
||||
340 242.3171865978215 8254.60852823558 161.8078967904619
|
||||
341 214.1446977447509 8234.888323709078 163.6328505651941
|
||||
342 217.7354071986266 8245.288597207242 154.7730826939639
|
||||
343 196.4946865287248 8224.62617669873 163.4134059585095
|
||||
344 218.9620915548466 8235.16921042608 166.5216637340015
|
||||
345 212.602480526767 8230.315824019077 167.2543475459644
|
||||
346 225.5514188205176 8254.297879149928 152.7900725810471
|
||||
347 236.8607050084175 8254.352097430679 158.9810045979034
|
||||
348 223.9153702249035 8247.807917997332 156.8171455135806
|
||||
349 205.4196086619233 8234.527173853638 157.8866814666313
|
||||
350 222.6451681302684 8236.936446448326 167.1656484337931
|
||||
351 231.2110824163707 8253.277771520552 157.0890331633047
|
||||
352 218.7750446547908 8240.280579848028 161.0171844123911
|
||||
353 229.0178444146641 8245.397731906243 162.7279983304483
|
||||
$EndNodes
|
||||
$Elements
|
||||
540
|
||||
0 2 1 0 169 68 69
|
||||
1 2 1 0 128 217 127
|
||||
2 2 1 0 65 220 64
|
||||
3 2 1 0 279 239 141
|
||||
4 2 1 0 258 105 106
|
||||
5 2 1 0 65 66 160
|
||||
6 2 1 0 280 169 155
|
||||
7 2 1 0 301 309 288
|
||||
8 2 1 0 160 291 220
|
||||
9 2 1 0 207 106 107
|
||||
10 2 1 0 5 203 177
|
||||
11 2 1 0 161 62 63
|
||||
12 2 1 0 168 284 292
|
||||
13 2 1 0 220 65 160
|
||||
14 2 1 0 200 119 172
|
||||
15 2 1 0 222 58 59
|
||||
16 2 1 0 240 221 328
|
||||
17 2 1 0 287 265 307
|
||||
18 2 1 0 181 127 217
|
||||
19 2 1 0 265 287 73
|
||||
20 2 1 0 161 221 62
|
||||
21 2 1 0 341 344 211
|
||||
22 2 1 0 222 162 58
|
||||
23 2 1 0 140 239 182
|
||||
24 2 1 0 287 72 73
|
||||
25 2 1 0 212 265 74
|
||||
26 2 1 0 47 246 46
|
||||
27 2 1 0 184 55 56
|
||||
28 2 1 0 250 16 17
|
||||
29 2 1 0 183 59 60
|
||||
30 2 1 0 300 265 212
|
||||
31 2 1 0 131 132 219
|
||||
32 2 1 0 60 61 240
|
||||
33 2 1 0 167 231 230
|
||||
34 2 1 0 329 263 321
|
||||
35 2 1 0 266 78 79
|
||||
36 2 1 0 53 54 211
|
||||
37 2 1 0 261 123 124
|
||||
38 2 1 0 132 133 218
|
||||
39 2 1 0 244 187 52
|
||||
40 2 1 0 187 51 52
|
||||
41 2 1 0 171 170 233
|
||||
42 2 1 0 48 49 224
|
||||
43 2 1 0 321 330 329
|
||||
44 2 1 0 296 253 202
|
||||
45 2 1 0 48 185 47
|
||||
46 2 1 0 13 14 252
|
||||
47 2 1 0 225 50 51
|
||||
48 2 1 0 261 298 285
|
||||
49 2 1 0 225 163 50
|
||||
50 2 1 0 189 46 246
|
||||
51 2 1 0 23 176 22
|
||||
52 2 1 0 226 164 44
|
||||
53 2 1 0 113 237 112
|
||||
54 2 1 0 67 249 66
|
||||
55 2 1 0 42 245 188
|
||||
56 2 1 0 55 262 54
|
||||
57 2 1 0 45 226 44
|
||||
58 2 1 0 40 41 267
|
||||
59 2 1 0 256 30 180
|
||||
60 2 1 0 61 62 221
|
||||
61 2 1 0 149 159 2
|
||||
62 2 1 0 39 214 38
|
||||
63 2 1 0 267 214 39
|
||||
64 2 1 0 8 178 236
|
||||
65 2 1 0 42 188 41
|
||||
66 2 1 0 74 265 73
|
||||
67 2 1 0 45 46 189
|
||||
68 2 1 0 252 199 271
|
||||
69 2 1 0 54 262 211
|
||||
70 2 1 0 185 224 163
|
||||
71 2 1 0 188 267 41
|
||||
72 2 1 0 187 225 51
|
||||
73 2 1 0 266 213 321
|
||||
74 2 1 0 162 222 183
|
||||
75 2 1 0 75 76 264
|
||||
76 2 1 0 186 243 81
|
||||
77 2 1 0 164 226 189
|
||||
78 2 1 0 52 53 244
|
||||
79 2 1 0 264 212 75
|
||||
80 2 1 0 336 320 185
|
||||
81 2 1 0 81 82 186
|
||||
82 2 1 0 176 201 115
|
||||
83 2 1 0 278 238 182
|
||||
84 2 1 0 78 286 77
|
||||
85 2 1 0 31 32 259
|
||||
86 2 1 0 242 82 83
|
||||
87 2 1 0 219 132 218
|
||||
88 2 1 0 164 308 245
|
||||
89 2 1 0 190 241 84
|
||||
90 2 1 0 88 166 228
|
||||
91 2 1 0 87 165 86
|
||||
92 2 1 0 284 193 258
|
||||
93 2 1 0 173 298 271
|
||||
94 2 1 0 190 84 85
|
||||
95 2 1 0 165 227 86
|
||||
96 2 1 0 85 227 190
|
||||
97 2 1 0 88 89 166
|
||||
98 2 1 0 269 92 93
|
||||
99 2 1 0 166 89 90
|
||||
100 2 1 0 90 91 192
|
||||
101 2 1 0 272 130 131
|
||||
102 2 1 0 90 192 166
|
||||
103 2 1 0 183 222 59
|
||||
104 2 1 0 163 224 49
|
||||
105 2 1 0 230 36 37
|
||||
106 2 1 0 57 162 223
|
||||
107 2 1 0 189 226 45
|
||||
108 2 1 0 232 170 99
|
||||
109 2 1 0 157 1 156
|
||||
110 2 1 0 33 34 229
|
||||
111 2 1 0 167 34 35
|
||||
112 2 1 0 64 220 274
|
||||
113 2 1 0 103 104 168
|
||||
114 2 1 0 193 104 105
|
||||
115 2 1 0 151 153 0
|
||||
116 2 1 0 106 207 258
|
||||
117 2 1 0 168 104 193
|
||||
118 2 1 0 180 259 207
|
||||
119 2 1 0 14 15 199
|
||||
120 2 1 0 151 158 153
|
||||
121 2 1 0 33 229 275
|
||||
122 2 1 0 169 195 68
|
||||
123 2 1 0 129 130 208
|
||||
124 2 1 0 214 268 38
|
||||
125 2 1 0 98 171 97
|
||||
126 2 1 0 171 96 97
|
||||
127 2 1 0 171 233 96
|
||||
128 2 1 0 121 251 120
|
||||
129 2 1 0 87 228 165
|
||||
130 2 1 0 196 94 95
|
||||
131 2 1 0 219 218 290
|
||||
132 2 1 0 170 171 98
|
||||
133 2 1 0 194 293 276
|
||||
134 2 1 0 115 116 176
|
||||
135 2 1 0 98 99 170
|
||||
136 2 1 0 93 215 269
|
||||
137 2 1 0 21 174 20
|
||||
138 2 1 0 221 161 319
|
||||
139 2 1 0 232 100 276
|
||||
140 2 1 0 194 101 102
|
||||
141 2 1 0 80 213 79
|
||||
142 2 1 0 260 209 125
|
||||
143 2 1 0 167 35 231
|
||||
144 2 1 0 231 35 36
|
||||
145 2 1 0 190 227 165
|
||||
146 2 1 0 99 100 232
|
||||
147 2 1 0 163 225 187
|
||||
148 2 1 0 172 18 19
|
||||
149 2 1 0 16 173 199
|
||||
150 2 1 0 174 200 20
|
||||
151 2 1 0 215 94 196
|
||||
152 2 1 0 18 172 197
|
||||
153 2 1 0 103 248 102
|
||||
154 2 1 0 216 12 13
|
||||
155 2 1 0 76 286 264
|
||||
156 2 1 0 15 16 199
|
||||
157 2 1 0 27 175 26
|
||||
158 2 1 0 24 25 179
|
||||
159 2 1 0 121 122 198
|
||||
160 2 1 0 17 197 250
|
||||
161 2 1 0 210 273 218
|
||||
162 2 1 0 197 17 18
|
||||
163 2 1 0 19 20 200
|
||||
164 2 1 0 27 235 175
|
||||
165 2 1 0 160 280 311
|
||||
166 2 1 0 156 150 157
|
||||
167 2 1 0 150 154 157
|
||||
168 2 1 0 206 257 283
|
||||
169 2 1 0 108 109 206
|
||||
170 2 1 0 235 110 111
|
||||
171 2 1 0 151 154 158
|
||||
172 2 1 0 21 234 174
|
||||
173 2 1 0 242 186 82
|
||||
174 2 1 0 57 223 56
|
||||
175 2 1 0 44 164 43
|
||||
176 2 1 0 21 22 234
|
||||
177 2 1 0 26 237 25
|
||||
178 2 1 0 176 23 201
|
||||
179 2 1 0 228 87 88
|
||||
180 2 1 0 248 194 102
|
||||
181 2 1 0 201 24 179
|
||||
182 2 1 0 12 216 270
|
||||
183 2 1 0 202 145 146
|
||||
184 2 1 0 147 3 4
|
||||
185 2 1 0 247 322 165
|
||||
186 2 1 0 148 3 147
|
||||
187 2 1 0 147 4 177
|
||||
188 2 1 0 3 148 2
|
||||
189 2 1 0 19 200 172
|
||||
190 2 1 0 158 154 150
|
||||
191 2 1 0 214 301 288
|
||||
192 2 1 0 156 1 159
|
||||
193 2 1 0 159 149 156
|
||||
194 2 1 0 250 197 198
|
||||
195 2 1 0 2 148 149
|
||||
196 2 1 0 273 302 290
|
||||
197 2 1 0 191 192 91
|
||||
198 2 1 0 215 93 94
|
||||
199 2 1 0 229 167 292
|
||||
200 2 1 0 236 7 8
|
||||
201 2 1 0 177 203 202
|
||||
202 2 1 0 9 10 255
|
||||
203 2 1 0 247 166 192
|
||||
204 2 1 0 169 280 195
|
||||
205 2 1 0 10 205 255
|
||||
206 2 1 0 203 6 254
|
||||
207 2 1 0 11 12 270
|
||||
208 2 1 0 177 4 5
|
||||
209 2 1 0 177 146 147
|
||||
210 2 1 0 202 146 177
|
||||
211 2 1 0 341 330 352
|
||||
212 2 1 0 253 144 145
|
||||
213 2 1 0 281 144 253
|
||||
214 2 1 0 164 189 335
|
||||
215 2 1 0 203 5 6
|
||||
216 2 1 0 236 297 254
|
||||
217 2 1 0 205 10 11
|
||||
218 2 1 0 210 218 133
|
||||
219 2 1 0 38 268 37
|
||||
220 2 1 0 249 67 195
|
||||
221 2 1 0 145 202 253
|
||||
222 2 1 0 23 24 201
|
||||
223 2 1 0 116 234 176
|
||||
224 2 1 0 229 34 167
|
||||
225 2 1 0 201 179 114
|
||||
226 2 1 0 227 85 86
|
||||
227 2 1 0 114 179 113
|
||||
228 2 1 0 240 183 60
|
||||
229 2 1 0 119 200 118
|
||||
230 2 1 0 289 215 196
|
||||
231 2 1 0 198 251 121
|
||||
232 2 1 0 198 197 251
|
||||
233 2 1 0 191 247 192
|
||||
234 2 1 0 118 200 174
|
||||
235 2 1 0 50 163 49
|
||||
236 2 1 0 116 117 234
|
||||
237 2 1 0 58 162 57
|
||||
238 2 1 0 184 162 345
|
||||
239 2 1 0 257 206 109
|
||||
240 2 1 0 107 108 180
|
||||
241 2 1 0 29 30 256
|
||||
242 2 1 0 84 241 83
|
||||
243 2 1 0 196 170 339
|
||||
244 2 1 0 80 81 243
|
||||
245 2 1 0 206 180 108
|
||||
246 2 1 0 117 118 174
|
||||
247 2 1 0 235 27 28
|
||||
248 2 1 0 141 239 140
|
||||
249 2 1 0 233 95 96
|
||||
250 2 1 0 285 122 123
|
||||
251 2 1 0 31 180 30
|
||||
252 2 1 0 91 92 191
|
||||
253 2 1 0 111 112 175
|
||||
254 2 1 0 113 179 237
|
||||
255 2 1 0 42 43 245
|
||||
256 2 1 0 209 261 124
|
||||
257 2 1 0 180 207 107
|
||||
258 2 1 0 127 181 126
|
||||
259 2 1 0 126 260 125
|
||||
260 2 1 0 120 172 119
|
||||
261 2 1 0 312 295 324
|
||||
262 2 1 0 238 137 138
|
||||
263 2 1 0 179 25 237
|
||||
264 2 1 0 209 124 125
|
||||
265 2 1 0 75 212 74
|
||||
266 2 1 0 220 291 274
|
||||
267 2 1 0 332 205 325
|
||||
268 2 1 0 139 182 138
|
||||
269 2 1 0 139 140 182
|
||||
270 2 1 0 48 224 185
|
||||
271 2 1 0 178 8 9
|
||||
272 2 1 0 252 14 199
|
||||
273 2 1 0 274 63 64
|
||||
274 2 1 0 324 178 332
|
||||
275 2 1 0 208 181 217
|
||||
276 2 1 0 219 272 131
|
||||
277 2 1 0 128 129 217
|
||||
278 2 1 0 215 289 269
|
||||
279 2 1 0 181 302 209
|
||||
280 2 1 0 208 217 129
|
||||
281 2 1 0 330 321 213
|
||||
282 2 1 0 184 223 162
|
||||
283 2 1 0 210 134 277
|
||||
284 2 1 0 133 134 210
|
||||
285 2 1 0 134 135 136
|
||||
286 2 1 0 56 223 184
|
||||
287 2 1 0 290 272 219
|
||||
288 2 1 0 275 32 33
|
||||
289 2 1 0 182 238 138
|
||||
290 2 1 0 238 277 137
|
||||
291 2 1 0 201 114 115
|
||||
292 2 1 0 229 292 275
|
||||
293 2 1 0 195 67 68
|
||||
294 2 1 0 143 204 142
|
||||
295 2 1 0 320 246 185
|
||||
296 2 1 0 168 292 323
|
||||
297 2 1 0 29 256 283
|
||||
298 2 1 0 268 214 288
|
||||
299 2 1 0 247 165 228
|
||||
300 2 1 0 230 231 36
|
||||
301 2 1 0 293 170 232
|
||||
302 2 1 0 100 101 276
|
||||
303 2 1 0 95 233 196
|
||||
304 2 1 0 170 196 233
|
||||
305 2 1 0 117 174 234
|
||||
306 2 1 0 176 234 22
|
||||
307 2 1 0 111 175 235
|
||||
308 2 1 0 257 109 110
|
||||
309 2 1 0 6 7 254
|
||||
310 2 1 0 297 202 203
|
||||
311 2 1 0 112 237 175
|
||||
312 2 1 0 26 175 237
|
||||
313 2 1 0 277 136 137
|
||||
314 2 1 0 238 278 277
|
||||
315 2 1 0 294 278 182
|
||||
316 2 1 0 141 142 279
|
||||
317 2 1 0 328 183 240
|
||||
318 2 1 0 221 240 61
|
||||
319 2 1 0 186 342 330
|
||||
320 2 1 0 163 336 185
|
||||
321 2 1 0 186 242 241
|
||||
322 2 1 0 241 242 83
|
||||
323 2 1 0 80 243 213
|
||||
324 2 1 0 213 243 186
|
||||
325 2 1 0 187 244 211
|
||||
326 2 1 0 211 244 53
|
||||
327 2 1 0 308 188 245
|
||||
328 2 1 0 164 245 43
|
||||
329 2 1 0 320 189 246
|
||||
330 2 1 0 185 246 47
|
||||
331 2 1 0 228 166 247
|
||||
332 2 1 0 346 190 165
|
||||
333 2 1 0 248 323 194
|
||||
334 2 1 0 168 248 103
|
||||
335 2 1 0 66 249 160
|
||||
336 2 1 0 311 313 160
|
||||
337 2 1 0 16 250 173
|
||||
338 2 1 0 198 173 250
|
||||
339 2 1 0 120 251 172
|
||||
340 2 1 0 197 172 251
|
||||
341 2 1 0 13 252 216
|
||||
342 2 1 0 271 216 252
|
||||
343 2 1 0 281 143 144
|
||||
344 2 1 0 253 296 281
|
||||
345 2 1 0 297 282 202
|
||||
346 2 1 0 236 254 7
|
||||
347 2 1 0 9 255 178
|
||||
348 2 1 0 332 178 255
|
||||
349 2 1 0 29 283 28
|
||||
350 2 1 0 180 206 256
|
||||
351 2 1 0 283 256 206
|
||||
352 2 1 0 235 257 110
|
||||
353 2 1 0 105 258 193
|
||||
354 2 1 0 284 258 259
|
||||
355 2 1 0 180 31 259
|
||||
356 2 1 0 258 207 259
|
||||
357 2 1 0 209 260 181
|
||||
358 2 1 0 181 260 126
|
||||
359 2 1 0 261 285 123
|
||||
360 2 1 0 271 199 173
|
||||
361 2 1 0 211 262 184
|
||||
362 2 1 0 184 262 55
|
||||
363 2 1 0 300 212 329
|
||||
364 2 1 0 266 79 213
|
||||
365 2 1 0 212 264 263
|
||||
366 2 1 0 286 263 264
|
||||
367 2 1 0 299 71 72
|
||||
368 2 1 0 302 332 325
|
||||
369 2 1 0 286 78 266
|
||||
370 2 1 0 321 263 266
|
||||
371 2 1 0 39 40 267
|
||||
372 2 1 0 188 214 267
|
||||
373 2 1 0 37 268 230
|
||||
374 2 1 0 288 230 268
|
||||
375 2 1 0 92 269 191
|
||||
376 2 1 0 289 191 269
|
||||
377 2 1 0 11 270 205
|
||||
378 2 1 0 205 270 216
|
||||
379 2 1 0 325 271 298
|
||||
380 2 1 0 285 298 173
|
||||
381 2 1 0 130 272 208
|
||||
382 2 1 0 290 218 273
|
||||
383 2 1 0 208 290 302
|
||||
384 2 1 0 294 182 304
|
||||
385 2 1 0 63 274 161
|
||||
386 2 1 0 291 161 274
|
||||
387 2 1 0 32 284 259
|
||||
388 2 1 0 275 292 284
|
||||
389 2 1 0 293 232 276
|
||||
390 2 1 0 194 276 101
|
||||
391 2 1 0 134 136 277
|
||||
392 2 1 0 278 210 277
|
||||
393 2 1 0 210 278 273
|
||||
394 2 1 0 204 304 279
|
||||
395 2 1 0 304 239 279
|
||||
396 2 1 0 204 279 142
|
||||
397 2 1 0 195 280 249
|
||||
398 2 1 0 160 249 280
|
||||
399 2 1 0 143 281 204
|
||||
400 2 1 0 204 296 295
|
||||
401 2 1 0 296 282 295
|
||||
402 2 1 0 297 236 178
|
||||
403 2 1 0 28 283 235
|
||||
404 2 1 0 257 235 283
|
||||
405 2 1 0 168 193 284
|
||||
406 2 1 0 32 275 284
|
||||
407 2 1 0 122 285 198
|
||||
408 2 1 0 285 173 198
|
||||
409 2 1 0 76 77 286
|
||||
410 2 1 0 266 263 286
|
||||
411 2 1 0 72 287 299
|
||||
412 2 1 0 307 299 287
|
||||
413 2 1 0 323 292 340
|
||||
414 2 1 0 188 301 214
|
||||
415 2 1 0 322 247 191
|
||||
416 2 1 0 167 230 303
|
||||
417 2 1 0 272 290 208
|
||||
418 2 1 0 302 181 208
|
||||
419 2 1 0 327 319 161
|
||||
420 2 1 0 310 312 294
|
||||
421 2 1 0 323 248 168
|
||||
422 2 1 0 331 194 323
|
||||
423 2 1 0 351 346 322
|
||||
424 2 1 0 288 309 230
|
||||
425 2 1 0 278 294 273
|
||||
426 2 1 0 312 302 273
|
||||
427 2 1 0 305 327 313
|
||||
428 2 1 0 155 311 280
|
||||
429 2 1 0 204 281 296
|
||||
430 2 1 0 202 282 296
|
||||
431 2 1 0 203 254 297
|
||||
432 2 1 0 297 324 282
|
||||
433 2 1 0 325 216 271
|
||||
434 2 1 0 209 298 261
|
||||
435 2 1 0 307 265 300
|
||||
436 2 1 0 315 307 300
|
||||
437 2 1 0 317 71 299
|
||||
438 2 1 0 349 315 300
|
||||
439 2 1 0 303 230 309
|
||||
440 2 1 0 188 308 301
|
||||
441 2 1 0 209 325 298
|
||||
442 2 1 0 324 297 178
|
||||
443 2 1 0 339 293 331
|
||||
444 2 1 0 191 289 322
|
||||
445 2 1 0 182 239 304
|
||||
446 2 1 0 304 310 294
|
||||
447 2 1 0 304 204 310
|
||||
448 2 1 0 152 327 305
|
||||
449 2 1 0 299 307 316
|
||||
450 2 1 0 70 71 317
|
||||
451 2 1 0 316 318 317
|
||||
452 2 1 0 309 308 326
|
||||
453 2 1 0 164 335 308
|
||||
454 2 1 0 326 303 309
|
||||
455 2 1 0 308 309 301
|
||||
456 2 1 0 294 312 273
|
||||
457 2 1 0 295 310 204
|
||||
458 2 1 0 313 291 160
|
||||
459 2 1 0 305 311 155
|
||||
460 2 1 0 295 312 310
|
||||
461 2 1 0 313 327 291
|
||||
462 2 1 0 305 313 311
|
||||
463 2 1 0 314 315 306
|
||||
464 2 1 0 316 307 315
|
||||
465 2 1 0 334 328 319
|
||||
466 2 1 0 183 334 333
|
||||
467 2 1 0 314 316 315
|
||||
468 2 1 0 316 314 318
|
||||
469 2 1 0 316 317 299
|
||||
470 2 1 0 334 183 328
|
||||
471 2 1 0 317 318 70
|
||||
472 2 1 0 319 327 338
|
||||
473 2 1 0 335 326 308
|
||||
474 2 1 0 241 348 342
|
||||
475 2 1 0 212 263 329
|
||||
476 2 1 0 186 330 213
|
||||
477 2 1 0 351 326 353
|
||||
478 2 1 0 347 303 326
|
||||
479 2 1 0 331 293 194
|
||||
480 2 1 0 292 167 340
|
||||
481 2 1 0 295 282 324
|
||||
482 2 1 0 332 255 205
|
||||
483 2 1 0 205 216 325
|
||||
484 2 1 0 209 302 325
|
||||
485 2 1 0 331 340 347
|
||||
486 2 1 0 322 346 165
|
||||
487 2 1 0 161 291 327
|
||||
488 2 1 0 334 319 338
|
||||
489 2 1 0 183 333 162
|
||||
490 2 1 0 221 319 328
|
||||
491 2 1 0 337 315 349
|
||||
492 2 1 0 187 211 344
|
||||
493 2 1 0 341 211 184
|
||||
494 2 1 0 187 344 350
|
||||
495 2 1 0 170 293 339
|
||||
496 2 1 0 347 340 303
|
||||
497 2 1 0 324 332 312
|
||||
498 2 1 0 332 302 312
|
||||
499 2 1 0 184 345 341
|
||||
500 2 1 0 338 343 306
|
||||
501 2 1 0 333 349 345
|
||||
502 2 1 0 334 338 337
|
||||
503 2 1 0 353 348 351
|
||||
504 2 1 0 320 335 189
|
||||
505 2 1 0 320 353 335
|
||||
506 2 1 0 342 186 241
|
||||
507 2 1 0 306 315 337
|
||||
508 2 1 0 334 337 333
|
||||
509 2 1 0 337 338 306
|
||||
510 2 1 0 343 338 327
|
||||
511 2 1 0 196 339 289
|
||||
512 2 1 0 322 289 339
|
||||
513 2 1 0 331 323 340
|
||||
514 2 1 0 303 340 167
|
||||
515 2 1 0 330 341 329
|
||||
516 2 1 0 329 349 300
|
||||
517 2 1 0 352 344 341
|
||||
518 2 1 0 348 336 342
|
||||
519 2 1 0 190 348 241
|
||||
520 2 1 0 152 343 327
|
||||
521 2 1 0 350 163 187
|
||||
522 2 1 0 350 352 336
|
||||
523 2 1 0 345 349 341
|
||||
524 2 1 0 333 345 162
|
||||
525 2 1 0 351 339 347
|
||||
526 2 1 0 331 347 339
|
||||
527 2 1 0 351 322 339
|
||||
528 2 1 0 353 320 336
|
||||
529 2 1 0 346 348 190
|
||||
530 2 1 0 349 333 337
|
||||
531 2 1 0 341 349 329
|
||||
532 2 1 0 163 350 336
|
||||
533 2 1 0 352 342 336
|
||||
534 2 1 0 348 346 351
|
||||
535 2 1 0 326 351 347
|
||||
536 2 1 0 330 342 352
|
||||
537 2 1 0 344 352 350
|
||||
538 2 1 0 353 326 335
|
||||
539 2 1 0 348 353 336
|
||||
$EndElements
|
Binary file not shown.
@ -1,146 +0,0 @@
|
||||
$MeshFormat
|
||||
2.2 0 8
|
||||
$EndMeshFormat
|
||||
$PhysicalNames
|
||||
1
|
||||
3 1 "cube"
|
||||
$EndPhysicalNames
|
||||
$Nodes
|
||||
41
|
||||
1 0 0 0
|
||||
2 1 0 0
|
||||
3 1 1 0
|
||||
4 0 1 0
|
||||
5 0 1 1
|
||||
6 0 0 1
|
||||
7 1 0 1
|
||||
8 1 1 1
|
||||
9 0.499999999998694 0 0
|
||||
10 1 0.499999999998694 0
|
||||
11 0.5000000000020591 1 0
|
||||
12 0 0.5000000000020591 0
|
||||
13 0 0.5000000000020591 1
|
||||
14 0.499999999998694 0 1
|
||||
15 1 0.499999999998694 1
|
||||
16 0.5000000000020591 1 1
|
||||
17 0 1 0.499999999998694
|
||||
18 0 0 0.499999999998694
|
||||
19 1 0 0.499999999998694
|
||||
20 1 1 0.499999999998694
|
||||
21 0.5000000000001412 0.5000000000001882 0
|
||||
22 0.2500000000010295 0.7500000000010295 0
|
||||
23 0.7500000000005501 0.7499999999997204 0
|
||||
24 0.7499999999997088 0.2499999999997206 0
|
||||
25 0.2499999999997088 0.2500000000005618 0
|
||||
26 0 0.6470588231134449 0.2794117661033739
|
||||
27 0 0.4852941155641359 0.6470588305188285
|
||||
28 0 0.2500000000010296 0.249999999999347
|
||||
29 0.5000000000000239 0 0.2857142860029753
|
||||
30 0.4999999999997863 0 0.7142857143333939
|
||||
31 1 0.5000000000000239 0.2857142860029753
|
||||
32 1 0.4999999999997863 0.7142857143333939
|
||||
33 0.7500000000010296 1 0.249999999999347
|
||||
34 0.6427777777785997 1 0.6452267573690922
|
||||
35 0.3566666666674795 1 0.3713605442171652
|
||||
36 0.2500000000010296 1 0.749999999999347
|
||||
37 0.5 0.4999999999999999 1
|
||||
38 0.2500000000008419 0.7500000000008418 1
|
||||
39 0.7500000000010295 0.7499999999993469 1
|
||||
40 0.7499999999993471 0.249999999999347 1
|
||||
41 0.2499999999996735 0.2500000000005148 1
|
||||
$EndNodes
|
||||
$Elements
|
||||
92
|
||||
1 4 2 1 1 21 35 37 34
|
||||
2 4 2 1 1 34 37 21 31
|
||||
3 4 2 1 1 21 35 27 37
|
||||
4 4 2 1 1 31 37 21 29
|
||||
5 4 2 1 1 34 32 37 31
|
||||
6 4 2 1 1 37 27 21 29
|
||||
7 4 2 1 1 32 30 37 31
|
||||
8 4 2 1 1 31 30 37 29
|
||||
9 4 2 1 1 21 35 26 27
|
||||
10 4 2 1 1 27 37 30 29
|
||||
11 4 2 1 1 22 21 35 26
|
||||
12 4 2 1 1 24 31 21 29
|
||||
13 4 2 1 1 37 41 27 30
|
||||
14 4 2 1 1 30 37 40 32
|
||||
15 4 2 1 1 39 32 37 34
|
||||
16 4 2 1 1 32 30 31 19
|
||||
17 4 2 1 1 29 31 30 19
|
||||
18 4 2 1 1 26 35 17 36
|
||||
19 4 2 1 1 30 18 28 29
|
||||
20 4 2 1 1 30 28 27 29
|
||||
21 4 2 1 1 11 33 35 23
|
||||
22 4 2 1 1 27 18 28 30
|
||||
23 4 2 1 1 34 31 33 20
|
||||
24 4 2 1 1 29 24 31 19
|
||||
25 4 2 1 1 16 38 36 34
|
||||
26 4 2 1 1 11 21 35 22
|
||||
27 4 2 1 1 11 21 23 35
|
||||
28 4 2 1 1 37 16 34 38
|
||||
29 4 2 1 1 36 26 35 27
|
||||
30 4 2 1 1 36 17 26 27
|
||||
31 4 2 1 1 21 12 26 22
|
||||
32 4 2 1 1 12 21 26 25
|
||||
33 4 2 1 1 18 27 41 30
|
||||
34 4 2 1 1 40 30 32 19
|
||||
35 4 2 1 1 12 28 25 26
|
||||
36 4 2 1 1 31 34 32 20
|
||||
37 4 2 1 1 16 37 34 39
|
||||
38 4 2 1 1 38 5 36 27
|
||||
39 4 2 1 1 31 33 3 23
|
||||
40 4 2 1 1 19 24 31 2
|
||||
41 4 2 1 1 19 29 24 2
|
||||
42 4 2 1 1 4 22 35 26
|
||||
43 4 2 1 1 27 38 13 37
|
||||
44 4 2 1 1 41 27 13 37
|
||||
45 4 2 1 1 41 6 18 30
|
||||
46 4 2 1 1 28 1 25 29
|
||||
47 4 2 1 1 27 6 18 41
|
||||
48 4 2 1 1 39 32 34 20
|
||||
49 4 2 1 1 21 9 24 29
|
||||
50 4 2 1 1 21 9 29 25
|
||||
51 4 2 1 1 23 31 21 10
|
||||
52 4 2 1 1 10 31 21 24
|
||||
53 4 2 1 1 14 41 37 30
|
||||
54 4 2 1 1 31 33 20 3
|
||||
55 4 2 1 1 5 38 13 27
|
||||
56 4 2 1 1 17 36 5 27
|
||||
57 4 2 1 1 22 4 35 11
|
||||
58 4 2 1 1 7 40 32 19
|
||||
59 4 2 1 1 30 40 7 19
|
||||
60 4 2 1 1 32 39 8 20
|
||||
61 4 2 1 1 18 1 28 29
|
||||
62 4 2 1 1 34 8 39 20
|
||||
63 4 2 1 1 13 6 27 41
|
||||
64 4 2 1 1 23 3 31 10
|
||||
65 4 2 1 1 24 10 31 2
|
||||
66 4 2 1 1 9 24 29 2
|
||||
67 4 2 1 1 25 1 9 29
|
||||
68 4 2 1 1 35 17 4 26
|
||||
69 4 2 1 1 41 14 6 30
|
||||
70 4 2 1 1 12 22 4 26
|
||||
71 4 2 1 1 40 39 32 37
|
||||
72 4 2 1 1 37 40 14 30
|
||||
73 4 2 1 1 39 40 32 15
|
||||
74 4 2 1 1 11 3 33 23
|
||||
75 4 2 1 1 30 40 14 7
|
||||
76 4 2 1 1 39 15 32 8
|
||||
77 4 2 1 1 7 32 40 15
|
||||
78 4 2 1 1 36 5 38 16
|
||||
79 4 2 1 1 28 25 1 12
|
||||
80 4 2 1 1 39 16 8 34
|
||||
81 4 2 1 1 38 34 35 36
|
||||
82 4 2 1 1 35 34 38 37
|
||||
83 4 2 1 1 35 27 38 36
|
||||
84 4 2 1 1 38 27 35 37
|
||||
85 4 2 1 1 25 26 27 21
|
||||
86 4 2 1 1 27 26 25 28
|
||||
87 4 2 1 1 27 29 25 21
|
||||
88 4 2 1 1 25 29 27 28
|
||||
89 4 2 1 1 23 31 34 21
|
||||
90 4 2 1 1 34 31 23 33
|
||||
91 4 2 1 1 34 35 23 21
|
||||
92 4 2 1 1 23 35 34 33
|
||||
$EndElements
|
@ -1,4 +0,0 @@
|
||||
# name age gender weight
|
||||
ZhangYi 23 Man 78.2
|
||||
WangSaiXin 21 Woman 55.0
|
||||
Little 12 Unknown 45.1
|
@ -1,44 +0,0 @@
|
||||
//this file is created by Tesseroid_creater
|
||||
//longitude: 40-50
|
||||
//latitude: 30-40
|
||||
//radius: 800-1000
|
||||
lc = 1.0;
|
||||
Point(1) = {0, 0, 0, lc};
|
||||
Point(2) = {530.7311585351508, 445.3363193811355, 399.9999999999999, lc*10.69599819922607};
|
||||
Point(3) = {0, 0, 399.9999999999999, lc*10.69599819922607};
|
||||
Point(4) = {445.3363193811358, 530.7311585351506, 399.9999999999999, lc*10.69599819922607};
|
||||
Point(5) = {663.4139481689385, 556.6703992264194, 499.9999999999999, lc*10.69599819922607};
|
||||
Point(6) = {0, 0, 499.9999999999999, lc*10.69599819922607};
|
||||
Point(7) = {556.6703992264197, 663.4139481689382, 499.9999999999999, lc*10.69599819922607};
|
||||
Point(8) = {469.4592710667722, 393.9231012048832, 514.2300877492315, lc*10.69599819922607};
|
||||
Point(9) = {0, 0, 514.2300877492315, lc*10.69599819922607};
|
||||
Point(10) = {393.9231012048835, 469.459271066772, 514.2300877492315, lc*10.69599819922607};
|
||||
Point(11) = {586.8240888334652, 492.403876506104, 642.7876096865393, lc*10.69599819922607};
|
||||
Point(12) = {0, 0, 642.7876096865393, lc*10.69599819922607};
|
||||
Point(13) = {492.4038765061043, 586.824088833465, 642.7876096865393, lc*10.69599819922607};
|
||||
Circle(1) = {13, 12, 11};
|
||||
Circle(2) = {10, 9, 8};
|
||||
Circle(3) = {7, 6, 5};
|
||||
Circle(4) = {4, 3, 2};
|
||||
Circle(5) = {8, 1, 2};
|
||||
Circle(6) = {11, 1, 5};
|
||||
Circle(7) = {10, 1, 4};
|
||||
Circle(8) = {13, 1, 7};
|
||||
Line(9) = {5, 2};
|
||||
Line(10) = {7, 4};
|
||||
Line(11) = {11, 8};
|
||||
Line(12) = {13, 10};
|
||||
Line Loop(13) = {1, 6, -3, -8};
|
||||
Ruled Surface(14) = {13};
|
||||
Line Loop(15) = {2, 5, -4, -7};
|
||||
Ruled Surface(16) = {15};
|
||||
Line Loop(17) = {1, 11, -2, -12};
|
||||
Ruled Surface(18) = {17};
|
||||
Line Loop(19) = {3, 9, -4, -10};
|
||||
Ruled Surface(20) = {19};
|
||||
Line Loop(21) = {6, 9, -5, -11};
|
||||
Plane Surface(22) = {21};
|
||||
Line Loop(23) = {8, 10, -7, -12};
|
||||
Plane Surface(24) = {23};
|
||||
Surface Loop(25) = {24, 18, 14, 22, 16, 20};
|
||||
Volume(26) = {25};
|
5461
data/tess/tess.msh
5461
data/tess/tess.msh
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
8766
data/tess/tmp.msh
8766
data/tess/tmp.msh
File diff suppressed because it is too large
Load Diff
254
doc/core/doc_str.md
Normal file
254
doc/core/doc_str.md
Normal file
@ -0,0 +1,254 @@
|
||||
# GCTL核心字符串处理模块文档(gctl/lib/core/str.h)
|
||||
|
||||
## 文件概述
|
||||
```cpp
|
||||
#include "exceptions.h" // 异常处理依赖
|
||||
#include <cmath> // 数学函数
|
||||
#include <vector> // 向量容器
|
||||
#include <sstream> // 字符串流
|
||||
```
|
||||
|
||||
本模块提供字符串与基础数据类型间的转换、字符串解析处理等核心功能,包含以下主要功能:
|
||||
- 类型与字符串的相互转换
|
||||
- 字符串模式替换与路径处理
|
||||
- 带分隔符的字符串解析
|
||||
- 特殊数值(NaN/Inf)转换
|
||||
- 随机字符串生成
|
||||
|
||||
## 核心功能模块
|
||||
|
||||
### 1. 类型转换
|
||||
#### 模板函数 `type2ss`
|
||||
```cpp
|
||||
template <typename ObjValType>
|
||||
void type2ss(ObjValType in_val, std::stringstream &out_ss)
|
||||
```
|
||||
- **功能**:将任意类型转换为字符串流
|
||||
- **参数**:
|
||||
- `in_val`:输入值(支持基础数据类型)
|
||||
- `out_ss`:输出字符串流(需预先声明)
|
||||
- **示例**:
|
||||
```cpp
|
||||
std::stringstream ss;
|
||||
gctl::type2ss(3.14, ss);
|
||||
std::cout << ss.str(); // 输出"3.14"
|
||||
```
|
||||
|
||||
#### 模板函数 `str2type`
|
||||
```cpp
|
||||
template <typename OutValType>
|
||||
int str2type(std::string in_str, OutValType &out_val, char sep = ' ')
|
||||
```
|
||||
- **功能**:带分隔符的字符串到类型转换
|
||||
- **参数**:
|
||||
- `in_str`:输入字符串
|
||||
- `out_val`:输出值(引用返回)
|
||||
- `sep`:分隔符(默认空格)
|
||||
- **返回值**:
|
||||
- 0:转换成功
|
||||
- -1:转换失败
|
||||
- **注意**:自动替换分隔符为空格后进行解析
|
||||
|
||||
### 2. 向量处理
|
||||
#### 数值向量转换 `type2str_vector`
|
||||
```cpp
|
||||
template <typename ValueType>
|
||||
void type2str_vector(const std::vector<ValueType> &in_vec,
|
||||
std::vector<std::string> &out_vec)
|
||||
```
|
||||
- **功能**:将数值向量转换为字符串向量
|
||||
- **参数**:
|
||||
- `in_vec`:输入数值向量
|
||||
- `out_vec`:输出字符串向量(自动清空原有内容)
|
||||
|
||||
#### 二维向量解析 `str2type_vector2d`
|
||||
```cpp
|
||||
// 基础版本
|
||||
template <typename ValueType>
|
||||
void str2type_vector2d(...)
|
||||
|
||||
// 变参模板版本
|
||||
template <typename ValueType, typename... Args>
|
||||
void str2type_vector2d(const std::vector<std::vector<std::string>> &vec2d,
|
||||
std::string order_str,
|
||||
std::vector<ValueType> &vec, Args&... rest)
|
||||
```
|
||||
- **新特性**:
|
||||
- 支持多个输出参数,按order_str顺序解析
|
||||
- 示例:`order_str="0,2,1"` 解析第0、2、1列到不同向量
|
||||
- **异常**:统一抛出`std::runtime_error`
|
||||
|
||||
#### 二维向量生成 `type2str_vector2d`
|
||||
```cpp
|
||||
template <typename ValueType>
|
||||
void type2str_vector2d(std::vector<std::vector<ValueType>> &vec2d,
|
||||
const std::vector<std::string> &vec)
|
||||
|
||||
template <typename ValueType, typename... Args>
|
||||
void type2str_vector2d(std::vector<std::vector<ValueType>> &vec2d,
|
||||
const std::vector<std::string> &vec, Args&... rest)
|
||||
```
|
||||
- **功能**:批量转换多个字符串向量到数值二维向量
|
||||
- **典型应用**:构建CSV格式的数据矩阵
|
||||
|
||||
### 3. 高级模板功能
|
||||
#### 变参字符串解析 `parse_string_to_value`
|
||||
```cpp
|
||||
template <typename ValueType, typename... Args>
|
||||
int parse_string_to_value(std::string val_str, char separator,
|
||||
bool throw_err, ValueType &fst_val, Args&... rest)
|
||||
```
|
||||
- **功能**:解析含多个值的字符串到不同变量
|
||||
- **参数顺序**:
|
||||
1. 输入字符串
|
||||
2. 分隔符
|
||||
3. 是否抛出异常
|
||||
4. 输出参数列表(至少1个)
|
||||
- **返回值**:成功解析的参数个数
|
||||
- **示例**:
|
||||
```cpp
|
||||
int a; double b; std::string c;
|
||||
parse_string_to_value("5,3.14,text", ',', true, a, b, c);
|
||||
```
|
||||
|
||||
### 4. 字符串操作
|
||||
#### 全局替换 `replace_all`
|
||||
```cpp
|
||||
int replace_all(std::string& new_str, const std::string& old_str,
|
||||
const std::string& old_value, const std::string& new_value)
|
||||
```
|
||||
- **功能**:全量替换字符串中的子串
|
||||
- **参数**:
|
||||
- `new_str`:替换后的新字符串(输出)
|
||||
- `old_str`:原始字符串
|
||||
- `old_value`:待替换的子串
|
||||
- `new_value`:新子串
|
||||
- **返回值**:替换次数
|
||||
|
||||
#### 路径补全 `patch_string`
|
||||
```cpp
|
||||
std::string patch_string(std::string in_str, std::string patch_str)
|
||||
```
|
||||
- **功能**:智能补全路径字符串
|
||||
- **示例**:
|
||||
```cpp
|
||||
auto path = gctl::patch_string("/data", "/"); // 返回"/data/"
|
||||
```
|
||||
- **逻辑**:检查末尾是否已包含目标字符串,若否则追加
|
||||
|
||||
### 4. 特殊数值处理
|
||||
#### 安全双精度转换 `str2double`
|
||||
```cpp
|
||||
double str2double(std::string instr)
|
||||
```
|
||||
- **功能**:转换字符串到double,支持:
|
||||
- Fortran风格的科学计数法(如"1.23D+04")
|
||||
- NaN/Infinity的特殊处理
|
||||
- **实现**:自动替换'D'为'E'后使用标准库转换
|
||||
|
||||
### 5. 实用工具函数
|
||||
#### 流转换函数 `str2ss`
|
||||
```cpp
|
||||
void str2ss(std::string in_str, std::stringstream &out_ss, std::string delimiter = "")
|
||||
```
|
||||
- **功能**:将字符串转换为预处理后的字符串流
|
||||
- **参数**:
|
||||
- `delimiter`:将指定分隔符替换为空格
|
||||
- `out_ss`:输出流(自动清空原有内容)
|
||||
- **应用场景**:处理CSV等格式数据
|
||||
|
||||
#### 随机字符串生成
|
||||
```cpp
|
||||
void random_char(unsigned int length, char* out);
|
||||
void random_str(unsigned int length, std::string &out_str);
|
||||
```
|
||||
- **字符范围**:a-z, A-Z, 0-9
|
||||
- **安全特性**:线程安全的随机数生成
|
||||
- **典型应用**:生成临时文件名或验证码
|
||||
- **示例**:
|
||||
```cpp
|
||||
std::string random;
|
||||
gctl::random_str(8, random); // 可能得到"aB3x9K7f"
|
||||
```
|
||||
|
||||
#### 通用字符串解析 `parse_string_to_vector`
|
||||
```cpp
|
||||
template <typename ValueType>
|
||||
int parse_string_to_vector(std::string val_str, char separator,
|
||||
std::vector<ValueType> &out_vec)
|
||||
```
|
||||
- **增强特性**:
|
||||
- 自动去除元素首尾空白
|
||||
- 支持保留带空格的字符串(当ValueType为std::string时)
|
||||
- **示例**:
|
||||
```cpp
|
||||
std::vector<std::string> parts;
|
||||
parse_string_to_vector("name=John Doe; age=30", ';', parts);
|
||||
// 得到 ["name=John Doe", "age=30"]
|
||||
```
|
||||
|
||||
### 6. 异常处理规范
|
||||
#### 统一异常类型
|
||||
- 所有解析函数均可能抛出 `gctl::runtime_error`
|
||||
- 错误信息包含:
|
||||
- 具体失败位置(函数名)
|
||||
- 原始输入内容片段
|
||||
- 失败原因(类型不匹配/格式错误等)
|
||||
|
||||
#### 错误处理示例
|
||||
```cpp
|
||||
try {
|
||||
std::vector<double> values;
|
||||
gctl::str2type_vector({"1", "2.5", "abc"}, values);
|
||||
} catch (const gctl::runtime_error& e) {
|
||||
std::cerr << "解析错误: " << e.what();
|
||||
// 输出:解析错误: [gctl::str2type_vector] Failed to parse: abc
|
||||
}
|
||||
|
||||
### 7. 高级解析功能
|
||||
#### 带引号解析 `parse_string_with_quotes`
|
||||
```cpp
|
||||
void parse_string_with_quotes(std::string in_str, std::vector<std::string> &str_vec)
|
||||
```
|
||||
- **增强特性**:
|
||||
- 支持嵌套引号(使用\"转义)
|
||||
- 自动去除外层引号
|
||||
- **示例**:
|
||||
```cpp
|
||||
输入: `cmd "complex \"name\"" 123`
|
||||
输出: ["cmd", "complex "name"", "123"]
|
||||
```
|
||||
```cpp
|
||||
void parse_string_with_quotes(std::string in_str, std::vector<std::string> &str_vec)
|
||||
```
|
||||
- **功能**:解析含空格和引号的字符串
|
||||
- **示例**:
|
||||
```cpp
|
||||
输入: `cmd "file name.txt" 100`
|
||||
输出: ["cmd", "file name.txt", "100"]
|
||||
```
|
||||
- **规则**:
|
||||
1. 双引号内的内容视为单个元素
|
||||
2. 自动去除元素首尾空白
|
||||
|
||||
## 使用示例
|
||||
### 类型转换示例
|
||||
```cpp
|
||||
std::vector<std::string> str_vec{"1", "2.5", "3"};
|
||||
std::vector<int> int_vec;
|
||||
gctl::str2type_vector(str_vec, int_vec); // 得到[1,2,3]
|
||||
```
|
||||
|
||||
### 配置文件解析
|
||||
```cpp
|
||||
std::string config = "max_threads=4, timeout=30s";
|
||||
int threads;
|
||||
std::string timeout;
|
||||
gctl::parse_string_to_value(config, '=', true, threads, timeout);
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
1. **异常处理**:关键函数(如`str2type_vector`)会抛出`gctl::runtime_error`
|
||||
2. **线程安全**:函数内部使用局部变量,可安全用于多线程环境
|
||||
3. **性能建议**:批量处理建议使用vector版本函数
|
||||
4. **编码要求**:输入字符串建议使用UTF-8编码
|
BIN
doc/figs/GCTL_Architecture.png
Normal file
BIN
doc/figs/GCTL_Architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
BIN
doc/figs/GCTL_Architecture.pptx
Normal file
BIN
doc/figs/GCTL_Architecture.pptx
Normal file
Binary file not shown.
54
manager.sh
Executable file
54
manager.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $# == 0 || ${1} == "help" ]]; then
|
||||
echo "Compiles executables/libraries and maintains installed files. Two tools 'Cmake' and 'stow' are empolyed here. For more information, see https://cmake.org and https://www.gnu.org/software/stow/."
|
||||
echo ""
|
||||
echo "School of Earth Sciences, Zhejiang University"
|
||||
echo "Yi Zhang (yizhang-geo@zju.edu.cn)"
|
||||
echo ""
|
||||
echo "Usage: ./manager.sh [option] [Cmake options]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "(1) configure: Configure Cmake project(s). This option could take extra Cmake options as in <option>=<value>."
|
||||
echo "(2) build: Build executables/libraries."
|
||||
echo "(3) install: Install executables/libraries to the directory of CMAKE_INSTALL_PREFIX and sym-links them to the target address. This offers a quick and clean remove of the installed files."
|
||||
echo "(4) clean: Clean build/ folder(s)."
|
||||
echo "(5) uninstall: Delete the installed files and sym-links."
|
||||
echo "(6) info: Print out current setups."
|
||||
echo "(7) help: Show help information."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
package=gctl_tutorials
|
||||
address=/opt/stow
|
||||
taress=/usr/local
|
||||
option="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${address}/${package}"
|
||||
|
||||
if [[ $# -gt 1 ]]; then
|
||||
for opt in "$@"; do
|
||||
if [[ ${opt} != "configure" ]]; then
|
||||
option="${option} -D${opt}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ${1} == "configure" && ! -d "build/" ]]; then
|
||||
mkdir build && cd build && cmake .. ${option}
|
||||
elif [[ ${1} == "configure" ]]; then
|
||||
cd build && rm -rf * && cmake .. ${option}
|
||||
elif [[ ${1} == "build" ]]; then
|
||||
cd build && make
|
||||
#elif [[ ${1} == "install" ]]; then
|
||||
# cd build && sudo make install
|
||||
# sudo stow --dir=${address} --target=${taress} -S ${package}
|
||||
elif [[ ${1} == "clean" ]]; then
|
||||
rm -rf build/
|
||||
elif [[ ${1} == "uninstall" ]]; then
|
||||
sudo stow --dir=${address} --target=${taress} -D ${package}
|
||||
sudo rm -rf ${address}/${package}
|
||||
elif [[ ${1} == "info" ]]; then
|
||||
echo "package name:" ${package}
|
||||
echo "stow address:" ${address}
|
||||
echo "target address:" ${taress}
|
||||
echo "Cmake options:" ${option}
|
||||
fi
|
120
src/ai/ex1.cpp
Normal file
120
src/ai/ex1.cpp
Normal file
@ -0,0 +1,120 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/dnn.h"
|
||||
using namespace gctl;
|
||||
|
||||
void data_generator(const matrix<double> &train_obs, matrix<double> &train_tar)
|
||||
{
|
||||
for (int j = 0; j < train_obs.col_size(); j++)
|
||||
{
|
||||
train_tar[0][j] = sqrt(train_obs[0][j]*train_obs[0][j] + train_obs[1][j]*train_obs[1][j]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// Prepare the data. In this example, we try to learn the sin() function.
|
||||
matrix<double> train_obs(2, 1000), train_tar(1, 1000), pre_obs(2, 10), pre_tar(1, 10), predicts(1, 10);
|
||||
|
||||
unsigned int seed = 101;
|
||||
srand(seed);
|
||||
for (int j = 0; j < 1000; j++)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
train_obs[i][j] = random(0.0, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
pre_obs[i][j] = random(0.0, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
data_generator(train_obs, train_tar);
|
||||
data_generator(pre_obs, pre_tar);
|
||||
|
||||
dnn my_nn("Ex-1");
|
||||
my_nn.add_hind_layer(2, 100, FullyConnected, Identity);
|
||||
my_nn.add_hind_layer(100, 100, FullyConnected, PReLU);
|
||||
my_nn.add_hind_layer(100, 100, FullyConnected, PReLU);
|
||||
my_nn.add_hind_layer(100, 1, FullyConnected, Identity);
|
||||
my_nn.add_output_layer(RegressionMSE);
|
||||
my_nn.add_train_set(train_obs, train_tar, 200);
|
||||
|
||||
my_nn.show_network();
|
||||
my_nn.init_network(0.0, 0.1, seed);
|
||||
|
||||
sgd_para my_para = my_nn.default_sgd_para();
|
||||
my_nn.train_network(my_para, gctl::ADAM);
|
||||
//lgd_para my_para = my_nn.default_lgd_para();
|
||||
//my_para.flight_times = 5000;
|
||||
//my_para.lambda = 5e-5;
|
||||
//my_para.epsilon = 1e-5;
|
||||
//my_para.batch = 10;
|
||||
//my_nn.train_network(my_para, gctl::LGD);
|
||||
|
||||
my_nn.predict(pre_obs, predicts);
|
||||
|
||||
double diff = 0;
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
diff = std::max(fabs(predicts[i][j] - pre_tar[i][j]), diff);
|
||||
}
|
||||
}
|
||||
std::clog << "Max difference = " << diff << "\n";
|
||||
/*
|
||||
my_nn.save_network("ex1");
|
||||
|
||||
dnn file_nn("File NN");
|
||||
file_nn.load_network("ex1");
|
||||
file_nn.show_network();
|
||||
file_nn.predict(pre_obs, predicts);
|
||||
|
||||
diff = 0;
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
diff = std::max(fabs(predicts[i][j] - pre_tar[i][j]), diff);
|
||||
}
|
||||
}
|
||||
std::clog << "Max difference = " << diff << "\n";
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
66
src/ai/ex2.cpp
Normal file
66
src/ai/ex2.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/dnn.h"
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
convolution cnl_layer(0, 3, 10, 10, 3, 3, 2, 2, Valid, ReLU);
|
||||
std::clog << cnl_layer.layer_info() << std::endl;
|
||||
|
||||
matrix<double> t(100, 3);
|
||||
std::clog << "T = \n";
|
||||
for (size_t c = 0; c < 3; c++)
|
||||
{
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 10; j++)
|
||||
{
|
||||
t[i*10+j][c] = i*10 + j + 1;
|
||||
std::clog << t[i*10+j][c] << " ";
|
||||
}
|
||||
std::clog << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
array<double> weights(28);
|
||||
for (size_t i = 0; i < 28; i++)
|
||||
{
|
||||
weights[i] = 1.0;
|
||||
}
|
||||
|
||||
cnl_layer.forward_propagation(weights, t);
|
||||
|
||||
const matrix<double> &d = cnl_layer.forward_propagation_data();
|
||||
d.show(std::clog);
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
116
src/ai/ex_mnist.cpp
Normal file
116
src/ai/ex_mnist.cpp
Normal file
@ -0,0 +1,116 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../data/MNIST/mnist_database.h"
|
||||
#include "../lib/dnn.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
mnist_database data("data/MNIST");
|
||||
|
||||
matrix<double> train_obs(784, 60000), train_lab(10, 60000, 0.0);
|
||||
matrix<double> test_obs(784, 10000), test_lab(10, 10000, 0.0), predicts(10, 10000);
|
||||
|
||||
const std::vector<std::vector<double> > &dt_obs = data.train_images();
|
||||
for (size_t i = 0; i < 60000; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 784; j++)
|
||||
{
|
||||
train_obs[j][i] = dt_obs[i][j]/255.0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<std::vector<double> > &dt_obs2 = data.test_images();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 784; j++)
|
||||
{
|
||||
test_obs[j][i] = dt_obs2[i][j]/255.0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<double> &dt_lab = data.train_labels();
|
||||
for (size_t i = 0; i < 60000; i++)
|
||||
{
|
||||
train_lab[dt_lab[i]][i] = 1.0;
|
||||
}
|
||||
|
||||
const std::vector<double> &dt_lab2 = data.test_labels();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
test_lab[dt_lab2[i]][i] = 1.0;
|
||||
}
|
||||
|
||||
dnn my_nn("Ex-MNIST");
|
||||
my_nn.add_hind_layer(784, 800, FullyConnected, PReLU);
|
||||
my_nn.add_hind_layer(800, 10, FullyConnected, SoftMax);
|
||||
my_nn.add_output_layer(MultiClassEntropy);
|
||||
my_nn.add_train_set(train_obs, train_lab, 1000);
|
||||
my_nn.init_network(0.0, 0.1);
|
||||
|
||||
//sgd_para my_para = my_nn.default_sgd_para();
|
||||
//my_para.alpha = 0.01;
|
||||
//my_para.epsilon = 1e-5;
|
||||
//my_nn.train_network(my_para, gctl::ADAM);
|
||||
lgd_para my_para = my_nn.default_lgd_para();
|
||||
my_para.flight_times = 1000;
|
||||
my_para.alpha = 0.08;
|
||||
my_para.beta = 1.8;
|
||||
my_nn.train_network(my_para);
|
||||
|
||||
my_nn.predict(test_obs, predicts);
|
||||
my_nn.save_network("data/saved_networks/mnist_m1");
|
||||
|
||||
int wrong_predicts = 0;
|
||||
int test_id, pre_id;
|
||||
double test_scr, pre_scr;
|
||||
for (size_t j = 0; j < 10000; j++)
|
||||
{
|
||||
test_id = pre_id = 0;
|
||||
test_scr = pre_scr = 0;
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
if (test_lab[i][j] > test_scr) {test_scr = test_lab[i][j]; test_id = i;}
|
||||
if (predicts[i][j] > pre_scr) {pre_scr = predicts[i][j]; pre_id = i;}
|
||||
}
|
||||
|
||||
if (test_id != pre_id)
|
||||
{
|
||||
wrong_predicts++;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Correct Rate = " << (10000 - wrong_predicts)/100.0 << "%\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
116
src/ai/ex_mnist2.cpp
Normal file
116
src/ai/ex_mnist2.cpp
Normal file
@ -0,0 +1,116 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../data/MNIST/mnist_database.h"
|
||||
#include "../lib/dnn.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
mnist_database data("data/MNIST");
|
||||
|
||||
matrix<double> train_obs(784, 60000), train_lab(10, 60000, 0.0);
|
||||
matrix<double> test_obs(784, 10000), test_lab(10, 10000, 0.0), predicts(10, 10000);
|
||||
|
||||
const std::vector<std::vector<double> > &dt_obs = data.train_images();
|
||||
for (size_t i = 0; i < 60000; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 784; j++)
|
||||
{
|
||||
train_obs[j][i] = dt_obs[i][j]/255.0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<std::vector<double> > &dt_obs2 = data.test_images();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 784; j++)
|
||||
{
|
||||
test_obs[j][i] = dt_obs2[i][j]/255.0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<double> &dt_lab = data.train_labels();
|
||||
for (size_t i = 0; i < 60000; i++)
|
||||
{
|
||||
train_lab[dt_lab[i]][i] = 1.0;
|
||||
}
|
||||
|
||||
const std::vector<double> &dt_lab2 = data.test_labels();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
test_lab[dt_lab2[i]][i] = 1.0;
|
||||
}
|
||||
|
||||
dnn my_nn("Ex-MNIST");
|
||||
my_nn.add_hind_layer(1, 28, 28, 4, 4, 2, 2, Convolution, Same, PReLU);
|
||||
my_nn.add_hind_layer(169, 256, FullyConnected, PReLU);
|
||||
my_nn.add_hind_layer(256, 10, FullyConnected, SoftMax);
|
||||
my_nn.add_output_layer(MultiClassEntropy);
|
||||
my_nn.add_train_set(train_obs, train_lab, 5000);
|
||||
my_nn.init_network(0.0, 0.1);
|
||||
|
||||
sgd_para my_para = my_nn.default_sgd_para();
|
||||
my_para.alpha = 0.01;
|
||||
my_para.epsilon = 1e-5;
|
||||
my_nn.train_network(my_para, gctl::ADAM);
|
||||
//lgd_para my_para = my_nn.default_lgd_para();
|
||||
//my_para.flight_times = 2000;
|
||||
//my_para.alpha = 0.1;
|
||||
//my_nn.train_network(my_para);
|
||||
|
||||
my_nn.predict(test_obs, predicts);
|
||||
my_nn.save_network("data/saved_networks/mnist_m2");
|
||||
|
||||
int wrong_predicts = 0;
|
||||
int test_id, pre_id;
|
||||
double test_scr, pre_scr;
|
||||
for (size_t j = 0; j < 10000; j++)
|
||||
{
|
||||
test_id = pre_id = 0;
|
||||
test_scr = pre_scr = 0;
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
if (test_lab[i][j] > test_scr) {test_scr = test_lab[i][j]; test_id = i;}
|
||||
if (predicts[i][j] > pre_scr) {pre_scr = predicts[i][j]; pre_id = i;}
|
||||
}
|
||||
|
||||
if (test_id != pre_id)
|
||||
{
|
||||
wrong_predicts++;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Correct Rate = " << (10000 - wrong_predicts)/100.0 << "%\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
87
src/ai/ex_mnist3.cpp
Normal file
87
src/ai/ex_mnist3.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../data/MNIST/mnist_database.h"
|
||||
#include "../lib/dnn.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
mnist_database data("data/MNIST");
|
||||
dnn my_nn("Ex-MNIST");
|
||||
my_nn.load_network("data/saved_networks/mnist_m1.gctl.dnn");
|
||||
my_nn.show_network();
|
||||
my_nn.save_layer2text(0, "data/saved_networks/mnist_m1_layer1");
|
||||
my_nn.save_layer2text(1, "data/saved_networks/mnist_m1_layer2");
|
||||
/*
|
||||
matrix<double> test_obs(784, 10000), test_lab(10, 10000, 0.0), predicts(10, 10000);
|
||||
|
||||
const std::vector<std::vector<double> > &dt_obs2 = data.test_images();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
for (size_t j = 0; j < 784; j++)
|
||||
{
|
||||
test_obs[j][i] = dt_obs2[i][j]/255.0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<double> &dt_lab2 = data.test_labels();
|
||||
for (size_t i = 0; i < 10000; i++)
|
||||
{
|
||||
test_lab[dt_lab2[i]][i] = 1.0;
|
||||
}
|
||||
|
||||
my_nn.predict(test_obs, predicts);
|
||||
|
||||
int wrong_predicts = 0;
|
||||
int test_id, pre_id;
|
||||
double test_scr, pre_scr;
|
||||
for (size_t j = 0; j < 10000; j++)
|
||||
{
|
||||
test_id = pre_id = 0;
|
||||
test_scr = pre_scr = 0;
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
if (test_lab[i][j] > test_scr) {test_scr = test_lab[i][j]; test_id = i;}
|
||||
if (predicts[i][j] > pre_scr) {pre_scr = predicts[i][j]; pre_id = i;}
|
||||
}
|
||||
|
||||
if (test_id != pre_id)
|
||||
{
|
||||
wrong_predicts++;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Correct Rate = " << (10000 - wrong_predicts)/100.0 << "%\n";
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
97
src/core/array_ex.cpp
Normal file
97
src/core/array_ex.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
double get_x(const point3dc &p)
|
||||
{
|
||||
return p.x;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// create a new array and give initial values
|
||||
array<double> A(10, 0.0, 1.0);
|
||||
A.memory_usage();
|
||||
|
||||
A.log2linear(2);
|
||||
A.show();
|
||||
|
||||
A.linear2log(2);
|
||||
A.show();
|
||||
|
||||
A.for_each([](double &a){a += 1;});
|
||||
A.show();
|
||||
|
||||
A.sequence(1.0, 0.5, 3, 4, 1);
|
||||
A.show();
|
||||
|
||||
// copy A to a new array
|
||||
array<double> B = A;
|
||||
B.normalize();
|
||||
B.show();
|
||||
|
||||
array<double> S = A + B;
|
||||
std::cout << "B + A = ";
|
||||
S.show();
|
||||
|
||||
S.normalize();
|
||||
S.show();
|
||||
|
||||
array<point3dc> P(5);
|
||||
P.sequence(point3dc(0, 0, 0), point3dc(2, 1, 0.5));
|
||||
P.show(std::cout, '\n');
|
||||
|
||||
//array<double> Px = P.extract<double>([](const point3dc &p)->double{return p.x;});
|
||||
array<double> Px = P.extract<double>(get_x);
|
||||
Px.show();
|
||||
|
||||
// create a new 2D array
|
||||
matrix<int> C(5, 5, 1);
|
||||
C.sequence(0, 1, 10);
|
||||
|
||||
std::cout << "C = \n";
|
||||
C.show();
|
||||
|
||||
// save array to a binary file
|
||||
save_matrix2binary("tmp/array_ex_out", C, "Int");
|
||||
|
||||
// import 2D array to a new object
|
||||
matrix<int> D;
|
||||
read_binary2matrix("tmp/array_ex_out", D);
|
||||
|
||||
std::cout << "D = \n";
|
||||
D.show();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
54
src/core/autodiff_ex.cpp
Normal file
54
src/core/autodiff_ex.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
affvar func(const affvar &x1, const affvar &x2)
|
||||
{
|
||||
// y(x1, x2) = x1*x2 + 2*cos(x1) - 3*sin(x2)
|
||||
// dy/dx1 = x2 - 2*sin(x1)
|
||||
// dy/dx2 = x1 - 3*cos(x2)
|
||||
affvar y = x1*x2 + 2.0*cos(x1) - 3.0*sin(x2);
|
||||
return y;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
affvar x1 = 2.0;
|
||||
affvar x2 = 3.0;
|
||||
affvar y;
|
||||
y.var({&x1, &x2}, x1);
|
||||
y = func(x1, x2);
|
||||
std::cout << y.val() << " " << y.der() << "\n";
|
||||
|
||||
y.var({&x1, &x2}, x2);
|
||||
y = func(x1, x2);
|
||||
std::cout << y.val() << " " << y.der() << "\n";
|
||||
return 0;
|
||||
}
|
94
src/core/ceemdan_ex.cpp
Normal file
94
src/core/ceemdan_ex.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
/* Copyright 2013 Perttu Luukko
|
||||
|
||||
* This file is part of libeemd.
|
||||
|
||||
* libeemd is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* libeemd is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with libeemd. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
const size_t ensemble_size = 500;
|
||||
const unsigned int S_number = 4;
|
||||
const unsigned int num_siftings = 50;
|
||||
const double noise_strength = 0.02;
|
||||
const unsigned long int rng_seed = 0;
|
||||
const std::string outfile = "ceemdan_example.out";
|
||||
|
||||
const size_t N = 512;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
libeemd_error_code err;
|
||||
// As an example decompose a Dirac signal as in the original CEEMDAN paper
|
||||
array<double> inp(N, 0.0);
|
||||
inp[N/2] = 1.0;
|
||||
|
||||
// Allocate memory for output data
|
||||
size_t M = emd_num_imfs(N); // This function is provided by the libeemd
|
||||
matrix<double> outp;
|
||||
|
||||
// Run CEEMDAN
|
||||
// This is just a warpper of the function ceemdan() from libeemd
|
||||
// IMFs are stored in rows of the output matrix in the shape of M*N
|
||||
ceemdan1d(inp, outp, M, ensemble_size, noise_strength, S_number, num_siftings, rng_seed);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, outfile);
|
||||
|
||||
for (size_t j=0; j<N; j++)
|
||||
{
|
||||
ofile << inp[j];
|
||||
for (size_t i=0; i<M; i++)
|
||||
{
|
||||
ofile << " " << outp[i][j];
|
||||
}
|
||||
ofile << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
47
src/core/cliplot_ex.cpp
Normal file
47
src/core/cliplot_ex.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/graphic/cliplot.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
double xmin = -3;
|
||||
double xmax = 3;
|
||||
double ymin = -1;
|
||||
double ymax = 1;
|
||||
|
||||
gctl::cliplot c(81, 16, xmin, xmax, ymin, ymax);
|
||||
|
||||
//c.set_new_screen(true);
|
||||
c.set_axis(5, 5);
|
||||
c.set_digs(4);
|
||||
c.set_wname("Time (s)");
|
||||
c.set_hname("Value");
|
||||
c.plot_func([](double x)->double{return sin(x);}, '.', GCTL_BOLDRED);
|
||||
c.display();
|
||||
return 0;
|
||||
}
|
104
src/core/dsv_io_ex.cpp
Normal file
104
src/core/dsv_io_ex.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
|
||||
dsv_io tc;
|
||||
tc.delimeter('|');
|
||||
tc.head_number(1);
|
||||
tc.load_text("tmp/world_data", ".txt", ColHead|RowHead);
|
||||
tc.info(AttInfo|HeadInfo|TagInfo);
|
||||
|
||||
tc.filter("America", "Continent_s", ColHead);
|
||||
//tc.filter("America", "BLZ", RowHead);
|
||||
//tc.save_text("out");
|
||||
|
||||
if (tc.has_column("Continent_s")) std::cout << "Find Column\n";
|
||||
|
||||
dsv_io tc2 = tc.export_table();
|
||||
//tc2.head_records(tc.head_records());
|
||||
tc2.delimeter('|');
|
||||
tc2.save_text("out");
|
||||
|
||||
/*
|
||||
geodsv_io tc;
|
||||
tc.load_text("tmp/topo", ".txt", ColumnHead);
|
||||
tc.set_column_names({"x (m)", "y (m)", "elev (m)"});
|
||||
tc.set_column_type(Float, "x (m)");
|
||||
tc.set_column_type(Float, "y (m)");
|
||||
tc.set_column_type(Float, "elev (m)");
|
||||
|
||||
array<point3dc> topo;
|
||||
tc.get_column_point3dc(topo, 1, 2, 3);
|
||||
|
||||
std::clog << std::setprecision(11) << topo.front().z << "\n";
|
||||
std::clog << topo.back().x << "," << topo.back().y << "," << topo.back().z << "\n";
|
||||
display_vector(tc.get_tags(), std::clog, '\n');
|
||||
display_vector(tc.get_annotoations(), std::clog, '\n');
|
||||
display_vector(tc.get_head_records(), std::clog, '\n');
|
||||
|
||||
//tc.column_output("C3", Disable);
|
||||
|
||||
array<double> elev;
|
||||
tc.get_column(elev, "elev (m)");
|
||||
elev.for_each([](double &d, size_t i){d += 100.0;});
|
||||
|
||||
tc.add_column(2, "elev_plus");
|
||||
tc.fill_column(elev, "elev_plus");
|
||||
|
||||
tc.add_column(-1, "dist");
|
||||
tc.cal_column("dist := sqrt(C1*C1 + C3*C3)", {"dist", "C1", "C3"});
|
||||
|
||||
tc.add_row(3);
|
||||
tc.fill_row(array<double>{5.5, 4.4, 3.3, 2.2, 1.1}, 3);
|
||||
|
||||
geodsv_io out_table;
|
||||
tc.filt_column("dist > 1000", {"dist"}, {"x (m)", "y (m)", "elev (m)"}, out_table);
|
||||
out_table.save_text("out2");
|
||||
|
||||
_1s_vector s = tc.get_tags();
|
||||
s.push_back("Elev = 1000");
|
||||
tc.set_tags(s);
|
||||
tc.save_csv("out");
|
||||
|
||||
double c = 4.25242153654;
|
||||
tc.cell(c, 2, 1, 12);
|
||||
std::clog << std::setprecision(12) << tc.cell<double>(2, 1) << "\n";
|
||||
|
||||
tc.info();
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
100
src/core/eemd_ex.cpp
Normal file
100
src/core/eemd_ex.cpp
Normal file
@ -0,0 +1,100 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
/* Copyright 2013 Perttu Luukko
|
||||
|
||||
* This file is part of libeemd.
|
||||
|
||||
* libeemd is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* libeemd is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with libeemd. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithms.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
const size_t ensemble_size = 250;
|
||||
const unsigned int S_number = 4;
|
||||
const unsigned int num_siftings = 50;
|
||||
const double noise_strength = 0.2;
|
||||
const unsigned long int rng_seed = 0;
|
||||
std::string outfile = "eemd_example.out";
|
||||
|
||||
// An example signal to decompose
|
||||
const size_t N = 1024;
|
||||
static inline double input_signal(double x) {
|
||||
const double omega = 2*GCTL_Pi/(N-1);
|
||||
return sin(17*omega*x)+0.5*(1.0-exp(-0.002*x))*sin(51*omega*x+1);
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// Define input data
|
||||
array<double> inp(N);
|
||||
for (size_t i=0; i<N; i++)
|
||||
{
|
||||
inp[i] = input_signal((double)i);
|
||||
}
|
||||
|
||||
// Run eemd
|
||||
matrix<double> outp;
|
||||
// This is just a warpper of the function eemd() from libeemd
|
||||
// IMFs are stored in rows of the output matrix in the shape of M*N
|
||||
eemd1d(inp, outp, 0, ensemble_size, noise_strength, S_number, num_siftings, rng_seed);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, outfile);
|
||||
|
||||
size_t M = outp.row_size();
|
||||
for (size_t j=0; j<N; j++)
|
||||
{
|
||||
ofile << inp[j];
|
||||
for (size_t i=0; i<M; i++)
|
||||
{
|
||||
ofile << " " << outp[i][j];
|
||||
}
|
||||
ofile << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
145
src/core/fft2d_ex.cpp
Normal file
145
src/core/fft2d_ex.cpp
Normal file
@ -0,0 +1,145 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
double module(std::complex<double> a)
|
||||
{
|
||||
return sqrt(a.real()*a.real() + a.imag()*a.imag());
|
||||
}
|
||||
|
||||
double sin_wave(double t, double f, double phi = 0, double A = 1.0)
|
||||
{
|
||||
return A*sin(2*GCTL_Pi*f*t + phi);
|
||||
}
|
||||
|
||||
void average_radian_spec(const array<double> &in_freq, const array<double> &in_power,
|
||||
const array<double> &out_freq, array<double> &out_power, array<double> &out_std)
|
||||
{
|
||||
int in_num = in_freq.size();
|
||||
int out_num = out_freq.size();
|
||||
out_power.resize(out_num, 0);
|
||||
out_std.resize(out_num, 0);
|
||||
|
||||
std::vector<double> bin;
|
||||
_1d_array bin_arr;
|
||||
for (size_t i = 0; i < out_num; i++)
|
||||
{
|
||||
bin.clear();
|
||||
for (size_t j = 0; j < in_num; j++)
|
||||
{
|
||||
if (in_freq[j] > out_freq[i] - 0.5 && in_freq[j] <= out_freq[i] + 0.5)
|
||||
{
|
||||
bin.push_back(in_power[j]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!bin.empty())
|
||||
{
|
||||
bin_arr.import_vector(bin);
|
||||
out_power[i] = bin_arr.mean();
|
||||
out_std[i] = bin_arr.std();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
double T = 2.0; // 采样时间
|
||||
double dT = 0.01; // 采样间隔
|
||||
double freq = 1.0/dT; // 采样频率
|
||||
|
||||
int M = round(T/dT) + 1, N = round(T/dT) + 1;
|
||||
|
||||
_2d_matrix sig(M, N);
|
||||
_1d_array X(N), Y(M);
|
||||
_1d_array U(N), V(M);
|
||||
X.sequence(-1.0, dT);
|
||||
Y.sequence(-1.0, dT);
|
||||
U.sequence(-1.0*freq, 2.0*freq/(N - 1));
|
||||
V.sequence(-1.0*freq, 2.0*freq/(M - 1));
|
||||
|
||||
double t;
|
||||
double f1 = 40.0;
|
||||
double f2 = 20.0;
|
||||
double f3 = 10.0;
|
||||
for (size_t i = 0; i < M; i++)
|
||||
{
|
||||
for (size_t j = 0; j < N; j++)
|
||||
{
|
||||
t = sqrt(X[j]*X[j] + Y[i]*Y[i]);
|
||||
sig[i][j] = pow(-1, i+j)*(sin_wave(t, f1) + sin_wave(t, f2) + sin_wave(t, f3));
|
||||
}
|
||||
}
|
||||
|
||||
_1cd_array spectrum;
|
||||
dft2d(sig, spectrum);
|
||||
|
||||
_1d_array spec_real(M*N), spec_imag(M*N), spec_power(M*N);
|
||||
for (size_t i = 0; i < M*N; i++)
|
||||
{
|
||||
spec_real[i] = spectrum[i].real();
|
||||
spec_imag[i] = spectrum[i].imag();
|
||||
spec_power[i] = module(spectrum[i]);
|
||||
}
|
||||
|
||||
save_netcdf_grid("fft2d_sig", sig, U, V, "u", "v");
|
||||
append_netcdf_grid("fft2d_sig", spec_real, "u", "v", "real");
|
||||
append_netcdf_grid("fft2d_sig", spec_imag, "u", "v", "imag");
|
||||
append_netcdf_grid("fft2d_sig", spec_power, "u", "v", "power");
|
||||
|
||||
_1d_array pro_freq(M*N), pro_spec(M*N);
|
||||
for (size_t i = 0; i < M; i++)
|
||||
{
|
||||
for (size_t j = 0; j < N; j++)
|
||||
{
|
||||
pro_freq[j + i*N] = sqrt(U[j]*U[j] + V[i]*V[i]);
|
||||
pro_spec[j + i*N] = spec_power[j + i*N];
|
||||
}
|
||||
}
|
||||
|
||||
_1d_array out_freq, out_power, out_std;
|
||||
out_freq.resize(150, 1.0, 1.0);
|
||||
average_radian_spec(pro_freq, pro_spec, out_freq, out_power, out_std);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "fft2d_radian_spec", ".txt");
|
||||
for (size_t i = 0; i < out_freq.size(); i++)
|
||||
{
|
||||
ofile << out_freq[i] << " " << out_power[i] << " " << out_std[i] << "\n";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
87
src/core/fft_ex.cpp
Normal file
87
src/core/fft_ex.cpp
Normal file
@ -0,0 +1,87 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
double module(std::complex<double> a)
|
||||
{
|
||||
return sqrt(a.real()*a.real() + a.imag()*a.imag());
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
int fs = 100;
|
||||
double T = 5;
|
||||
int n = round(fs*T);
|
||||
double t;
|
||||
|
||||
gctl::array<double> in(n), out;
|
||||
gctl::array<double> freq_index;
|
||||
gctl::_1cd_array spectrum;
|
||||
|
||||
for (size_t i = 0; i < n; i++)
|
||||
{
|
||||
t = 1.0*T*i/n;
|
||||
in[i] = 2.0*sin(2.0*GCTL_Pi*t*10) + 1.0*sin(2.0*GCTL_Pi*t*5) + 3.0*sin(2.0*GCTL_Pi*t*2);
|
||||
}
|
||||
|
||||
// Run the r2c transform
|
||||
gctl::dft_r2c_1d(in, spectrum, 1.0*fs, &freq_index);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "fft_example_spec.out");
|
||||
for (size_t i = 0; i < spectrum.size(); i++)
|
||||
{
|
||||
ofile << freq_index[i] << ' ' << module(spectrum[i]) << " ";
|
||||
|
||||
if (9.5 < freq_index[i] && freq_index[i] < 10.5) {spectrum[i].real(0.0); spectrum[i].imag(0.0);}
|
||||
//if (1.5 < freq_index[i] && freq_index[i] < 2.5) {spectrum[i].real(0.0); = spectrum[i].imag(0.0);}
|
||||
if (4.5 < freq_index[i] && freq_index[i] < 5.5) {spectrum[i].real(0.0); spectrum[i].imag(0.0);}
|
||||
|
||||
ofile << module(spectrum[i]) << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
|
||||
// Run the c2r transform
|
||||
gctl::dft_c2r_1d(spectrum, out);
|
||||
|
||||
open_outfile(ofile, "fft_example_sig.out");
|
||||
for (size_t i = 0; i < n; i++)
|
||||
{
|
||||
t = 1.0*T*i/n;
|
||||
ofile << t << " " << in[i] << " " << out[i] << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
81
src/core/fft_filter_ex.cpp
Normal file
81
src/core/fft_filter_ex.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
int fs = 200;
|
||||
double f1 = 4.0;
|
||||
double f2 = 10.0;
|
||||
|
||||
// Create filters
|
||||
fft_filter filter_lp(LowPass, Butterworth, 5, (double) fs, f1);
|
||||
fft_filter filter_hp(HighPass, Butterworth, 5, (double) fs, f2);
|
||||
fft_filter filter_bp(BandPass, Butterworth, 5, (double) fs, f1, f2);
|
||||
fft_filter filter_bs(BandStop, Butterworth, 5, (double) fs, f1, f2);
|
||||
|
||||
// Demo
|
||||
double f1_demo = 1.0; // Hz
|
||||
double f2_demo = 7.5;
|
||||
double f3_demo = 15.0;
|
||||
|
||||
// Create input signal
|
||||
int snum = int(10.13*fs);
|
||||
gctl::array<double> t(snum), signal(snum);
|
||||
t.sequence(0.0, 10.13/(snum - 1));
|
||||
|
||||
for (size_t i = 0; i < t.size(); i++)
|
||||
{
|
||||
signal[i] = 2.0*sin(2.0*GCTL_Pi*f1_demo*t[i]) + sin(2.0*GCTL_Pi*f2_demo*t[i]) + 0.5*sin(2.0*GCTL_Pi*f3_demo*t[i]);
|
||||
}
|
||||
|
||||
gctl::array<double> filtered_lp, filtered_hp, filtered_bp, filtered_bs;
|
||||
|
||||
// Run the filtersc。
|
||||
filter_lp.filter(signal, filtered_lp);
|
||||
filter_hp.filter(signal, filtered_hp);
|
||||
filter_bp.filter(signal, filtered_bp);
|
||||
filter_bs.filter(signal, filtered_bs);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "fft_filter_ex.out");
|
||||
for (size_t i = 0; i < filtered_lp.size(); i++)
|
||||
{
|
||||
ofile << t[i] << " " << signal[i] << " " << filtered_lp[i] << " " << filtered_hp[i] << " " << filtered_bp[i] << " " << filtered_bs[i] << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
88
src/core/fir_filter_ex.cpp
Normal file
88
src/core/fir_filter_ex.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
int fs = 200;
|
||||
double f1 = 4.0;
|
||||
double f2 = 10.0;
|
||||
int m = 600;
|
||||
|
||||
// Create filters
|
||||
fir_filter filter_lp(LowPass, Hamming, m, (double) fs, f1);
|
||||
fir_filter filter_hp(HighPass, Hamming, m, (double) fs, f2);
|
||||
fir_filter filter_bp(BandPass, Hamming, m, (double) fs, f1, f2);
|
||||
fir_filter filter_sb(BandStop, Hamming, m, (double) fs, f1, f2);
|
||||
|
||||
// Get coefficient
|
||||
//array<double> h_lp = filter_lp.get_coefficients();
|
||||
//array<double> h_hp = filter_hp.get_coefficients();
|
||||
//array<double> h_bp = filter_bp.get_coefficients();
|
||||
//array<double> h_sb = filter_sb.get_coefficients();
|
||||
|
||||
// Demo
|
||||
double f1_demo = 1.0; // Hz
|
||||
double f2_demo = 7.5;
|
||||
double f3_demo = 15.0;
|
||||
|
||||
// Create input signal
|
||||
int snum = int(10.13*fs);
|
||||
gctl::array<double> t(snum), signal(snum);
|
||||
t.sequence(0.0, 10.13/(snum - 1));
|
||||
|
||||
for (size_t i = 0; i < t.size(); i++)
|
||||
{
|
||||
signal[i] = 2.0*sin(2.0*GCTL_Pi*f1_demo*t[i]) + sin(2.0*GCTL_Pi*f2_demo*t[i]) + 0.5*sin(2.0*GCTL_Pi*f3_demo*t[i]);
|
||||
}
|
||||
|
||||
gctl::array<double> filtered_lp, filtered_hp, filtered_bp, filtered_sb;
|
||||
|
||||
// Run the filters
|
||||
filter_lp.filter(signal, filtered_lp);
|
||||
filter_hp.filter(signal, filtered_hp);
|
||||
filter_bp.filter(signal, filtered_bp);
|
||||
filter_sb.filter(signal, filtered_sb);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "fir_filter_ex.out");
|
||||
for (size_t i = 0; i < filtered_lp.size(); i++)
|
||||
{
|
||||
ofile << t[i] << " " << signal[i] << " " << filtered_lp[i] << " " << filtered_hp[i] << " " << filtered_bp[i] << " " << filtered_sb[i] << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
84
src/core/getoption_ex.cpp
Normal file
84
src/core/getoption_ex.cpp
Normal file
@ -0,0 +1,84 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/utility.h"
|
||||
#include "../lib/geometry.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
getoption gopt;
|
||||
|
||||
gopt.add_options({"range", "interval", "weight", "model-file", "model-tag", "out-model", "save-model"},
|
||||
{true, true, true, true, true, true, false});
|
||||
|
||||
gopt.set_group(1, {"out-model", "save-model"});
|
||||
|
||||
gopt.read_options("tmp/option_sample");
|
||||
|
||||
gopt.check_mandatory();
|
||||
|
||||
gopt.check_group(1);
|
||||
|
||||
// 显示所有读入的键值与参数值
|
||||
gopt.show_options();
|
||||
// 通过键值获取参数值
|
||||
std::cout << gopt.get_value("model-file") << std::endl;
|
||||
// 查找不存在的命令 返回警告信息与默认值NULL
|
||||
std::cout << gopt.get_value("model-tag") << std::endl;
|
||||
|
||||
std::cout << "---------------------" << std::endl;
|
||||
|
||||
// 通过选项的标签值来获取参数值 需要匹配的字符串只需要包含标签值即可
|
||||
_1d_vector weight = gopt.get_value_t<_1d_vector>("weight|Weight", '|', '/');
|
||||
std::cout << weight.size() << std::endl;
|
||||
std::cout << weight[2] << std::endl;
|
||||
|
||||
double xmin, xmax, ymin, ymax;
|
||||
std::string cover_str;
|
||||
parse_string_to_value(gopt.get_value("range|Range"), '/', true, xmin, xmax, ymin, ymax, cover_str);
|
||||
std::cout << xmin << " " << xmax << " " << ymin << " " << ymax << " " << cover_str << std::endl;
|
||||
|
||||
std::vector<std::string> tags;
|
||||
parse_string_to_vector(gopt.get_value("model-tag"), ',', tags);
|
||||
for (int i = 0; i < tags.size(); i++)
|
||||
{
|
||||
std::cout << tags[i] << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
_1s_vector s;
|
||||
std::cin >> s;
|
||||
std::cout << s.size() << "\n";
|
||||
std::cout << s << "\n";
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
65
src/core/gmt_ex.cpp
Normal file
65
src/core/gmt_ex.cpp
Normal file
@ -0,0 +1,65 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/graphic/gmt.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gctl::gmt gt;
|
||||
/*
|
||||
gt.begin_session("line_plot", "eps,png");
|
||||
gt.call_module("basemap", "-R0/10/0/10 -JX5i/5i -Baf");
|
||||
gt.call_module("plot", "tmp/data.txt -R0/10/0/10 -JX5i/5i -W1p,blue");
|
||||
gt.end_session(false);
|
||||
gt.save_session("line_plot");
|
||||
*/
|
||||
|
||||
// example 2
|
||||
gctl::array<double> data(51*41);
|
||||
|
||||
double dist;
|
||||
for (int i = 0; i < 51; ++i)
|
||||
{
|
||||
for (int j = 0; j < 41; ++j)
|
||||
{
|
||||
dist = sqrt((j-20)*(j-20) + (i-25)*(i-25));
|
||||
data[j+i*41] = sin(dist/GCTL_Pi);
|
||||
}
|
||||
}
|
||||
|
||||
gt.begin_session("image_plot", "eps");
|
||||
gt.call_module("set", "FONT_ANNOT_PRIMARY=10.5p,Times-Roman,black");
|
||||
|
||||
std::string gname = gt.create_grid(data, 41, 51, 0.0, 1.0, 0.0, 1.0);
|
||||
|
||||
gt.call_module("grd2cpt", gname + " -R0/40/0/50 -Crainbow -Z -D");
|
||||
gt.call_module("grdimage", gname + " -R0/40/0/50 -JX1.5i/1.5i -X0.5i -Y0.5i -Bxag+l\"x (m)\" -Byag+l\"y (m)\"");
|
||||
gt.call_module("psscale", "-Bxa -By+lm -Dx0.1i/-0.2i+w1.3i/0.05i+h");
|
||||
gt.end_session();
|
||||
gt.save_session("image_plot");
|
||||
return 0;
|
||||
}
|
97
src/core/gnuplot_ex.cpp
Normal file
97
src/core/gnuplot_ex.cpp
Normal file
@ -0,0 +1,97 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core/macro.h"
|
||||
#include "../lib/graphic/gnuplot.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gctl::gnuplot gt;
|
||||
|
||||
//one line test
|
||||
//gt.send("set terminal dumb");
|
||||
//gt.send("plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1))");
|
||||
|
||||
//buffer test (bessel animation)
|
||||
/*
|
||||
gt.to_buffer();
|
||||
gt.send("set terminal gif animate delay 10 size 600,400");
|
||||
gt.send("set output 'bessel.gif'");
|
||||
gt.send("set palette rgb 3,9,9");
|
||||
gt.send("unset key; unset colorbox; unset border; unset tics");
|
||||
gt.send("set lmargin at screen 0.03");
|
||||
gt.send("set bmargin at screen 0");
|
||||
gt.send("set rmargin at screen 0.97");
|
||||
gt.send("set tmargin at screen 1");
|
||||
gt.send("set parametric", true);
|
||||
gt.send("bessel(x,t) = besj0(x) * cos(2*pi*t)");
|
||||
gt.send("n = 6 # number of zeros");
|
||||
gt.send("k = (n*pi-1.0/4*pi)");
|
||||
gt.send("u_0 = k + 1/(8*k) - 31/(384*k)**3 + 3779/(15360*k)**5");
|
||||
gt.send("set urange [0:u_0]");
|
||||
gt.send("set vrange[0:1.5*pi]");
|
||||
gt.send("set cbrange [-1:1]");
|
||||
gt.send("set zrange[-1:1]");
|
||||
gt.send("set isosamples 200,100");
|
||||
gt.send("set pm3d depthorder");
|
||||
gt.send("set view 40,200");
|
||||
|
||||
std::string cmd;
|
||||
for (float t = 0.0f; t < 2.0f; t += 0.02f)
|
||||
{
|
||||
cmd = "splot u*sin(v),u*cos(v),bessel(u," + std::to_string(t) + ") w pm3d ls 1";
|
||||
gt.send(cmd);
|
||||
}
|
||||
gt.send("set output");
|
||||
|
||||
gt.save_buffer("bessel");
|
||||
gt.send_buffer();
|
||||
*/
|
||||
|
||||
//data test
|
||||
std::vector<double> x(101);
|
||||
std::vector<double> y1(101);
|
||||
std::vector<double> y2(101);
|
||||
for (size_t i = 0; i < 101; i++)
|
||||
{
|
||||
x[i] = -1.0*GCTL_Pi + 2.0*GCTL_Pi*i/100.0;
|
||||
y1[i] = sin(x[i]);
|
||||
y2[i] = cos(x[i]);
|
||||
}
|
||||
|
||||
std::vector<std::vector<double> > data;
|
||||
data.push_back(x);
|
||||
data.push_back(y1);
|
||||
data.push_back(y2);
|
||||
|
||||
gt.to_buffer();
|
||||
gt.send_data("$Data", data);
|
||||
gt.send("plot $Data using 1:2 with lines title 'y1', '' using 1:3 with lines title 'y2'");
|
||||
gt.save_buffer("sin_cos");
|
||||
gt.send_buffer();
|
||||
return 0;
|
||||
}
|
106
src/core/kde_ex.cpp
Normal file
106
src/core/kde_ex.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
/*
|
||||
array<double> x(201);
|
||||
x.sequence(-1.0, 0.01);
|
||||
kde k(0.02, x);
|
||||
|
||||
array<double> d;
|
||||
array<double> a(100000);
|
||||
a.random_float(0.2, 0.2, RdNormal, 0);
|
||||
k.get_distribution(a, d);
|
||||
|
||||
gaussian_para1d g1(0, 0.2);
|
||||
array<double> g(201);
|
||||
for (size_t i = 0; i < x.size(); i++)
|
||||
{
|
||||
g[i] = gaussian_dist1d(x[i], g1);
|
||||
}
|
||||
|
||||
array<double> dm(201);
|
||||
array<double> am(100000, 0.0);
|
||||
|
||||
for (size_t i = 0; i < am.size(); i++)
|
||||
{
|
||||
k.get_gradient_at(i, a, dm);
|
||||
|
||||
for (size_t j = 0; j < x.size(); j++)
|
||||
{
|
||||
am[i] += 2.0*(d[j] - g[j])*dm[j];
|
||||
}
|
||||
|
||||
std::cout << a[i] << " " << am[i] << "\n";
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < x.size(); i++)
|
||||
{
|
||||
std::cout << x[i] << " " << d[i] - g[i] << "\n";
|
||||
}
|
||||
*/
|
||||
|
||||
array<double> x(201), y(301);
|
||||
x.sequence(-1.0, 0.01);
|
||||
y.sequence(0.0, 0.01);
|
||||
kde2d k(0.1, 0.1, x, y);
|
||||
|
||||
array<double> a(10000), b(10000);
|
||||
a.random_float(0, 0.2, RdNormal, 0);
|
||||
b.random_float(1.5, 0.3, RdNormal, 0);
|
||||
|
||||
gaussian_para2d g1(0, 1.5, 0.2, 0.3, 0);
|
||||
|
||||
array<double> d(201*301);
|
||||
//k.get_distribution(a, b, d);
|
||||
|
||||
a[0] = 0;
|
||||
b[0] = 1.5;
|
||||
k.get_gradient_y_at(0, a, b, d);
|
||||
|
||||
double t, sum = 0;
|
||||
for (size_t i = 0; i < y.size(); i++)
|
||||
{
|
||||
for (size_t j = 0; j < x.size(); j++)
|
||||
{
|
||||
std::cout << x[j] << " " << y[i] << " "
|
||||
//<< gaussian_dist2d(x[j], y[i], g1) << " "
|
||||
<< d[201*i + j] << "\n";
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
53
src/core/legendre_ex.cpp
Normal file
53
src/core/legendre_ex.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/io.h"
|
||||
#include "../lib/algebra.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "legendre_ex.out");
|
||||
for (size_t i = 0; i < 101; i++)
|
||||
{
|
||||
ofile << -1.0+2.0*i/100;
|
||||
for (size_t o = 0; o < 10; o++)
|
||||
{
|
||||
ofile << " " << legendre_polynomials(o, -1.0+2.0*i/100, false);
|
||||
ofile << " " << legendre_polynomials(o, -1.0+2.0*i/100, true);
|
||||
}
|
||||
ofile << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
53
src/core/multinary_ex.cpp
Normal file
53
src/core/multinary_ex.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/geometry.h"
|
||||
#include "../lib/algorithm.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
multinary ml;
|
||||
ml.init(0.1, 0.3, 0.008, 5);
|
||||
|
||||
//array<double> std(9, 0.05);
|
||||
//array<double> xs = {-2.2, -1.8, -1.5, -1.0, -0.7, -0.2, 0.9, 1.3, 1.9, 2.5};
|
||||
//ml.init(xs, std);
|
||||
|
||||
array<double> x(201);
|
||||
sequence(x, 0.1, 0.001);
|
||||
|
||||
for (size_t i = 0; i < x.size(); i++)
|
||||
{
|
||||
std::cout << x[i] << " " << ml.val(x[i]) << " " << ml.der(x[i]) << "\n";
|
||||
}
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
44
src/core/ply_io_ex.cpp
Normal file
44
src/core/ply_io_ex.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
array<vertex3dc> nodes;
|
||||
array<triangle> tris;
|
||||
read_ply_binary("tmp_binary", nodes, tris);
|
||||
save_ply_ascii("tmp", nodes, tris);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
63
src/core/process_ex.cpp
Normal file
63
src/core/process_ex.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/utility.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
class process_ex : public process_monitor
|
||||
{
|
||||
public:
|
||||
process_ex(){}
|
||||
virtual ~process_ex(){}
|
||||
|
||||
void process()
|
||||
{
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
{
|
||||
std::cout << "do something here...\n";
|
||||
|
||||
wait_for_kerboard();
|
||||
if (end_process()) break;
|
||||
}
|
||||
|
||||
set_end_process();
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
process_ex p;
|
||||
p.start_monitoring();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
74
src/core/refellipsoid_ex.cpp
Normal file
74
src/core/refellipsoid_ex.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/geometry.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
refellipsoid ellip;
|
||||
ellip.set(WGS84);
|
||||
/*
|
||||
point3ds ps;
|
||||
ps.set_io_precision(17);
|
||||
ps.lon = -110;
|
||||
ellip.geodetic2spherical(-40, 0, ps.lat, ps.rad);
|
||||
std::cout << "Geocentric: " << ps << std::endl;
|
||||
|
||||
point3dc pc = ps.s2c();
|
||||
pc.set_io_precision(17);
|
||||
std::cout << "XYZ: " << pc << std::endl;
|
||||
|
||||
ellip.spherical2geodetic(ps, ps.lon, ps.lat, ps.rad);
|
||||
std::cout << "Geodetic: " << ps << std::endl;
|
||||
|
||||
ellip.xyz2geodetic(pc, ps.lon, ps.lat, ps.rad);
|
||||
std::cout << "Geodetic: " << ps << std::endl;
|
||||
*/
|
||||
|
||||
point3ds ps;
|
||||
ps.set_io_precision(17);
|
||||
// 大地坐标 (110,40,0)
|
||||
ps.lon = 110;
|
||||
ellip.geodetic2spherical(40.0, 0.0, ps.lat, ps.rad);
|
||||
// 球心坐标 (110,39.810615323061491,6369344.5441424493)
|
||||
std::cout << "Geocentric: " << ps << std::endl;
|
||||
// 转换为大地坐标
|
||||
point3ds pd;
|
||||
ellip.xyz2geodetic(ps.s2c(), pd.lon, pd.lat, pd.rad);
|
||||
std::cout << "Geodetic: " << pd << std::endl;
|
||||
// 400km高
|
||||
pd.rad = 400000.0;
|
||||
ellip.geodetic2spherical(pd.lat, pd.rad, pd.lat, pd.rad);
|
||||
std::cout << "Geocentric: " << pd << std::endl;
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
114
src/core/sparray_ex.cpp
Normal file
114
src/core/sparray_ex.cpp
Normal file
@ -0,0 +1,114 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/algorithms.h"
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
srand(time(0));
|
||||
gctl::sparray<double> M(50, 0.0);
|
||||
gctl::sparray<double> L;
|
||||
|
||||
int tmp_id[13] = {4, 2, 6, 7, 8, 12, 23, 43, 33, 47, 38, 15, 1};
|
||||
int tmp_size = 13;
|
||||
for (int i = 0; i < tmp_size; i++)
|
||||
{
|
||||
M.set(tmp_id[i], gctl::random(10.0, 20.0));
|
||||
}
|
||||
|
||||
M.show_list();
|
||||
std::cout << "************" << std::endl;
|
||||
|
||||
M.copy_to(L, 2);
|
||||
L.show_list();
|
||||
|
||||
M.set(18, 100);
|
||||
M.set(38, 100);
|
||||
M.remove(12);
|
||||
|
||||
std::cout << "************" << std::endl;
|
||||
M.show_list();
|
||||
|
||||
gctl::array<double> C(50, -1.0);
|
||||
M.export_dense(C, 1.0, gctl::AppendVal);
|
||||
for (int i = 0; i < C.size(); i++)
|
||||
{
|
||||
std::cout << C.at(i) << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
gctl::sparray<double> N(C, -1, 1e-10);
|
||||
N.show_list();
|
||||
|
||||
std::cout << "Test 2" << std::endl;
|
||||
|
||||
M.clear();
|
||||
M.malloc(20, 0.0);
|
||||
|
||||
M.set(5, 6.5);
|
||||
M.set(9, 9.1);
|
||||
M.set(3, 4.3);
|
||||
M.set(17, 1.4);
|
||||
M.set(10, 3.5);
|
||||
M.set(7, 7.4);
|
||||
|
||||
M.show_list();
|
||||
|
||||
M.remove(17);
|
||||
M.remove(9);
|
||||
|
||||
std::cout << "**********" << std::endl;
|
||||
M.show_list();
|
||||
|
||||
std::cout << "Test 3" << std::endl;
|
||||
|
||||
int test_size = 500000;
|
||||
|
||||
M.clear();
|
||||
M.malloc(test_size, 0.0);
|
||||
|
||||
clock_t start = clock();
|
||||
for (int i = 0; i < 300000; i++)
|
||||
{
|
||||
M.set(i, gctl::random(10.0, 20.0));
|
||||
}
|
||||
for (int i = 300001; i < test_size; i++)
|
||||
{
|
||||
M.set(i, gctl::random(10.0, 20.0));
|
||||
}
|
||||
M.set(300000, 15.8888);
|
||||
|
||||
clock_t end = clock();
|
||||
std::cout << "sparray set() time: " << 1000.0*(end - start)/(double)CLOCKS_PER_SEC << " ms" << std::endl;
|
||||
|
||||
std::cout << "M.at(300000) = " << M.value(300000) << std::endl;
|
||||
|
||||
M.show_list(299995, 300005);
|
||||
|
||||
return 0;
|
||||
}
|
77
src/core/spmat_ex.cpp
Normal file
77
src/core/spmat_ex.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
spmat<double> mat(5, 5, 0.0);
|
||||
|
||||
std::vector<mat_node<double> > triplts;
|
||||
triplts.push_back(mat_node(0, 1, 0.23));
|
||||
triplts.push_back(mat_node(1, 2, 0.52));
|
||||
triplts.push_back(mat_node(2, 3, 0.31));
|
||||
triplts.push_back(mat_node(2, 3, 0.19));
|
||||
triplts.push_back(mat_node(3, 2, 0.65));
|
||||
triplts.push_back(mat_node(3, 4, 0.8));
|
||||
triplts.push_back(mat_node(4, 3, 1.6));
|
||||
triplts.push_back(mat_node(4, 3, 0.4));
|
||||
|
||||
mat.set_triplts(triplts, ReplaceVal);
|
||||
mat.init_pattern();
|
||||
mat.show_matrix();
|
||||
std::cout << "=====\n";
|
||||
|
||||
// 调用clear会重置pattern
|
||||
mat.clear(3, RowMajor);
|
||||
|
||||
for (size_t i = 0; i < triplts.size(); i++)
|
||||
{
|
||||
triplts[i].val = 0.1*(i + 1);
|
||||
}
|
||||
|
||||
mat.set_triplts(triplts, ReplaceVal);
|
||||
mat.show_matrix();
|
||||
|
||||
for (size_t i = 0; i < mat.row_size(); i++)
|
||||
{
|
||||
std::cout << "module(" << i << ") = " << mat.module(i, ColMajor) << "\n";
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < mat.row_size(); i++)
|
||||
{
|
||||
mat.scale(2.0, i);
|
||||
}
|
||||
|
||||
mat.show_matrix();
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
45
src/core/stl_io_ex.cpp
Normal file
45
src/core/stl_io_ex.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
array<vertex3dc> nodes;
|
||||
array<triangle> tris;
|
||||
read_stl_binary("tmp/Stanford_Bunny_Binary", nodes, tris);
|
||||
save_stl_ascii("tmp", tris, "Stanford_Bunny");
|
||||
save_stl_binary("tmp_binary", tris, "Stanford_Bunny");
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
55
src/core/windowfunc_ex.cpp
Normal file
55
src/core/windowfunc_ex.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/core.h"
|
||||
#include "../lib/algorithm.h"
|
||||
#include "../lib/io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
int t = 100;
|
||||
_1d_array w1, w2, w3, w4;
|
||||
|
||||
window_hamming(t, w1);
|
||||
window_hanning(t, w2);
|
||||
window_triangle(t, w3);
|
||||
window_blackman(t, w4);
|
||||
|
||||
std::ofstream ofile;
|
||||
open_outfile(ofile, "windowfunc_ex.out");
|
||||
for (size_t i = 0; i < t; i++)
|
||||
{
|
||||
ofile << i << " " << w1[i] << " " << w2[i] << " " << w3[i] << " " << w4[i] << "\n";
|
||||
}
|
||||
ofile.close();
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
59
src/mesh/create_tin_ex1.cpp
Normal file
59
src/mesh/create_tin_ex1.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
// File: create_tin_ex1.cpp
|
||||
// Author: Dr. Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
// Date: 2025-05-15
|
||||
|
||||
#include "gctl/mesh/tin.h"
|
||||
#include "gctl/io/dsv_io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
// read dem grid
|
||||
std::vector<double> topo(10201);
|
||||
std::ifstream infile("data/mesh/topo");
|
||||
for (int i = 0; i < 10201; ++i)
|
||||
{
|
||||
infile >> topo[i];
|
||||
}
|
||||
infile.close();
|
||||
|
||||
std::vector<vertex3dc> box(4);
|
||||
box[0].set(point3dc(500, 250, 0), 0);
|
||||
box[1].set(point3dc(750, 250, 0), 1);
|
||||
box[2].set(point3dc(750, 500, 0), 2);
|
||||
box[3].set(point3dc(500, 500, 0), 3);
|
||||
|
||||
std::vector<region> box_region(1);
|
||||
box_region[0].set(box, 5.0);
|
||||
|
||||
std::vector<double> err_records;
|
||||
std::vector<vertex3dc*> tin_vert;
|
||||
std::vector<tin_triangle*> tin_ele;
|
||||
grd2tin(topo, 0, 1000, 0, 1000, 10, 10, tin_vert, tin_ele, 1.0, nullptr, &err_records, nullptr);
|
||||
//grd2tin(topo, 0, 1000, 0, 1000, 10, 10, tin_vert, tin_ele, 1.0, nullptr, &err_records, &box_region);
|
||||
|
||||
save_tin2gmsh("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
save_tin2triangle("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
|
||||
int times = err_records.size();
|
||||
_1d_array errs;
|
||||
errs.input(err_records);
|
||||
destroy_vector(err_records);
|
||||
|
||||
dsv_io log_out;
|
||||
log_out.init_table(err_records.size(), 2);
|
||||
log_out.column_names({"Times", "Maxi-Error"});
|
||||
log_out.fill_column(array<int>(err_records.size(), 1, 1), "Times");
|
||||
log_out.fill_column(errs, "Maxi-Error");
|
||||
log_out.save_text("data/mesh/tin_out", ".log");
|
||||
|
||||
// Destroy memories allocated by the dem2tin function
|
||||
destroy_vector(tin_vert);
|
||||
destroy_vector(tin_ele);
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
46
src/mesh/create_tin_ex2.cpp
Normal file
46
src/mesh/create_tin_ex2.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
// File: create_tin_ex2.cpp
|
||||
// Author: Dr. Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
// Date: 2025-05-15
|
||||
|
||||
#include "gctl/mesh/tin.h"
|
||||
#include "gctl/io/dsv_io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// read dem grid
|
||||
std::vector<dem_point> topo(8000);
|
||||
std::ifstream infile("data/mesh/topo_rnd");
|
||||
for (int i = 0; i < 8000; i++)
|
||||
{
|
||||
infile >> topo[i].x >> topo[i].y >> topo[i].elev;
|
||||
}
|
||||
infile.close();
|
||||
|
||||
std::vector<double> err_records;
|
||||
std::vector<vertex3dc*> tin_vert;
|
||||
std::vector<tin_triangle*> tin_ele;
|
||||
rnd2tin(topo, tin_vert, tin_ele, 1.0, nullptr, &err_records);
|
||||
|
||||
save_tin2gmsh("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
save_tin2triangle("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
|
||||
// Write a log file
|
||||
std::ofstream logfile("data/mesh/tin_out.log");
|
||||
logfile << "Insertion Maxi-Error\n";
|
||||
for (int i = 0; i < err_records.size(); ++i)
|
||||
{
|
||||
logfile << i+1 << " " << err_records[i] << std::endl;
|
||||
}
|
||||
logfile.close();
|
||||
|
||||
// Destroy memories allocated by the dem2tin function
|
||||
destroy_vector(tin_vert);
|
||||
destroy_vector(tin_ele);
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
56
src/mesh/create_tin_ex3.cpp
Normal file
56
src/mesh/create_tin_ex3.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
// File: create_tin_ex3.cpp
|
||||
// Author: Dr. Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
// Date: 2025-05-15
|
||||
|
||||
#include "gctl/mesh/tin.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// read dem grid
|
||||
std::vector<double> topo(10201);
|
||||
std::ifstream infile("data/mesh/topo");
|
||||
for (int i = 0; i < 10201; ++i)
|
||||
{
|
||||
infile >> topo[i];
|
||||
}
|
||||
infile.close();
|
||||
|
||||
// Set outline polygon
|
||||
std::vector<vertex3dc> valid_area(8);
|
||||
valid_area[0].set(point3dc(-5, 500, 0), 0);
|
||||
valid_area[1].set(point3dc(58, 365, 0), 1);
|
||||
valid_area[2].set(point3dc(314, 158, 0), 2);
|
||||
valid_area[3].set(point3dc(681, 22, 0), 3);
|
||||
valid_area[4].set(point3dc(942, 105, 0), 4);
|
||||
valid_area[5].set(point3dc(1005, 360, 0), 5);
|
||||
valid_area[6].set(point3dc(1005, 1005, 0), 6);
|
||||
valid_area[7].set(point3dc(-5, 1005, 0), 7);
|
||||
|
||||
std::vector<double> err_records;
|
||||
std::vector<vertex3dc*> tin_vert;
|
||||
std::vector<tin_triangle*> tin_ele;
|
||||
grd2tin(topo, 0, 1000, 0, 1000, 10, 10, tin_vert, tin_ele, 1.0, &valid_area, &err_records);
|
||||
|
||||
save_tin2gmsh("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
save_tin2triangle("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
|
||||
// Write a log file
|
||||
std::ofstream logfile("data/mesh/tin_out.log");
|
||||
logfile << "Insertion Maxi-Error\n";
|
||||
for (int i = 0; i < err_records.size(); ++i)
|
||||
{
|
||||
logfile << i+1 << " " << err_records[i] << std::endl;
|
||||
}
|
||||
logfile.close();
|
||||
|
||||
// Destroy memories allocated by the dem2tin function
|
||||
destroy_vector(tin_vert);
|
||||
destroy_vector(tin_ele);
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
57
src/mesh/create_tin_ex4.cpp
Normal file
57
src/mesh/create_tin_ex4.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
// File: create_tin_ex4.cpp
|
||||
// Author: Dr. Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
// Date: 2025-05-15
|
||||
|
||||
#include "gctl/mesh/tin.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
// read dem grid
|
||||
std::vector<dem_point> topo(8000);
|
||||
std::ifstream infile("data/mesh/topo_rnd");
|
||||
for (int i = 0; i < 8000; ++i)
|
||||
{
|
||||
infile >> topo[i].x >> topo[i].y >> topo[i].elev;
|
||||
}
|
||||
infile.close();
|
||||
|
||||
// Set outline polygon
|
||||
std::vector<vertex3dc> valid_area(8);
|
||||
valid_area[0].set(point3dc(-5, 500, 0), 0);
|
||||
valid_area[1].set(point3dc(58, 365, 0), 1);
|
||||
valid_area[2].set(point3dc(314, 158, 0), 2);
|
||||
valid_area[3].set(point3dc(681, 22, 0), 3);
|
||||
valid_area[4].set(point3dc(942, 105, 0), 4);
|
||||
valid_area[5].set(point3dc(1005, 360, 0), 5);
|
||||
valid_area[6].set(point3dc(1005, 1005, 0), 6);
|
||||
valid_area[7].set(point3dc(-5, 1005, 0), 7);
|
||||
|
||||
std::vector<double> err_records;
|
||||
std::vector<vertex3dc*> tin_vert;
|
||||
std::vector<tin_triangle*> tin_ele;
|
||||
rnd2tin(topo, tin_vert, tin_ele, 1.0, &valid_area, &err_records);
|
||||
|
||||
save_tin2gmsh("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
save_tin2triangle("data/mesh/tin_out", tin_vert, tin_ele);
|
||||
|
||||
// Write a log file
|
||||
std::ofstream logfile("data/mesh/tin_out.log");
|
||||
logfile << "Insertion Maxi-Error\n";
|
||||
for (int i = 0; i < err_records.size(); ++i)
|
||||
{
|
||||
logfile << i+1 << " " << err_records[i] << std::endl;
|
||||
}
|
||||
logfile.close();
|
||||
|
||||
// Destroy memories allocated by the dem2tin function
|
||||
for (int i = 0; i < tin_vert.size(); ++i)
|
||||
destroy_vector(tin_vert);
|
||||
destroy_vector(tin_ele);
|
||||
return 0;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
54
src/mesh/mesh_ex1.cpp
Normal file
54
src/mesh/mesh_ex1.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gctl::regular_grid rgd;
|
||||
rgd.init("grid-1", "null", 4, 4, 0.0, 0.0, 1.0, 1.0);
|
||||
|
||||
rgd.add_data(gctl::NodeData, gctl::Scalar, "data-1", 2.5);
|
||||
rgd.add_data(gctl::ElemData, gctl::Scalar, "data-2", 1.2, false);
|
||||
rgd.add_data(gctl::NodeData, gctl::Scalar, "data-3", 1.0);
|
||||
rgd.show_info();
|
||||
|
||||
gctl::meshdata data2 = rgd.get_data("data-2");
|
||||
std::cout << "data name: " << data2.name_ << std::endl;
|
||||
data2.datval_.show();
|
||||
|
||||
gctl::meshdata data3 = rgd.get_data("data-3");
|
||||
std::cout << "data name: " << data3.name_ << std::endl;
|
||||
data3.datval_.show();
|
||||
|
||||
rgd.diff("data-4", "data-1", "data-3");
|
||||
|
||||
rgd.remove_data("data-1");
|
||||
rgd.show_info();
|
||||
rgd.save_gmsh_withdata("ex1_out", gctl::OverWrite, gctl::NotPacked);
|
||||
return 0;
|
||||
}
|
37
src/mesh/mesh_ex10.cpp
Normal file
37
src/mesh/mesh_ex10.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gctl::regular_mesh_sph_3d rm_3ds;
|
||||
rm_3ds.init("mesh-1", "null", 30.25, 30.25, 2005, 0.5, 0.5, 10, 40, 40, 50);
|
||||
rm_3ds.add_data(gctl::ElemData, gctl::Scalar, "data-1", 2.5);
|
||||
rm_3ds.save_gmsh_withdata("mesh_sample10",gctl::OverWrite, gctl::NotPacked);
|
||||
return 0;
|
||||
}
|
62
src/mesh/mesh_ex2.cpp
Normal file
62
src/mesh/mesh_ex2.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
std::string dname = "example";
|
||||
std::string dname2= "another-example";
|
||||
|
||||
gctl::regular_grid rgd;
|
||||
rgd.init("grid-1", "null", 15, 10, 0.0, 0.0, 1.0, 1.0);
|
||||
|
||||
gctl::meshdata &data = rgd.add_data(gctl::NodeData, gctl::Scalar, dname, 0.0);
|
||||
for (int j = 0; j < rgd.get_ydim(); j++)
|
||||
{
|
||||
for (int i = 0; i < rgd.get_xdim(); i++)
|
||||
{
|
||||
data.datval_[i + j*rgd.get_xdim()] = i;
|
||||
}
|
||||
}
|
||||
|
||||
gctl::meshdata &data2 = rgd.add_data(gctl::NodeData, gctl::Scalar, dname2, 0.0);
|
||||
for (int j = 0; j < rgd.get_ydim(); j++)
|
||||
{
|
||||
for (int i = 0; i < rgd.get_xdim(); i++)
|
||||
{
|
||||
data2.datval_[i + j*rgd.get_xdim()] = j;
|
||||
}
|
||||
}
|
||||
|
||||
// disable the output of data object named dname2
|
||||
//data2.output_ok_ = false;
|
||||
|
||||
rgd.show_info();
|
||||
rgd.save_netcdf_grid("sample2-out", gctl::NodeData);
|
||||
return 0;
|
||||
}
|
82
src/mesh/mesh_ex3.cpp
Normal file
82
src/mesh/mesh_ex3.cpp
Normal file
@ -0,0 +1,82 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
std::string dname = "example";
|
||||
std::string dname2= "another-example";
|
||||
|
||||
gctl::regular_grid rgd;
|
||||
rgd.init("grid-1", "this is a test message.", 15, 10, 0.0, 0.0, 1.0, 1.0);
|
||||
|
||||
gctl::meshdata &data = rgd.add_data(gctl::NodeData, gctl::Scalar, dname, 0.0);
|
||||
for (int j = 0; j < rgd.get_ydim(); j++)
|
||||
{
|
||||
for (int i = 0; i < rgd.get_xdim(); i++)
|
||||
{
|
||||
data.datval_[i + j*rgd.get_xdim()] = i;
|
||||
}
|
||||
}
|
||||
|
||||
gctl::meshdata &data2 = rgd.add_data(gctl::ElemData, gctl::Scalar, dname2, 0.0);
|
||||
for (int j = 0; j < rgd.get_ydim()-1; j++)
|
||||
{
|
||||
for (int i = 0; i < rgd.get_xdim()-1; i++)
|
||||
{
|
||||
data2.datval_[i + j*(rgd.get_xdim()-1)] = j;
|
||||
}
|
||||
}
|
||||
|
||||
rgd.save_binary("sample3-out");
|
||||
rgd.save_netcdf_grid("sample3-out1", dname);
|
||||
rgd.save_netcdf_grid("sample3-out2", dname2);
|
||||
|
||||
gctl::regular_grid rgd2;
|
||||
rgd2.load_binary("sample3-out");
|
||||
rgd2.show_info();
|
||||
|
||||
gctl::meshdata &data3 = rgd2.get_data(dname);
|
||||
for (int i = 0; i < data3.datval_.size(); i++)
|
||||
{
|
||||
std::cout << data3.datval_[i] << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
gctl::meshdata &data4 = rgd2.get_data(dname2);
|
||||
for (int i = 0; i < data4.datval_.size(); i++)
|
||||
{
|
||||
std::cout << data4.datval_[i] << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
60
src/mesh/mesh_ex4.cpp
Normal file
60
src/mesh/mesh_ex4.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
std::string dname = "vector-data";
|
||||
|
||||
gctl::regular_grid rgd;
|
||||
rgd.init("grid-example", "this grid can store vectors. Yeah!", 15, 10, 0.0, 0.0, 1.0, 1.0);
|
||||
|
||||
gctl::array<gctl::point3dc> init_data(rgd.get_ydim()*rgd.get_xdim());
|
||||
for (int j = 0; j < rgd.get_ydim(); j++)
|
||||
{
|
||||
for (int i = 0; i < rgd.get_xdim(); i++)
|
||||
{
|
||||
init_data[i + j*rgd.get_xdim()].x = i;
|
||||
init_data[i + j*rgd.get_xdim()].y = j;
|
||||
init_data[i + j*rgd.get_xdim()].z = i+j;
|
||||
}
|
||||
}
|
||||
|
||||
gctl::meshdata data = rgd.add_data(gctl::NodeData, dname, init_data);
|
||||
|
||||
rgd.save_binary("sample4-out");
|
||||
|
||||
gctl::regular_grid rgd2;
|
||||
rgd2.load_binary("sample4-out");
|
||||
rgd2.show_info();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
43
src/mesh/mesh_ex5.cpp
Normal file
43
src/mesh/mesh_ex5.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
gctl::regular_grid rgd;
|
||||
rgd.load_netcdf_grid("data/out/sample3-out1", gctl::ElemData, "x", "y");
|
||||
|
||||
rgd.show_info();
|
||||
|
||||
rgd.save_netcdf_grid("data/out/sample5-out", "example");
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
66
src/mesh/mesh_ex6.cpp
Normal file
66
src/mesh/mesh_ex6.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
gctl::regular_mesh_2d rg_mesh;
|
||||
rg_mesh.init("mesh-example", "this mesh can store vectors. Yeah!", 15, 10, 0.5, 0.5, 1.0, 1.0);
|
||||
|
||||
int ybnum = rg_mesh.get_ybnum();
|
||||
int xbnum = rg_mesh.get_xbnum();
|
||||
|
||||
gctl::array<gctl::point3dc> init_data(ybnum*xbnum);
|
||||
for (int j = 0; j < ybnum; j++)
|
||||
{
|
||||
for (int i = 0; i < xbnum; i++)
|
||||
{
|
||||
init_data[i + j*xbnum].x = i;
|
||||
init_data[i + j*xbnum].y = j;
|
||||
init_data[i + j*xbnum].z = i+j;
|
||||
}
|
||||
}
|
||||
|
||||
rg_mesh.add_data(gctl::ElemData, "vector-data", init_data);
|
||||
|
||||
gctl::meshdata &data2= rg_mesh.add_data(gctl::NodeData, gctl::Scalar, "double-data", 0.0);
|
||||
for (int j = 0; j < ybnum+1; j++)
|
||||
{
|
||||
for (int i = 0; i < xbnum+1; i++)
|
||||
{
|
||||
data2.datval_[i + j*(xbnum+1)] = i+j;
|
||||
}
|
||||
}
|
||||
|
||||
rg_mesh.save_gmsh_withdata("sample6-out", gctl::OverWrite);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
57
src/mesh/mesh_ex7.cpp
Normal file
57
src/mesh/mesh_ex7.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
gctl::regular_mesh_3d rg_mesh;
|
||||
rg_mesh.init("mesh-example", "this mesh can store vectors. Yeah!", 15, 10, 10, 0.5, 0.5, 0.5, 1.0, 1.0, 1.0);
|
||||
|
||||
int ybnum = rg_mesh.get_ybnum();
|
||||
int xbnum = rg_mesh.get_xbnum();
|
||||
int zbnum = rg_mesh.get_zbnum();
|
||||
|
||||
gctl::meshdata &data = rg_mesh.add_data(gctl::NodeData, gctl::Scalar, "double-data", 0.0);
|
||||
for (int k = 0; k < zbnum+1; k++)
|
||||
{
|
||||
for (int j = 0; j < ybnum+1; j++)
|
||||
{
|
||||
for (int i = 0; i < xbnum+1; i++)
|
||||
{
|
||||
data.datval_[i + j*(xbnum+1) + k*(xbnum+1)*(ybnum+1)] = i+j+k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rg_mesh.save_gmsh_withdata("sample7-out", "double-data", gctl::OverWrite);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
47
src/mesh/mesh_ex8.cpp
Normal file
47
src/mesh/mesh_ex8.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
gctl::triangle2d_mesh t_mesh;
|
||||
t_mesh.load_triangle("sample8", gctl::Packed);
|
||||
t_mesh.add_data(gctl::ElemData, gctl::Scalar, "example", 1.0);
|
||||
|
||||
t_mesh.save_gmsh_withdata("sample8-out", "example", gctl::OverWrite, gctl::NotPacked);
|
||||
t_mesh.save_binary("sample8-out");
|
||||
|
||||
gctl::triangle2d_mesh t2_mesh;
|
||||
t2_mesh.load_binary("sample8-out");
|
||||
t2_mesh.show_info();
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
65
src/mesh/mesh_ex9.cpp
Normal file
65
src/mesh/mesh_ex9.cpp
Normal file
@ -0,0 +1,65 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh.h"
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
gctl::array<double> xs(15);
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
xs[i] = i+1;
|
||||
}
|
||||
|
||||
gctl::array<double> ys(10);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
ys[i] = i+1;
|
||||
}
|
||||
|
||||
gctl::linear_mesh_2d l2d_mesh;
|
||||
l2d_mesh.init("mesh-example", "This is a linear mesh", 0.5, 0.5, xs, ys);
|
||||
|
||||
int ybnum = l2d_mesh.get_ybnum();
|
||||
int xbnum = l2d_mesh.get_xbnum();
|
||||
|
||||
gctl::meshdata &data = l2d_mesh.add_data(gctl::ElemData, gctl::Scalar, "double-data", 0.0);
|
||||
for (int j = 0; j < ybnum; j++)
|
||||
{
|
||||
for (int i = 0; i < xbnum; i++)
|
||||
{
|
||||
data.datval_[i + j*xbnum] = i+j;
|
||||
}
|
||||
}
|
||||
|
||||
l2d_mesh.save_gmsh_withdata("sample9-out", gctl::OverWrite, gctl::NotPacked);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
109
src/mesh/meshio_ex.cpp
Normal file
109
src/mesh/meshio_ex.cpp
Normal file
@ -0,0 +1,109 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh/mesh_io.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
mesh_io mshio;
|
||||
mshio.read_gmsh_v2_ascii("tmp/test");
|
||||
mshio.info();
|
||||
|
||||
array<vertex3dc> nodes;
|
||||
array<triangle> tris;
|
||||
|
||||
mshio.select_elements("Bz (pT)", NodeData);
|
||||
mshio.export_selected_to(tris, nodes);
|
||||
|
||||
//meshio_data &d = mshio.get_data("Bz (pT)", NodeData);
|
||||
//array<double> dat = d.val;
|
||||
array<double> dat1 = mshio.get_selected_data("Bx (pT)", NodeData);
|
||||
array<double> dat2 = mshio.get_selected_data("By (pT)", NodeData);
|
||||
array<double> dat3 = mshio.get_selected_data("Bz (pT)", NodeData);
|
||||
|
||||
mesh_io mshio2;
|
||||
mshio2.import_from(tris, nodes);
|
||||
mshio2.add_data("Bx (pT)", dat1, NodeData, OverWrite);
|
||||
mshio2.add_data("By (pT)", dat2, NodeData, OverWrite);
|
||||
mshio2.add_data("Bz (pT)", dat3, NodeData, OverWrite);
|
||||
mshio2.save_gmsh_v2_ascii("tmp");
|
||||
mshio2.info();
|
||||
|
||||
/*
|
||||
mshio.read_tetgen_ascii("tmp/ex1.1");
|
||||
mshio.edit_group(Disable, GeometryTag, 5);
|
||||
mshio.edit_group(GeometryTag, 1, PhysicalTag, 1);
|
||||
mshio.edit_group(GeometryTag, 2, PhysicalTag, 2);
|
||||
mshio.edit_group(GeometryTag, 3, PhysicalTag, 3);
|
||||
mshio.edit_group(GeometryTag, 4, PhysicalTag, 4);
|
||||
mshio.edit_group(GeometryTag, 1, "Boundary");
|
||||
mshio.edit_group(GeometryTag, 2, "Body1");
|
||||
mshio.edit_group(GeometryTag, 3, "Body2");
|
||||
mshio.edit_group(GeometryTag, 4, "Body3");
|
||||
mshio.save_gmsh_v2_ascii("tmp/ex1.1");
|
||||
*/
|
||||
/*
|
||||
mshio.read_gmsh_v2_ascii("tmp/ex1.1");
|
||||
mshio.convert_tags_to_data(GeometryTag);
|
||||
|
||||
array<double> body_val(mshio.element_size("Body2"), 2.0);
|
||||
mshio.add_element_data("BodyValue", "Body2", body_val);
|
||||
|
||||
array<double> body_val2(mshio.element_size("Body3"), 1.0);
|
||||
mshio.add_element_data("BodyValue", "Body3", body_val2);
|
||||
|
||||
mshio.save_gmsh_v2_ascii("tmp/ex1.2");
|
||||
//mshio.save_vtk_legacy_ascii("tmp/ex1.1");
|
||||
mshio.info();
|
||||
|
||||
const array<vertex3dc> &nodes = mshio.get_nodes();
|
||||
|
||||
array<tetrahedron> body2_tets;
|
||||
mshio.export_elements_to(body2_tets, "All");
|
||||
|
||||
gmshio gio;
|
||||
gio.init_file("tmp.msh", Output);
|
||||
gio.set_packed(NotPacked, Output);
|
||||
gio.save_mesh(body2_tets, nodes);
|
||||
*/
|
||||
/*
|
||||
mshio.read_gmsh_v2_ascii("tmp/wjb.1");
|
||||
mshio.edit_group(Disable);
|
||||
mshio.edit_group(Enable, GeometryTag, 3);
|
||||
mshio.edit_group(Enable, GeometryTag, 8);
|
||||
mshio.edit_group(Enable, GeometryTag, 9);
|
||||
|
||||
mshio.save_gmsh_v2_ascii("tmp/wjb.2");
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
55
src/mesh/tri2d_meshio_ex.cpp
Normal file
55
src/mesh/tri2d_meshio_ex.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/mesh/tri2d_mesh.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
int main(int argc, char const *argv[]) try
|
||||
{
|
||||
mesh_io mshio;
|
||||
mshio.read_gmsh_v2_ascii("tmp/tri2d");
|
||||
mshio.info();
|
||||
|
||||
array<vertex2dc> nodes;
|
||||
array<triangle2d> tris;
|
||||
|
||||
mshio.select_elements(_3NodeTriangle);
|
||||
mshio.export_selected_to(tris, nodes);
|
||||
_1d_array data = mshio.get_selected_data("Model slowness (s/km)", ElemData);
|
||||
|
||||
triangle2d_mesh tri2dmesh;
|
||||
tri2dmesh.init("Test", "This is a test.", nodes, tris);
|
||||
tri2dmesh.add_data(ElemData, "Test Data", data);
|
||||
tri2dmesh.show_info();
|
||||
tri2dmesh.save_gmsh_withdata("tri2d_out", OverWrite);
|
||||
return 0;
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
147
src/optimization/cfg_ex.cpp
Normal file
147
src/optimization/cfg_ex.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/optimization.h"
|
||||
#include "gctl/math/gaussfunc.h"
|
||||
|
||||
using namespace gctl;
|
||||
|
||||
class cfg : public lgd_solver
|
||||
{
|
||||
private:
|
||||
std::vector<gaussian_para2d> gs1_, gs2_;
|
||||
array<double> g1_, g2_;
|
||||
|
||||
common_gradient cmg_;
|
||||
|
||||
array<double> x_;
|
||||
array<double> xm_;
|
||||
array<double> xs_;
|
||||
|
||||
public:
|
||||
cfg(/* args */){}
|
||||
~cfg(){}
|
||||
|
||||
virtual double LGD_Evaluate(const array<double> &x, array<double> &g);
|
||||
void read_gaussians(std::string file, std::vector<gaussian_para2d> &gs);
|
||||
void routine(int argc, char *argv[]);
|
||||
};
|
||||
|
||||
double cfg::LGD_Evaluate(const array<double> &x, array<double> &g)
|
||||
{
|
||||
double f, fx = 0.0;
|
||||
g1_.assign(0.0);
|
||||
g2_.assign(0.0);
|
||||
|
||||
f = 0.0;
|
||||
for (int i = 0; i < gs1_.size(); i++)
|
||||
{
|
||||
f += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs1_[i]);
|
||||
g1_[0] += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs1_[i], gctl::Dx);
|
||||
g1_[1] += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs1_[i], gctl::Dy);
|
||||
}
|
||||
|
||||
cmg_.fill_model_gradient(0, f, g1_);
|
||||
fx += f;
|
||||
|
||||
f = 0.0;
|
||||
for (int i = 0; i < gs2_.size(); i++)
|
||||
{
|
||||
f += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs2_[i]);
|
||||
g2_[0] += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs2_[i], gctl::Dx);
|
||||
g2_[1] += -1e+3*gctl::gaussian_dist2d(x[0], x[1], gs2_[i], gctl::Dy);
|
||||
}
|
||||
|
||||
cmg_.fill_model_gradient(1, f, g2_);
|
||||
fx += f;
|
||||
fx += 0.666027; // 目标值
|
||||
|
||||
g = cmg_.get_common_gradient();
|
||||
return fx;
|
||||
}
|
||||
|
||||
void cfg::read_gaussians(std::string file, std::vector<gaussian_para2d> &gs)
|
||||
{
|
||||
gaussian_para2d tmp_p;
|
||||
std::string tmp_str;
|
||||
std::stringstream tmp_ss;
|
||||
|
||||
std::ifstream infile;
|
||||
gctl::open_infile(infile, file, ".txt");
|
||||
|
||||
while(getline(infile, tmp_str))
|
||||
{
|
||||
if (tmp_str[0] == '#') continue;
|
||||
else
|
||||
{
|
||||
gctl::str2ss(tmp_str, tmp_ss);
|
||||
tmp_ss >> tmp_p.mu_x >> tmp_p.mu_y >> tmp_p.sigma_x >> tmp_p.sigma_y >> tmp_p.rho;
|
||||
gs.push_back(tmp_p);
|
||||
}
|
||||
}
|
||||
infile.close();
|
||||
return;
|
||||
}
|
||||
|
||||
void cfg::routine(int argc, char *argv[])
|
||||
{
|
||||
cmg_.init(2, 2);
|
||||
g1_.resize(2);
|
||||
g2_.resize(2);
|
||||
|
||||
read_gaussians("example/data/gauss_model", gs1_);
|
||||
read_gaussians("example/data/gauss_model2", gs2_);
|
||||
|
||||
x_.resize(2, 20.0);
|
||||
xm_.resize(2, 0.0);
|
||||
xs_.resize(2, 0.0);
|
||||
array<double> low(2, 0.0);
|
||||
array<double> high(2, 100.0);
|
||||
|
||||
lgd_para para = default_lgd_para();
|
||||
para.alpha = 0.01;
|
||||
para.flight_times = 1000;
|
||||
set_lgd_para(para);
|
||||
|
||||
set_lgd_record_trace();
|
||||
LGD_Minimize(x_, xm_, xs_, low, high);
|
||||
|
||||
save_lgd_trace("trace.txt");
|
||||
std::cout << "x = (" << x_[0] << ", " << x_[1] << ")\n";
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) try
|
||||
{
|
||||
cfg c;
|
||||
c.routine(argc, argv);
|
||||
return 0;
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
GCTL_ShowWhatError(e.what(), GCTL_ERROR_ERROR, 0, 0, 0);
|
||||
}
|
174
src/optimization/ex1.cpp
Normal file
174
src/optimization/ex1.cpp
Normal file
@ -0,0 +1,174 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/optimization/lcg.h"
|
||||
#include "gctl/graphic/gnuplot.h"
|
||||
|
||||
#define M 1000
|
||||
#define N 800
|
||||
|
||||
double max_diff(const gctl::array<double> &a, const gctl::array<double> &b)
|
||||
{
|
||||
double max = -1.0;
|
||||
for (size_t i = 0; i < a.size(); i++)
|
||||
{
|
||||
max = std::max(sqrt((a[i] - b[i])*(a[i] - b[i])), max);
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
class ex1 : public gctl::lcg_solver
|
||||
{
|
||||
public:
|
||||
ex1();
|
||||
virtual ~ex1();
|
||||
|
||||
// 计算共轭梯度的B项
|
||||
void cal_partb(const gctl::array<double> &x, gctl::array<double> &B);
|
||||
|
||||
//定义共轭梯度中Ax的算法
|
||||
virtual void LCG_Ax(const gctl::array<double> &x, gctl::array<double> &ax);
|
||||
virtual void LCG_Mx(const gctl::array<double> &x, gctl::array<double> &mx);
|
||||
|
||||
private:
|
||||
gctl::matrix<double> kernel; // 普通二维数组做核矩阵
|
||||
gctl::array<double> tmp_arr; // 中间结果数组
|
||||
gctl::array<double> p; // 预优矩阵
|
||||
};
|
||||
|
||||
ex1::ex1()
|
||||
{
|
||||
kernel.resize(M, N);
|
||||
kernel.random_float(-1.0, 1.0, gctl::RdUniform);
|
||||
|
||||
tmp_arr.resize(M);
|
||||
p.resize(N);
|
||||
for (size_t i = 0; i < N; i++)
|
||||
{
|
||||
p[i] = 1.0;
|
||||
}
|
||||
|
||||
double diag;
|
||||
for (size_t i = 0; i < N; i++)
|
||||
{
|
||||
diag = 0.0;
|
||||
for (size_t j = 0; j < M; j++)
|
||||
{
|
||||
diag += kernel[j][i]*kernel[j][i];
|
||||
}
|
||||
p[i] = 1.0/diag;
|
||||
}
|
||||
}
|
||||
|
||||
ex1::~ex1(){}
|
||||
|
||||
void ex1::cal_partb(const gctl::array<double> &x, gctl::array<double> &B)
|
||||
{
|
||||
LCG_Ax(x, B);
|
||||
return;
|
||||
}
|
||||
|
||||
void ex1::LCG_Ax(const gctl::array<double> &x, gctl::array<double> &ax)
|
||||
{
|
||||
matvec(tmp_arr, kernel, x);
|
||||
matvec(ax, kernel, tmp_arr, gctl::Trans);
|
||||
return;
|
||||
}
|
||||
|
||||
void ex1::LCG_Mx(const gctl::array<double> &x, gctl::array<double> &mx)
|
||||
{
|
||||
vecmul(mx, p, x);
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
// 生成一组正演解
|
||||
gctl::array<double> fm(N);
|
||||
fm.random_float(1.0, 2.0, gctl::RdUniform);
|
||||
|
||||
ex1 test;
|
||||
|
||||
// 计算共轭梯度B项
|
||||
gctl::array<double> B(N);
|
||||
test.cal_partb(fm, B);
|
||||
|
||||
// 声明一组解
|
||||
gctl::array<double> m(N, 0.0);
|
||||
|
||||
test.set_lcg_message(gctl::LCG_SOLUTION);
|
||||
|
||||
std::ofstream ofile("log.txt");
|
||||
test.LCG_Minimize(m, B, gctl::LCG_CG, ofile);
|
||||
ofile << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
|
||||
test.save_convergence("convergence");
|
||||
gctl::gnuplot gt;
|
||||
gt.to_buffer();
|
||||
gt.send("set terminal png size 800,600");
|
||||
gt.send("set output \"convergence.png\"");
|
||||
gt.send("plot \"convergence.txt\" using 1:2 with lines");
|
||||
gt.send("set output");
|
||||
gt.send_buffer();
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_Minimize(m, B, gctl::LCG_PCG, ofile);
|
||||
ofile << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_Minimize(m, B, gctl::LCG_CGS, ofile);
|
||||
ofile << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
ofile.close();
|
||||
|
||||
test.set_lcg_message(gctl::LCG_SOLUTION);
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_Minimize(m, B, gctl::LCG_BICGSTAB);
|
||||
std::clog << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_Minimize(m, B, gctl::LCG_BICGSTAB2);
|
||||
std::clog << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
|
||||
gctl::array<double> low(N, 1.0);
|
||||
gctl::array<double> hig(N, 2.0);
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_MinimizeConstrained(m, B, low, hig, gctl::LCG_PG);
|
||||
std::clog << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
|
||||
m.assign(0.0);
|
||||
|
||||
test.LCG_MinimizeConstrained(m, B, low, hig, gctl::LCG_SPG);
|
||||
std::clog << "maximal difference: " << max_diff(fm, m) << std::endl;
|
||||
return 0;
|
||||
}
|
64
src/optimization/ex10.cpp
Normal file
64
src/optimization/ex10.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include "../lib/optimization.h"
|
||||
#include "gctl/core.h"
|
||||
#include "gctl/algorithms.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::setw;
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
gctl::matrix<double> A(4, 3);
|
||||
for (int i = 0; i < A.row_size(); i++)
|
||||
{
|
||||
for (int j = 0; j < A.col_size(); j++)
|
||||
{
|
||||
A[i][j] = 3*(i+1) + j - 2;
|
||||
}
|
||||
}
|
||||
A[3][1] = 1;
|
||||
|
||||
gctl::array<double> x(3), y(3), m(3);
|
||||
x.random_float(-1.0, 1.0, gctl::RdUniform, 452);
|
||||
gctl::matvec(y, A, x);
|
||||
|
||||
cout<<"A(" << A.row_size() << ", " << A.col_size() << ") = " <<endl;
|
||||
A.show();
|
||||
|
||||
gctl::svd svdd;
|
||||
svdd.decompose(A);
|
||||
svdd.solve(y, m);
|
||||
|
||||
cout << "x = "; x.show();
|
||||
cout << "m = "; m.show();
|
||||
return 0;
|
||||
}
|
179
src/optimization/ex2.cpp
Normal file
179
src/optimization/ex2.cpp
Normal file
@ -0,0 +1,179 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/optimization.h"
|
||||
|
||||
#define M 90
|
||||
#define N 100
|
||||
|
||||
// get random floating points
|
||||
double random_double(double l, double t)
|
||||
{
|
||||
return (t-l)*rand()*1.0/RAND_MAX + l;
|
||||
}
|
||||
|
||||
// get random integral numbers
|
||||
int random_int(int small, int big)
|
||||
{
|
||||
return (rand() % (big - small)) + small;
|
||||
}
|
||||
|
||||
class ex2 : public gctl::lgd_solver
|
||||
{
|
||||
protected:
|
||||
gctl::matrix<double> kernel;
|
||||
gctl::array<double> obs, tmp;
|
||||
|
||||
protected:
|
||||
double LGD_Evaluate(const gctl::array<double> &x, gctl::array<double> &g);
|
||||
|
||||
public:
|
||||
ex2();
|
||||
virtual ~ex2(){}
|
||||
|
||||
void CalObs(const gctl::array<double> &x);
|
||||
};
|
||||
|
||||
ex2::ex2()
|
||||
{
|
||||
kernel.resize(M, N);
|
||||
tmp.resize(M);
|
||||
obs.resize(M);
|
||||
|
||||
srand(time(0));
|
||||
// 添加一些大数
|
||||
int tmp_id, tmp_size;
|
||||
double tmp_val;
|
||||
for (int i = 0; i < M; i++)
|
||||
{
|
||||
tmp_size = random_int(25, 35);
|
||||
for (int j = 0; j < tmp_size; j++)
|
||||
{
|
||||
tmp_id = random_int(0, N);
|
||||
tmp_val = random_double(-10, 10);
|
||||
|
||||
kernel[i][tmp_id] = tmp_val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double ex2::LGD_Evaluate(const gctl::array<double> &x, gctl::array<double> &g)
|
||||
{
|
||||
for (int i = 0; i < M; i++)
|
||||
{
|
||||
tmp[i] = 0.0;
|
||||
for (int j = 0; j < N; j++)
|
||||
{
|
||||
tmp[i] += kernel[i][j] * x[j];
|
||||
}
|
||||
tmp[i] -= obs[i];
|
||||
//tmp[i] /= 1e-1;
|
||||
}
|
||||
|
||||
for (int j = 0; j < N; j++)
|
||||
{
|
||||
g[j] = 0.0;
|
||||
for (int i = 0; i < M; i++)
|
||||
{
|
||||
g[j] += kernel[i][j]*tmp[i];
|
||||
}
|
||||
g[j] *= 2.0/M;
|
||||
}
|
||||
|
||||
double sum = 0.0;
|
||||
for (int i = 0; i < M; i++)
|
||||
{
|
||||
sum += tmp[i]*tmp[i];
|
||||
}
|
||||
return sum/M;
|
||||
}
|
||||
|
||||
void ex2::CalObs(const gctl::array<double> &x)
|
||||
{
|
||||
// 计算正演值
|
||||
for (int i = 0; i < M; i++)
|
||||
{
|
||||
obs[i] = 0.0;
|
||||
for (int j = 0; j < N; j++)
|
||||
{
|
||||
obs[i] += kernel[i][j]*x[j];
|
||||
}
|
||||
// 添加噪声
|
||||
obs[i] += random_double(-1e-3, 1e-3);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
gctl::array<double> m(N, 0.0), mean_m(N, 0.0), stddev_m(N, 0.0), low(N), hig(N);
|
||||
|
||||
// 生成一组正演解 包含一些大值和一些小值
|
||||
gctl::array<double> fm(N);
|
||||
int N2 = (int) N/2;
|
||||
|
||||
srand(time(0));
|
||||
for (int i = 0; i < N2; i++)
|
||||
{
|
||||
fm[i] = random_double(5, 10);
|
||||
//fm[i] = 10.0;
|
||||
}
|
||||
|
||||
for (int i = N2; i < N; i++)
|
||||
{
|
||||
fm[i] = random_double(1, 2);
|
||||
//fm[i] = 1.0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < N2; i++)
|
||||
{
|
||||
low[i] = 4.0; // 对解的范围进行约束
|
||||
hig[i] = 11.0;
|
||||
}
|
||||
|
||||
for (int i = N2; i < N; i++)
|
||||
{
|
||||
low[i] = 0.0;
|
||||
hig[i] = 3.0;
|
||||
}
|
||||
|
||||
ex2 e;
|
||||
e.CalObs(fm);
|
||||
|
||||
gctl::lgd_para my_para = e.default_lgd_para();
|
||||
my_para.flight_times = 20000;
|
||||
my_para.batch = 100;
|
||||
my_para.fmt = 0.5;
|
||||
my_para.smt = 0.05;
|
||||
e.set_lgd_para(my_para);
|
||||
e.LGD_Minimize(m, mean_m, stddev_m, low, hig);
|
||||
|
||||
for (int i = 0; i < N; i++)
|
||||
{
|
||||
std::cout << fm[i] << " " << m[i] << " " << mean_m[i] << " " << stddev_m[i] << " " << fabs(mean_m[i] - fm[i]) << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
69
src/optimization/ex3.cpp
Normal file
69
src/optimization/ex3.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
#include "../lib/optimization.h"
|
||||
|
||||
class TEST_FUNC : public gctl::lbfgs_solver
|
||||
{
|
||||
public:
|
||||
TEST_FUNC();
|
||||
~TEST_FUNC();
|
||||
|
||||
virtual double LBFGS_Evaluate(const gctl::array<double> &x, gctl::array<double> &g);
|
||||
|
||||
void Routine();
|
||||
|
||||
private:
|
||||
gctl::array<double> m_x;
|
||||
};
|
||||
|
||||
TEST_FUNC::TEST_FUNC()
|
||||
{
|
||||
m_x.resize(3, 0.0);
|
||||
}
|
||||
|
||||
TEST_FUNC::~TEST_FUNC(){}
|
||||
|
||||
// test functions
|
||||
// 3 = 3*x1 + x2 + 2*x3*x3
|
||||
// 1 = -3*x1 + 5*x2*x2 + 2*x1*x3
|
||||
// -12 = 25*x1*x2 + 20*x3
|
||||
double TEST_FUNC::LBFGS_Evaluate(const gctl::array<double> &x, gctl::array<double> &g)
|
||||
{
|
||||
double f0,f1,f2,temp;
|
||||
f0 = 3*x[0] + x[1] + 2*x[2]*x[2] - 3.012; //这里添加一点噪声
|
||||
f1 = -3*x[0] + 5*x[1]*x[1] + 2*x[0]*x[2] - 1.04252;
|
||||
f2 = 25*x[0]*x[1] + 20*x[2] + 12.12479;
|
||||
temp = sqrt(f0*f0+f1*f1+f2*f2);
|
||||
|
||||
g[0] = 0.5*(6*f0+2*f1*(2*x[2]-3)+50*f2*x[1])/temp;
|
||||
g[1] = 0.5*(2*f0+20*f1*x[1]+50*f2*x[0])/temp;
|
||||
g[2] = 0.5*(8*f0*x[2]+4*f1*x[0]+40*f2)/temp;
|
||||
return temp;
|
||||
}
|
||||
|
||||
void TEST_FUNC::Routine()
|
||||
{
|
||||
gctl::lbfgs_para self_para = default_lbfgs_para();
|
||||
self_para.m = 10;
|
||||
self_para.past = 5;
|
||||
self_para.residual = 1e-10;
|
||||
//self_para.min_step = 1e-30;
|
||||
//self_para.max_linesearch = 40;
|
||||
//self_para.linesearch = gctl::LBFGS_LINESEARCH_BACKTRACKING_WOLFE;
|
||||
|
||||
set_lbfgs_para(self_para);
|
||||
|
||||
std::ofstream ofile("log.txt");
|
||||
show_lbfgs_para(ofile);
|
||||
|
||||
double fx = LBFGS_Minimize(m_x, ofile);
|
||||
ofile.close();
|
||||
|
||||
m_x.show();
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
TEST_FUNC test;
|
||||
test.Routine();
|
||||
return 0;
|
||||
}
|
91
src/optimization/ex4.cpp
Normal file
91
src/optimization/ex4.cpp
Normal file
@ -0,0 +1,91 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include "../lib/optimization.h"
|
||||
#include "gctl/core.h"
|
||||
#include "gctl/algorithms.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::setw;
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
gctl::matrix<double> A(4, 3);
|
||||
for (int i = 0; i < A.row_size(); i++)
|
||||
{
|
||||
for (int j = 0; j < A.col_size(); j++)
|
||||
{
|
||||
A[i][j] = 3*(i+1) + j - 2;
|
||||
}
|
||||
}
|
||||
A[3][1] = 1;
|
||||
|
||||
cout<<"A(" << A.row_size() << ", " << A.col_size() << ") = " <<endl;
|
||||
A.show();
|
||||
|
||||
gctl::svd svdd;
|
||||
svdd.decompose(A);
|
||||
|
||||
cout<<"U(" << svdd.U.row_size() << ", " << svdd.U.col_size() << ") = " <<endl;
|
||||
svdd.U.show();
|
||||
|
||||
cout<<"S(" << svdd.S.size() << ") = " << endl;
|
||||
svdd.S.show();
|
||||
|
||||
cout<<"V(" << svdd.V.row_size() << ", " << svdd.V.col_size() << ") = " <<endl;
|
||||
svdd.V.show();
|
||||
|
||||
int sig_num = svdd.get_singular_number();
|
||||
double tmp_d;
|
||||
gctl::array<double> tmp(sig_num);
|
||||
|
||||
cout<<"U^T * S * V(" << A.row_size() << ", " << A.col_size() << ") = " <<endl;
|
||||
for(int i=0;i<A.row_size();i++)
|
||||
{
|
||||
for (int k = 0; k < sig_num; k++)
|
||||
{
|
||||
tmp[k] = svdd.U[k][i] * svdd.S[k];
|
||||
}
|
||||
|
||||
for(int j=0;j<A.col_size();j++)
|
||||
{
|
||||
tmp_d = 0.0;
|
||||
for (int k = 0; k < sig_num; k++)
|
||||
{
|
||||
tmp_d += tmp[k] * svdd.V[k][j];
|
||||
}
|
||||
cout<<setw(12)<<tmp_d<<' ';
|
||||
}
|
||||
cout<<endl;
|
||||
}
|
||||
cout<<endl;
|
||||
|
||||
return 0;
|
||||
}
|
78
src/optimization/ex5.cpp
Normal file
78
src/optimization/ex5.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
/********************************************************
|
||||
* ██████╗ ██████╗████████╗██╗
|
||||
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
||||
* ██║ ███╗██║ ██║ ██║
|
||||
* ██║ ██║██║ ██║ ██║
|
||||
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
||||
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
||||
* Geophysical Computational Tools & Library (GCTL)
|
||||
*
|
||||
* Copyright (c) 2022 Yi Zhang (yizhang-geo@zju.edu.cn)
|
||||
*
|
||||
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
||||
* it and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation, either version 2
|
||||
* of the License, or (at your option) any later version. You should have
|
||||
* received a copy of the GNU Lesser General Public License along with this
|
||||
* program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
||||
* the GCTL, please consider the option to obtain a commercial license for a
|
||||
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
||||
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
||||
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
||||
* to include some description of your company and the realm of its activities.
|
||||
* Also add information on how to contact you by electronic and paper mail.
|
||||
******************************************************/
|
||||
|
||||
#include "../lib/optimization.h"
|
||||
#include "gctl/core.h"
|
||||
#include "gctl/algorithms.h"
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
gctl::matrix<double> A(5, 5);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
A[i][j] = 3*(i+1) + j - 2;
|
||||
}
|
||||
}
|
||||
// 注意A要满秩
|
||||
A[1][2] = 3.4;
|
||||
A[4][1] = 2.1;
|
||||
A[3][4] = 9.7;
|
||||
A[2][3] = 2.7;
|
||||
|
||||
std::cout<<"A(5, 5) = " <<std::endl;
|
||||
for(int i=0;i<5;i++){
|
||||
for(int j=0;j<5;j++){
|
||||
std::cout<<A[i][j]<<' ';
|
||||
}
|
||||
std::cout<<std::endl;
|
||||
}
|
||||
std::cout<<std::endl;
|
||||
|
||||
gctl::array<double> m(5, 0.5), x(5, 0.0);
|
||||
gctl::array<double> B(5);
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
B[i] = 0.0;
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
B[i] += A[i][j] * m[j];
|
||||
}
|
||||
}
|
||||
|
||||
gctl::lu glu(A);
|
||||
glu.decompose();
|
||||
glu.solve(B, x);
|
||||
|
||||
for (size_t i = 0; i < 5; i++)
|
||||
{
|
||||
std::cout << m[i] << " " << x[i] << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user