Skip to content

Commit

Permalink
fix uniform faceting
Browse files Browse the repository at this point in the history
  • Loading branch information
H-A-M-G-E-R committed Apr 2, 2024
1 parent 7cfff77 commit 1ba9828
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions miratope-core/src/conc/faceting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,22 +974,31 @@ fn faceting_subdim(
}

let mut poly = Concrete {
vertices: new_vertices,
vertices: new_vertices.clone(),
abs: abs.clone(),
};
poly.recenter();


if let Some(circumsphere) = Hypersphere::circumsphere(&new_vertices) {
poly.recenter_with(&circumsphere.center);
}

let amount = poly.element_types()[1].len();

if amount <= 1 {
output.push((ranks, new_facets.clone()));
output_facets.push(new_facets.clone());
} else {
poly.element_sort();
let components = poly.defiss();
let components = poly.split();
let mut isogonal = true;
for component in components {
if component.element_types()[1].len() > 1 {
for mut component in components {
if let Some(circumsphere) = Hypersphere::circumsphere(component.vertices()) {
component.recenter_with(&circumsphere.center);
if component.element_types()[1].len() > 1 {
isogonal = false;
break;
}
} else {
isogonal = false;
break;
}
Expand Down

0 comments on commit 1ba9828

Please sign in to comment.