diff --git a/.clang-format b/.clang-format
index 60cf9d536e56d8675468717814ffb5698298cf1e..754996e110483e274f0dc1af97bd91ccccec53a8 100644
--- a/.clang-format
+++ b/.clang-format
@@ -4,7 +4,25 @@
 BasedOnStyle: LLVM
 UseTab: Never
 IndentWidth: 4
-BreakBeforeBraces: Allman
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterNamespace: true
+  AfterClass: true
+  AfterStruct: true
+  AfterFunction: true
+  BeforeLambdaBody: false
+  AfterControlStatement: Always
+  BeforeElse: true
+  AfterCaseLabel: true
+  BeforeWhile: false
+  BeforeCatch: true
+  AfterEnum: true
+  AfterUnion: true
+  AfterExternBlock: true
+  SplitEmptyNamespace: false
+  SplitEmptyFunction: false
+  SplitEmptyRecord: false
+  IndentBraces: false
 AccessModifierOffset: -4
 SortIncludes: false
 ColumnLimit: 0
diff --git a/dart/src/dart.h b/dart/src/dart.h
index 4770c325e9723481115cc87618b8d28688405486..60c5692001e5af91ad4fc4e7fa39f4f4a6bc71c5 100644
--- a/dart/src/dart.h
+++ b/dart/src/dart.h
@@ -90,4 +90,4 @@ class FaceEq;
 
 } // namespace dart
 
-#endif //DART_H
+#endif // DART_H
diff --git a/dart/src/wAdjoint.cpp b/dart/src/wAdjoint.cpp
index 1d75d8a161601af7cc87be39faea99c2d5baaa17..4dd690ba30a5bbeee109ff5ffec975555812ef65 100644
--- a/dart/src/wAdjoint.cpp
+++ b/dart/src/wAdjoint.cpp
@@ -525,7 +525,7 @@ void Adjoint::buildGradientResidualMesh(Eigen::SparseMatrix<double, Eigen::RowMa
     tbb::parallel_for_each(fluid->adjMap.begin(), fluid->adjMap.end(), [&](std::pair<Element *, std::vector<Element *>> p) {
         // Current element
         Element *e = p.first;
-        //Upwind element
+        // Upwind element
         Element *eU = p.second[0];
         // Build elementary matrices
         Eigen::MatrixXd Ae1, Ae2;
diff --git a/dart/src/wAdjoint.h b/dart/src/wAdjoint.h
index b2dc8ffd116cf3415e30bde0fef648e4fac4fb54..a8c678eefac9820a60beaa2834cfa83782a0b03b 100644
--- a/dart/src/wAdjoint.h
+++ b/dart/src/wAdjoint.h
@@ -105,4 +105,4 @@ private:
 };
 
 } // namespace dart
-#endif //WADJOINT_H
+#endif // WADJOINT_H
diff --git a/dart/src/wAssign.h b/dart/src/wAssign.h
index 5f8b47af9d6ee715db9399b4e9b3fb59ea59b02e..86207a90154f86cd72df0d83b05b8c6ecb19cbdb 100644
--- a/dart/src/wAssign.h
+++ b/dart/src/wAssign.h
@@ -83,4 +83,4 @@ public:
 
 } // namespace dart
 
-#endif //WASSIGN_H
+#endif // WASSIGN_H
diff --git a/dart/src/wBlowing.h b/dart/src/wBlowing.h
index ca06a0bb6a910ce8f05b232b35d121cef5eb77f4..7334194e0c35134323a0da8388f99215f5aff3ed 100644
--- a/dart/src/wBlowing.h
+++ b/dart/src/wBlowing.h
@@ -53,4 +53,4 @@ private:
 
 } // namespace dart
 
-#endif //WBLOWING_H
+#endif // WBLOWING_H
diff --git a/dart/src/wBlowingResidual.h b/dart/src/wBlowingResidual.h
index 0844cb3d1bdd8b62d0848fa7969983785f2b28aa..f2857b86e98dc4c0efd8ab244c2c3d519b53cd18 100644
--- a/dart/src/wBlowingResidual.h
+++ b/dart/src/wBlowingResidual.h
@@ -36,4 +36,4 @@ public:
 };
 
 } // namespace dart
