Skip to content

Commit 4e5ba16

Browse files
committed
centering: CenterStyle->Centering
1 parent 923b580 commit 4e5ba16

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/include/centering.hxx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace centering
77
{
88

9-
enum CenterStyle
9+
enum Centering
1010
{
1111
NC, // node-centered
1212
EC, // edge-centered
@@ -24,16 +24,15 @@ CC | ccc ccc ccc
2424
*/
2525

2626
template <typename PATCH>
27-
Double3 get_pos(PATCH patch, Int3 index, CenterStyle style, int component = -1)
27+
Double3 get_pos(PATCH patch, Int3 index, Centering c, int component = -1)
2828
{
2929
if (component == -1) {
30-
assert(style == NC || style == CC);
30+
assert(c == NC || c == CC);
3131
}
3232

3333
Double3 pos;
3434
for (int d = 0; d < 3; d++) {
35-
if (style == CC || (style == FC && d != component) ||
36-
(style == EC && d == component)) {
35+
if (c == CC || (c == FC && d != component) || (c == EC && d == component)) {
3736
pos[d] = patch.get_cc(index[d], d);
3837
} else {
3938
pos[d] = patch.get_nc(index[d], d);
@@ -44,13 +43,13 @@ Double3 get_pos(PATCH patch, Int3 index, CenterStyle style, int component = -1)
4443

4544
struct Centerer
4645
{
47-
CenterStyle style;
48-
Centerer(CenterStyle style) : style(style) {}
46+
Centering c;
47+
Centerer(Centering c) : c(c) {}
4948

5049
template <typename PATCH>
5150
inline Double3 get_pos(PATCH patch, Int3 index, int component = -1) const
5251
{
53-
return centering::get_pos(patch, index, style, component);
52+
return centering::get_pos(patch, index, c, component);
5453
}
5554
};
5655

0 commit comments

Comments
 (0)