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

Merge entity orientation information of grid, fe values and constraint handler #704

Open
termi-official opened this issue May 10, 2023 · 1 comment
Labels
refactoring Code refactoring, no functional change.

Comments

@termi-official
Copy link
Member

We should merge the constraint handler entity orientation api (

struct PeriodicFacePair
mirror::FaceIndex
image::FaceIndex
rotation::UInt8 # relative rotation of the mirror face counter-clockwise the *image* normal (only relevant in 3D)
mirrored::Bool # mirrored => opposite normal vectors
end
) with the grid orientation api (

Ferrite.jl/src/Grid/grid.jl

Lines 1385 to 1432 in 90a5889

"""
PathOrientationInfo
Orientation information for 1D entities.
The orientation for 1D entities is defined by the indices of the grid nodes
associated to the vertices. To give an example, the oriented path
```
1 ---> 2
```
is called *regular*, indicated by `regular=true`, while the oriented path
```
2 ---> 1
```
is called *inverted*, indicated by `regular=false`.
"""
struct PathOrientationInfo
regular::Bool # Indicator whether the orientation is regular or inverted.
end
"""
SurfaceOrientationInfo
Orientation information for 2D entities. Such an entity can be
possibly flipped (i.e. the defining vertex order is reverse to the
spanning vertex order) and the vertices can be rotated against each other.
Take for example the faces
```
1---2 2---3
| A | | B |
4---3 1---4
```
which are rotated against each other by 90° (shift index is 1) or the faces
```
1---2 2---1
| A | | B |
4---3 3---4
```
which are flipped against each other. Any combination of these can happen.
The combination to map this local face to the defining face is encoded with
this data structure via ``rotate \\circ flip`` where the rotation is indiced by
the shift index.
!!!NOTE TODO implement me.
"""
struct SurfaceOrientationInfo
#flipped::Bool
#shift_index::Int
end
). Both do essentially the same.

@termi-official termi-official added the refactoring Code refactoring, no functional change. label May 10, 2023
@termi-official
Copy link
Member Author

There is more to consider soon:
#743 (comment)
#743 (comment)

@termi-official termi-official changed the title Merge entity orientation information of grid and constraint handler Merge entity orientation information of grid, fe values and constraint handler Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring, no functional change.
Projects
None yet
Development

No branches or pull requests

1 participant