-#endif //WBLOWINGRESIDUAL_H
+#endif // WBLOWINGRESIDUAL_H
diff --git a/dart/src/wF0Ps.h b/dart/src/wF0Ps.h
index 05e86869d983bbbb4d0a34daad6184a550ca1a3e..8c769a1787a8df56c971c7ab3b200381bdc762dd 100644
--- a/dart/src/wF0Ps.h
+++ b/dart/src/wF0Ps.h
@@ -54,4 +54,4 @@ public:
 
 } // namespace dart
 
-#endif //WF0PS_H
+#endif // WF0PS_H
diff --git a/dart/src/wF1Ct.h b/dart/src/wF1Ct.h
index 3041a2fbf7edc24c2185044fc70d9a8ddf4c1e09..096868c45170096903fee7473a04cd759576bd05 100644
--- a/dart/src/wF1Ct.h
+++ b/dart/src/wF1Ct.h
@@ -96,4 +96,4 @@ public:
 
 } // namespace dart
 
-#endif //WF1CT_H
+#endif // WF1CT_H
diff --git a/dart/src/wF1El.h b/dart/src/wF1El.h
index 90889f25cb61d201d79bf18ab3ac0199f1e6fb43..3a911b5839acb5c243be7aeac486ebb211eeb1b9 100644
--- a/dart/src/wF1El.h
+++ b/dart/src/wF1El.h
@@ -62,4 +62,4 @@ public:
 
 } // namespace dart
 
-#endif //WF1EL_H
+#endif // WF1EL_H
diff --git a/dart/src/wFace.h b/dart/src/wFace.h
index a585f5ed1b02d98e0a8e2081f8f08feaba48d02d..9b46b6c3cff00f90c3f3a148cf8846613fdc242a 100644
--- a/dart/src/wFace.h
+++ b/dart/src/wFace.h
@@ -85,4 +85,4 @@ public:
 
 } // namespace dart
 
-#endif //WFACE_H
+#endif // WFACE_H
diff --git a/dart/src/wFluid.h b/dart/src/wFluid.h
index ec10d01169bd4ee20316681e6a29be6e114e0675..600c35d91364b72f550fdbf012fadcfedb3762bf 100644
--- a/dart/src/wFluid.h
+++ b/dart/src/wFluid.h
@@ -59,4 +59,4 @@ public:
 
 } // namespace dart
 
-#endif //WFLUID_H
+#endif // WFLUID_H
diff --git a/dart/src/wFpeLSFunction.h b/dart/src/wFpeLSFunction.h
index de81d0c20e232f0dcda59c8ca6faf00024857e57..495f9e98b7f9ab9fd542ed246e920683812595af 100644
--- a/dart/src/wFpeLSFunction.h
+++ b/dart/src/wFpeLSFunction.h
@@ -49,4 +49,4 @@ public:
 
 } // namespace dart
 
-#endif //WFPELSFUNCTION_H
+#endif // WFPELSFUNCTION_H
diff --git a/dart/src/wFreestream.h b/dart/src/wFreestream.h
index 4b7d032e92495f8b8a94cec624843e18c46f3594..a3d1c0c05a802b239e34b43e203ad4ac28408bbf 100644
--- a/dart/src/wFreestream.h
+++ b/dart/src/wFreestream.h
@@ -45,4 +45,4 @@ public:
 
 } // namespace dart
 
-#endif //WFREESTREAM_H
+#endif // WFREESTREAM_H
diff --git a/dart/src/wFreestreamResidual.h b/dart/src/wFreestreamResidual.h
index cafe98ca7099aaa8395f988ee9f5b92aa6df515d..46a1ac87bc9574ea65830524c9dbef35f6b05bd8 100644
--- a/dart/src/wFreestreamResidual.h
+++ b/dart/src/wFreestreamResidual.h
@@ -38,4 +38,4 @@ public:
 };
 
 } // namespace dart
