Compare commits
No commits in common. "master" and "multipleSimulationScenarios" have entirely different histories.
master
...
multipleSi
|
|
@ -15,14 +15,7 @@ else()
|
||||||
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
|
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(EXTERNAL_DEPS_DIR "/home/iason/Coding/build/external dependencies")
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
||||||
set(EXTERNAL_DEPS_DIR "C:/Users/iason/Downloads/ReducedModelOptimization/build/externalDependencies/")
|
|
||||||
else()
|
|
||||||
set(EXTERNAL_DEPS_DIR "/home/iason/Coding/build/external dependencies/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##Create directory for the external libraries
|
##Create directory for the external libraries
|
||||||
file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 5
|
||||||
|
3 6
|
||||||
|
5 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 6
|
||||||
|
3 6
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 5
|
||||||
|
2 5
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 5
|
||||||
|
2 3
|
||||||
|
2 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 5
|
||||||
|
1 6
|
||||||
|
3 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 6
|
||||||
|
3 4
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 6
|
||||||
|
3 4
|
||||||
|
3 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 4
|
||||||
|
1 5
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 4
|
||||||
|
1 5
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 3
|
||||||
|
3 6
|
||||||
|
5 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 3
|
||||||
|
1 6
|
||||||
|
5 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 3
|
||||||
|
1 5
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 3
|
||||||
|
1 4
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 5
|
||||||
|
3 4
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
2 5
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
2 5
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
2 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 5
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 5
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 4
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 4
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 3
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 2
|
||||||
|
1 3
|
||||||
|
1 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
3 4
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
2 6
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 4
|
||||||
|
3 6
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
2 3
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
2 3
|
||||||
|
2 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
1 3
|
||||||
|
5 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 6
|
||||||
|
1 3
|
||||||
|
1 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 4
|
||||||
|
2 6
|
||||||
|
3 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 3
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 3
|
||||||
|
1 3
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 3
|
||||||
|
0 6
|
||||||
|
3 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
3 6
|
||||||
|
5 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
2 5
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 3
|
||||||
|
3 6
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
2 3
|
||||||
|
2 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 6
|
||||||
|
3 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 5
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 4
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 4
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 3
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 3
|
||||||
|
1 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 2
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
0 3
|
||||||
|
3 5
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0 1
|
||||||
|
0 3
|
||||||
|
1 3
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 3
|
||||||
|
2 6
|
||||||
|
4 6
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
2 3
|
||||||
|
2 4
|
||||||
|
3 4
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 3
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 6
|
||||||
|
3 6
|
||||||
|
5 6
|
||||||
|
|
@ -11,7 +11,7 @@ property uchar blue
|
||||||
property uchar alpha
|
property uchar alpha
|
||||||
element face 0
|
element face 0
|
||||||
property list uchar int vertex_indices
|
property list uchar int vertex_indices
|
||||||
element edge 1
|
element edge 2
|
||||||
property int vertex1
|
property int vertex1
|
||||||
property int vertex2
|
property int vertex2
|
||||||
end_header
|
end_header
|
||||||
|
|
@ -21,5 +21,6 @@ end_header
|
||||||
0 -0.8660254037844387 0 255 255 255 255
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
0 -0.3333333 0 255 255 255 255
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
0 3
|
1 5
|
||||||
|
3 1
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
ply
|
||||||
|
format ascii 1.0
|
||||||
|
comment VCGLIB generated
|
||||||
|
element vertex 7
|
||||||
|
property double x
|
||||||
|
property double y
|
||||||
|
property double z
|
||||||
|
property uchar red
|
||||||
|
property uchar green
|
||||||
|
property uchar blue
|
||||||
|
property uchar alpha
|
||||||
|
element face 0
|
||||||
|
property list uchar int vertex_indices
|
||||||
|
element edge 2
|
||||||
|
property int vertex1
|
||||||
|
property int vertex2
|
||||||
|
end_header
|
||||||
|
0 0 0 255 255 255 255
|
||||||
|
-0.1666666666666666 -0.2886751345948129 0 255 255 255 255
|
||||||
|
-0.3333333333333333 -0.5773502691896257 0 255 255 255 255
|
||||||
|
0 -0.8660254037844387 0 255 255 255 255
|
||||||
|
0.3333333333333333 -0.5773502691896258 0 255 255 255 255
|
||||||
|
0.1666666666666666 -0.288675134594813 0 255 255 255 255
|
||||||
|
0.1 -0.5773502691896258 0 255 255 255 255
|
||||||
|
1 5
|
||||||
|
3 5
|
||||||
107
src/main.cpp
107
src/main.cpp
|
|
@ -30,11 +30,13 @@ int main(int argc, char *argv[]) {
|
||||||
////Full pattern
|
////Full pattern
|
||||||
const std::string filepath_fullPattern = argv[1];
|
const std::string filepath_fullPattern = argv[1];
|
||||||
PatternGeometry fullPattern(filepath_fullPattern);
|
PatternGeometry fullPattern(filepath_fullPattern);
|
||||||
// fullPattern.prependToLabel(std::to_string(fullPattern.EN()) + "#");
|
fullPattern.setLabel(
|
||||||
|
std::filesystem::path(filepath_fullPattern).stem().string());
|
||||||
fullPattern.scale(0.03,interfaceNodeIndex);
|
fullPattern.scale(0.03,interfaceNodeIndex);
|
||||||
////Reduced pattern
|
////Reduced pattern
|
||||||
const std::string filepath_reducedPattern = argv[2];
|
const std::string filepath_reducedPattern = argv[2];
|
||||||
PatternGeometry reducedPattern(filepath_reducedPattern);
|
PatternGeometry reducedPattern(filepath_reducedPattern);
|
||||||
|
reducedPattern.setLabel(std::filesystem::path(filepath_reducedPattern).stem().string());
|
||||||
reducedPattern.scale(0.03, interfaceNodeIndex);
|
reducedPattern.scale(0.03, interfaceNodeIndex);
|
||||||
|
|
||||||
// Set the optization settings
|
// Set the optization settings
|
||||||
|
|
@ -53,88 +55,69 @@ int main(int argc, char *argv[]) {
|
||||||
input_numberOfFunctionCallsDefined ? std::atoi(argv[3]) : 100;
|
input_numberOfFunctionCallsDefined ? std::atoi(argv[3]) : 100;
|
||||||
settings_optimization.normalizationStrategy
|
settings_optimization.normalizationStrategy
|
||||||
= ReducedPatternOptimization::Settings::NormalizationStrategy::Epsilon;
|
= ReducedPatternOptimization::Settings::NormalizationStrategy::Epsilon;
|
||||||
|
|
||||||
settings_optimization.normalizationParameter = 0.0003;
|
settings_optimization.normalizationParameter = 0.0003;
|
||||||
settings_optimization.solverAccuracy = 0.001;
|
settings_optimization.solutionAccuracy = 0.001;
|
||||||
settings_optimization.objectiveWeights.translational = std::atof(argv[4]);
|
settings_optimization.objectiveWeights.translational = std::atof(argv[4]);
|
||||||
settings_optimization.objectiveWeights.rotational = 2 - std::atof(argv[4]);
|
settings_optimization.objectiveWeights.rotational = 2 - std::atof(argv[4]);
|
||||||
|
|
||||||
// Optimize pair
|
// Optimize pair
|
||||||
const std::string pairName = fullPattern.getLabel() + "@" + reducedPattern.getLabel();
|
const std::string pairName =
|
||||||
const std::string optimizationName = pairName + "("
|
fullPattern.getLabel() + "@" + reducedPattern.getLabel();
|
||||||
+ std::to_string(settings_optimization.numberOfFunctionCalls)
|
|
||||||
+ "_"
|
|
||||||
+ to_string_with_precision(
|
|
||||||
settings_optimization.objectiveWeights.translational)
|
|
||||||
+ ")";
|
|
||||||
const bool input_resultDirectoryDefined = argc >= 6;
|
|
||||||
const std::string optimizationResultsDirectory = input_resultDirectoryDefined
|
|
||||||
? argv[5]
|
|
||||||
: std::filesystem::current_path().append(
|
|
||||||
"OptimizationResults").string();
|
|
||||||
std::string resultsOutputDir;
|
|
||||||
bool optimizationResultFolderExists = false;
|
|
||||||
const std::filesystem::path crashedJobsDirPath(std::filesystem::path(optimizationResultsDirectory)
|
|
||||||
.append("CrashedJobs")
|
|
||||||
.append(optimizationName));
|
|
||||||
if (std::filesystem::exists(crashedJobsDirPath)) {
|
|
||||||
resultsOutputDir = crashedJobsDirPath.string();
|
|
||||||
optimizationResultFolderExists = true;
|
|
||||||
}
|
|
||||||
const std::filesystem::path convergedJobsDirPath(
|
|
||||||
std::filesystem::path(optimizationResultsDirectory)
|
|
||||||
.append("ConvergedJobs")
|
|
||||||
.append(optimizationName));
|
|
||||||
if (std::filesystem::exists(convergedJobsDirPath)) {
|
|
||||||
resultsOutputDir = convergedJobsDirPath.string();
|
|
||||||
optimizationResultFolderExists = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReducedPatternOptimization::Results optimizationResults;
|
|
||||||
bool optimizationAlreadyComputed = optimizationResultFolderExists;
|
|
||||||
// bool optimizationAlreadyComputed = false;
|
|
||||||
// if (optimizationResultFolderExists) {
|
|
||||||
// const bool resultsWereSuccessfullyLoaded = optimizationResults.load(resultsOutputDir);
|
|
||||||
// if (resultsWereSuccessfullyLoaded && optimizationResults.settings == settings_optimization) {
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!optimizationAlreadyComputed) {
|
|
||||||
auto start = std::chrono::system_clock::now();
|
|
||||||
const std::vector<size_t> numberOfNodesPerSlot{1, 0, 0, 2, 1, 2, 1};
|
const std::vector<size_t> numberOfNodesPerSlot{1, 0, 0, 2, 1, 2, 1};
|
||||||
assert(interfaceNodeIndex==numberOfNodesPerSlot[0]+numberOfNodesPerSlot[3]);
|
assert(interfaceNodeIndex==numberOfNodesPerSlot[0]+numberOfNodesPerSlot[3]);
|
||||||
ReducedModelOptimizer optimizer(numberOfNodesPerSlot);
|
ReducedModelOptimizer optimizer(numberOfNodesPerSlot);
|
||||||
optimizer.initializePatterns(fullPattern,
|
optimizer.initializePatterns(fullPattern, reducedPattern, settings_optimization.xRanges.size());
|
||||||
reducedPattern,
|
ReducedPatternOptimization::Results optimizationResults
|
||||||
settings_optimization.xRanges.size());
|
// = optimizer.optimize(
|
||||||
optimizer.optimize(settings_optimization, optimizationResults);
|
// settings_optimization);
|
||||||
optimizationResults.label = optimizationName;
|
= optimizer.optimize(settings_optimization);
|
||||||
optimizationResults.baseTriangleFullPattern.copy(fullPattern);
|
|
||||||
optimizationResults.settings = settings_optimization;
|
|
||||||
auto end = std::chrono::system_clock::now();
|
|
||||||
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
|
||||||
optimizationResults.time = elapsed.count() / 1000.0;
|
|
||||||
|
|
||||||
if (optimizationResults.wasSuccessful) {
|
// Export results
|
||||||
|
const bool input_resultDirectoryDefined = argc >= 6;
|
||||||
|
std::string optimizationResultsDirectory = input_resultDirectoryDefined
|
||||||
|
? argv[5]
|
||||||
|
: std::filesystem::current_path().append(
|
||||||
|
"OptimizationResults");
|
||||||
|
std::string resultsOutputDir;
|
||||||
|
if (optimizationResults.numberOfSimulationCrashes != 0) {
|
||||||
|
const auto crashedJobsDirPath = std::filesystem::path(
|
||||||
|
optimizationResultsDirectory.append("CrashedJobs")
|
||||||
|
.append(
|
||||||
|
pairName + "(" + std::to_string(settings_optimization.numberOfFunctionCalls) + "_"
|
||||||
|
+ to_string_with_precision(settings_optimization.objectiveWeights.translational)
|
||||||
|
+ ")"));
|
||||||
|
std::filesystem::create_directories(crashedJobsDirPath);
|
||||||
|
resultsOutputDir = crashedJobsDirPath.string();
|
||||||
|
} else {
|
||||||
|
std::filesystem::path convergedJobsDirPath(
|
||||||
|
std::filesystem::path(optimizationResultsDirectory)
|
||||||
|
.append("ConvergedJobs")
|
||||||
|
.append(
|
||||||
|
pairName + "(" + std::to_string(settings_optimization.numberOfFunctionCalls) + "_"
|
||||||
|
+ to_string_with_precision(settings_optimization.objectiveWeights.translational)
|
||||||
|
+ ")"));
|
||||||
|
std::filesystem::create_directories(convergedJobsDirPath);
|
||||||
resultsOutputDir = convergedJobsDirPath.string();
|
resultsOutputDir = convergedJobsDirPath.string();
|
||||||
|
}
|
||||||
|
optimizationResults.save(resultsOutputDir);
|
||||||
|
// Write results in csv
|
||||||
csvFile csv_results({}, false);
|
csvFile csv_results({}, false);
|
||||||
// csvFile csv_results(std::filesystem::path(resultsOutputDir).append("optimizationDistances.csv"), false);
|
// csvFile csv_results(std::filesystem::path(dirPath_thisOptimization)
|
||||||
|
// .append("results.csv")
|
||||||
|
// .string(),
|
||||||
|
// false);
|
||||||
csv_results << "Name";
|
csv_results << "Name";
|
||||||
optimizationResults.writeHeaderTo(csv_results);
|
optimizationResults.writeHeaderTo(csv_results);
|
||||||
settings_optimization.writeHeaderTo(csv_results);
|
settings_optimization.writeHeaderTo(csv_results);
|
||||||
csv_results << endrow;
|
csv_results << endrow;
|
||||||
csv_results << std::to_string(fullPattern.EN()) + "#" + pairName;
|
csv_results << pairName;
|
||||||
optimizationResults.writeResultsTo(settings_optimization, csv_results);
|
optimizationResults.writeResultsTo(settings_optimization, csv_results);
|
||||||
settings_optimization.writeSettingsTo(csv_results);
|
settings_optimization.writeSettingsTo(csv_results);
|
||||||
csv_results << endrow;
|
csv_results << endrow;
|
||||||
} else {
|
|
||||||
resultsOutputDir = crashedJobsDirPath.string();
|
|
||||||
}
|
|
||||||
optimizationResults.save(resultsOutputDir, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
#ifdef POLYSCOPE_DEFINED
|
||||||
// optimizationResults.saveMeshFiles();
|
optimizationResults.saveMeshFiles();
|
||||||
optimizationResults.draw();
|
optimizationResults.draw();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#include "trianglepatterngeometry.hpp"
|
#include "trianglepatterngeometry.hpp"
|
||||||
#include "trianglepattterntopology.hpp"
|
#include "trianglepattterntopology.hpp"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
using namespace ReducedPatternOptimization;
|
using namespace ReducedPatternOptimization;
|
||||||
|
|
||||||
|
|
@ -38,8 +37,6 @@ struct GlobalOptimizationVariables {
|
||||||
constructScenarioFunction;
|
constructScenarioFunction;
|
||||||
FullPatternVertexIndex interfaceViForComputingScenarioError;
|
FullPatternVertexIndex interfaceViForComputingScenarioError;
|
||||||
double desiredMaxDisplacementValue;
|
double desiredMaxDisplacementValue;
|
||||||
double desiredMaxRotationAngle;
|
|
||||||
std::string currentScenarioName;
|
|
||||||
} global;
|
} global;
|
||||||
|
|
||||||
double ReducedModelOptimizer::computeDisplacementError(
|
double ReducedModelOptimizer::computeDisplacementError(
|
||||||
|
|
@ -191,17 +188,15 @@ double ReducedModelOptimizer::objective(long n, const double *x) {
|
||||||
global.translationalDisplacementNormalizationValues[simulationScenarioIndex],
|
global.translationalDisplacementNormalizationValues[simulationScenarioIndex],
|
||||||
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]);
|
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]);
|
||||||
}
|
}
|
||||||
#ifdef POLYSCOPE_DEFINED
|
//#ifdef POLYSCOPE_DEFINED
|
||||||
// std::cout << reducedJob->getLabel() << " sim error:" << simulationScenarioError
|
// std::cout << "sim error:" << simulationScenarioError << std::endl;
|
||||||
// << std::endl;
|
// global.reducedPatternSimulationJobs[simulationScenarioIndex]->pMesh->registerForDrawing(
|
||||||
// reducedJob->pMesh->registerForDrawing(Colors::reducedInitial);
|
// ReducedModelOptimization::Colors::reducedInitial);
|
||||||
// reducedModelResults.registerForDrawing(Colors::reducedDeformed);
|
// reducedModelResults.registerForDrawing(
|
||||||
// global.fullPatternResults[simulationScenarioIndex].registerForDrawing(
|
// ReducedModelOptimization::Colors::reducedDeformed);
|
||||||
// Colors::fullDeformed);
|
|
||||||
// polyscope::show();
|
// polyscope::show();
|
||||||
// reducedModelResults.unregister();
|
// reducedModelResults.unregister();
|
||||||
// global.fullPatternResults[simulationScenarioIndex].unregister();
|
//#endif
|
||||||
#endif
|
|
||||||
// if (global.optimizationSettings.normalizationStrategy !=
|
// if (global.optimizationSettings.normalizationStrategy !=
|
||||||
// NormalizationStrategy::Epsilon &&
|
// NormalizationStrategy::Epsilon &&
|
||||||
// simulationScenarioError > 1) {
|
// simulationScenarioError > 1) {
|
||||||
|
|
@ -241,9 +236,7 @@ double ReducedModelOptimizer::objective(long n, const double *x) {
|
||||||
}
|
}
|
||||||
#ifdef POLYSCOPE_DEFINED
|
#ifdef POLYSCOPE_DEFINED
|
||||||
++global.numberOfFunctionCalls;
|
++global.numberOfFunctionCalls;
|
||||||
if (global.optimizationSettings.numberOfFunctionCalls >= 100
|
if (global.numberOfFunctionCalls % 1000 == 0) {
|
||||||
&& global.numberOfFunctionCalls % (global.optimizationSettings.numberOfFunctionCalls / 100)
|
|
||||||
== 0) {
|
|
||||||
std::cout << "Number of function calls:" << global.numberOfFunctionCalls << std::endl;
|
std::cout << "Number of function calls:" << global.numberOfFunctionCalls << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -275,14 +268,14 @@ void ReducedModelOptimizer::createSimulationMeshes(
|
||||||
pFullPatternSimulationMesh = std::make_shared<SimulationMesh>(fullModel);
|
pFullPatternSimulationMesh = std::make_shared<SimulationMesh>(fullModel);
|
||||||
pFullPatternSimulationMesh->setBeamCrossSection(
|
pFullPatternSimulationMesh->setBeamCrossSection(
|
||||||
CrossSectionType{0.002, 0.002});
|
CrossSectionType{0.002, 0.002});
|
||||||
pFullPatternSimulationMesh->setBeamMaterial(0.3, 2.3465 * 1e9);
|
pFullPatternSimulationMesh->setBeamMaterial(0.3, 1 * 1e9);
|
||||||
|
|
||||||
// Reduced pattern
|
// Reduced pattern
|
||||||
pReducedPatternSimulationMesh =
|
pReducedPatternSimulationMesh =
|
||||||
std::make_shared<SimulationMesh>(reducedModel);
|
std::make_shared<SimulationMesh>(reducedModel);
|
||||||
pReducedPatternSimulationMesh->setBeamCrossSection(
|
pReducedPatternSimulationMesh->setBeamCrossSection(
|
||||||
CrossSectionType{0.002, 0.002});
|
CrossSectionType{0.002, 0.002});
|
||||||
pReducedPatternSimulationMesh->setBeamMaterial(0.3, 2.3465 * 1e9);
|
pReducedPatternSimulationMesh->setBeamMaterial(0.3, 1 * 1e9);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::createSimulationMeshes(
|
void ReducedModelOptimizer::createSimulationMeshes(
|
||||||
|
|
@ -443,28 +436,14 @@ ReducedModelOptimizer::ReducedModelOptimizer(const std::vector<size_t> &numberOf
|
||||||
{
|
{
|
||||||
FlatPatternTopology::constructNodeToSlotMap(numberOfNodesPerSlot, nodeToSlot);
|
FlatPatternTopology::constructNodeToSlotMap(numberOfNodesPerSlot, nodeToSlot);
|
||||||
FlatPatternTopology::constructSlotToNodeMap(nodeToSlot, slotToNode);
|
FlatPatternTopology::constructSlotToNodeMap(nodeToSlot, slotToNode);
|
||||||
constructBaseScenarioFunctions.resize(BaseSimulationScenario::NumberOfBaseSimulationScenarios);
|
|
||||||
scenarioIsSymmetrical.resize(BaseSimulationScenario::NumberOfBaseSimulationScenarios);
|
|
||||||
constructBaseScenarioFunctions[BaseSimulationScenario::Axial] = &constructAxialSimulationScenario;
|
|
||||||
scenarioIsSymmetrical[BaseSimulationScenario::Axial] = false;
|
|
||||||
constructBaseScenarioFunctions[BaseSimulationScenario::Shear] = &constructShearSimulationScenario;
|
|
||||||
scenarioIsSymmetrical[BaseSimulationScenario::Shear] = false;
|
|
||||||
constructBaseScenarioFunctions[BaseSimulationScenario::Bending]
|
|
||||||
= &constructBendingSimulationScenario;
|
|
||||||
scenarioIsSymmetrical[BaseSimulationScenario::Bending] = true;
|
|
||||||
constructBaseScenarioFunctions[BaseSimulationScenario::Dome] = &constructDomeSimulationScenario;
|
|
||||||
scenarioIsSymmetrical[BaseSimulationScenario::Dome] = true;
|
|
||||||
constructBaseScenarioFunctions[BaseSimulationScenario::Saddle]
|
|
||||||
= &constructSaddleSimulationScenario;
|
|
||||||
scenarioIsSymmetrical[BaseSimulationScenario::Saddle] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::initializePatterns(PatternGeometry &fullPattern,
|
void ReducedModelOptimizer::initializePatterns(PatternGeometry &fullPattern,
|
||||||
PatternGeometry &reducedPattern,
|
PatternGeometry &reducedPattern,
|
||||||
const int &optimizationParameters)
|
const int &optimizationParameters)
|
||||||
{
|
{
|
||||||
assert(fullPattern.VN() == reducedPattern.VN() && fullPattern.EN() >= reducedPattern.EN());
|
assert(fullPattern.VN() == reducedPattern.VN() &&
|
||||||
fullPatternNumberOfEdges = fullPattern.EN();
|
fullPattern.EN() >= reducedPattern.EN());
|
||||||
#if POLYSCOPE_DEFINED
|
#if POLYSCOPE_DEFINED
|
||||||
polyscope::removeAllStructures();
|
polyscope::removeAllStructures();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -477,7 +456,7 @@ void ReducedModelOptimizer::initializePatterns(PatternGeometry &fullPattern,
|
||||||
|
|
||||||
computeMaps(copyFullPattern, copyReducedPattern);
|
computeMaps(copyFullPattern, copyReducedPattern);
|
||||||
createSimulationMeshes(copyFullPattern, copyReducedPattern);
|
createSimulationMeshes(copyFullPattern, copyReducedPattern);
|
||||||
initializeOptimizationParameters(m_pFullPatternSimulationMesh, optimizationParameters);
|
initializeOptimizationParameters(m_pReducedPatternSimulationMesh,optimizationParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateMesh(long n, const double *x) {
|
void updateMesh(long n, const double *x) {
|
||||||
|
|
@ -597,26 +576,29 @@ void ReducedModelOptimizer::computeReducedModelSimulationJob(
|
||||||
// &reducedToFullInterfaceViMap)
|
// &reducedToFullInterfaceViMap)
|
||||||
//{
|
//{
|
||||||
// DRMSimulationModel simulator;
|
// DRMSimulationModel simulator;
|
||||||
// std::shared_ptr<SimulationMesh> pFullPatternSimulationMesh = fullPatternSimulationJobs[0]->pMesh;
|
// std::shared_ptr<SimulationMesh> pFullPatternSimulationMesh =
|
||||||
|
// fullPatternSimulationJobs[0]->pMesh;
|
||||||
// pFullPatternSimulationMesh->registerForDrawing();
|
// pFullPatternSimulationMesh->registerForDrawing();
|
||||||
// pFullPatternSimulationMesh->save(pFullPatternSimulationMesh->getLabel() + "_undeformed.ply");
|
// pFullPatternSimulationMesh->save(pFullPatternSimulationMesh->getLabel() + "_undeformed.ply");
|
||||||
// reducedPatternSimulationJobs[0]->pMesh->save(reducedPatternSimulationJobs[0]->pMesh->getLabel()
|
// reducedPatternSimulationJobs[0]->pMesh->save(reducedPatternSimulationJobs[0]->pMesh->getLabel()
|
||||||
// + "_undeformed.ply");
|
// + "_undeformed.ply");
|
||||||
// double totalError = 0;
|
// double totalError = 0;
|
||||||
// for (const int simulationScenarioIndex : simulationScenarios) {
|
// for (const int simulationScenarioIndex : simulationScenarios) {
|
||||||
// const std::shared_ptr<SimulationJob> &pFullPatternSimulationJob
|
// const std::shared_ptr<SimulationJob> &pFullPatternSimulationJob =
|
||||||
// = fullPatternSimulationJobs[simulationScenarioIndex];
|
// fullPatternSimulationJobs[simulationScenarioIndex];
|
||||||
// pFullPatternSimulationJob->registerForDrawing(pFullPatternSimulationMesh->getLabel());
|
// pFullPatternSimulationJob->registerForDrawing(
|
||||||
// SimulationResults fullModelResults = simulator.executeSimulation(pFullPatternSimulationJob);
|
// pFullPatternSimulationMesh->getLabel());
|
||||||
|
// SimulationResults fullModelResults =
|
||||||
|
// simulator.executeSimulation(pFullPatternSimulationJob);
|
||||||
// fullModelResults.registerForDrawing();
|
// fullModelResults.registerForDrawing();
|
||||||
// // fullModelResults.saveDeformedModel();
|
// // fullModelResults.saveDeformedModel();
|
||||||
// const std::shared_ptr<SimulationJob> &pReducedPatternSimulationJob
|
// const std::shared_ptr<SimulationJob> &pReducedPatternSimulationJob =
|
||||||
// = reducedPatternSimulationJobs[simulationScenarioIndex];
|
// reducedPatternSimulationJobs[simulationScenarioIndex];
|
||||||
// SimulationResults reducedModelResults = simulator.executeSimulation(
|
// SimulationResults reducedModelResults =
|
||||||
// pReducedPatternSimulationJob);
|
// simulator.executeSimulation(pReducedPatternSimulationJob);
|
||||||
// double normalizationFactor = 1;
|
// double normalizationFactor = 1;
|
||||||
// if (global.optimizationSettings.normalizationStrategy
|
// if (global.optimizationSettings.normalizationStrategy !=
|
||||||
// != ReducedModelOptimization::Settings::NormalizationStrategy::NonNormalized) {
|
// ReducedModelOptimization::Settings::NormalizationStrategy::NonNormalized) {
|
||||||
// normalizationFactor
|
// normalizationFactor
|
||||||
// = global.translationalDisplacementNormalizationValues[simulationScenarioIndex];
|
// = global.translationalDisplacementNormalizationValues[simulationScenarioIndex];
|
||||||
// }
|
// }
|
||||||
|
|
@ -627,7 +609,8 @@ void ReducedModelOptimizer::computeReducedModelSimulationJob(
|
||||||
// reducedToFullInterfaceViMap,
|
// reducedToFullInterfaceViMap,
|
||||||
// normalizationFactor);
|
// normalizationFactor);
|
||||||
// std::cout << "Error of simulation scenario "
|
// std::cout << "Error of simulation scenario "
|
||||||
// < baseSimulationScenarioNames[simulationScenarioIndex] << " is " << error << std::endl;
|
// <baseSimulationScenarioNames[simulationScenarioIndex]
|
||||||
|
// << " is " << error << std::endl;
|
||||||
// totalError += error;
|
// totalError += error;
|
||||||
// reducedModelResults.registerForDrawing();
|
// reducedModelResults.registerForDrawing();
|
||||||
// // firstOptimizationRoundResults[simulationScenarioIndex].registerForDrawing();
|
// // firstOptimizationRoundResults[simulationScenarioIndex].registerForDrawing();
|
||||||
|
|
@ -703,12 +686,14 @@ void ReducedModelOptimizer::computeDesiredReducedModelDisplacements(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimizationResult_dlib,
|
ReducedPatternOptimization::Results ReducedModelOptimizer::getResults(
|
||||||
const Settings &settings,
|
const dlib::function_evaluation &optimizationResult_dlib, const Settings &settings)
|
||||||
ReducedPatternOptimization::Results &results)
|
|
||||||
{
|
{
|
||||||
|
ReducedPatternOptimization::Results results;
|
||||||
|
|
||||||
|
results.baseTriangle = global.baseTriangle;
|
||||||
//Number of crashes
|
//Number of crashes
|
||||||
// results.numberOfSimulationCrashes = global.numOfSimulationCrashes;
|
results.numberOfSimulationCrashes = global.numOfSimulationCrashes;
|
||||||
//Value of optimal objective Y
|
//Value of optimal objective Y
|
||||||
results.objectiveValue.total = optimizationResult_dlib.y;
|
results.objectiveValue.total = optimizationResult_dlib.y;
|
||||||
//Optimal X values
|
//Optimal X values
|
||||||
|
|
@ -729,14 +714,10 @@ void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimiza
|
||||||
|
|
||||||
assert(global.minX[xVariableIndex] == optimizationResult_dlib.x(xVariableIndex));
|
assert(global.minX[xVariableIndex] == optimizationResult_dlib.x(xVariableIndex));
|
||||||
optimalX[xVariableIndex] = optimizationResult_dlib.x(xVariableIndex);
|
optimalX[xVariableIndex] = optimizationResult_dlib.x(xVariableIndex);
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << results.optimalXNameValuePairs[xVariableIndex].first << ":"
|
std::cout << results.optimalXNameValuePairs[xVariableIndex].first << ":"
|
||||||
<< optimalX[xVariableIndex] << " ";
|
<< optimalX[xVariableIndex] << " ";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Compute obj value per simulation scenario and the raw objective value
|
// Compute obj value per simulation scenario and the raw objective value
|
||||||
updateMesh(optimalX.size(), optimalX.data());
|
updateMesh(optimalX.size(), optimalX.data());
|
||||||
|
|
@ -754,7 +735,6 @@ void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimiza
|
||||||
global.simulationScenarioIndices.size());
|
global.simulationScenarioIndices.size());
|
||||||
results.objectiveValue.perSimulationScenario_total.resize(
|
results.objectiveValue.perSimulationScenario_total.resize(
|
||||||
global.simulationScenarioIndices.size());
|
global.simulationScenarioIndices.size());
|
||||||
results.perScenario_fullPatternPotentialEnergy.resize(global.simulationScenarioIndices.size());
|
|
||||||
for (int i = 0; i < global.simulationScenarioIndices.size(); i++) {
|
for (int i = 0; i < global.simulationScenarioIndices.size(); i++) {
|
||||||
const int simulationScenarioIndex = global.simulationScenarioIndices[i];
|
const int simulationScenarioIndex = global.simulationScenarioIndices[i];
|
||||||
SimulationResults reducedModelResults = simulator.executeSimulation(
|
SimulationResults reducedModelResults = simulator.executeSimulation(
|
||||||
|
|
@ -806,10 +786,6 @@ void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimiza
|
||||||
// global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]);
|
// global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]);
|
||||||
// assert(test_normalizedTranslationError == normalizedTranslationalError);
|
// assert(test_normalizedTranslationError == normalizedTranslationalError);
|
||||||
// assert(test_normalizedRotationalError == normalizedRotationalError);
|
// assert(test_normalizedRotationalError == normalizedRotationalError);
|
||||||
results.objectiveValue.totalRaw += rawTranslationalError + rawRotationalError;
|
|
||||||
results.perScenario_fullPatternPotentialEnergy[i]
|
|
||||||
= global.fullPatternResults[simulationScenarioIndex].internalPotentialEnergy;
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << "Simulation scenario:"
|
std::cout << "Simulation scenario:"
|
||||||
<< global.reducedPatternSimulationJobs[simulationScenarioIndex]->getLabel()
|
<< global.reducedPatternSimulationJobs[simulationScenarioIndex]->getLabel()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
@ -827,8 +803,8 @@ void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimiza
|
||||||
// = normalizedTranslationalError + normalizedRotationalError;
|
// = normalizedTranslationalError + normalizedRotationalError;
|
||||||
std::cout << "Total Error value:" << results.objectiveValue.perSimulationScenario_total[i]
|
std::cout << "Total Error value:" << results.objectiveValue.perSimulationScenario_total[i]
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
results.objectiveValue.totalRaw += rawTranslationalError + rawRotationalError;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool printDebugInfo = false;
|
const bool printDebugInfo = false;
|
||||||
|
|
@ -852,66 +828,11 @@ void ReducedModelOptimizer::getResults(const dlib::function_evaluation &optimiza
|
||||||
// global.reducedPatternSimulationJobs[simulationScenarioIndex]->pMesh->registerForDrawing();
|
// global.reducedPatternSimulationJobs[simulationScenarioIndex]->pMesh->registerForDrawing();
|
||||||
// global.reducedPatternSimulationJobs[simulationScenarioIndex]->pMesh->setLabel(temp);
|
// global.reducedPatternSimulationJobs[simulationScenarioIndex]->pMesh->setLabel(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<BaseSimulationScenario, double>>
|
ReducedPatternOptimization::Results ReducedModelOptimizer::runOptimization(const Settings &settings)
|
||||||
ReducedModelOptimizer::computeFullPatternMaxSimulationForces(
|
|
||||||
const std::vector<BaseSimulationScenario> &desiredBaseSimulationScenario)
|
|
||||||
{
|
|
||||||
std::vector<std::pair<BaseSimulationScenario, double>> fullPatternMaxSimulationForces;
|
|
||||||
fullPatternMaxSimulationForces.reserve(desiredBaseSimulationScenario.size());
|
|
||||||
for (const BaseSimulationScenario &scenario : desiredBaseSimulationScenario) {
|
|
||||||
const double maxForce = computeFullPatternMaxSimulationForce(scenario);
|
|
||||||
fullPatternMaxSimulationForces.emplace_back(std::make_pair(scenario, maxForce));
|
|
||||||
}
|
|
||||||
|
|
||||||
return fullPatternMaxSimulationForces;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::pair<BaseSimulationScenario, double>>
|
|
||||||
ReducedModelOptimizer::getFullPatternMaxSimulationForces(
|
|
||||||
const std::vector<BaseSimulationScenario> &desiredBaseSimulationScenarioIndices)
|
|
||||||
{
|
|
||||||
std::vector<std::pair<BaseSimulationScenario, double>> fullPatternSimulationScenarioMaxMagnitudes;
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
const std::filesystem::path forceMagnitudesDirectoryPath(std::filesystem::current_path()
|
|
||||||
.parent_path()
|
|
||||||
.append("IntermediateResults")
|
|
||||||
.append("ForceMagnitudes"));
|
|
||||||
std::filesystem::path patternMaxForceMagnitudesFilePath(
|
|
||||||
std::filesystem::path(forceMagnitudesDirectoryPath)
|
|
||||||
.append(m_pFullPatternSimulationMesh->getLabel() + ".json"));
|
|
||||||
const bool fullPatternScenarioMagnitudesExist = std::filesystem::exists(
|
|
||||||
patternMaxForceMagnitudesFilePath);
|
|
||||||
if (fullPatternScenarioMagnitudesExist) {
|
|
||||||
nlohmann::json json;
|
|
||||||
std::ifstream ifs(patternMaxForceMagnitudesFilePath.string());
|
|
||||||
ifs >> json;
|
|
||||||
fullPatternSimulationScenarioMaxMagnitudes
|
|
||||||
= static_cast<std::vector<std::pair<BaseSimulationScenario, double>>>(
|
|
||||||
json.at("maxMagn"));
|
|
||||||
} else {
|
|
||||||
#endif
|
|
||||||
fullPatternSimulationScenarioMaxMagnitudes = computeFullPatternMaxSimulationForces(
|
|
||||||
desiredBaseSimulationScenarioIndices);
|
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
nlohmann::json json;
|
|
||||||
json["maxMagn"] = fullPatternSimulationScenarioMaxMagnitudes;
|
|
||||||
|
|
||||||
std::filesystem::create_directories(forceMagnitudesDirectoryPath);
|
|
||||||
std::ofstream jsonFile(patternMaxForceMagnitudesFilePath.string());
|
|
||||||
jsonFile << json;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
assert(fullPatternSimulationScenarioMaxMagnitudes.size()
|
|
||||||
== desiredBaseSimulationScenarioIndices.size());
|
|
||||||
|
|
||||||
return fullPatternSimulationScenarioMaxMagnitudes;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReducedModelOptimizer::runOptimization(const Settings &settings,
|
|
||||||
ReducedPatternOptimization::Results &results)
|
|
||||||
{
|
{
|
||||||
global.objectiveValueHistory.clear();
|
global.objectiveValueHistory.clear();
|
||||||
dlib::matrix<double, 0, 1> xMin(global.numberOfOptimizationParameters);
|
dlib::matrix<double, 0, 1> xMin(global.numberOfOptimizationParameters);
|
||||||
|
|
@ -921,6 +842,7 @@ void ReducedModelOptimizer::runOptimization(const Settings &settings,
|
||||||
xMax(i) = settings.xRanges[i].max;
|
xMax(i) = settings.xRanges[i].max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto start = std::chrono::system_clock::now();
|
||||||
dlib::function_evaluation result_dlib;
|
dlib::function_evaluation result_dlib;
|
||||||
double (*objF)(double, double, double, double, double,double,double) = &objective;
|
double (*objF)(double, double, double, double, double,double,double) = &objective;
|
||||||
result_dlib = dlib::find_min_global(objF,
|
result_dlib = dlib::find_min_global(objF,
|
||||||
|
|
@ -928,8 +850,13 @@ void ReducedModelOptimizer::runOptimization(const Settings &settings,
|
||||||
xMax,
|
xMax,
|
||||||
dlib::max_function_calls(settings.numberOfFunctionCalls),
|
dlib::max_function_calls(settings.numberOfFunctionCalls),
|
||||||
std::chrono::hours(24 * 365 * 290),
|
std::chrono::hours(24 * 365 * 290),
|
||||||
settings.solverAccuracy);
|
settings.solutionAccuracy);
|
||||||
getResults(result_dlib, settings, results);
|
auto end = std::chrono::system_clock::now();
|
||||||
|
auto elapsed =
|
||||||
|
std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
||||||
|
ReducedPatternOptimization::Results results = getResults(result_dlib, settings);
|
||||||
|
results.time = elapsed.count() / 1000.0;
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::constructAxialSimulationScenario(
|
void ReducedModelOptimizer::constructAxialSimulationScenario(
|
||||||
|
|
@ -984,8 +911,6 @@ void ReducedModelOptimizer::constructBendingSimulationScenario(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*NOTE: From the results it seems as if the forced displacements are different in the linear and in the drm
|
|
||||||
* */
|
|
||||||
void ReducedModelOptimizer::constructDomeSimulationScenario(
|
void ReducedModelOptimizer::constructDomeSimulationScenario(
|
||||||
const double &forceMagnitude,
|
const double &forceMagnitude,
|
||||||
const std::vector<std::pair<FullPatternVertexIndex, FullPatternVertexIndex>>
|
const std::vector<std::pair<FullPatternVertexIndex, FullPatternVertexIndex>>
|
||||||
|
|
@ -1005,14 +930,14 @@ void ReducedModelOptimizer::constructDomeSimulationScenario(
|
||||||
= Eigen::Vector3d(-interfaceVector[0],
|
= Eigen::Vector3d(-interfaceVector[0],
|
||||||
-interfaceVector[1],
|
-interfaceVector[1],
|
||||||
0)
|
0)
|
||||||
* 0.005
|
* 0.001
|
||||||
* std::abs(
|
* std::abs(
|
||||||
forceMagnitude); //NOTE:Should the forced displacement change relatively to the magnitude?
|
forceMagnitude); //NOTE:Should the forced displacement change relatively to the magnitude?
|
||||||
// * std::abs(forceMagnitude / maxForceMagnitude_dome);
|
// * std::abs(forceMagnitude / maxForceMagnitude_dome);
|
||||||
job.nodalForcedDisplacements[viPair.second] = Eigen::Vector3d(interfaceVector[0],
|
job.nodalForcedDisplacements[viPair.second] = Eigen::Vector3d(interfaceVector[0],
|
||||||
interfaceVector[1],
|
interfaceVector[1],
|
||||||
0)
|
0)
|
||||||
* 0.005 * std::abs(forceMagnitude);
|
* 0.001 * std::abs(forceMagnitude);
|
||||||
// * std::abs(forceMagnitude / maxForceMagnitude_dome);
|
// * std::abs(forceMagnitude / maxForceMagnitude_dome);
|
||||||
// CoordType v = (pMesh->vert[viPair.first].cP() - pMesh->vert[viPair.second].cP())
|
// CoordType v = (pMesh->vert[viPair.first].cP() - pMesh->vert[viPair.second].cP())
|
||||||
// ^ CoordType(0, 0, -1).Normalize();
|
// ^ CoordType(0, 0, -1).Normalize();
|
||||||
|
|
@ -1023,10 +948,10 @@ void ReducedModelOptimizer::constructDomeSimulationScenario(
|
||||||
} else {
|
} else {
|
||||||
job.nodalExternalForces[viPair.first]
|
job.nodalExternalForces[viPair.first]
|
||||||
= Vector6d({0, 0, 0, momentAxis[0], momentAxis[1], momentAxis[2]}) * forceMagnitude
|
= Vector6d({0, 0, 0, momentAxis[0], momentAxis[1], momentAxis[2]}) * forceMagnitude
|
||||||
/ 3;
|
/ 5;
|
||||||
job.nodalExternalForces[viPair.second]
|
job.nodalExternalForces[viPair.second]
|
||||||
= Vector6d({0, 0, 0, -momentAxis[0], -momentAxis[1], -momentAxis[2]})
|
= Vector6d({0, 0, 0, -momentAxis[0], -momentAxis[1], -momentAxis[2]})
|
||||||
* forceMagnitude / 3;
|
* forceMagnitude / 5;
|
||||||
job.constrainedVertices[viPair.first] = std::unordered_set<DoFType>{2};
|
job.constrainedVertices[viPair.first] = std::unordered_set<DoFType>{2};
|
||||||
job.constrainedVertices[viPair.second] = std::unordered_set<DoFType>{2};
|
job.constrainedVertices[viPair.second] = std::unordered_set<DoFType>{2};
|
||||||
}
|
}
|
||||||
|
|
@ -1062,201 +987,100 @@ void ReducedModelOptimizer::constructSaddleSimulationScenario(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double fullPatternMaxSimulationForceRotationalObjective(const double &forceMagnitude)
|
double fullPatternMaxSimulationForceObjective(const double &forceMagnitude)
|
||||||
{
|
{
|
||||||
SimulationJob job;
|
|
||||||
job.pMesh = global.pFullPatternSimulationMesh;
|
|
||||||
global.constructScenarioFunction(forceMagnitude, global.fullPatternInterfaceViPairs, job);
|
|
||||||
// ReducedModelOptimizer::axialSimulationScenario(forceMagnitude,
|
|
||||||
// global.fullPatternInterfaceViPairs,
|
|
||||||
// job);
|
|
||||||
|
|
||||||
DRMSimulationModel simulator;
|
|
||||||
DRMSimulationModel::Settings settings;
|
|
||||||
settings.totalExternalForcesNormPercentageTermination = 1e-2;
|
|
||||||
settings.totalTranslationalKineticEnergyThreshold = 1e-8;
|
|
||||||
settings.viscousDampingFactor = 1e-2;
|
|
||||||
settings.useKineticDamping = true;
|
|
||||||
settings.shouldDraw = false;
|
|
||||||
settings.debugModeStep = 200;
|
|
||||||
// settings.averageResidualForcesCriterionThreshold = 1e-5;
|
|
||||||
settings.maxDRMIterations = 200000;
|
|
||||||
SimulationResults results = simulator.executeSimulation(std::make_shared<SimulationJob>(job),
|
|
||||||
settings);
|
|
||||||
const double &desiredRotationAngle = global.desiredMaxRotationAngle;
|
|
||||||
double error;
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
job.pMesh->setLabel("initial");
|
|
||||||
// job.pMesh->registerForDrawing();
|
|
||||||
// results.registerForDrawing();
|
|
||||||
// polyscope::show();
|
|
||||||
std::string saveJobToPath;
|
|
||||||
if (!results.converged) {
|
|
||||||
// std::cout << "Force used:" << forceMagnitude << std::endl;
|
|
||||||
error = std::numeric_limits<double>::max();
|
|
||||||
// DRMSimulationModel::Settings debugSimulationSettings;
|
|
||||||
// debugSimulationSettings.isDebugMode = true;
|
|
||||||
// debugSimulationSettings.debugModeStep = 1000;
|
|
||||||
// // debugSimulationSettings.maxDRMIterations = 100000;
|
|
||||||
// debugSimulationSettings.shouldDraw = true;
|
|
||||||
// debugSimulationSettings.drawingStep = debugSimulationSettings.debugModeStep;
|
|
||||||
// debugSimulationSettings.shouldCreatePlots = true;
|
|
||||||
// // debugSimulationSettings.Dtini = 0.06;
|
|
||||||
// debugSimulationSettings.beVerbose = true;
|
|
||||||
// debugSimulationSettings.useAverage = true;
|
|
||||||
// // debugSimulationSettings.totalExternalForcesNormPercentageTermination = 1e-3;
|
|
||||||
// debugSimulationSettings.shouldUseTranslationalKineticEnergyThreshold = true;
|
|
||||||
// auto debugResults = simulator.executeSimulation(std::make_shared<SimulationJob>(job),
|
|
||||||
// debugSimulationSettings);
|
|
||||||
// std::terminate();
|
|
||||||
saveJobToPath = "../nonConvergingJobs";
|
|
||||||
} else {
|
|
||||||
error = std::abs(
|
|
||||||
results.rotationalDisplacementQuaternion[global.interfaceViForComputingScenarioError]
|
|
||||||
.angularDistance(Eigen::Quaterniond::Identity())
|
|
||||||
- desiredRotationAngle);
|
|
||||||
saveJobToPath = "../convergingJobs";
|
|
||||||
}
|
|
||||||
std::filesystem::path outputPath(std::filesystem::path(saveJobToPath)
|
|
||||||
.append(job.pMesh->getLabel())
|
|
||||||
.append("mag_" + global.currentScenarioName));
|
|
||||||
std::filesystem::create_directories(outputPath);
|
|
||||||
job.save(outputPath);
|
|
||||||
settings.save(outputPath);
|
|
||||||
|
|
||||||
std::cout << "Force:" << forceMagnitude << " Error is:" << vcg::math::ToDeg(error) << std::endl;
|
|
||||||
#endif
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
double fullPatternMaxSimulationForceTranslationalObjective(const double &forceMagnitude)
|
|
||||||
{
|
|
||||||
SimulationJob job;
|
|
||||||
job.pMesh = global.pFullPatternSimulationMesh;
|
|
||||||
global.constructScenarioFunction(forceMagnitude, global.fullPatternInterfaceViPairs, job);
|
|
||||||
// ReducedModelOptimizer::axialSimulationScenario(forceMagnitude,
|
|
||||||
// global.fullPatternInterfaceViPairs,
|
|
||||||
// job);
|
|
||||||
|
|
||||||
DRMSimulationModel simulator;
|
|
||||||
DRMSimulationModel::Settings settings;
|
|
||||||
// settings.totalResidualForcesNormThreshold = 1e-3;
|
|
||||||
settings.totalExternalForcesNormPercentageTermination = 1e-2;
|
|
||||||
settings.totalTranslationalKineticEnergyThreshold = 1e-8;
|
|
||||||
settings.viscousDampingFactor = 5e-3;
|
|
||||||
settings.useKineticDamping = true;
|
|
||||||
// settings.averageResidualForcesCriterionThreshold = 1e-5;
|
|
||||||
// settings.useAverage = true;
|
|
||||||
// settings.totalTranslationalKineticEnergyThreshold = 1e-10;
|
|
||||||
// settings.shouldUseTranslationalKineticEnergyThreshold = true;
|
|
||||||
// settings.shouldDraw = true;
|
|
||||||
// settings.isDebugMode = true;
|
|
||||||
// settings.drawingStep = 200000;
|
|
||||||
// settings.beVerbose = true;
|
|
||||||
// settings.debugModeStep = 200;
|
|
||||||
settings.maxDRMIterations = 200000;
|
|
||||||
SimulationResults results = simulator.executeSimulation(std::make_shared<SimulationJob>(job),
|
|
||||||
settings);
|
|
||||||
const double &desiredDisplacementValue = global.desiredMaxDisplacementValue;
|
const double &desiredDisplacementValue = global.desiredMaxDisplacementValue;
|
||||||
double error;
|
SimulationJob job;
|
||||||
if (!results.converged) {
|
job.pMesh = global.pFullPatternSimulationMesh;
|
||||||
error = std::numeric_limits<double>::max();
|
global.constructScenarioFunction(forceMagnitude, global.fullPatternInterfaceViPairs, job);
|
||||||
std::filesystem::path outputPath(std::filesystem::path("../nonConvergingJobs")
|
// ReducedModelOptimizer::axialSimulationScenario(forceMagnitude,
|
||||||
.append(job.pMesh->getLabel())
|
// global.fullPatternInterfaceViPairs,
|
||||||
.append("mag_" + global.currentScenarioName));
|
// job);
|
||||||
std::filesystem::create_directories(outputPath);
|
|
||||||
job.save(outputPath);
|
DRMSimulationModel simulator;
|
||||||
settings.save(outputPath);
|
DRMSimulationModel::Settings settings;
|
||||||
// std::terminate();
|
settings.totalExternalForcesNormPercentageTermination = 1e-2;
|
||||||
} else {
|
// settings.shouldUseTranslationalKineticEnergyThreshold = true;
|
||||||
error = std::abs(
|
// settings.totalTranslationalKineticEnergyThreshold = 1e-7;
|
||||||
|
SimulationResults results = simulator.executeSimulation(std::make_shared<SimulationJob>(job),
|
||||||
|
settings);
|
||||||
|
const double error = std::abs(
|
||||||
|
// results.displacements[global.fullPatternInterfaceViPairs[1].first].getTranslation().norm()
|
||||||
results.displacements[global.interfaceViForComputingScenarioError].getTranslation().norm()
|
results.displacements[global.interfaceViForComputingScenarioError].getTranslation().norm()
|
||||||
- desiredDisplacementValue);
|
- desiredDisplacementValue);
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << "Force:" << forceMagnitude << " Error is:" << error << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
double ReducedModelOptimizer::computeFullPatternMaxSimulationForce(
|
double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulationScenario &scenario)
|
||||||
const BaseSimulationScenario &scenario)
|
|
||||||
{
|
{
|
||||||
double forceMagnitude = 1;
|
double forceMagnitude = 1;
|
||||||
double minimumError;
|
global.desiredMaxDisplacementValue = 0.1
|
||||||
double translationalOptimizationEpsilon;
|
* vcg::Distance(global.baseTriangle.cP(0),
|
||||||
bool wasSuccessful = false;
|
|
||||||
global.constructScenarioFunction = constructBaseScenarioFunctions[scenario];
|
|
||||||
const double baseTriangleHeight = vcg::Distance(global.baseTriangle.cP(0),
|
|
||||||
(global.baseTriangle.cP(1)
|
(global.baseTriangle.cP(1)
|
||||||
+ global.baseTriangle.cP(2))
|
+ global.baseTriangle.cP(2))
|
||||||
/ 2);
|
/ 2);
|
||||||
std::function<double(const double &)> objectiveFunction;
|
const double optimizationEpsilon = global.desiredMaxDisplacementValue * 0.5;
|
||||||
double objectiveEpsilon = translationalOptimizationEpsilon;
|
|
||||||
objectiveFunction = &fullPatternMaxSimulationForceTranslationalObjective;
|
|
||||||
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
|
||||||
global.desiredMaxDisplacementValue = 0.1 * baseTriangleHeight;
|
|
||||||
global.currentScenarioName = baseSimulationScenarioNames[scenario];
|
|
||||||
double forceMagnitudeEpsilon = 1e-4;
|
|
||||||
|
|
||||||
switch (scenario) {
|
switch (scenario) {
|
||||||
case Axial:
|
case Axial:
|
||||||
global.desiredMaxDisplacementValue = 0.03 * baseTriangleHeight;
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructAxialSimulationScenario;
|
||||||
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
||||||
|
dlib::find_min_single_variable(&fullPatternMaxSimulationForceObjective,
|
||||||
|
forceMagnitude,
|
||||||
|
1e-8,
|
||||||
|
1e8,
|
||||||
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Shear:
|
case Shear:
|
||||||
global.desiredMaxDisplacementValue = 0.03 * baseTriangleHeight;
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructShearSimulationScenario;
|
||||||
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
||||||
|
dlib::find_min_single_variable(&fullPatternMaxSimulationForceObjective,
|
||||||
|
forceMagnitude,
|
||||||
|
1e-8,
|
||||||
|
1e8,
|
||||||
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Bending:
|
case Bending:
|
||||||
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructBendingSimulationScenario;
|
||||||
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[0].first;
|
||||||
|
dlib::find_min_single_variable(&fullPatternMaxSimulationForceObjective,
|
||||||
|
forceMagnitude,
|
||||||
|
1e-8,
|
||||||
|
1e8,
|
||||||
|
optimizationEpsilon,
|
||||||
|
200);
|
||||||
break;
|
break;
|
||||||
case Dome:
|
case Dome:
|
||||||
global.desiredMaxRotationAngle = vcg::math::ToRad(25.0);
|
global.desiredMaxDisplacementValue *= 2;
|
||||||
objectiveFunction = &fullPatternMaxSimulationForceRotationalObjective;
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructDomeSimulationScenario;
|
||||||
forceMagnitudeEpsilon *= 1e-2;
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
||||||
objectiveEpsilon = vcg::math::ToRad(3.0);
|
dlib::find_min_single_variable(&fullPatternMaxSimulationForceObjective,
|
||||||
forceMagnitude = 0.6;
|
forceMagnitude,
|
||||||
|
1e-8,
|
||||||
|
1e8,
|
||||||
|
optimizationEpsilon,
|
||||||
|
200);
|
||||||
break;
|
break;
|
||||||
case Saddle:
|
case Saddle:
|
||||||
|
global.desiredMaxDisplacementValue *= 2;
|
||||||
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructSaddleSimulationScenario;
|
||||||
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[0].first;
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[0].first;
|
||||||
|
dlib::find_min_single_variable(&fullPatternMaxSimulationForceObjective,
|
||||||
|
forceMagnitude,
|
||||||
|
1e-8,
|
||||||
|
1e8,
|
||||||
|
optimizationEpsilon,
|
||||||
|
150);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
minimumError = dlib::find_min_single_variable(objectiveFunction,
|
|
||||||
forceMagnitude,
|
|
||||||
1e-4,
|
|
||||||
1e4,
|
|
||||||
forceMagnitudeEpsilon,
|
|
||||||
1000);
|
|
||||||
wasSuccessful = minimumError < objectiveEpsilon;
|
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << "Max " << ReducedPatternOptimization::baseSimulationScenarioNames[scenario]
|
|
||||||
<< " magnitude:" << forceMagnitude << std::endl;
|
|
||||||
if (!wasSuccessful) {
|
|
||||||
SimulationJob job;
|
|
||||||
job.pMesh = global.pFullPatternSimulationMesh;
|
|
||||||
global.constructScenarioFunction(forceMagnitude, global.fullPatternInterfaceViPairs, job);
|
|
||||||
std::cout << ReducedPatternOptimization::baseSimulationScenarioNames[scenario]
|
|
||||||
+ " max scenario magnitude was not succefully determined."
|
|
||||||
<< std::endl;
|
|
||||||
std::filesystem::path outputPath(
|
|
||||||
std::filesystem::path("../nonConvergingJobs")
|
|
||||||
.append(m_pFullPatternSimulationMesh->getLabel())
|
|
||||||
.append("magFinal_"
|
|
||||||
+ ReducedPatternOptimization::baseSimulationScenarioNames[scenario]));
|
|
||||||
std::filesystem::create_directories(outputPath);
|
|
||||||
job.save(outputPath);
|
|
||||||
std::terminate();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return forceMagnitude;
|
return forceMagnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::shared_ptr<SimulationJob>> ReducedModelOptimizer::createFullPatternSimulationJobs(
|
//TODO: Make more compact
|
||||||
const std::shared_ptr<SimulationMesh> &pMesh,
|
std::vector<std::shared_ptr<SimulationJob>>
|
||||||
const std::vector<std::pair<BaseSimulationScenario, double>> &scenarioMaxForceMagnitudePairs)
|
ReducedModelOptimizer::createFullPatternSimulationScenarios(
|
||||||
|
const std::shared_ptr<SimulationMesh> &pMesh)
|
||||||
{
|
{
|
||||||
std::vector<std::shared_ptr<SimulationJob>> scenarios;
|
std::vector<std::shared_ptr<SimulationJob>> scenarios;
|
||||||
scenarios.resize(totalNumberOfSimulationScenarios);
|
scenarios.resize(totalNumberOfSimulationScenarios);
|
||||||
|
|
@ -1264,44 +1088,157 @@ std::vector<std::shared_ptr<SimulationJob>> ReducedModelOptimizer::createFullPat
|
||||||
SimulationJob job;
|
SimulationJob job;
|
||||||
job.pMesh = pMesh;
|
job.pMesh = pMesh;
|
||||||
|
|
||||||
for (std::pair<BaseSimulationScenario, double> scenarioMaxForceMagnitudePair :
|
//// Axial
|
||||||
scenarioMaxForceMagnitudePairs) {
|
const double maxForceMagnitude_axial = getFullPatternMaxSimulationForce(
|
||||||
const BaseSimulationScenario scenario = scenarioMaxForceMagnitudePair.first;
|
BaseSimulationScenario::Axial);
|
||||||
const double maxForceMagnitude = scenarioMaxForceMagnitudePair.second;
|
const double minForceMagnitude_axial = -maxForceMagnitude_axial;
|
||||||
const int numberOfSimulationScenarios = simulationScenariosResolution[scenario];
|
const int numberOfSimulationScenarios_axial
|
||||||
const double minForceMagnitude = scenarioIsSymmetrical[scenario]
|
= simulationScenariosResolution[BaseSimulationScenario::Axial];
|
||||||
? maxForceMagnitude / numberOfSimulationScenarios
|
const double forceMagnitudeStep_axial = numberOfSimulationScenarios_axial == 1
|
||||||
: -maxForceMagnitude;
|
? maxForceMagnitude_axial
|
||||||
const double forceMagnitudeStep = numberOfSimulationScenarios == 1
|
: (maxForceMagnitude_axial - minForceMagnitude_axial)
|
||||||
? maxForceMagnitude
|
/ (numberOfSimulationScenarios_axial - 1);
|
||||||
: (maxForceMagnitude - minForceMagnitude)
|
const int baseSimulationScenarioIndexOffset_axial
|
||||||
/ (numberOfSimulationScenarios);
|
|
||||||
const int baseSimulationScenarioIndexOffset
|
|
||||||
= std::accumulate(simulationScenariosResolution.begin(),
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
simulationScenariosResolution.begin() + scenario,
|
simulationScenariosResolution.begin() + BaseSimulationScenario::Axial,
|
||||||
0);
|
0);
|
||||||
for (int simulationScenarioIndex = 0; simulationScenarioIndex < numberOfSimulationScenarios;
|
for (int axialSimulationScenarioIndex = 0;
|
||||||
simulationScenarioIndex++) {
|
axialSimulationScenarioIndex < numberOfSimulationScenarios_axial;
|
||||||
|
axialSimulationScenarioIndex++) {
|
||||||
job.nodalExternalForces.clear();
|
job.nodalExternalForces.clear();
|
||||||
job.constrainedVertices.clear();
|
job.constrainedVertices.clear();
|
||||||
job.nodalForcedDisplacements.clear();
|
job.nodalForcedDisplacements.clear();
|
||||||
job.label = baseSimulationScenarioNames[scenario] + "_"
|
job.label = baseSimulationScenarioNames[BaseSimulationScenario::Axial] + "_"
|
||||||
+ std::to_string(simulationScenarioIndex);
|
+ std::to_string(axialSimulationScenarioIndex);
|
||||||
|
|
||||||
const double forceMagnitude = (forceMagnitudeStep * simulationScenarioIndex
|
const double forceMagnitude = (forceMagnitudeStep_axial * axialSimulationScenarioIndex
|
||||||
+ minForceMagnitude);
|
+ minForceMagnitude_axial);
|
||||||
constructBaseScenarioFunctions[scenario](forceMagnitude,
|
constructAxialSimulationScenario(forceMagnitude, m_fullPatternOppositeInterfaceViPairs, job);
|
||||||
m_fullPatternOppositeInterfaceViPairs,
|
|
||||||
job);
|
|
||||||
|
|
||||||
scenarios[baseSimulationScenarioIndexOffset + simulationScenarioIndex]
|
scenarios[baseSimulationScenarioIndexOffset_axial + axialSimulationScenarioIndex]
|
||||||
= std::make_shared<SimulationJob>(job);
|
= std::make_shared<SimulationJob>(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//// Shear
|
||||||
|
const double maxForceMagnitude_shear = getFullPatternMaxSimulationForce(
|
||||||
|
BaseSimulationScenario::Shear);
|
||||||
|
const double minForceMagnitude_shear = -maxForceMagnitude_shear;
|
||||||
|
const int numberOfSimulationScenarios_shear
|
||||||
|
= simulationScenariosResolution[BaseSimulationScenario::Shear];
|
||||||
|
const double forceMagnitudeStep_shear = numberOfSimulationScenarios_shear == 1
|
||||||
|
? maxForceMagnitude_shear
|
||||||
|
: (maxForceMagnitude_shear - minForceMagnitude_shear)
|
||||||
|
/ (numberOfSimulationScenarios_shear - 1);
|
||||||
|
const int baseSimulationScenarioIndexOffset_shear
|
||||||
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
|
simulationScenariosResolution.begin() + BaseSimulationScenario::Shear,
|
||||||
|
0);
|
||||||
|
for (int shearSimulationScenarioIndex = 0;
|
||||||
|
shearSimulationScenarioIndex < numberOfSimulationScenarios_shear;
|
||||||
|
shearSimulationScenarioIndex++) {
|
||||||
|
job.constrainedVertices.clear();
|
||||||
|
job.nodalExternalForces.clear();
|
||||||
|
job.label = baseSimulationScenarioNames[BaseSimulationScenario::Shear] + "_"
|
||||||
|
+ std::to_string(shearSimulationScenarioIndex);
|
||||||
|
const double forceMagnitude = (forceMagnitudeStep_shear * shearSimulationScenarioIndex
|
||||||
|
+ minForceMagnitude_shear);
|
||||||
|
constructShearSimulationScenario(forceMagnitude, m_fullPatternOppositeInterfaceViPairs, job);
|
||||||
|
scenarios[baseSimulationScenarioIndexOffset_shear + shearSimulationScenarioIndex]
|
||||||
|
= std::make_shared<SimulationJob>(job);
|
||||||
|
}
|
||||||
|
|
||||||
|
//// Bending
|
||||||
|
const double maxForceMagnitude_bending = getFullPatternMaxSimulationForce(
|
||||||
|
BaseSimulationScenario::Bending);
|
||||||
|
const double minForceMagnitude_bending = -maxForceMagnitude_bending;
|
||||||
|
const int numberOfSimulationScenarios_bending
|
||||||
|
= simulationScenariosResolution[BaseSimulationScenario::Bending];
|
||||||
|
const double forceMagnitudeStep_bending = numberOfSimulationScenarios_bending == 1
|
||||||
|
? maxForceMagnitude_bending
|
||||||
|
: (maxForceMagnitude_bending
|
||||||
|
- minForceMagnitude_bending)
|
||||||
|
/ (numberOfSimulationScenarios_bending - 1);
|
||||||
|
const int baseSimulationScenarioIndexOffset_bending
|
||||||
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
|
simulationScenariosResolution.begin() + BaseSimulationScenario::Bending,
|
||||||
|
0);
|
||||||
|
for (int bendingSimulationScenarioIndex = 0;
|
||||||
|
bendingSimulationScenarioIndex < numberOfSimulationScenarios_bending;
|
||||||
|
bendingSimulationScenarioIndex++) {
|
||||||
|
job.nodalExternalForces.clear();
|
||||||
|
job.constrainedVertices.clear();
|
||||||
|
job.label = baseSimulationScenarioNames[BaseSimulationScenario::Bending] + "_"
|
||||||
|
+ std::to_string(bendingSimulationScenarioIndex);
|
||||||
|
const double forceMagnitude = (forceMagnitudeStep_bending * bendingSimulationScenarioIndex
|
||||||
|
+ minForceMagnitude_bending);
|
||||||
|
constructBendingSimulationScenario(forceMagnitude,
|
||||||
|
m_fullPatternOppositeInterfaceViPairs,
|
||||||
|
job);
|
||||||
|
scenarios[baseSimulationScenarioIndexOffset_bending + bendingSimulationScenarioIndex]
|
||||||
|
= std::make_shared<SimulationJob>(job);
|
||||||
|
}
|
||||||
|
|
||||||
|
//// Dome
|
||||||
|
const double maxForceMagnitude_dome = getFullPatternMaxSimulationForce(
|
||||||
|
BaseSimulationScenario::Dome);
|
||||||
|
const double minForceMagnitude_dome = -maxForceMagnitude_dome;
|
||||||
|
const int numberOfSimulationScenarios_dome
|
||||||
|
= simulationScenariosResolution[BaseSimulationScenario::Dome];
|
||||||
|
const double forceMagnitudeStep_dome = numberOfSimulationScenarios_dome == 1
|
||||||
|
? maxForceMagnitude_dome
|
||||||
|
: (maxForceMagnitude_dome - minForceMagnitude_dome)
|
||||||
|
/ (numberOfSimulationScenarios_dome - 1);
|
||||||
|
const int baseSimulationScenarioIndexOffset_dome
|
||||||
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
|
simulationScenariosResolution.begin() + BaseSimulationScenario::Dome,
|
||||||
|
0);
|
||||||
|
for (int domeSimulationScenarioIndex = 0;
|
||||||
|
domeSimulationScenarioIndex < numberOfSimulationScenarios_dome;
|
||||||
|
domeSimulationScenarioIndex++) {
|
||||||
|
job.constrainedVertices.clear();
|
||||||
|
job.nodalExternalForces.clear();
|
||||||
|
job.nodalForcedDisplacements.clear();
|
||||||
|
job.label = baseSimulationScenarioNames[BaseSimulationScenario::Dome] + "_"
|
||||||
|
+ std::to_string(domeSimulationScenarioIndex);
|
||||||
|
const double forceMagnitude = (forceMagnitudeStep_dome * domeSimulationScenarioIndex
|
||||||
|
+ minForceMagnitude_dome);
|
||||||
|
constructDomeSimulationScenario(forceMagnitude, m_fullPatternOppositeInterfaceViPairs, job);
|
||||||
|
scenarios[baseSimulationScenarioIndexOffset_dome + domeSimulationScenarioIndex]
|
||||||
|
= std::make_shared<SimulationJob>(job);
|
||||||
|
}
|
||||||
|
|
||||||
|
//// Saddle
|
||||||
|
const double maxForceMagnitude_saddle = getFullPatternMaxSimulationForce(
|
||||||
|
BaseSimulationScenario::Saddle);
|
||||||
|
const double minForceMagnitude_saddle = -maxForceMagnitude_saddle;
|
||||||
|
const int numberOfSimulationScenarios_saddle
|
||||||
|
= simulationScenariosResolution[BaseSimulationScenario::Saddle];
|
||||||
|
const double forceMagnitudeStep_saddle = numberOfSimulationScenarios_saddle == 1
|
||||||
|
? maxForceMagnitude_saddle
|
||||||
|
: (maxForceMagnitude_saddle
|
||||||
|
- minForceMagnitude_saddle)
|
||||||
|
/ (numberOfSimulationScenarios_saddle - 1);
|
||||||
|
const int baseSimulationScenarioIndexOffset_saddle
|
||||||
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
|
simulationScenariosResolution.begin() + BaseSimulationScenario::Saddle,
|
||||||
|
0);
|
||||||
|
for (int saddleSimulationScenarioIndex = 0;
|
||||||
|
saddleSimulationScenarioIndex < numberOfSimulationScenarios_saddle;
|
||||||
|
saddleSimulationScenarioIndex++) {
|
||||||
|
job.constrainedVertices.clear();
|
||||||
|
job.nodalExternalForces.clear();
|
||||||
|
job.nodalForcedDisplacements.clear();
|
||||||
|
job.label = baseSimulationScenarioNames[BaseSimulationScenario::Saddle] + "_"
|
||||||
|
+ std::to_string(saddleSimulationScenarioIndex);
|
||||||
|
const double forceMagnitude = (forceMagnitudeStep_saddle * saddleSimulationScenarioIndex
|
||||||
|
+ minForceMagnitude_saddle);
|
||||||
|
constructSaddleSimulationScenario(forceMagnitude,
|
||||||
|
m_fullPatternOppositeInterfaceViPairs,
|
||||||
|
job);
|
||||||
|
scenarios[baseSimulationScenarioIndexOffset_saddle + saddleSimulationScenarioIndex]
|
||||||
|
= std::make_shared<SimulationJob>(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << "Computed full pattern scenario magnitudes" << std::endl;
|
|
||||||
#endif
|
|
||||||
return scenarios;
|
return scenarios;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1364,10 +1301,11 @@ void ReducedModelOptimizer::computeObjectiveValueNormalizationFactors() {
|
||||||
global.translationalDisplacementNormalizationValues[simulationScenarioIndex]
|
global.translationalDisplacementNormalizationValues[simulationScenarioIndex]
|
||||||
= std::max(fullPatternTranslationalDisplacementNormSum[simulationScenarioIndex],
|
= std::max(fullPatternTranslationalDisplacementNormSum[simulationScenarioIndex],
|
||||||
epsilon_translationalDisplacement);
|
epsilon_translationalDisplacement);
|
||||||
const double epsilon_rotationalDisplacement = vcg::math::ToRad(3.0);
|
// const double epsilon_rotationalDisplacement = vcg::math::ToRad(10.0);
|
||||||
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]
|
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex]
|
||||||
= std::max(fullPatternAngularDistance[simulationScenarioIndex],
|
= /*std::max(*/ fullPatternAngularDistance[simulationScenarioIndex] /*,
|
||||||
epsilon_rotationalDisplacement);
|
epsilon_rotationalDisplacement)*/
|
||||||
|
;
|
||||||
} else {
|
} else {
|
||||||
global.translationalDisplacementNormalizationValues[simulationScenarioIndex] = 1;
|
global.translationalDisplacementNormalizationValues[simulationScenarioIndex] = 1;
|
||||||
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex] = 1;
|
global.rotationalDisplacementNormalizationValues[simulationScenarioIndex] = 1;
|
||||||
|
|
@ -1375,9 +1313,8 @@ void ReducedModelOptimizer::computeObjectiveValueNormalizationFactors() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::optimize(
|
Results ReducedModelOptimizer::optimize(
|
||||||
const Settings &optimizationSettings,
|
const Settings &optimizationSettings,
|
||||||
ReducedPatternOptimization::Results &results,
|
|
||||||
const std::vector<BaseSimulationScenario> &desiredBaseSimulationScenarioIndices)
|
const std::vector<BaseSimulationScenario> &desiredBaseSimulationScenarioIndices)
|
||||||
{
|
{
|
||||||
for (int baseSimulationScenarioIndex : desiredBaseSimulationScenarioIndices) {
|
for (int baseSimulationScenarioIndex : desiredBaseSimulationScenarioIndices) {
|
||||||
|
|
@ -1394,6 +1331,12 @@ void ReducedModelOptimizer::optimize(
|
||||||
+ baseSimulationScenarioIndex,
|
+ baseSimulationScenarioIndex,
|
||||||
0));
|
0));
|
||||||
}
|
}
|
||||||
|
if (desiredBaseSimulationScenarioIndices.empty()) {
|
||||||
|
global.simulationScenarioIndices.resize(totalNumberOfSimulationScenarios);
|
||||||
|
std::iota(global.simulationScenarioIndices.begin(),
|
||||||
|
global.simulationScenarioIndices.end(),
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
global.reducedPatternSimulationJobs.resize(totalNumberOfSimulationScenarios);
|
global.reducedPatternSimulationJobs.resize(totalNumberOfSimulationScenarios);
|
||||||
global.fullPatternResults.resize(totalNumberOfSimulationScenarios);
|
global.fullPatternResults.resize(totalNumberOfSimulationScenarios);
|
||||||
|
|
@ -1404,95 +1347,28 @@ void ReducedModelOptimizer::optimize(
|
||||||
global.numberOfFunctionCalls = 0;
|
global.numberOfFunctionCalls = 0;
|
||||||
global.optimizationSettings = optimizationSettings;
|
global.optimizationSettings = optimizationSettings;
|
||||||
global.pFullPatternSimulationMesh = m_pFullPatternSimulationMesh;
|
global.pFullPatternSimulationMesh = m_pFullPatternSimulationMesh;
|
||||||
|
global.fullPatternSimulationJobs = createFullPatternSimulationScenarios(
|
||||||
std::vector<std::pair<BaseSimulationScenario, double>> fullPatternSimulationScenarioMaxMagnitudes
|
m_pFullPatternSimulationMesh);
|
||||||
= getFullPatternMaxSimulationForces(desiredBaseSimulationScenarioIndices);
|
|
||||||
global.fullPatternSimulationJobs
|
|
||||||
= createFullPatternSimulationJobs(m_pFullPatternSimulationMesh,
|
|
||||||
fullPatternSimulationScenarioMaxMagnitudes);
|
|
||||||
// polyscope::removeAllStructures();
|
// polyscope::removeAllStructures();
|
||||||
|
|
||||||
results.baseTriangle = global.baseTriangle;
|
|
||||||
|
|
||||||
DRMSimulationModel::Settings simulationSettings;
|
DRMSimulationModel::Settings simulationSettings;
|
||||||
simulationSettings.maxDRMIterations = 200000;
|
simulationSettings.shouldDraw = false;
|
||||||
simulationSettings.totalTranslationalKineticEnergyThreshold = 1e-8;
|
|
||||||
simulationSettings.viscousDampingFactor = 5e-3;
|
|
||||||
simulationSettings.useKineticDamping = true;
|
|
||||||
// simulationSettings.averageResidualForcesCriterionThreshold = 1e-5;
|
|
||||||
// simulationSettings.viscousDampingFactor = 1e-3;
|
|
||||||
// simulationSettings.beVerbose = true;
|
|
||||||
// simulationSettings.shouldDraw = true;
|
|
||||||
// simulationSettings.isDebugMode = true;
|
|
||||||
// simulationSettings.debugModeStep = 100000;
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
const bool drawFullPatternSimulationResults = false;
|
const bool drawFullPatternSimulationResults = false;
|
||||||
if (drawFullPatternSimulationResults) {
|
if (drawFullPatternSimulationResults) {
|
||||||
global.fullPatternSimulationJobs[0]->pMesh->registerForDrawing(
|
global.fullPatternSimulationJobs[0]->pMesh->registerForDrawing(
|
||||||
ReducedPatternOptimization::Colors::fullInitial);
|
ReducedPatternOptimization::Colors::fullInitial);
|
||||||
}
|
}
|
||||||
#endif
|
// LinearSimulationModel linearSimulator;
|
||||||
results.wasSuccessful = true;
|
|
||||||
for (int simulationScenarioIndex : global.simulationScenarioIndices) {
|
for (int simulationScenarioIndex : global.simulationScenarioIndices) {
|
||||||
const std::shared_ptr<SimulationJob> &pFullPatternSimulationJob
|
const std::shared_ptr<SimulationJob> &pFullPatternSimulationJob
|
||||||
= global.fullPatternSimulationJobs[simulationScenarioIndex];
|
= global.fullPatternSimulationJobs[simulationScenarioIndex];
|
||||||
|
|
||||||
SimulationResults fullPatternResults = simulator.executeSimulation(pFullPatternSimulationJob,
|
SimulationResults fullPatternResults = simulator.executeSimulation(pFullPatternSimulationJob,
|
||||||
simulationSettings);
|
simulationSettings);
|
||||||
// if (!fullPatternResults.converged) {
|
|
||||||
// DRMSimulationModel::Settings simulationSettings_secondRound;
|
|
||||||
// simulationSettings_secondRound.viscousDampingFactor = 2e-3;
|
|
||||||
// simulationSettings_secondRound.useKineticDamping = true;
|
|
||||||
// simulationSettings.maxDRMIterations = 200000;
|
|
||||||
// fullPatternResults = simulator.executeSimulation(pFullPatternSimulationJob,
|
|
||||||
// simulationSettings_secondRound);
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
// std::cout << "Simulation job " << pFullPatternSimulationJob->getLabel()
|
|
||||||
// << " used viscous damping." << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!fullPatternResults.converged) {
|
|
||||||
results.wasSuccessful = false;
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
std::cout << "Simulation job " << pFullPatternSimulationJob->getLabel()
|
|
||||||
<< " did not converge." << std::endl;
|
|
||||||
// DRMSimulationModel::Settings debugSimulationSettings;
|
|
||||||
// debugSimulationSettings.debugModeStep = 50;
|
|
||||||
// // // debugSimulationSettings.maxDRMIterations = 100000;
|
|
||||||
// debugSimulationSettings.shouldDraw = true;
|
|
||||||
// // debugSimulationSettings.drawingStep = debugSimulationSettings.debugModeStep;
|
|
||||||
// debugSimulationSettings.shouldCreatePlots = true;
|
|
||||||
// // // debugSimulationSettings.Dtini = 0.06;
|
|
||||||
// debugSimulationSettings.beVerbose = true;
|
|
||||||
// debugSimulationSettings.averageResidualForcesCriterionThreshold = 1e-5;
|
|
||||||
// debugSimulationSettings.maxDRMIterations = 100000;
|
|
||||||
// debugSimulationSettings.totalTranslationalKineticEnergyThreshold = 1e-8;
|
|
||||||
// debugSimulationSettings.viscousDampingFactor = 1e-2;
|
|
||||||
// // // debugSimulationSettings.totalExternalForcesNormPercentageTermination = 1e-3;
|
|
||||||
// // // debugSimulationSettings.shouldUseTranslationalKineticEnergyThreshold = true;
|
|
||||||
// auto debugResults = simulator.executeSimulation(pFullPatternSimulationJob,
|
|
||||||
// debugSimulationSettings);
|
|
||||||
// debugResults.setLabelPrefix("debugResults");
|
|
||||||
// debugResults.registerForDrawing();
|
|
||||||
// polyscope::show();
|
|
||||||
// debugResults.unregister();
|
|
||||||
std::filesystem::path outputPath(
|
|
||||||
std::filesystem::path("../nonConvergingJobs")
|
|
||||||
.append(m_pFullPatternSimulationMesh->getLabel())
|
|
||||||
.append("final_" + pFullPatternSimulationJob->getLabel()));
|
|
||||||
std::filesystem::create_directories(outputPath);
|
|
||||||
pFullPatternSimulationJob->save(outputPath);
|
|
||||||
simulationSettings.save(outputPath);
|
|
||||||
#endif
|
|
||||||
std::terminate();
|
|
||||||
return;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
if (drawFullPatternSimulationResults) {
|
if (drawFullPatternSimulationResults) {
|
||||||
// SimulationResults fullPatternResults_linear = linearSimulator.executeSimulation(
|
// SimulationResults fullPatternResults_linear = linearSimulator.executeSimulation(
|
||||||
// pFullPatternSimulationJob);
|
// pFullPatternSimulationJob);
|
||||||
fullPatternResults.registerForDrawing(ReducedPatternOptimization::Colors::fullDeformed,
|
fullPatternResults.registerForDrawing(ReducedPatternOptimization::Colors::fullDeformed,
|
||||||
|
true,
|
||||||
true);
|
true);
|
||||||
// fullPatternResults_linear.labelPrefix += "_linear";
|
// fullPatternResults_linear.labelPrefix += "_linear";
|
||||||
// fullPatternResults_linear.registerForDrawing(ReducedModelOptimization::Colors::fullDeformed,
|
// fullPatternResults_linear.registerForDrawing(ReducedModelOptimization::Colors::fullDeformed,
|
||||||
|
|
@ -1502,7 +1378,6 @@ void ReducedModelOptimizer::optimize(
|
||||||
fullPatternResults.unregister();
|
fullPatternResults.unregister();
|
||||||
// fullPatternResults_linear.unregister();
|
// fullPatternResults_linear.unregister();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
global.fullPatternResults[simulationScenarioIndex] = fullPatternResults;
|
global.fullPatternResults[simulationScenarioIndex] = fullPatternResults;
|
||||||
SimulationJob reducedPatternSimulationJob;
|
SimulationJob reducedPatternSimulationJob;
|
||||||
reducedPatternSimulationJob.pMesh = m_pReducedPatternSimulationMesh;
|
reducedPatternSimulationJob.pMesh = m_pReducedPatternSimulationMesh;
|
||||||
|
|
@ -1513,19 +1388,15 @@ void ReducedModelOptimizer::optimize(
|
||||||
= std::make_shared<SimulationJob>(reducedPatternSimulationJob);
|
= std::make_shared<SimulationJob>(reducedPatternSimulationJob);
|
||||||
// std::cout << "Ran sim scenario:" << simulationScenarioIndex << std::endl;
|
// std::cout << "Ran sim scenario:" << simulationScenarioIndex << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYSCOPE_DEFINED
|
|
||||||
if (drawFullPatternSimulationResults) {
|
if (drawFullPatternSimulationResults) {
|
||||||
global.fullPatternSimulationJobs[0]->pMesh->unregister();
|
global.fullPatternSimulationJobs[0]->pMesh->unregister();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// if (global.optimizationSettings.normalizationStrategy
|
// if (global.optimizationSettings.normalizationStrategy
|
||||||
// != Settings::NormalizationStrategy::NonNormalized) {
|
// != Settings::NormalizationStrategy::NonNormalized) {
|
||||||
computeObjectiveValueNormalizationFactors();
|
computeObjectiveValueNormalizationFactors();
|
||||||
// }
|
// }
|
||||||
#ifdef POLYSCOPE_DEFINED
|
PolyscopeInterface::deinitPolyscope();
|
||||||
std::cout << "Running reduced model optimization" << std::endl;
|
Results optResults = runOptimization(optimizationSettings);
|
||||||
#endif
|
|
||||||
runOptimization(optimizationSettings, results);
|
return optResults;
|
||||||
results.notes = optimizationNotes;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,9 @@ class ReducedModelOptimizer
|
||||||
m_fullPatternOppositeInterfaceViPairs;
|
m_fullPatternOppositeInterfaceViPairs;
|
||||||
std::unordered_map<size_t, size_t> nodeToSlot;
|
std::unordered_map<size_t, size_t> nodeToSlot;
|
||||||
std::unordered_map<size_t, std::unordered_set<size_t>> slotToNode;
|
std::unordered_map<size_t, std::unordered_set<size_t>> slotToNode;
|
||||||
std::string optimizationNotes;
|
|
||||||
std::vector<std::function<
|
|
||||||
void(const double &,
|
|
||||||
const std::vector<std::pair<FullPatternVertexIndex, FullPatternVertexIndex>> &,
|
|
||||||
SimulationJob &)>>
|
|
||||||
constructBaseScenarioFunctions;
|
|
||||||
std::vector<bool> scenarioIsSymmetrical;
|
|
||||||
int fullPatternNumberOfEdges;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr static std::array<int, 5> simulationScenariosResolution = {11, 11, 20, 20, 20};
|
constexpr static std::array<int, 5> simulationScenariosResolution = {4, 4, 4, 4, 4};
|
||||||
// constexpr static std::array<int, 5> simulationScenariosResolution = {3, 3, 3, 3, 3};
|
|
||||||
inline static int totalNumberOfSimulationScenarios
|
inline static int totalNumberOfSimulationScenarios
|
||||||
= std::accumulate(simulationScenariosResolution.begin(),
|
= std::accumulate(simulationScenariosResolution.begin(),
|
||||||
simulationScenariosResolution.end(),
|
simulationScenariosResolution.end(),
|
||||||
|
|
@ -47,16 +38,10 @@ public:
|
||||||
inline static int fanSize{6};
|
inline static int fanSize{6};
|
||||||
inline static double initialHexagonSize{0.3};
|
inline static double initialHexagonSize{0.3};
|
||||||
inline static VectorType patternPlaneNormal{0, 0, 1};
|
inline static VectorType patternPlaneNormal{0, 0, 1};
|
||||||
void optimize(
|
ReducedPatternOptimization::Results optimize(
|
||||||
const ReducedPatternOptimization::Settings &xRanges,
|
const ReducedPatternOptimization::Settings &xRanges,
|
||||||
ReducedPatternOptimization::Results &results,
|
|
||||||
const std::vector<ReducedPatternOptimization::BaseSimulationScenario> &simulationScenarios
|
const std::vector<ReducedPatternOptimization::BaseSimulationScenario> &simulationScenarios
|
||||||
= std::vector<ReducedPatternOptimization::BaseSimulationScenario>(
|
= std::vector<ReducedPatternOptimization::BaseSimulationScenario>());
|
||||||
{ReducedPatternOptimization::Axial,
|
|
||||||
ReducedPatternOptimization::Shear,
|
|
||||||
ReducedPatternOptimization::Bending,
|
|
||||||
ReducedPatternOptimization::Dome,
|
|
||||||
ReducedPatternOptimization::Saddle}));
|
|
||||||
double operator()(const Eigen::VectorXd &x, Eigen::VectorXd &) const;
|
double operator()(const Eigen::VectorXd &x, Eigen::VectorXd &) const;
|
||||||
|
|
||||||
ReducedModelOptimizer(const std::vector<size_t> &numberOfNodesPerSlot);
|
ReducedModelOptimizer(const std::vector<size_t> &numberOfNodesPerSlot);
|
||||||
|
|
@ -82,7 +67,7 @@ public:
|
||||||
double innerHexagonRotationAngle);
|
double innerHexagonRotationAngle);
|
||||||
static double objective(double b, double r, double E);
|
static double objective(double b, double r, double E);
|
||||||
|
|
||||||
static std::vector<std::shared_ptr<SimulationJob>> createFullPatternSimulationJobs(
|
static std::vector<std::shared_ptr<SimulationJob>> createFullPatternSimulationScenarios(
|
||||||
const std::shared_ptr<SimulationMesh> &pMesh,
|
const std::shared_ptr<SimulationMesh> &pMesh,
|
||||||
const std::unordered_map<size_t, size_t> &fullPatternOppositeInterfaceViMap);
|
const std::unordered_map<size_t, size_t> &fullPatternOppositeInterfaceViMap);
|
||||||
|
|
||||||
|
|
@ -183,12 +168,10 @@ private:
|
||||||
const SimulationResults &fullModelResults,
|
const SimulationResults &fullModelResults,
|
||||||
const std::unordered_map<size_t, size_t> &displacementsReducedToFullMap,
|
const std::unordered_map<size_t, size_t> &displacementsReducedToFullMap,
|
||||||
Eigen::MatrixX3d &optimalDisplacementsOfReducedModel);
|
Eigen::MatrixX3d &optimalDisplacementsOfReducedModel);
|
||||||
static void runOptimization(const ReducedPatternOptimization::Settings &settings,
|
static ReducedPatternOptimization::Results runOptimization(
|
||||||
ReducedPatternOptimization::Results &results);
|
const ReducedPatternOptimization::Settings &settings);
|
||||||
std::vector<std::shared_ptr<SimulationJob>> createFullPatternSimulationJobs(
|
std::vector<std::shared_ptr<SimulationJob>> createFullPatternSimulationScenarios(
|
||||||
const std::shared_ptr<SimulationMesh> &pMesh,
|
const std::shared_ptr<SimulationMesh> &pMesh);
|
||||||
const std::vector<std::pair<ReducedPatternOptimization::BaseSimulationScenario, double>>
|
|
||||||
&maxForceMagnitudes);
|
|
||||||
void computeMaps(PatternGeometry &fullModel, PatternGeometry &reducedPattern);
|
void computeMaps(PatternGeometry &fullModel, PatternGeometry &reducedPattern);
|
||||||
void createSimulationMeshes(PatternGeometry &fullModel, PatternGeometry &reducedModel);
|
void createSimulationMeshes(PatternGeometry &fullModel, PatternGeometry &reducedModel);
|
||||||
static void initializeOptimizationParameters(const std::shared_ptr<SimulationMesh> &mesh,
|
static void initializeOptimizationParameters(const std::shared_ptr<SimulationMesh> &mesh,
|
||||||
|
|
@ -197,20 +180,12 @@ private:
|
||||||
static double objective(long n, const double *x);
|
static double objective(long n, const double *x);
|
||||||
DRMSimulationModel simulator;
|
DRMSimulationModel simulator;
|
||||||
void computeObjectiveValueNormalizationFactors();
|
void computeObjectiveValueNormalizationFactors();
|
||||||
static void getResults(const dlib::function_evaluation &optimizationResult_dlib,
|
static ReducedPatternOptimization::Results getResults(
|
||||||
const ReducedPatternOptimization::Settings &settings,
|
const dlib::function_evaluation &optimizationResult_dlib,
|
||||||
ReducedPatternOptimization::Results &results);
|
const ReducedPatternOptimization::Settings &settings);
|
||||||
double computeFullPatternMaxSimulationForce(
|
std::vector<double> getFullPatternMaxSimulationForces();
|
||||||
|
double getFullPatternMaxSimulationForce(
|
||||||
const ReducedPatternOptimization::BaseSimulationScenario &scenario);
|
const ReducedPatternOptimization::BaseSimulationScenario &scenario);
|
||||||
std::vector<std::pair<ReducedPatternOptimization::BaseSimulationScenario, double>>
|
|
||||||
computeFullPatternMaxSimulationForces(
|
|
||||||
const std::vector<ReducedPatternOptimization::BaseSimulationScenario>
|
|
||||||
&desiredBaseSimulationScenarioIndices);
|
|
||||||
|
|
||||||
std::vector<std::pair<ReducedPatternOptimization::BaseSimulationScenario, double>>
|
|
||||||
getFullPatternMaxSimulationForces(
|
|
||||||
const std::vector<ReducedPatternOptimization::BaseSimulationScenario>
|
|
||||||
&desiredBaseSimulationScenarioIndices);
|
|
||||||
};
|
};
|
||||||
void updateMesh(long n, const double *x);
|
void updateMesh(long n, const double *x);
|
||||||
#endif // REDUCEDMODELOPTIMIZER_HPP
|
#endif // REDUCEDMODELOPTIMIZER_HPP
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue