Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pyramid face corner #863

Merged
merged 16 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ t8_dpyramid_get_face_corner (const t8_dpyramid_t *pyra, int face, int corner)
return t8_dtet_face_corner[face][corner];
}
else {
int corner_number = t8_dpyramid_face_corner[face][corner];
int corner_number = t8_dpyramid_face_corner[pyra->pyramid.type-6][face][corner];
lukasdreyer marked this conversation as resolved.
Show resolved Hide resolved
T8_ASSERT (0 <= corner_number && corner_number < T8_DPYRAMID_FACES);
return corner_number;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,26 @@ const int t8_dpyramid_tritype_rootface_to_face[2][4] = {
{ 2, 0, 2, 0 },
{ 1, 0, 1, 0 } };

const int t8_dpyramid_face_corner[5][4] = {
const int t8_dpyramid_face_corner[2][5][4] = {
{
{ 0, 2, 4, -1 },
{ 1, 3, 4, -1 },
{ 0, 1, 4, -1 },
{ 2, 3, 4, -1 },
{ 0, 1, 2, 3 } };
{ 0, 1, 2, 3 }
},{
{ 2, 3, 4, -1 },
{ 0, 1, 4, -1 },
{ 1, 3, 4, -1 },
{ 0, 2, 4, -1 },
{ 0, 1, 2, 3 }
/*
{ 1, 3, 4, -1 },
{ 0, 2, 4, -1 },
{ 2, 3, 4, -1 },
{ 0, 1, 4, -1 },
{ 0, 1, 2, 3 }
*/
}
};
/* clang-format on */
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ extern const int t8_dtet_type_cid_to_pyramid_parenttype[6][8];
/** The corner numbers of the face of a pyramid
* corner_number = A(face, corner_number_at_face)
holke marked this conversation as resolved.
Show resolved Hide resolved
*/
extern const int t8_dpyramid_face_corner[5][4];
extern const int t8_dpyramid_face_corner[2][5][4];

#endif // T8_DPYRAMID_CONNECTIVITY_H
Loading