-#endif //WFREESTREAMRESIDUAL_H
+#endif // WFREESTREAMRESIDUAL_H
diff --git a/dart/src/wKutta.cpp b/dart/src/wKutta.cpp
index a8bc12da27133162759e9d5aaeb05048cbd224a3..5eda55237a5714b6cfc2fe81c458ec0bfb69d122 100644
--- a/dart/src/wKutta.cpp
+++ b/dart/src/wKutta.cpp
@@ -82,10 +82,10 @@ void Kutta::connectNodes()
     // Create the node map
     for (auto nUp : nodesUp)
     {
-        //std::cout << "MASTER: " << nUp->pos(0) << ',' << nUp->pos(1) << ',' << nUp->pos(2) << std::endl;
+        // std::cout << "MASTER: " << nUp->pos(0) << ',' << nUp->pos(1) << ',' << nUp->pos(2) << std::endl;
         for (auto nLw : nodesLw)
         {
-            //std::cout << "    SLAVE: " << nLw->pos(0) << ',' << nLw->pos(1) << ',' << nLw->pos(2) << std::endl;
+            // std::cout << "    SLAVE: " << nLw->pos(0) << ',' << nLw->pos(1) << ',' << nLw->pos(2) << std::endl;
             if ((nUp->pos - nLw->pos).norm() <= 1e-14)
             {
                 nodMap.push_back(std::pair<Node *, Node *>(nUp, nLw));
diff --git a/dart/src/wKutta.h b/dart/src/wKutta.h
index dbe15e2457056c0681e9f914e67edc37e7b69285..fe04443722330121dc621440159a6806c282efcc 100644
--- a/dart/src/wKutta.h
+++ b/dart/src/wKutta.h
@@ -56,4 +56,4 @@ private:
 
 } // namespace dart
 
-#endif //WKUTTA_H
+#endif // WKUTTA_H
diff --git a/dart/src/wKuttaElement.h b/dart/src/wKuttaElement.h
index f3fe8d8e27f873b399378dc0095cfe878b8873a5..7fe70d4a89629c5b39702751d66094bfe425ea1e 100644
--- a/dart/src/wKuttaElement.h
+++ b/dart/src/wKuttaElement.h
@@ -65,4 +65,4 @@ private:
 
 } // namespace dart
 
-#endif //WKUTTAELEMENT_H
+#endif // WKUTTAELEMENT_H
diff --git a/dart/src/wKuttaResidual.cpp b/dart/src/wKuttaResidual.cpp
index 8884b5f7b7aa76db48ada9e9107c9df13935f608..ae8ff721fcb6dee0321ce53a2a3815bd10b58242 100644
--- a/dart/src/wKuttaResidual.cpp
+++ b/dart/src/wKuttaResidual.cpp
@@ -131,7 +131,7 @@ Eigen::MatrixXd KuttaResidual::buildGradientFlow(KuttaElement const &ke, std::ve
 
 /**
  * @brief Build the gradient of the residual vector with respect to the nodes, on one Kutta element
- * 
+ *
  * A = d( 1/S * \int (psi + grad_psi*v_inf) * (grad_phi)^2 dS )
  *   = d1/S * \int (psi + grad_psi*v_inf) * (grad_phi)^2 dS
  *   + 1/S * \int dgrad_psi*v_inf * (grad_phi)^2 dS
diff --git a/dart/src/wKuttaResidual.h b/dart/src/wKuttaResidual.h
index 2fff0c173bf29cd127644f279619e57e183f0349..277a4b9271d5615c7f2eb30d6f3ae9894163b9ab 100644
--- a/dart/src/wKuttaResidual.h
+++ b/dart/src/wKuttaResidual.h
@@ -41,4 +41,4 @@ public:
 };
 
 } // namespace dart
-#endif //WKUTTARESIDUAL_H
+#endif // WKUTTARESIDUAL_H
diff --git a/dart/src/wLoadFunctional.h b/dart/src/wLoadFunctional.h
index 338f71ee5bef350ff52ca223b4a80ed8a33ae9bf..225f151fb74d82ce26b4c9b8c8dfa30336f91ec5 100644
--- a/dart/src/wLoadFunctional.h
+++ b/dart/src/wLoadFunctional.h
@@ -39,4 +39,4 @@ public:
 };
 
 } // namespace dart
-#endif //WLOADFUNCTIONAL_H
+#endif // WLOADFUNCTIONAL_H
diff --git a/dart/src/wNewton.cpp b/dart/src/wNewton.cpp
index 37dfb4b5596b73752ea5ae01896c3b5c1ae5df14..f4b932fa8b0b165f50baa8f6310ce64db22e9ff5 100644
--- a/dart/src/wNewton.cpp
+++ b/dart/src/wNewton.cpp
@@ -115,7 +115,7 @@ Status Newton::run()
     // Linesearch
     FpeLSFunction fpe(*this, phi, phi, dPhi_, rPhi_);
     BankRoseLS ls(fpe);
-    //FleuryLS ls(fpe, 1., 1e-2, false);
+    // FleuryLS ls(fpe, 1., 1e-2, false);
     ls.set(maxLsIt, lsTol, verbose);
 
     // Display residual
@@ -291,7 +291,7 @@ void Newton::buildJac(Eigen::SparseMatrix<double, Eigen::RowMajor> &J)
     tbb::parallel_for_each(fluid->adjMap.begin(), fluid->adjMap.end(), [&](std::pair<Element *, std::vector<Element *>> p) {
         // Current element
         Element *e = p.first;
-        //Upwind element
+        // Upwind element
         Element *eU = p.second[0];
         // Build elementary matrices
         Eigen::MatrixXd Ae1, Ae2;
diff --git a/dart/src/wNewton.h b/dart/src/wNewton.h
index 83950e3fc8c51d84e9ac44fc3c0da40475564703..aa1150a723ede66beda0fc6c6ce1399c08976b66 100644
--- a/dart/src/wNewton.h
+++ b/dart/src/wNewton.h
@@ -63,4 +63,4 @@ private:
 
 } // namespace dart
 
-#endif //WNEWTON_H
+#endif // WNEWTON_H
diff --git a/dart/src/wPicard.cpp b/dart/src/wPicard.cpp
index 6648a8c22517976cc8e1655fbde080473f2a0ef7..52b9078417b45ba413b61ed07588854475d40a71 100644
--- a/dart/src/wPicard.cpp
+++ b/dart/src/wPicard.cpp
@@ -205,7 +205,7 @@ Status Picard::run()
 
 /**
  * @brief Build LHS matrix and RHS vector for Picard iteration
- * 
+ *
  * A = \int rho * grad_phi * grad_psi dV
  * b = \int rho * grad_phi * n * psi dS
  */
diff --git a/dart/src/wPicard.h b/dart/src/wPicard.h
index 69980895437f11f6323f6772ae937ffcc40706d7..063a94bc96c1786391b7f9fa9bebc30f03f71bb7 100644
--- a/dart/src/wPicard.h
+++ b/dart/src/wPicard.h
@@ -52,4 +52,4 @@ private:
 
 } // namespace dart
 
-#endif //WPICARD_H
+#endif // WPICARD_H
diff --git a/dart/src/wPotentialResidual.h b/dart/src/wPotentialResidual.h
index 6d175706726f6ad26314bef6aeba5672312ae8d8..5007fe1485af41b201dba56488ec4580364214fe 100644
--- a/dart/src/wPotentialResidual.h
+++ b/dart/src/wPotentialResidual.h
@@ -43,4 +43,4 @@ public:
 };
 
 } // namespace dart
