Skip to content

Commit

Permalink
coordinate not point
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Nov 3, 2023
1 parent 9492e4b commit 4389e41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions grid/examples/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ fn test_surface_area() {
for i in 0..grid.topology().entity_count(2) {
let v = grid.geometry().cell_vertices(i).unwrap();
let e1 = [
grid.geometry().point(v[1]).unwrap()[0] - grid.geometry().point(v[0]).unwrap()[0],
grid.geometry().point(v[1]).unwrap()[1] - grid.geometry().point(v[0]).unwrap()[1],
grid.geometry().point(v[1]).unwrap()[2] - grid.geometry().point(v[0]).unwrap()[2],
grid.geometry().coordinate(v[1], 0).unwrap() - grid.geometry().coordinate(v[0], 0).unwrap(),
grid.geometry().coordinate(v[1], 1).unwrap() - grid.geometry().coordinate(v[0], 1).unwrap(),
grid.geometry().coordinate(v[1], 2).unwrap() - grid.geometry().coordinate(v[0], 2).unwrap(),
];
let e2 = [
grid.geometry().point(v[2]).unwrap()[0] - grid.geometry().point(v[0]).unwrap()[0],
grid.geometry().point(v[2]).unwrap()[1] - grid.geometry().point(v[0]).unwrap()[1],
grid.geometry().point(v[2]).unwrap()[2] - grid.geometry().point(v[0]).unwrap()[2],
grid.geometry().coordinate(v[2], 0).unwrap() - grid.geometry().coordinate(v[0], 0).unwrap(),
grid.geometry().coordinate(v[2], 1).unwrap() - grid.geometry().coordinate(v[0], 1).unwrap(),
grid.geometry().coordinate(v[2], 2).unwrap() - grid.geometry().coordinate(v[0], 2).unwrap(),
];
let c = [
e1[1] * e2[2] - e1[2] * e2[1],
Expand Down

0 comments on commit 4389e41

Please sign in to comment.