-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable_mesh.sh
34 lines (29 loc) · 1.15 KB
/
table_mesh.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Variables
mesh_files=("project/mesh_test/hemisphere-quad-tri.obj" "project/mesh_test/hemisphere-cut.obj" "project/mesh_test/camelhead-cut.obj")
iterations=(20)
methods=("ARAP" "SYMMETRIC-DIRICHLET" "EXPONENTIAL-SYMMETRIC-DIRICHLET" "HENCKY-STRAIN" "AMIPS" "CONFORMAL-AMIPS-2D" "UNTANGLE-2D")
# Create the build directory if it doesn't exist
mkdir -p build
# Run cmake and make
cmake -B build -DCMAKE_BUILD_TYPE=Release && cd build && make -j
if [ $? -ne 0 ]; then
echo "Build failed"
exit 1
fi
for mesh in "${mesh_files[@]}"; do
for iter in "${iterations[@]}"; do
for method in "${methods[@]}"; do
echo "Running project with mesh: $mesh, iterations: $iter, method: $method"
if [ "$method" == "UNTANGLE-2D" ]; then
./project/SLIM_intern "$mesh" 1 max_iterations="$iter" "$method" epsilon=1e-1
else
./project/SLIM_intern "$mesh" 1 max_iterations="$iter" "$method"
fi
if [ $? -ne 0 ]; then
echo "Run failed with mesh: $mesh, iterations: $iter, method: $method"
fi
done
done
done
echo "All tasks completed"