-#endif //WPOTENTIALRESIDUAL_H
+#endif // WPOTENTIALRESIDUAL_H
diff --git a/dart/src/wProblem.h b/dart/src/wProblem.h
index c57042a0a712287aad3dd1d776092735fde66fd5..2ef363d70b2eda474f3b3ed788f02255ea8aab41 100644
--- a/dart/src/wProblem.h
+++ b/dart/src/wProblem.h
@@ -95,4 +95,4 @@ private:
 
 } // namespace dart
 
-#endif //WPROBLEM_H
+#endif // WPROBLEM_H
diff --git a/dart/src/wSolver.h b/dart/src/wSolver.h
index 605f0c01f960e39ceda626a57c9f838e24d61e44..8055299905a734ab188e499263e0b0bc9d34663e 100644
--- a/dart/src/wSolver.h
+++ b/dart/src/wSolver.h
@@ -86,4 +86,4 @@ protected:
 };
 
 } // namespace dart
-#endif //WSOLVER_H
+#endif // WSOLVER_H
diff --git a/dart/src/wWake.cpp b/dart/src/wWake.cpp
index 1aaba0206e28fb5ce4f0384136ebae503ef71b9a..a584e008d52d0ea7db8aa41080a42bdf5ab5c490 100644
--- a/dart/src/wWake.cpp
+++ b/dart/src/wWake.cpp
@@ -112,10 +112,10 @@ void Wake::connectNodes()
     // Create the node map
     for (auto nUp : nodesUp)
     {
-        //std::cout << "MASTER: " << nUp->pos(0) << ',' << nUp->pos(1) << ',' << nUp->pos(2) << std::endl;
+        // std::cout << "MASTER: " << nUp->pos(0) << ',' << nUp->pos(1) << ',' << nUp->pos(2) << std::endl;
         for (auto nLw : nodesLw)
         {
-            //std::cout << "    SLAVE: " << nLw->pos(0) << ',' << nLw->pos(1) << ',' << nLw->pos(2) << std::endl;
+            // std::cout << "    SLAVE: " << nLw->pos(0) << ',' << nLw->pos(1) << ',' << nLw->pos(2) << std::endl;
             if ((nUp->pos - nLw->pos).norm() <= 1e-14)
             {
                 nodMap[nUp] = nLw;
diff --git a/dart/src/wWake.h b/dart/src/wWake.h
index 72670e8895acd2863619e4bb9a61a64fcb1f267f..2f7a10c85a4286aac4645b07d21fa01fb3930bc0 100644
--- a/dart/src/wWake.h
+++ b/dart/src/wWake.h
@@ -59,4 +59,4 @@ private:
 
 } // namespace dart
 
-#endif //WWAKE_H
+#endif // WWAKE_H
diff --git a/dart/src/wWakeElement.h b/dart/src/wWakeElement.h
index 43ead69dca1bbbef7c1d4651addf02801baf0d72..de2add62afbc7c377fa2d53fcd41581af4a5dd72 100644
--- a/dart/src/wWakeElement.h
+++ b/dart/src/wWakeElement.h
@@ -67,4 +67,4 @@ private:
 
 } // namespace dart
 
-#endif //WWAKEELEMENT_H
+#endif // WWAKEELEMENT_H
diff --git a/dart/src/wWakeResidual.h b/dart/src/wWakeResidual.h
index 8501d7fe0ebebacd6def95d4060e9b0256180b6c..5b6fad027e3a2f4f758718abb3fa46e111cb948b 100644
--- a/dart/src/wWakeResidual.h
+++ b/dart/src/wWakeResidual.h
@@ -41,4 +41,4 @@ public:
 };
 
 } // namespace dart
-#endif //WWAKERESIDUAL_H
+#endif // WWAKERESIDUAL_H
diff --git a/vii/src/DDiscretization.cpp b/vii/src/DDiscretization.cpp
index 8f4e561618ae9f633b7bacaae7068590dd86f173..872c55500f28cef92c671b8f03da779d24cd92cc 100644
--- a/vii/src/DDiscretization.cpp
+++ b/vii/src/DDiscretization.cpp
@@ -34,7 +34,7 @@ void Discretization::setGlob(std::vector<double> &_x, std::vector<double> &_y, s
 
 /**
  * @brief Compute x/chord coordinate.
-*/
+ */
 void Discretization::computeOCcoord()
 {
     // Find min and max of array x