@@ -142,21 +142,22 @@ struct t8_standalone_scheme
142142 }
143143
144144 static constexpr u_int8_t
145- get_typebit (u_int8_t type, int pos){
146- return (type & (1 <<pos))>>pos;
145+ get_typebit (u_int8_t type, int pos)
146+ {
147+ return (type & (1 << pos)) >> pos;
147148 }
148149 static constexpr void
149- set_typebit_from_zero (u_int8_t *type, u_int8_t pos, u_int8_t bit){
150- *type |= ((bit&&1 )<<pos);
150+ set_typebit_from_zero (u_int8_t *type, u_int8_t pos, u_int8_t bit)
151+ {
152+ *type |= ((bit && 1 ) << pos);
151153 }
152154 static constexpr void
153- set_typebit (u_int8_t *type, u_int8_t pos, u_int8_t bit){
154- *type &= !(1 <<pos);
155- set_typebit_from_zero (type,pos,bit);
155+ set_typebit (u_int8_t *type, u_int8_t pos, u_int8_t bit)
156+ {
157+ *type &= !(1 << pos);
158+ set_typebit_from_zero (type, pos, bit);
156159 }
157160
158-
159-
160161 // ################################################____SHAPE INFORMATION____################################################
161162
162163 /* * Compute the number of corners of a given element.
@@ -326,7 +327,7 @@ struct t8_standalone_scheme
326327 return T8_ECLASS_TRIANGLE;
327328 }
328329 case T8_ECLASS_PYRAMID:
329- if (get_typebit (el->type ,0 ) != get_typebit (el->type ,1 )) {
330+ if (get_typebit (el->type , 0 ) != get_typebit (el->type , 1 )) {
330331 return T8_ECLASS_TRIANGLE;
331332 }
332333 else {
@@ -868,8 +869,7 @@ struct t8_standalone_scheme
868869 }
869870 else {
870871 const t8_standalone_element<TEclass> *el = (const t8_standalone_element<TEclass> *) elem;
871- const int child_id
872- = t8_standalone_lut_type_face_facechildid_to_childid<TEclass>[el->type ][face][face_child];
872+ const int child_id = t8_standalone_lut_type_face_facechildid_to_childid<TEclass>[el->type ][face][face_child];
873873 return t8_standalone_lut_type_childid_face_to_childface<TEclass>[el->type ][child_id][face];
874874 }
875875 }
@@ -1019,8 +1019,8 @@ struct t8_standalone_scheme
10191019 // all edges containing dim must be fulfilled with x_d-a_d >= x_j-a_j or x_j-a_j <= x_d-a_d
10201020 if constexpr (T8_ELEMENT_NUM_EQUATIONS[TEclass]) {
10211021 for (int ieq = 0 ; ieq < T8_ELEMENT_NUM_EQUATIONS[TEclass]; ++ieq) {
1022- if ((t8_type_edge_equations<TEclass>[ieq][0 ] == dim && get_typebit (el->type ,ieq))
1023- || (t8_type_edge_equations<TEclass>[ieq][1 ] == dim && ! get_typebit (el->type ,ieq))) {
1022+ if ((t8_type_edge_equations<TEclass>[ieq][0 ] == dim && get_typebit (el->type , ieq))
1023+ || (t8_type_edge_equations<TEclass>[ieq][1 ] == dim && !get_typebit (el->type , ieq))) {
10241024 return 0 ;
10251025 }
10261026 }
@@ -1035,8 +1035,8 @@ struct t8_standalone_scheme
10351035 // all edges containing dimid must be fulfilled with x_d-a_d <= x_j-a_j or x_j-a_j >= x_d-a_d
10361036 if constexpr (T8_ELEMENT_NUM_EQUATIONS[TEclass]) {
10371037 for (int ieq = 0 ; ieq < T8_ELEMENT_NUM_EQUATIONS[TEclass]; ieq++) {
1038- if ((t8_type_edge_equations<TEclass>[ieq][0 ] == dim && !get_typebit (el->type ,ieq))
1039- || (t8_type_edge_equations<TEclass>[ieq][1 ] == dim && get_typebit (el->type ,ieq))) {
1038+ if ((t8_type_edge_equations<TEclass>[ieq][0 ] == dim && !get_typebit (el->type , ieq))
1039+ || (t8_type_edge_equations<TEclass>[ieq][1 ] == dim && get_typebit (el->type , ieq))) {
10401040 return 0 ;
10411041 }
10421042 }
@@ -1121,7 +1121,7 @@ struct t8_standalone_scheme
11211121 /* *Determine typebit*/
11221122 int typebit = t8_standalone_lut_type_face_to_typebit<TEclass>[el->type ][face];
11231123 /* *Change typebit*/
1124- neighbor->type ^= (1 << typebit);
1124+ neighbor->type ^= (1 << typebit);
11251125 *neigh_face = t8_standalone_lut_type_face_to_neighface<TEclass>[el->type ][face];
11261126 return element_is_inside_root (neighbor);
11271127 }
@@ -1149,7 +1149,7 @@ struct t8_standalone_scheme
11491149 /* *For all neighboring typebits, change typebit*/
11501150 if (t8_type_edge_equations<TEclass>[ieq][0 ] == facenormal_dim
11511151 || t8_type_edge_equations<TEclass>[ieq][1 ] == facenormal_dim) {
1152- neighbor->type ^= (1 << ieq); /* ASSERT that flip is in correct direction */
1152+ neighbor->type ^= (1 << ieq); /* ASSERT that flip is in correct direction */
11531153 }
11541154 }
11551155 *neigh_face = t8_standalone_lut_type_face_to_neighface<TEclass>[el->type ][face];
@@ -1741,7 +1741,7 @@ struct t8_standalone_scheme
17411741 t8_debugf (" x_%i: %i \n " , idim, el->coords [idim]);
17421742 }
17431743 for (int e_num = 0 ; e_num < T8_ELEMENT_NUM_EQUATIONS[TEclass]; e_num++) {
1744- t8_debugf (" t_%i: %i \n " , e_num, get_typebit (el->type ,e_num));
1744+ t8_debugf (" t_%i: %i \n " , e_num, get_typebit (el->type , e_num));
17451745 }
17461746 }
17471747
@@ -2240,7 +2240,7 @@ struct t8_standalone_scheme
22402240 for (int ieq = 0 ; ieq < T8_ELEMENT_NUM_EQUATIONS[TEclass]; ieq++) {
22412241 const int ifaceeq = t8_standalone_lut_rootface_eq_to_faceeq<TEclass>[root_face][ieq];
22422242 if (ifaceeq != -1 ) {
2243- set_typebit_from_zero (&boundary->type ,ifaceeq, get_typebit (el->type ,ieq));
2243+ set_typebit_from_zero (&boundary->type , ifaceeq, get_typebit (el->type , ieq));
22442244 }
22452245 }
22462246 T8_ASSERT (t8_standalone_scheme<TFaceEclass>::element_is_valid ((t8_element_t *) boundary));
@@ -2313,18 +2313,19 @@ struct t8_standalone_scheme
23132313 for (int ieq = 0 ; ieq < T8_ELEMENT_NUM_EQUATIONS[TEclass]; ieq++) {
23142314 const int ifaceeq = t8_standalone_lut_rootface_eq_to_faceeq<TEclass>[root_face][ieq];
23152315 if (ifaceeq != -1 ) {
2316- set_typebit_from_zero (&el->type ,ieq, get_typebit (face->type ,ifaceeq));
2316+ set_typebit_from_zero (&el->type , ieq, get_typebit (face->type , ifaceeq));
23172317 }
23182318 }
23192319 /* * Set those typebits, that are connected to the face_normaldim of root_face*/
23202320 for (int ieq = 0 ; ieq < T8_ELEMENT_NUM_EQUATIONS[TEclass]; ieq++) {
2321- const int facenormal_dim
2322- = t8_standalone_lut_type_face_to_facenormal_dim<TEclass>[root_type][root_face];
2321+ const int facenormal_dim = t8_standalone_lut_type_face_to_facenormal_dim<TEclass>[root_type][root_face];
23232322 if (t8_type_edge_equations<TEclass>[ieq][0 ] == facenormal_dim) {
2324- set_typebit_from_zero (&el->type ,ieq, !t8_standalone_lut_type_face_to_is_1_boundary<TEclass>[root_type][root_face]);
2323+ set_typebit_from_zero (&el->type , ieq,
2324+ !t8_standalone_lut_type_face_to_is_1_boundary<TEclass>[root_type][root_face]);
23252325 }
23262326 else if (t8_type_edge_equations<TEclass>[ieq][1 ] == facenormal_dim) {
2327- set_typebit_from_zero (&el->type ,ieq, t8_standalone_lut_type_face_to_is_1_boundary<TEclass>[root_type][root_face]);
2327+ set_typebit_from_zero (&el->type , ieq,
2328+ t8_standalone_lut_type_face_to_is_1_boundary<TEclass>[root_type][root_face]);
23282329 }
23292330 }
23302331 return t8_standalone_lut_type_rootface_to_face<TEclass>[el->type ][root_face];
@@ -2391,7 +2392,7 @@ struct t8_standalone_scheme
23912392 coord_v1 = (coord_v1 << level) & ((1 << T8_ELEMENT_MAXLEVEL[TEclass]) - 1 );
23922393
23932394 if (coord_v0 == coord_v1) {
2394- set_typebit_from_zero (&type,e, get_typebit (el->type ,e) | get_typebit (type,e));
2395+ set_typebit_from_zero (&type, e, get_typebit (el->type , e) | get_typebit (type, e));
23952396 }
23962397 else if (coord_v0 < coord_v1) {
23972398 type |= (1 << e);
0 commit comments