small flatmesh fix

This commit is contained in:
looooo
2018-06-08 16:08:31 +02:00
parent 08910e71e4
commit 83dd39b4ce

View File

@@ -645,7 +645,7 @@ void LscmRelax::rotate_by_min_bound_area()
double phi;
double min_phi = 0;
double min_area = 0;
bool x_dominant;
bool x_dominant = 0;
// rotate vector by 90 degree and find min area
for (int i = 0; i < n + 1; i++ )
{
@@ -661,11 +661,11 @@ void LscmRelax::rotate_by_min_bound_area()
min_phi = phi;
x_dominant = x_distance > y_distance;
}
Eigen::Matrix<double, 2, 2> rot;
min_phi += x_dominant * M_PI / 2;
rot << std::cos(min_phi), std::sin(min_phi), -std::sin(min_phi), std::cos(min_phi);
this->flat_vertices = rot * this->flat_vertices;
}
Eigen::Matrix<double, 2, 2> rot;
min_phi += x_dominant * M_PI / 2;
rot << std::cos(min_phi), std::sin(min_phi), -std::sin(min_phi), std::cos(min_phi);
this->flat_vertices = rot * this->flat_vertices;
}
std::vector<long> LscmRelax::get_fem_fixed_pins()