diff --git a/Applications/ApplicationsLib/LinearSolverLibrarySetup.h b/Applications/ApplicationsLib/LinearSolverLibrarySetup.h
index c6506b1bcc6b7ca2d3bc2cdfe86910605886b362..721f65f281cf27d646b1dbe157930c1bd199d1a8 100644
--- a/Applications/ApplicationsLib/LinearSolverLibrarySetup.h
+++ b/Applications/ApplicationsLib/LinearSolverLibrarySetup.h
@@ -71,5 +71,5 @@ struct LinearSolverLibrarySetup final
         NumLib::cleanupGlobalMatrixProviders();
     }
 };
-}    // ApplicationsLib
+}  // namespace ApplicationsLib
 #endif
diff --git a/Applications/ApplicationsLib/LogogSetup.h b/Applications/ApplicationsLib/LogogSetup.h
index 7b0a01d49cba82856ca5b1cab64de4585e04a740..7a06b03289f628c7f83e4eb42097ae7708546bc5 100644
--- a/Applications/ApplicationsLib/LogogSetup.h
+++ b/Applications/ApplicationsLib/LogogSetup.h
@@ -80,4 +80,4 @@ private:
     std::unique_ptr<logog::Cout> logog_cout;
 };
 
-}    // ApplicationsLib
+}  // namespace ApplicationsLib
diff --git a/Applications/DataHolderLib/Color.cpp b/Applications/DataHolderLib/Color.cpp
index 200a4a4550447ede5f032e3ab74f66a0c638e440..a0e3662a2325c1f9a3ca5f00ef9f062b2b0a2ab3 100644
--- a/Applications/DataHolderLib/Color.cpp
+++ b/Applications/DataHolderLib/Color.cpp
@@ -55,4 +55,4 @@ Color const getColor(const std::string &id, std::map<std::string, Color> &colors
     return c;
 }
 
-}
+}  // namespace DataHolderLib
diff --git a/Applications/DataHolderLib/Color.h b/Applications/DataHolderLib/Color.h
index 40e286378b7b28ff4778dd227646317e56286fcc..7b245c2f70bf85d67b859bb55ef6e07898a03c76 100644
--- a/Applications/DataHolderLib/Color.h
+++ b/Applications/DataHolderLib/Color.h
@@ -36,4 +36,4 @@ Color const getColor(const std::string &id, std::map<std::string, DataHolderLib:
 
 /// Convenience function to use the getColor method with numbers as identifiers.
 Color const getColor(double id, std::map<std::string, DataHolderLib::Color> &colors);
-} // namespace
+}  // namespace DataHolderLib
diff --git a/Applications/DataHolderLib/ColorLookupTable.cpp b/Applications/DataHolderLib/ColorLookupTable.cpp
index b5c04cbe036ee5fbd376645ca27c5e888255ae21..bde4cd65b377bc92017e05f3f36558e2c1c2711c 100644
--- a/Applications/DataHolderLib/ColorLookupTable.cpp
+++ b/Applications/DataHolderLib/ColorLookupTable.cpp
@@ -38,6 +38,4 @@ void ColorLookupTable::setColor(std::string const& name, DataHolderLib::Color co
     _lut.emplace_back(0, color, name);
 }
 
-
-
-} // namespace
+}  // namespace DataHolderLib
diff --git a/Applications/DataHolderLib/ColorLookupTable.h b/Applications/DataHolderLib/ColorLookupTable.h
index a159f7816840af7df0462f821ab259ba4bdcab34..317e54b258becc57174df2fc0a3d1fc09ef7ac81 100644
--- a/Applications/DataHolderLib/ColorLookupTable.h
+++ b/Applications/DataHolderLib/ColorLookupTable.h
@@ -65,4 +65,4 @@ private:
     std::pair<double, double> _range;
 };
 
-} // namespace
+}  // namespace DataHolderLib
diff --git a/Applications/DataHolderLib/Project.cpp b/Applications/DataHolderLib/Project.cpp
index e556cfb77a82bda9d41f839ab5df497ec9511290..1a03bb81f59c6064954bbca402261659e7b8ec68 100644
--- a/Applications/DataHolderLib/Project.cpp
+++ b/Applications/DataHolderLib/Project.cpp
@@ -145,4 +145,4 @@ void Project::removeSourceTerm(std::string const& primary_var_name,
     }
 }
 
-} //namespace
+}  // namespace DataHolderLib
diff --git a/Applications/DataHolderLib/Project.h b/Applications/DataHolderLib/Project.h
index 09d334968ed3e0660c2f86fb99e104b732c86f03..0b31b4ba1ac8b6431d69a22c4481de35914b5dc4 100644
--- a/Applications/DataHolderLib/Project.h
+++ b/Applications/DataHolderLib/Project.h
@@ -122,4 +122,4 @@ private:
     std::vector<std::unique_ptr<SourceTerm>> _source_terms;
 };
 
-} // namespace
+}  // namespace DataHolderLib
diff --git a/Applications/FileIO/CsvInterface.h b/Applications/FileIO/CsvInterface.h
index ad488877d5de78f73376f6db45b9afe4d5137601..0206d0c99ab83d36ecb74fbc5a2bb1cb5922d1c0 100644
--- a/Applications/FileIO/CsvInterface.h
+++ b/Applications/FileIO/CsvInterface.h
@@ -238,4 +238,4 @@ private:
     std::vector< boost::any > _data;
 };
 
-} // FileIO
+}  // namespace FileIO
diff --git a/Applications/FileIO/GMSInterface.cpp b/Applications/FileIO/GMSInterface.cpp
index d5761533b86dffb1aa3da52cff42cd5e9f555b3f..a1ef78069d5cfe307b639277e33decc9bb48b8a6 100644
--- a/Applications/FileIO/GMSInterface.cpp
+++ b/Applications/FileIO/GMSInterface.cpp
@@ -349,4 +349,4 @@ MeshLib::Mesh* GMSInterface::readGMS3DMMesh(const std::string &filename)
     return new MeshLib::Mesh(mesh_name, nodes, elements, properties);
 }
 
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/GMSInterface.h b/Applications/FileIO/GMSInterface.h
index 269c2058c92e4bb30ee80cfc5d2c0de3147c1f3c..c9ef4b3d55bd466b551d66398bca265d51a846cb 100644
--- a/Applications/FileIO/GMSInterface.h
+++ b/Applications/FileIO/GMSInterface.h
@@ -78,4 +78,4 @@ private:
     static std::size_t getSoilID(std::vector<std::string> &soilID, std::string &soilName);
 };
 
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
index d33b60070a06cd057eae56a6a68f037afedf7fe3..76a4752a1470d1d5e033b51e92e2fc35abac8306 100644
--- a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
+++ b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
@@ -158,6 +158,6 @@ void GMSHAdaptiveMeshDensity::getQuadTreeGeometry(std::vector<GeoLib::Point*> &p
     }
 }
 #endif
-}
+}  // namespace GMSH
 
 } // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
index 2a3e41e79b5079269a118de0af3a1cc9cd258456..f1036515ddf62819d2120a813606eaaa2385e265 100644
--- a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
+++ b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
@@ -52,5 +52,5 @@ private:
     GeoLib::QuadTree<GeoLib::Point> *_quad_tree;
 };
 
-}
+}  // namespace GMSH
 } // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
index 08f9593b8cebaac7bd27e7ff560afb08a3800cd8..1a5198facb3b27666816dec5a4b537202942440a 100644
--- a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
+++ b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
@@ -36,5 +36,5 @@ double GMSHFixedMeshDensity::getMeshDensityAtStation(GeoLib::Point const*const)
     return _mesh_density;
 }
 
-}
+}  // namespace GMSH
 } // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
index 23d3f8b577b1190f52a985a8b0b32db25fe5bcd2..c3f1814cd7dc22607fae2805a0454ca7f7e27db2 100644
--- a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
+++ b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
@@ -30,5 +30,5 @@ private:
     double _mesh_density;
 };
 
-}
+}  // namespace GMSH
 } // end namespace FileIO
diff --git a/Applications/FileIO/Legacy/OGSIOVer4.cpp b/Applications/FileIO/Legacy/OGSIOVer4.cpp
index d29437f6cb15c32f5853532e12490a5f4fae0830..6ae7743ae04b3b3b83b7de8c2a32897daf6cba52 100644
--- a/Applications/FileIO/Legacy/OGSIOVer4.cpp
+++ b/Applications/FileIO/Legacy/OGSIOVer4.cpp
@@ -697,5 +697,5 @@ void writeAllDataToGLIFileV4 (const std::string& fname, const GeoLib::GEOObjects
     os.close ();
 }
 
-}
+}  // namespace Legacy
 } // end namespace FileIO
diff --git a/Applications/FileIO/Legacy/OGSIOVer4.h b/Applications/FileIO/Legacy/OGSIOVer4.h
index f5998e0ffd778d9a44cdec8b4cd692d5c0be7b03..b66f900c232f0280c2fb4e4b39c1d3fec3296874 100644
--- a/Applications/FileIO/Legacy/OGSIOVer4.h
+++ b/Applications/FileIO/Legacy/OGSIOVer4.h
@@ -42,5 +42,5 @@ void writeGLIFileV4 (const std::string& fname,
 /** Writes all geometric information to a gli-file */
 void writeAllDataToGLIFileV4 (const std::string& fname, const GeoLib::GEOObjects& geo);
 
-}
+}  // namespace Legacy
 } // end namespace FileIO
diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp
index b7ad63fd19ef8b4f4d3fa8649bb4d32108008e1e..a45bd63c222c865e181373b7ea83e170a309d373 100644
--- a/Applications/FileIO/Legacy/createSurface.cpp
+++ b/Applications/FileIO/Legacy/createSurface.cpp
@@ -123,4 +123,4 @@ bool createSurface(GeoLib::Polyline const& ply,
     return true;
 }
 
-} // end namespace
+}  // namespace FileIO
diff --git a/Applications/FileIO/Legacy/createSurface.h b/Applications/FileIO/Legacy/createSurface.h
index e559fe1a96266816fadecd4f66e0663022f2f1c2..36162aa13a4e4467b5aae887e5852a442304ec49 100644
--- a/Applications/FileIO/Legacy/createSurface.h
+++ b/Applications/FileIO/Legacy/createSurface.h
@@ -27,4 +27,4 @@ namespace FileIO
 bool createSurface(GeoLib::Polyline const& polyline,
                    GeoLib::GEOObjects& geometries,
                    std::string const& geometry_name);
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/SHPInterface.cpp b/Applications/FileIO/SHPInterface.cpp
index 35090a4dbd84ee09bbea59e645ea55264f7158c8..32d41d0276c586d987c5e77952df232a1888cb3c 100644
--- a/Applications/FileIO/SHPInterface.cpp
+++ b/Applications/FileIO/SHPInterface.cpp
@@ -279,4 +279,4 @@ bool SHPInterface::write2dMeshToSHP(const std::string &file_name, const MeshLib:
     return true;
 }
 
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/SHPInterface.h b/Applications/FileIO/SHPInterface.h
index adfadab5718946190d53dee89d61272d7ed4c0b9..cdcc554bbe2af1863f63c0710d55681a5c39490c 100644
--- a/Applications/FileIO/SHPInterface.h
+++ b/Applications/FileIO/SHPInterface.h
@@ -83,4 +83,4 @@ private:
     GeoLib::GEOObjects& _geoObjects;
 };
 
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/TetGenInterface.h b/Applications/FileIO/TetGenInterface.h
index 18c3b0f6e684a523ab74e7ff7ac27f25a5c74d32..c02358ac359c8cd239e7a0dea08d50d257cc2321 100644
--- a/Applications/FileIO/TetGenInterface.h
+++ b/Applications/FileIO/TetGenInterface.h
@@ -214,4 +214,4 @@ private:
     /// true if boundary markers are set, false otherwise
     bool _boundary_markers;
 };
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/readGeometryFromFile.cpp b/Applications/FileIO/readGeometryFromFile.cpp
index e1bb9791732f44780aaa50c7e116efd15e217f8c..4f355b73ac87f5917ce3fadd0a47077f65627149 100644
--- a/Applications/FileIO/readGeometryFromFile.cpp
+++ b/Applications/FileIO/readGeometryFromFile.cpp
@@ -42,4 +42,4 @@ readGeometryFromFile(std::string const& fname, GeoLib::GEOObjects & geo_objs)
                   "Something is wrong in the reading function.");
     }
 }
-}
+}  // namespace FileIO
diff --git a/Applications/FileIO/writeGeometryToFile.cpp b/Applications/FileIO/writeGeometryToFile.cpp
index c7a528198f2ba439a938d4d12ae9e1a157c9e3c9..0c279cbde36e941f097aeb64608cf4e74ac4acdc 100644
--- a/Applications/FileIO/writeGeometryToFile.cpp
+++ b/Applications/FileIO/writeGeometryToFile.cpp
@@ -34,4 +34,4 @@ void writeGeometryToFile(std::string const& geo_name,
             " the required format from file extension.");
     }
 }
-}
+}  // namespace FileIO
diff --git a/BaseLib/BuildInfo.h b/BaseLib/BuildInfo.h
index 544ccc7a8c7f02724612221821e49adfb7faa33e..1eda014d1394911afca551e6ae5ba605a71a41ff 100644
--- a/BaseLib/BuildInfo.h
+++ b/BaseLib/BuildInfo.h
@@ -38,5 +38,5 @@ namespace BuildInfo
     extern BASELIB_EXPORT const std::string data_path;
     extern BASELIB_EXPORT const std::string data_binary_path;
     extern BASELIB_EXPORT const std::string tests_tmp_path;
-}
-}
+    }  // namespace BuildInfo
+    }  // namespace BaseLib
diff --git a/BaseLib/ConfigTree-impl.h b/BaseLib/ConfigTree-impl.h
index 87ddab369adb363b933ea5b660af5425fdd7a8a4..76cb7fa5f44319311d1601ec4529714806e77bd7 100644
--- a/BaseLib/ConfigTree-impl.h
+++ b/BaseLib/ConfigTree-impl.h
@@ -248,4 +248,4 @@ markVisited(std::string const& key, Attr const is_attr,
     return p.first->second;
 }
 
-}
+}  // namespace BaseLib
diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp
index 21196c27c8bef6c7cd628f563905c31c45e2856e..e96d729cdeddfe0309ff1fecc68e3b961c6e2b9d 100644
--- a/BaseLib/ConfigTree.cpp
+++ b/BaseLib/ConfigTree.cpp
@@ -438,4 +438,4 @@ void checkAndInvalidate(std::unique_ptr<ConfigTree> const& conf)
     if (conf) conf->checkAndInvalidate();
 }
 
-}
+}  // namespace BaseLib
diff --git a/BaseLib/ConfigTree.h b/BaseLib/ConfigTree.h
index cc50ba473227044524668b955c04ed5ceb798a88..1c363bee6b0939896adde6c50499de0d8e9a99fe 100644
--- a/BaseLib/ConfigTree.h
+++ b/BaseLib/ConfigTree.h
@@ -643,6 +643,6 @@ private:
     friend void checkAndInvalidate(std::unique_ptr<ConfigTree> const& conf);
 };
 
-}
+}  // namespace BaseLib
 
 #include "ConfigTree-impl.h"
diff --git a/BaseLib/ConfigTreeUtil.cpp b/BaseLib/ConfigTreeUtil.cpp
index 117c41453154c485286e13429ebe9d5c7b62e1ed..93f0a647a32ad7ff45c6f60c68aa89295b3a16af 100644
--- a/BaseLib/ConfigTreeUtil.cpp
+++ b/BaseLib/ConfigTreeUtil.cpp
@@ -75,4 +75,4 @@ makeConfigTree(const std::string& filepath, const bool be_ruthless,
               filepath.c_str());
 }
 
-}
+}  // namespace BaseLib
diff --git a/BaseLib/ConfigTreeUtil.h b/BaseLib/ConfigTreeUtil.h
index 1d5a187a3dc48fd50243794ecdcce49db70ac3f7..4bfec5085af625ec2365d6f7e8e52246c59cd8e8 100644
--- a/BaseLib/ConfigTreeUtil.h
+++ b/BaseLib/ConfigTreeUtil.h
@@ -87,4 +87,4 @@ ConfigTreeTopLevel
 makeConfigTree(std::string const& filepath, bool const be_ruthless,
                std::string const& toplevel_tag);
 
-}
+}  // namespace BaseLib
diff --git a/BaseLib/Functional.cpp b/BaseLib/Functional.cpp
index 8162fa6e5877f6629faf8fc10889f79794fa0d88..73c1efa84600895e6035187c06345b80c7362efb 100644
--- a/BaseLib/Functional.cpp
+++ b/BaseLib/Functional.cpp
@@ -28,6 +28,6 @@ DEFINE_INDEXEDPLACEHOLDER_MEMBER(6, 7);
 DEFINE_INDEXEDPLACEHOLDER_MEMBER(7, 8);
 DEFINE_INDEXEDPLACEHOLDER_MEMBER(8, 9);
 DEFINE_INDEXEDPLACEHOLDER_MEMBER(9, 10);
-}
+}  // namespace detail
 
 }  // namespace BaseLib
diff --git a/BaseLib/IO/XmlIO/XMLInterface.cpp b/BaseLib/IO/XmlIO/XMLInterface.cpp
index a2e011139f39ef152df34aca1ff9e3843849d6d7..126f2ee0e7a4be5cd57c62c89a25e6928efa82b2 100644
--- a/BaseLib/IO/XmlIO/XMLInterface.cpp
+++ b/BaseLib/IO/XmlIO/XMLInterface.cpp
@@ -24,4 +24,4 @@ XMLInterface::XMLInterface() :
 {}
 
 }
-}
+}  // namespace BaseLib
diff --git a/BaseLib/IO/XmlIO/XMLInterface.h b/BaseLib/IO/XmlIO/XMLInterface.h
index 6d2b8bcc9b82a4a0333de973ef97a749b1c2fb44..7de12dd35ae31b098eb13dc176bbd1d0c6d34b9f 100644
--- a/BaseLib/IO/XmlIO/XMLInterface.h
+++ b/BaseLib/IO/XmlIO/XMLInterface.h
@@ -38,5 +38,5 @@ protected:
     std::string _exportName;
 };
 
-}
-}
+}  // namespace IO
+}  // namespace BaseLib
diff --git a/BaseLib/MemWatch.h b/BaseLib/MemWatch.h
index a7e7341067e43f5682fd629fffc465d022a43409..4d11181a1cae12e9e77492ca888eb008f67a37ed 100644
--- a/BaseLib/MemWatch.h
+++ b/BaseLib/MemWatch.h
@@ -32,4 +32,4 @@ private:
     unsigned long _cmem_size = 0;
 };
 
-}
+}  // namespace BaseLib
diff --git a/BaseLib/Subdivision.h b/BaseLib/Subdivision.h
index 9751621097411a5a3e56f7577145fcd924824735..49ba120cf4d6ba0dc76f45e1e881d146e5c1a8d9 100644
--- a/BaseLib/Subdivision.h
+++ b/BaseLib/Subdivision.h
@@ -112,4 +112,4 @@ private:
     const double _multiplier;
 };
 
-} // BaseLib
+}  // namespace BaseLib
diff --git a/BaseLib/TimeInterval.cpp b/BaseLib/TimeInterval.cpp
index 9058d3f3a9cbdcb8c5b41a9e05558fcba50aa728..161f0585053bdfe76599c09a41fe2825e3bbba7c 100644
--- a/BaseLib/TimeInterval.cpp
+++ b/BaseLib/TimeInterval.cpp
@@ -33,4 +33,4 @@ std::unique_ptr<TimeInterval> createTimeInterval(
 
     return std::make_unique<BaseLib::TimeInterval>(start_time, end_time);
 }
-}  // end of namespace
+}  // namespace BaseLib
diff --git a/BaseLib/TimeInterval.h b/BaseLib/TimeInterval.h
index 8d2a68361f52e49112e310f6e3840f6800d1c8d3..c21fb7dda9d205a97fc3db527f7c21247204716d 100644
--- a/BaseLib/TimeInterval.h
+++ b/BaseLib/TimeInterval.h
@@ -47,4 +47,4 @@ private:
 std::unique_ptr<TimeInterval> createTimeInterval(
     BaseLib::ConfigTree const& config);
 
-}  // end of namespace
+}  // namespace BaseLib
diff --git a/GeoLib/AABB.h b/GeoLib/AABB.h
index 2ac4d543618740c3862683a4be2fbfa44de5807d..874def54e57ce70627dac458c24ebc05a4c8a779 100644
--- a/GeoLib/AABB.h
+++ b/GeoLib/AABB.h
@@ -240,4 +240,4 @@ private:
         update(*pnt);
     }
 };
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/AnalyticalGeometry.cpp b/GeoLib/AnalyticalGeometry.cpp
index 283a4a955b0304da03a3c7394df22c04db6e1adb..dd210eb7607204a81cc9c4ad43c02b092ac694b3 100644
--- a/GeoLib/AnalyticalGeometry.cpp
+++ b/GeoLib/AnalyticalGeometry.cpp
@@ -50,7 +50,7 @@ double getOrientation2dFast(MathLib::Point3d const& a,
                         const_cast<double*>(b.getCoords()),
                         const_cast<double*>(c.getCoords()));
 }
-}
+}  // namespace ExactPredicates
 
 namespace GeoLib
 {
diff --git a/GeoLib/DuplicateGeometry.cpp b/GeoLib/DuplicateGeometry.cpp
index d9eb3e3e8877b5a6359947c8fe60ed8bcdaece83..ddfa0ca0df210513244a9b52af40c09a93586d5a 100644
--- a/GeoLib/DuplicateGeometry.cpp
+++ b/GeoLib/DuplicateGeometry.cpp
@@ -117,4 +117,4 @@ std::vector<GeoLib::Surface*>& DuplicateGeometry::getSurfaceVectorCopy()
     return const_cast<std::vector<GeoLib::Surface*>&>(*_geo_objects.getSurfaceVec(_output_name));
 }
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/DuplicateGeometry.h b/GeoLib/DuplicateGeometry.h
index 1a29866a6537f4d1b036bb3e93a97d3aa748f5bd..84aea52dbd316dc590710e7e28fa385d79e3ad30 100644
--- a/GeoLib/DuplicateGeometry.h
+++ b/GeoLib/DuplicateGeometry.h
@@ -63,4 +63,4 @@ private:
 
 }; // class
 
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp
index 15562145f916fb84c4f1dc2d891404729a849b05..d353b5522adc04b309920c1492d1a122d014f0f9 100644
--- a/GeoLib/GEOObjects.cpp
+++ b/GeoLib/GEOObjects.cpp
@@ -704,5 +704,4 @@ std::size_t GEOObjects::exists(const std::string &geometry_name) const
     return std::numeric_limits<std::size_t>::max();
 }
 
-
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/GEOObjects.h b/GeoLib/GEOObjects.h
index a3a9779bc83df7aca5878208d99a7e50c05399db..89baa730d12f10d6ee1b1de7e3d27fbf92da3b04 100644
--- a/GeoLib/GEOObjects.h
+++ b/GeoLib/GEOObjects.h
@@ -380,4 +380,4 @@ private:
     void markUnusedPoints(std::string const& geo_name,
                           std::vector<bool>& transfer_pnts) const;
 };
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.cpp b/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.cpp
index a9a3345fd849f8f4a88df035f016dd00852282f6..0ffb4f8fea61b87e0bbe12ac93799529c09eabc5 100644
--- a/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.cpp
+++ b/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.cpp
@@ -253,5 +253,5 @@ void RapidStnInterface::readStratigraphy( const rapidxml::xml_node<>* strat_root
     }
 }
 
-} // IO
-} // GeoLib
+}  // namespace IO
+}  // namespace GeoLib
diff --git a/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.h b/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.h
index 487ad84813fafd195b02b134ca07a920b409774e..ab3e4bbf0e67957323e84967a7a448dbbdd846d0 100644
--- a/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.h
+++ b/GeoLib/IO/XmlIO/Rapid/RapidStnInterface.h
@@ -48,5 +48,5 @@ private:
     static void readStratigraphy(const rapidxml::xml_node<>* strat_root, GeoLib::StationBorehole* borehole);
 };
 
-} // IO
-} // GeoLib
+}  // namespace IO
+}  // namespace GeoLib
diff --git a/GeoLib/LineSegment.cpp b/GeoLib/LineSegment.cpp
index f9d6b4f1f9ce2d55d5ca4264ae6225947f530970..b8074cae5f902a819fb0cd3f65c3103d9320ac8b 100644
--- a/GeoLib/LineSegment.cpp
+++ b/GeoLib/LineSegment.cpp
@@ -101,4 +101,4 @@ bool operator==(LineSegment const& s0, LineSegment const& s1)
         (MathLib::sqrDist(s0.getBeginPoint(), s1.getEndPoint()) < tol &&
          MathLib::sqrDist(s0.getEndPoint(), s1.getBeginPoint()) < tol);
 }
-}
+}  // namespace GeoLib
diff --git a/GeoLib/LineSegment.h b/GeoLib/LineSegment.h
index 73b852aa3d967b3f879811940f156f76424ff818..38a1c465c4a1710969fa547c0e0a1fe5bdda9e6b 100644
--- a/GeoLib/LineSegment.h
+++ b/GeoLib/LineSegment.h
@@ -58,4 +58,4 @@ std::ostream& operator<<(std::ostream& os,
 ///  of double.
 bool operator==(LineSegment const& s0, LineSegment const& s1);
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/MinimalBoundingSphere.cpp b/GeoLib/MinimalBoundingSphere.cpp
index d473b2ac6dbeb65262b60e958f2752c42e749011..05568ca7146259a836414b4d085c44385032e6e1 100644
--- a/GeoLib/MinimalBoundingSphere.cpp
+++ b/GeoLib/MinimalBoundingSphere.cpp
@@ -206,4 +206,4 @@ std::vector<MathLib::Point3d*>* MinimalBoundingSphere::getRandomSpherePoints(std
     return pnts;
 }
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/MinimalBoundingSphere.h b/GeoLib/MinimalBoundingSphere.h
index b724582cb57b1b9a93bab5102349a470a464cb33..adb9b6e5836d4a97ca4a0b24e4d65660e489dc77 100644
--- a/GeoLib/MinimalBoundingSphere.h
+++ b/GeoLib/MinimalBoundingSphere.h
@@ -84,4 +84,4 @@ private:
     MathLib::Vector3 _center;
 };
 
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/Point.h b/GeoLib/Point.h
index 1f29cb5f8047ac5b8e91f7be49882b13417bd32e..f8af4d5f3ad221b5ece622a37fd16c5a1fa93e95 100644
--- a/GeoLib/Point.h
+++ b/GeoLib/Point.h
@@ -60,4 +60,4 @@ protected:
     void setID(std::size_t id) { _id = id; }
 };
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/PointVec.cpp b/GeoLib/PointVec.cpp
index d5b69bb93337d9f4e7c19d84f8825951791ce139..0f7611e9230cd9b613ba4deec8e531d177fc913f 100644
--- a/GeoLib/PointVec.cpp
+++ b/GeoLib/PointVec.cpp
@@ -268,4 +268,4 @@ void PointVec::resetInternalDataStructures()
     }
 }
 
-}  // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/PointVec.h b/GeoLib/PointVec.h
index a7b85ff0c4c594f188b2d463492fd91d8aa0e969..030cfddbf18c2c0a11b8651b93311a6d5e11e33d 100644
--- a/GeoLib/PointVec.h
+++ b/GeoLib/PointVec.h
@@ -157,4 +157,4 @@ private:
     double _rel_eps;
     std::unique_ptr<GeoLib::OctTree<GeoLib::Point, 16>> _oct_tree;
 };
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/PolygonWithSegmentMarker.cpp b/GeoLib/PolygonWithSegmentMarker.cpp
index 0330436be45b0f16f6192cdc7352894bac10fcc9..cf253e5c43223a49caa49c93e7399f07752f199a 100644
--- a/GeoLib/PolygonWithSegmentMarker.cpp
+++ b/GeoLib/PolygonWithSegmentMarker.cpp
@@ -45,4 +45,4 @@ bool PolygonWithSegmentMarker::insertPoint(std::size_t pos, std::size_t pnt_id)
     return false;
 }
 
-} // end GeoLib
+}  // namespace GeoLib
diff --git a/GeoLib/Polyline.h b/GeoLib/Polyline.h
index 1eb7b6908e6536808330faf8d83e309c7f11c69e..a37a258a61506c535098a0902733d0b110d05679 100644
--- a/GeoLib/Polyline.h
+++ b/GeoLib/Polyline.h
@@ -261,4 +261,4 @@ bool operator==(Polyline const& lhs, Polyline const& rhs);
 
 bool pointsAreIdentical(const std::vector<Point*> &pnt_vec, std::size_t i, std::size_t j,
                         double prox);
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/PolylineVec.h b/GeoLib/PolylineVec.h
index 683fe5ed62a929e576be05deba836219d7aa40df..7813bb24b1749ad5e09a22254e19c7ef05c8adf1 100644
--- a/GeoLib/PolylineVec.h
+++ b/GeoLib/PolylineVec.h
@@ -28,4 +28,4 @@ namespace GeoLib {
 
 using PolylineVec = TemplateVec<GeoLib::Polyline>;
 
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/PolylineWithSegmentMarker.cpp b/GeoLib/PolylineWithSegmentMarker.cpp
index 83795209abbf8de15d0855feb3439cf59a51b5e9..3119acba8b56a0ebf3f4054bf1c5806806c9a4a7 100644
--- a/GeoLib/PolylineWithSegmentMarker.cpp
+++ b/GeoLib/PolylineWithSegmentMarker.cpp
@@ -49,4 +49,4 @@ bool PolylineWithSegmentMarker::insertPoint(std::size_t pos, std::size_t pnt_id)
     return false;
 }
 
-} // end GeoLib
+}  // namespace GeoLib
diff --git a/GeoLib/PolylineWithSegmentMarker.h b/GeoLib/PolylineWithSegmentMarker.h
index 78cc3812cd786aa0e15f416c6c6228d4bc7f55d9..87b0cec951137f62fe1143a5cc10e96196dbeaa3 100644
--- a/GeoLib/PolylineWithSegmentMarker.h
+++ b/GeoLib/PolylineWithSegmentMarker.h
@@ -57,4 +57,4 @@ private:
     std::vector<bool> _marker;
 };
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/QuadTree.h b/GeoLib/QuadTree.h
index 6a7e49801d21743d6487a330a1a4ae2af73bff58..3583aab1d637d733f51f9a6e74ffea9798a428fa 100644
--- a/GeoLib/QuadTree.h
+++ b/GeoLib/QuadTree.h
@@ -505,4 +505,4 @@ private:
      */
     const std::size_t _max_points_per_leaf;
 };
-}
+}  // namespace GeoLib
diff --git a/GeoLib/Raster.h b/GeoLib/Raster.h
index 9d461c3afe052b84567081442f38be1d8b888ee6..5bda05f0937ffc06e3b25d061e998fd1e6121886 100644
--- a/GeoLib/Raster.h
+++ b/GeoLib/Raster.h
@@ -108,4 +108,4 @@ private:
     double* _raster_data;
 };
 
-}
+}  // namespace GeoLib
diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp
index 4b8bff29f4e3a3f8ff9609f050a3d34fe86b1d45..d2c53953c003481396169f48e67732b179c9c2cd 100644
--- a/GeoLib/Station.cpp
+++ b/GeoLib/Station.cpp
@@ -88,5 +88,4 @@ bool isStation(GeoLib::Point const* pnt)
     return bh != nullptr;
 }
 
-} // namespace
-
+}  // namespace GeoLib
diff --git a/GeoLib/Station.h b/GeoLib/Station.h
index 00ae4aa0bcfd346a90e4933dffaa897cdcf3048d..1f50b59723ebf1d33e03145ed47d0f6b4ac5dfa0 100644
--- a/GeoLib/Station.h
+++ b/GeoLib/Station.h
@@ -104,4 +104,4 @@ private:
 };
 
 bool isStation(GeoLib::Point const* pnt);
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/StationBorehole.cpp b/GeoLib/StationBorehole.cpp
index 89b80ed3e750f27e40f308a390269c18c2fe8618..b3ff212f945f0cdc3dd6a910df1e4584bd85b541 100644
--- a/GeoLib/StationBorehole.cpp
+++ b/GeoLib/StationBorehole.cpp
@@ -304,4 +304,4 @@ bool isBorehole(GeoLib::Point const* pnt)
     return bh != nullptr;
 }
 
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/StationBorehole.h b/GeoLib/StationBorehole.h
index 4b9a657024d03b4471d1a5a439df7ecebcaa5303..e8861b01f6cfd7aabc5a7ee27f4c23590bbcbc18 100644
--- a/GeoLib/StationBorehole.h
+++ b/GeoLib/StationBorehole.h
@@ -117,4 +117,4 @@ private:
 
 bool isBorehole(GeoLib::Point const* pnt);
 
-} // namespace
+}  // namespace GeoLib
diff --git a/GeoLib/Surface.cpp b/GeoLib/Surface.cpp
index 97fc8c2491efe9ea395c189d06e19128ed641d35..b56ccf24096eabd4c0f224b57590d365d180315d 100644
--- a/GeoLib/Surface.cpp
+++ b/GeoLib/Surface.cpp
@@ -122,4 +122,4 @@ const Triangle* Surface::findTriangle(MathLib::Point3d const& pnt) const
     return nullptr;
 }
 
-} // end namespace
+}  // namespace GeoLib
diff --git a/GeoLib/Surface.h b/GeoLib/Surface.h
index 8971f480cc130377c84aa4a94cf67ff6e488b807..048e2d059f1b9a81b54e00d54891587d57aec3a7 100644
--- a/GeoLib/Surface.h
+++ b/GeoLib/Surface.h
@@ -99,4 +99,4 @@ protected:
     /// called and a valid surface grid is not existing.
     mutable std::unique_ptr<SurfaceGrid> _surface_grid;
 };
-}
+}  // namespace GeoLib
diff --git a/MaterialLib/Adsorption/Adsorption.cpp b/MaterialLib/Adsorption/Adsorption.cpp
index 92ab5b76792a64c4104f435e808c30c0d9f93382..d6ceb5d7c529ce632d746c69ca93c3b719a8e19e 100644
--- a/MaterialLib/Adsorption/Adsorption.cpp
+++ b/MaterialLib/Adsorption/Adsorption.cpp
@@ -184,6 +184,4 @@ double AdsorptionReaction::getEquilibriumLoading(
     return getAdsorbateDensity(T_Ads) * characteristicCurve(A);
 }
 
-
-
-} // namespace Ads
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/Adsorption.h b/MaterialLib/Adsorption/Adsorption.h
index 8eb7bb92129990843c4c3af3348823f9fdab04b9..ae7b05a4025fa35e5e49e65c67d4dfeb37df33ed 100644
--- a/MaterialLib/Adsorption/Adsorption.h
+++ b/MaterialLib/Adsorption/Adsorption.h
@@ -82,4 +82,4 @@ inline double dCurvePolyfrac(const double* coeffs, const double x)
     return (du*v - u*dv) / v / v;
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/Density100MPa.cpp b/MaterialLib/Adsorption/Density100MPa.cpp
index 88e24c4904909af5de16a5a51008fc348b7128a4..89400b43883660eafb7b187eee8f66adc452ceea 100644
--- a/MaterialLib/Adsorption/Density100MPa.cpp
+++ b/MaterialLib/Adsorption/Density100MPa.cpp
@@ -24,7 +24,7 @@ const double c[] = {
     -9.919599580166727e-11    /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -60,4 +60,4 @@ double Density100MPa::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/Density100MPa.h b/MaterialLib/Adsorption/Density100MPa.h
index d100d341cd6c0f28106ceba0930e109df928b250..e13fe9a87016e80cbc10160047714de4e79cb41b 100644
--- a/MaterialLib/Adsorption/Density100MPa.h
+++ b/MaterialLib/Adsorption/Density100MPa.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityConst.cpp b/MaterialLib/Adsorption/DensityConst.cpp
index 736c9f435afce3244530f15c7b5aad1ddb01dfdc..c1f48961e46055d0a4f294c2fd34c13e7d0dc265 100644
--- a/MaterialLib/Adsorption/DensityConst.cpp
+++ b/MaterialLib/Adsorption/DensityConst.cpp
@@ -25,7 +25,7 @@ const double c[] = {
     -1.0668790477629686e-10        /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -57,4 +57,4 @@ double DensityConst::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityConst.h b/MaterialLib/Adsorption/DensityConst.h
index 172fd663ea50be54b436c712420092eaf788c7d8..4aa41e4ae7a14ba5f3445bb339dfe659e326a110 100644
--- a/MaterialLib/Adsorption/DensityConst.h
+++ b/MaterialLib/Adsorption/DensityConst.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityCook.cpp b/MaterialLib/Adsorption/DensityCook.cpp
index 301e524e8cb70987fca9f14b6cb93c454637f22a..35a12dabe0a86bce69898d380e28a6dc1a166b89 100644
--- a/MaterialLib/Adsorption/DensityCook.cpp
+++ b/MaterialLib/Adsorption/DensityCook.cpp
@@ -24,7 +24,7 @@ const double c[] = {
     -1.037977321231462e-10    /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -56,4 +56,4 @@ double DensityCook::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityCook.h b/MaterialLib/Adsorption/DensityCook.h
index ad6ab60034f5266b83b87be06a7a5e3de64ff567..fa90f2a1127161e0964e01c7363623a9451a79bc 100644
--- a/MaterialLib/Adsorption/DensityCook.h
+++ b/MaterialLib/Adsorption/DensityCook.h
@@ -54,4 +54,4 @@ inline double alphaTWaterDean(const double T_Ads)
     return aT_100 / (1. - aT_100 * (Tcel - 100.));
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityDubinin.cpp b/MaterialLib/Adsorption/DensityDubinin.cpp
index f7731dda7705a95980b9ce2364b509383037a5e9..054915c7cf969f26aeb539421e6f8155b55472b2 100644
--- a/MaterialLib/Adsorption/DensityDubinin.cpp
+++ b/MaterialLib/Adsorption/DensityDubinin.cpp
@@ -27,7 +27,7 @@ const double c[] = {
     -1.0477401124006098e-10    /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -91,4 +91,4 @@ double DensityDubinin::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityDubinin.h b/MaterialLib/Adsorption/DensityDubinin.h
index ac9516140d5ee3e25b4985c5cf98a7f6cc1a6d2b..fd026c01213851edce55bd912be9df742cc1bc7e 100644
--- a/MaterialLib/Adsorption/DensityDubinin.h
+++ b/MaterialLib/Adsorption/DensityDubinin.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityHauer.cpp b/MaterialLib/Adsorption/DensityHauer.cpp
index 38daaa957a53cc95569751cbe8aee7b9088a8755..c6f5b17f72034b263d4ad6f383749cd7f17e69c5 100644
--- a/MaterialLib/Adsorption/DensityHauer.cpp
+++ b/MaterialLib/Adsorption/DensityHauer.cpp
@@ -24,7 +24,7 @@ const double c[] = {
     -1.0300151379421499e-10    /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -60,4 +60,4 @@ double DensityHauer::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityHauer.h b/MaterialLib/Adsorption/DensityHauer.h
index 7c49be66ecc380104d3dd135ca136f95863ca4b0..ce034699ab63bfa6586c9ea4b4873bb6121fcae6 100644
--- a/MaterialLib/Adsorption/DensityHauer.h
+++ b/MaterialLib/Adsorption/DensityHauer.h
@@ -32,4 +32,4 @@ inline double rhoWaterHauer(const double T_Ads)
     return rho0 * (1. - alpha0 * (T_Ads-T0)); // in kg/m^3
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityLegacy.cpp b/MaterialLib/Adsorption/DensityLegacy.cpp
index 76468d5af3a387d89ff2a5e0a07b9decc8b863ea..9eda437d24eadd5d335ba97470bc0eff7a9fe8fa 100644
--- a/MaterialLib/Adsorption/DensityLegacy.cpp
+++ b/MaterialLib/Adsorption/DensityLegacy.cpp
@@ -22,7 +22,7 @@ const double c[] = { 0.34102920966608297,
                      -7.610441241719489e-11
                    };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -61,4 +61,4 @@ double DensityLegacy::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityLegacy.h b/MaterialLib/Adsorption/DensityLegacy.h
index d434ecb86fba4fa7dc42ef6de598c6bbd37216c0..888933157e92713f0dbccdfe5bb9f34cba92aece 100644
--- a/MaterialLib/Adsorption/DensityLegacy.h
+++ b/MaterialLib/Adsorption/DensityLegacy.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityMette.cpp b/MaterialLib/Adsorption/DensityMette.cpp
index b60ee6f0f2c2cce79117a13c0f269e0c9516406e..d0f96151ced82c6686643da6b0c5771333790cee 100644
--- a/MaterialLib/Adsorption/DensityMette.cpp
+++ b/MaterialLib/Adsorption/DensityMette.cpp
@@ -23,7 +23,7 @@ const double c[] = {
     6.854673678427112e-10,    /* a5 */
     -1.0197050219481966e-10    /* a6 */
 };
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -63,4 +63,4 @@ double DensityMette::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityMette.h b/MaterialLib/Adsorption/DensityMette.h
index f83da39eb7ffb812145ba77641313344df5a8f1e..a0e43b1435def8601639ffb39709217eb77b6dd3 100644
--- a/MaterialLib/Adsorption/DensityMette.h
+++ b/MaterialLib/Adsorption/DensityMette.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityNunez.cpp b/MaterialLib/Adsorption/DensityNunez.cpp
index 12df1282920ccee931dfadb8b47ee1f261e97838..cd3bafb6a3c3ad346675a969bf87d68eb5f0415f 100644
--- a/MaterialLib/Adsorption/DensityNunez.cpp
+++ b/MaterialLib/Adsorption/DensityNunez.cpp
@@ -24,7 +24,7 @@ const double c[] = {
     -1.0345385018952998e-10    /* a6 */
 };
 
-}
+}  // namespace
 
 namespace Adsorption
 {
@@ -71,4 +71,4 @@ double DensityNunez::dCharacteristicCurve(const double A) const
     return dCurvePolyfrac(c, A);
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/DensityNunez.h b/MaterialLib/Adsorption/DensityNunez.h
index c3726c1a9337159548d5d362d5b3638e5952a525..2c6c571841715e40a3a3cebf11427cd8e10d0473 100644
--- a/MaterialLib/Adsorption/DensityNunez.h
+++ b/MaterialLib/Adsorption/DensityNunez.h
@@ -23,4 +23,4 @@ public:
     double dCharacteristicCurve(const double A) const override;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/Reaction.h b/MaterialLib/Adsorption/Reaction.h
index 0011b734a876717a4384b55efaf1307a1c8d8727..a220d3cda18ac30cee1239b21ef2f5b7d7f72cfa 100644
--- a/MaterialLib/Adsorption/Reaction.h
+++ b/MaterialLib/Adsorption/Reaction.h
@@ -33,4 +33,4 @@ public:
     virtual ~Reaction() = default;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/ReactionCaOH2.cpp b/MaterialLib/Adsorption/ReactionCaOH2.cpp
index 17af5d07793f3caf2b3124097b8d8559b9d3bbc7..fed12383bf0630f0f8d5e28f30da9c8ec7015fb9 100644
--- a/MaterialLib/Adsorption/ReactionCaOH2.cpp
+++ b/MaterialLib/Adsorption/ReactionCaOH2.cpp
@@ -133,4 +133,4 @@ double ReactionCaOH2::CaHydration()
     return dXdt;
 }
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/ReactionCaOH2.h b/MaterialLib/Adsorption/ReactionCaOH2.h
index aa1aea2b13a02e6bf4e4db02bd73e82dd81725ce..645c00c0a626f1e4118ca003b193946178628d71 100644
--- a/MaterialLib/Adsorption/ReactionCaOH2.h
+++ b/MaterialLib/Adsorption/ReactionCaOH2.h
@@ -84,4 +84,4 @@ public:
     static MATERIALLIB_EXPORT const double rho_up;  //! upper density limit
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/ReactionInert.h b/MaterialLib/Adsorption/ReactionInert.h
index fe2dc76080388f2e9d4b6e035665e9ad338f1001..2eaa2e9ccf22118dbf9701cd596d864d1754f0a0 100644
--- a/MaterialLib/Adsorption/ReactionInert.h
+++ b/MaterialLib/Adsorption/ReactionInert.h
@@ -32,4 +32,4 @@ public:
     }
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Adsorption/ReactionSinusoidal.h b/MaterialLib/Adsorption/ReactionSinusoidal.h
index 4dc5b0dd5c2c847f012b2c3fe0677593a4d02c2e..e34864c6de6645cba805987ac5fd9a880e54ed00 100644
--- a/MaterialLib/Adsorption/ReactionSinusoidal.h
+++ b/MaterialLib/Adsorption/ReactionSinusoidal.h
@@ -44,4 +44,4 @@ private:
     double _enthalpy;
 };
 
-}
+}  // namespace Adsorption
diff --git a/MaterialLib/Fluid/ConstantFluidProperty.h b/MaterialLib/Fluid/ConstantFluidProperty.h
index 11afa7eef0b0d6374bf5e15aac163e30510a6850..87327aa5e5d6e25daafa94e2a0e894142b031e72 100644
--- a/MaterialLib/Fluid/ConstantFluidProperty.h
+++ b/MaterialLib/Fluid/ConstantFluidProperty.h
@@ -54,5 +54,5 @@ private:
     const double _value;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp b/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
index 959921e750d31b75b59b6d13f3e41940de7b2789..cdd515217c376f5af556196180f9b6320ca4bcf6 100644
--- a/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
+++ b/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp
@@ -167,5 +167,5 @@ std::unique_ptr<FluidProperty> createFluidDensityModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/IdealGasLaw.h b/MaterialLib/Fluid/Density/IdealGasLaw.h
index e39cf29ef7fd5ebc71729a81c38f11e5d1d2fd9c..5e6b29e5b06069f397c06a99b59b8740bf128726 100644
--- a/MaterialLib/Fluid/Density/IdealGasLaw.h
+++ b/MaterialLib/Fluid/Density/IdealGasLaw.h
@@ -87,5 +87,5 @@ private:
         return _molar_mass / (PhysicalConstant::IdealGasConstant * T);
     }
 };
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h b/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h
index 8dd7693e8f9d3f26edf7b700c8e63d79a57151a7..c806eb97f5bd131bbb7cac1f509240a53c0a0167 100644
--- a/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h
+++ b/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h
@@ -82,5 +82,5 @@ private:
     const double _fluid_density_difference_ratio;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/LinearTemperatureDependentDensity.h b/MaterialLib/Fluid/Density/LinearTemperatureDependentDensity.h
index dd0cc41b983d9d165b62a4238fbd62dc82047bfe..5bc2f9bf1a7b1104a2f9d1e0e887a30cd9768b41 100644
--- a/MaterialLib/Fluid/Density/LinearTemperatureDependentDensity.h
+++ b/MaterialLib/Fluid/Density/LinearTemperatureDependentDensity.h
@@ -72,5 +72,5 @@ private:
     const double _beta;          ///<  Parameter.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/LiquidDensity.h b/MaterialLib/Fluid/Density/LiquidDensity.h
index bc106fc3a3d42e40e816d50664abab1e7408a619..7b8395f33a41595375d8988dd6bfd77e1a13587c 100644
--- a/MaterialLib/Fluid/Density/LiquidDensity.h
+++ b/MaterialLib/Fluid/Density/LiquidDensity.h
@@ -138,5 +138,5 @@ private:
     }
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Density/WaterDensityIAPWSIF97Region1.h b/MaterialLib/Fluid/Density/WaterDensityIAPWSIF97Region1.h
index 7d1d4a65510653edf0354bd49f7ae51c9084c996..badae46d99fc943eda8fdb9fb17446871f2435ed 100644
--- a/MaterialLib/Fluid/Density/WaterDensityIAPWSIF97Region1.h
+++ b/MaterialLib/Fluid/Density/WaterDensityIAPWSIF97Region1.h
@@ -90,5 +90,5 @@ private:
     const double _sR = 461.526;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.cpp b/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.cpp
index 8c511f53ce665f08b9f6f0b3480d9eb117ac5e1c..3fe6d034af47cd2990ef521b60767f721f3e12d9 100644
--- a/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.cpp
+++ b/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.cpp
@@ -89,5 +89,5 @@ std::unique_ptr<FluidProperties> createFluidProperties(
         std::move(specific_heat_capacity), std::move(thermal_conductivity));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h b/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h
index ba5f018957495fc9e67fb651ea4f00407159725a..4ffc5026d47915a43b32860c10b8d8459879a975 100644
--- a/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h
+++ b/MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h
@@ -29,4 +29,4 @@ class FluidProperties;
 std::unique_ptr<FluidProperties> createFluidProperties(
     BaseLib::ConfigTree const& config);
 }  // end namespace
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/FluidProperties.h b/MaterialLib/Fluid/FluidProperties/FluidProperties.h
index b70f8c13460ad819e4d7a86b047962541bf414e1..87c03eaac6fe4720ab593c76000c152b209dab64 100644
--- a/MaterialLib/Fluid/FluidProperties/FluidProperties.h
+++ b/MaterialLib/Fluid/FluidProperties/FluidProperties.h
@@ -94,5 +94,5 @@ protected:
         _property_models;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.cpp b/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.cpp
index 7fd1c30aef9b1bcf8a3e4214da12e01739f0e253..2a0a8167b6739d6caba5f1e21a06dd69e788a89d 100644
--- a/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.cpp
+++ b/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.cpp
@@ -123,5 +123,5 @@ double FluidPropertiesWithDensityDependentModels::compute_df_drho_drho_dp(
            drho_dp;
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.h b/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.h
index a4b41be650e0d50f3510c12bbfb02c5cd4c1b7d7..cf11057e72d51404ab479d61d51ad732e07a8d4a 100644
--- a/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.h
+++ b/MaterialLib/Fluid/FluidProperties/FluidPropertiesWithDensityDependentModels.h
@@ -77,5 +77,5 @@ private:
     std::array<bool, FluidPropertyTypeNumber> _is_density_dependent;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperties/PrimaryVariableDependentFluidProperties.h b/MaterialLib/Fluid/FluidProperties/PrimaryVariableDependentFluidProperties.h
index 030bb6dd344a0d2ccba46a6c81bab8f1c0ab1cb4..488730350808733081e3584be67059eec5c6b8f8 100644
--- a/MaterialLib/Fluid/FluidProperties/PrimaryVariableDependentFluidProperties.h
+++ b/MaterialLib/Fluid/FluidProperties/PrimaryVariableDependentFluidProperties.h
@@ -71,5 +71,5 @@ public:
     }
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/FluidProperty.h b/MaterialLib/Fluid/FluidProperty.h
index 68fec1a75439cc94dfe3500d5f8fb844a251e475..e56c4d452521adbef9cc8a28030eb909762c82b6 100644
--- a/MaterialLib/Fluid/FluidProperty.h
+++ b/MaterialLib/Fluid/FluidProperty.h
@@ -45,5 +45,5 @@ public:
                              const PropertyVariableType /* var */) const = 0;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.cpp b/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.cpp
index 359bec651746ba91dacca593813b7bbdd1500270..756350c58d32a99ea734699d543ed30956c11ea7 100644
--- a/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.cpp
+++ b/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.cpp
@@ -119,5 +119,5 @@ double DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dpi(
     return val;
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h b/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h
index 53bcc1754cac90cd2a49e3f93419bdc5914bd03a..9dd50f20febd9cf6866d723be55fb4265ad6d69c 100644
--- a/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h
+++ b/MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h
@@ -94,5 +94,5 @@ public:
     double get_dgamma_dtau_dpi(const double tau, const double pi) const;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/PropertyVariableType.h b/MaterialLib/Fluid/PropertyVariableType.h
index 9b8d50fe4ce001417785b44e91697ce8d1d25136..28d430c71f72ec83ad1e2d7d384e3796d88a1c4e 100644
--- a/MaterialLib/Fluid/PropertyVariableType.h
+++ b/MaterialLib/Fluid/PropertyVariableType.h
@@ -29,5 +29,5 @@ enum class PropertyVariableType
 const unsigned PropertyVariableNumber =
     static_cast<unsigned>(PropertyVariableType::number_of_variables);
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.cpp b/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.cpp
index 28087cb95c6bbb2967fbf13e04cde7aad69547ba..aa7982aa7c352adbc1c9525b41c6a15b62e5eb95 100644
--- a/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.cpp
+++ b/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.cpp
@@ -41,5 +41,5 @@ std::unique_ptr<FluidProperty> createSpecificFluidHeatCapacityModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h b/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h
index 048a6217e390549feb87ed4eadb8cb8e3053fe81..b037290f98657bbde5279f6a9a317c7520605323 100644
--- a/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h
+++ b/MaterialLib/Fluid/SpecificHeatCapacity/CreateSpecificFluidHeatCapacityModel.h
@@ -33,5 +33,5 @@ class FluidProperty;
 std::unique_ptr<FluidProperty> createSpecificFluidHeatCapacityModel(
     BaseLib::ConfigTree const& config);
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.cpp b/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.cpp
index 985dca5fdaf109a9ec6719276beb21eea532593b..ef984a45f9d357c5e3fc8911b61035270f872ec9 100644
--- a/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.cpp
+++ b/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.cpp
@@ -41,5 +41,5 @@ std::unique_ptr<FluidProperty> createFluidThermalConductivityModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h b/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h
index 2139422a3bf800f80ff3f0720422c8701f297f25..742248ba3c40300a372940454cb990878dbadf5f 100644
--- a/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h
+++ b/MaterialLib/Fluid/ThermalConductivity/CreateFluidThermalConductivityModel.h
@@ -33,5 +33,5 @@ class FluidProperty;
 std::unique_ptr<FluidProperty> createFluidThermalConductivityModel(
     BaseLib::ConfigTree const& config);
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp b/MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp
index cfa855b347a6f186a787b7e6d7c0578d48c5b73b..dfeb268d75987bff63dc1c9fc87e05472f6daf68 100644
--- a/MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp
+++ b/MaterialLib/Fluid/Viscosity/CreateViscosityModel.cpp
@@ -146,5 +146,5 @@ std::unique_ptr<FluidProperty> createViscosityModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/CreateViscosityModel.h b/MaterialLib/Fluid/Viscosity/CreateViscosityModel.h
index 4b9cc72c3218255489b50bf4bc0049dbb6a6b1e4..878f524ae368553807bfa06ffe43251ff7051587 100644
--- a/MaterialLib/Fluid/Viscosity/CreateViscosityModel.h
+++ b/MaterialLib/Fluid/Viscosity/CreateViscosityModel.h
@@ -29,4 +29,4 @@ std::unique_ptr<FluidProperty> createViscosityModel(
     BaseLib::ConfigTree const& config);
 
 }  // end namespace
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/LinearPressureDependentViscosity.h b/MaterialLib/Fluid/Viscosity/LinearPressureDependentViscosity.h
index eedeefefc1241852687f145dbdb06de234187d5a..7481c2aceccd5ff59406d69df8b88c28086d7ff7 100644
--- a/MaterialLib/Fluid/Viscosity/LinearPressureDependentViscosity.h
+++ b/MaterialLib/Fluid/Viscosity/LinearPressureDependentViscosity.h
@@ -82,5 +82,5 @@ private:
     const double _gamma;  ///<  Parameter.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/TemperatureDependentViscosity.h b/MaterialLib/Fluid/Viscosity/TemperatureDependentViscosity.h
index 48386f10dc0e0eeb802fe130da0417b14236445e..1ee3564dcba2c1e3a0f48dafc7042bd607a2653e 100644
--- a/MaterialLib/Fluid/Viscosity/TemperatureDependentViscosity.h
+++ b/MaterialLib/Fluid/Viscosity/TemperatureDependentViscosity.h
@@ -91,5 +91,5 @@ private:
     const double _temperature_v;  ///<  Reference temperature 2.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/VogelsLiquidDynamicViscosity.h b/MaterialLib/Fluid/Viscosity/VogelsLiquidDynamicViscosity.h
index 0bf51cf16d6a4999a8ba9ae9537e826848da48a7..b2c1ba88574a1d8eac7fabba2f1e4c1ca6bd8e26 100644
--- a/MaterialLib/Fluid/Viscosity/VogelsLiquidDynamicViscosity.h
+++ b/MaterialLib/Fluid/Viscosity/VogelsLiquidDynamicViscosity.h
@@ -110,5 +110,5 @@ struct VogelsViscosityConstantsCH4
     const double C = 969.306;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.cpp b/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.cpp
index 6dfe681c5cfff24edc1acde60a85d5ae370dc9f0..21bd160a2d0da9df08ffeb01c9b8763486c8ce2c 100644
--- a/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.cpp
+++ b/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.cpp
@@ -195,5 +195,5 @@ double computedBarMu_dbarRho(const double barT, double bar_rho)
            (mu1_factor + bar_rho * dmu1_factor_dbar_rho);
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.h b/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.h
index 950007cb960c4d51002e636c656904549a887343..80e7175fa790f70b7767105954ee5815cc3ed328 100644
--- a/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.h
+++ b/MaterialLib/Fluid/Viscosity/WaterViscosityIAPWS.h
@@ -82,5 +82,5 @@ private:
     // Coefficients Hi and Hij are given in two static arrays in the cpp file.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.cpp b/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.cpp
index 0c53db4408f89bb0785a6970ed70a1d6c6546bc9..d330cd104a093f3f2ac4a230bb7e11dc9d67bf0e 100644
--- a/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.cpp
+++ b/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.cpp
@@ -83,5 +83,5 @@ double WaterVaporProperties::getWaterVaporEnthalpySimple(const double temperatur
         h_wg;
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.h b/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.h
index fed0898b0d63d19a2f47d3f44d38bb177302504f..a43baa58492cf0fa0e9c2cf2a9828067f3c9bc3e 100644
--- a/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.h
+++ b/MaterialLib/Fluid/WaterVaporProperties/WaterVaporProperties.h
@@ -62,5 +62,5 @@ private:
     const double& _air_mol_mass = PhysicalConstant::MolarMass::Air;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace Fluid
+}  // namespace MaterialLib
diff --git a/MaterialLib/FractureModels/MohrCoulomb.cpp b/MaterialLib/FractureModels/MohrCoulomb.cpp
index 6d569b05f58e10ce54d5c7f5ed60d3d3ee6803f5..c19c0fbb94360c5ba2f19dd2d1249684fa88dbf4 100644
--- a/MaterialLib/FractureModels/MohrCoulomb.cpp
+++ b/MaterialLib/FractureModels/MohrCoulomb.cpp
@@ -43,7 +43,7 @@ struct MaterialPropertyValues
     }
 };
 
-} // no namespace
+}  // namespace
 
 template <int DisplacementDim>
 void MohrCoulomb<DisplacementDim>::computeConstitutiveRelation(
diff --git a/MaterialLib/MPL/CreateComponent.cpp b/MaterialLib/MPL/CreateComponent.cpp
index 1364eb9c45ca0415b21d5f732d44026d0fc2ef23..c042afe9501e1cfb84e99cd2f939c508bcbe4f6d 100644
--- a/MaterialLib/MPL/CreateComponent.cpp
+++ b/MaterialLib/MPL/CreateComponent.cpp
@@ -59,7 +59,7 @@ std::unique_ptr<MaterialPropertyLib::Component> createComponent(
 
     return std::make_unique<Component>(component_name, std::move(properties));
 }
-}
+}  // namespace
 
 namespace MaterialPropertyLib
 {
diff --git a/MaterialLib/MPL/CreatePhase.cpp b/MaterialLib/MPL/CreatePhase.cpp
index 8423aef48119571a0f193053888e7eda99e31c28..800de257b90905abf3542d6c72b60d4954a3b555 100644
--- a/MaterialLib/MPL/CreatePhase.cpp
+++ b/MaterialLib/MPL/CreatePhase.cpp
@@ -75,7 +75,7 @@ std::unique_ptr<MaterialPropertyLib::Phase> createPhase(
     return std::make_unique<Phase>(
         std::move(phase_type), std::move(components), std::move(properties));
 }
-}
+}  // namespace
 
 namespace MaterialPropertyLib
 {
diff --git a/MaterialLib/MPL/Properties/LinearProperty.h b/MaterialLib/MPL/Properties/LinearProperty.h
index 7ba5ebe49d31bbdc12f8aea2ebb46b7ba0e6bce6..61727a702d8af81c84dde3b6771edbfa7090d693 100644
--- a/MaterialLib/MPL/Properties/LinearProperty.h
+++ b/MaterialLib/MPL/Properties/LinearProperty.h
@@ -50,4 +50,4 @@ public:
 private:
     IndependentVariable const _independent_variable;
 };
-}
+}  // namespace MaterialPropertyLib
diff --git a/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp b/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp
index 1aaabb81533c49c46635e5b63010aad91adf91f3..b21edcd02376327026fd07648e889d142b954e63 100644
--- a/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp
+++ b/MaterialLib/PorousMedium/CreatePorousMediaProperties.cpp
@@ -107,5 +107,5 @@ PorousMediaProperties createPorousMediaProperties(
                                  std::move(storage_models), material_ids};
 }
 
-}  // namespace ComponentTransport
-}  // namespace ProcessLib
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Permeability/Permeability.h b/MaterialLib/PorousMedium/Permeability/Permeability.h
index b577bc64766b2951b85a82ecbe98ecd3a99b98a6..4716f0135d2ef1c3c41b79283064a5ffa8937c6b 100644
--- a/MaterialLib/PorousMedium/Permeability/Permeability.h
+++ b/MaterialLib/PorousMedium/Permeability/Permeability.h
@@ -77,5 +77,5 @@ private:
     mutable Eigen::MatrixXd _intrinsic_permeability_tensor;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.cpp b/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.cpp
index 75226449378f20a1787a6b7e446544982e2ef7b3..a8a510efa8bd6cb533357bfb899d66b822a3d1f4 100644
--- a/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.cpp
+++ b/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.cpp
@@ -59,5 +59,5 @@ std::unique_ptr<Permeability> createPermeabilityModel(
               type.data());
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.h b/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.h
index c51bd827b8c87690c40da248e0f488331e69d782..0237ebea93b4228b2a118477c10f6f7e7c0a6510 100644
--- a/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.h
+++ b/MaterialLib/PorousMedium/Permeability/createPermeabilityModel.h
@@ -35,5 +35,5 @@ std::unique_ptr<Permeability> createPermeabilityModel(
     BaseLib::ConfigTree const& config,
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters);
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Porosity/Porosity.h b/MaterialLib/PorousMedium/Porosity/Porosity.h
index b6a8ce93f623f370c870fc42c6dc1be0228e7b80..a4cca87dc1f838f09246c30ad62b0083e93ed268 100644
--- a/MaterialLib/PorousMedium/Porosity/Porosity.h
+++ b/MaterialLib/PorousMedium/Porosity/Porosity.h
@@ -51,5 +51,5 @@ private:
     ProcessLib::Parameter<double> const& _parameter;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Porosity/createPorosityModel.cpp b/MaterialLib/PorousMedium/Porosity/createPorosityModel.cpp
index 4fb36d2b127f8b041884d7c6d8c8c9a81ac87dbf..de4cd5b11e81a627d87827746b0f203938ebe25a 100644
--- a/MaterialLib/PorousMedium/Porosity/createPorosityModel.cpp
+++ b/MaterialLib/PorousMedium/Porosity/createPorosityModel.cpp
@@ -44,5 +44,5 @@ std::unique_ptr<Porosity> createPorosityModel(BaseLib::ConfigTree const& config,
               type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Porosity/createPorosityModel.h b/MaterialLib/PorousMedium/Porosity/createPorosityModel.h
index 6c0444e8cfdcd1786842885765d7147072281af0..bdfb5602239a601481e20214379e2a8c70e3c9a3 100644
--- a/MaterialLib/PorousMedium/Porosity/createPorosityModel.h
+++ b/MaterialLib/PorousMedium/Porosity/createPorosityModel.h
@@ -35,5 +35,5 @@ std::unique_ptr<Porosity> createPorosityModel(
     BaseLib::ConfigTree const& config,
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters);
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/PorousMediaProperties.cpp b/MaterialLib/PorousMedium/PorousMediaProperties.cpp
index fb03d81bf4f9bf6bd716ddd79ce0415301f7fe40..6c05d86e96b544a94849b2736c4eae43d4ed7217 100644
--- a/MaterialLib/PorousMedium/PorousMediaProperties.cpp
+++ b/MaterialLib/PorousMedium/PorousMediaProperties.cpp
@@ -40,5 +40,5 @@ PorousMediaProperties::getSpecificStorage(
 {
     return *_specific_storage_models[getMaterialID(pos)];
 }
-}
-}
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/PorousMediaProperties.h b/MaterialLib/PorousMedium/PorousMediaProperties.h
index dc07be9200c74f6673341b08872f1e4f9ec67185..cc5965c6e8b8fff6c0debf4576e237cb8d6a43f2 100644
--- a/MaterialLib/PorousMedium/PorousMediaProperties.h
+++ b/MaterialLib/PorousMedium/PorousMediaProperties.h
@@ -68,5 +68,5 @@ private:
     MeshLib::PropertyVector<int> const* const _material_ids;
 };
 
-}
-}
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Storage/ConstantStorage.h b/MaterialLib/PorousMedium/Storage/ConstantStorage.h
index bab1ee765111ef57c3c35de188c6dd49ff3cee87..b1dd4a89da1eb4d9e59a7f39f1615268852aa44e 100644
--- a/MaterialLib/PorousMedium/Storage/ConstantStorage.h
+++ b/MaterialLib/PorousMedium/Storage/ConstantStorage.h
@@ -40,5 +40,5 @@ private:
     const double _value;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Storage/Storage.h b/MaterialLib/PorousMedium/Storage/Storage.h
index b80c7554b31a0fd79ee54e54651f093cb06d2e21..67ab489b15e6d1af06915ae3716fa4fda8833838 100644
--- a/MaterialLib/PorousMedium/Storage/Storage.h
+++ b/MaterialLib/PorousMedium/Storage/Storage.h
@@ -32,5 +32,5 @@ public:
     virtual double getValue(const double variable) const = 0;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Storage/createStorageModel.cpp b/MaterialLib/PorousMedium/Storage/createStorageModel.cpp
index ef826f05bbf9f4de6a515e27e44e8ae1d4587978..0c553ec1ddcad8ff5941744c41999a1df451b8cd 100644
--- a/MaterialLib/PorousMedium/Storage/createStorageModel.cpp
+++ b/MaterialLib/PorousMedium/Storage/createStorageModel.cpp
@@ -36,5 +36,5 @@ std::unique_ptr<Storage> createStorageModel(BaseLib::ConfigTree const& config)
               "The available type is Constant.");
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/Storage/createStorageModel.h b/MaterialLib/PorousMedium/Storage/createStorageModel.h
index 29c3b8c301a2f164e947a49284962e65d6478e69..827f96c69993878e6e60992c209a8fd9b9ad4655 100644
--- a/MaterialLib/PorousMedium/Storage/createStorageModel.h
+++ b/MaterialLib/PorousMedium/Storage/createStorageModel.h
@@ -30,4 +30,4 @@ class Storage;
 std::unique_ptr<Storage> createStorageModel(BaseLib::ConfigTree const& config);
 
 }  // end namespace
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.cpp
index 2645f5bedd0dd5cb368a454c32d47a8d343b5acb..c89cbd318c559952c1a35df24bac741740f407d0 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.cpp
@@ -53,5 +53,5 @@ double BrooksCoreyCapillaryPressureSaturation::getdPcdS(
     return (_pb * val) / (_m * (_saturation_r - S));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.h b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.h
index b4b5f0442b01a992d2fdfcc5dae67e2b4d663828..63e2d4ef5521b31fc9ac692f5c0eb78e8107d75a 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/BrooksCoreyCapillaryPressureSaturation.h
@@ -87,5 +87,5 @@ private:
     const double _m;   ///< Exponent m, m>1.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h
index 2a28ab6e0ce8ffc3e7af1e0f6a76026096cd968b..1c3037c72542af0711b7e51f0ea363c21e2156ed 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h
@@ -69,5 +69,5 @@ protected:
     const double _minor_offset = std::numeric_limits<double>::epsilon();
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturationCurve.h b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturationCurve.h
index b9929793fb64f09e168f5b04d46c94e864e9fb96..7362a2b4e423fd02c9a7f10163141815e7868be5 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturationCurve.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturationCurve.h
@@ -81,5 +81,5 @@ private:
     std::unique_ptr<MathLib::PiecewiseLinearMonotonicCurve> _curve_data;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.cpp
index 0822e55c1e461e6bfb4de11f744d2071ae48c47a..88b2ed1804964fb862f4fbcf308c7aafacd1e3d1 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.cpp
@@ -163,5 +163,5 @@ std::unique_ptr<CapillaryPressureSaturation> createCapillaryPressureModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h
index 340d6a5a961d5b0d619209c624f7688c3b128250..a69597503bcd343ccb8ce91c00094ca0aca0099c 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h
@@ -29,4 +29,4 @@ class CapillaryPressureSaturation;
 std::unique_ptr<CapillaryPressureSaturation> createCapillaryPressureModel(
     BaseLib::ConfigTree const& config);
 }
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.cpp
index d29857c1f9bdce5cfd69c808a5681afc084bf656..4e4177c387c5f7981f3511e1ef53344752a08b44 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.cpp
@@ -158,5 +158,5 @@ double VanGenuchtenCapillaryPressureSaturation::getdPcdSvG(
            std::pow(S_le, (-1 / _m)) / S_le;
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.h b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.h
index da948f38caa2ba88af03ff2e4fec391d2da80ee3..a4310c96b0a318cd5df3c94ef49c69723fd0d348 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/VanGenuchtenCapillaryPressureSaturation.h
@@ -114,5 +114,5 @@ private:
     double getdPcdSvG(const double Sg) const;
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.cpp
index 0c1d6d4a257d4a3b4ed84b23448759905ac6efb1..4aff51cf35bf713c41b5b9b876020a512dc3a726 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.cpp
@@ -209,5 +209,5 @@ std::unique_ptr<RelativePermeability> createRelativePermeabilityModel(
         type.data());
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h
index fdf30e87f695522bf270c956f3436429de90f987..8cef856c1b614f0906bbd0b975f1d818b37d892c 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/CreateRelativePermeabilityModel.h
@@ -29,4 +29,4 @@ class RelativePermeability;
 std::unique_ptr<RelativePermeability> createRelativePermeabilityModel(
     BaseLib::ConfigTree const& config);
 }
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.cpp
index 2e00900fea23520e8fe0a8a0f834c9ad48e33edd..1f713447f74def7441f22260e6d6f8971c85d41d 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.cpp
@@ -47,5 +47,5 @@ double NonWettingPhaseBrooksCoreyOilGas::getdValue(
            (_saturation_max - _saturation_r);
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.h
index 92c1046ea05c612f9692b044f2f474e6303c94c2..3b495bbec784a465b930d3ddcea535d4a5bce17e 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseBrooksCoreyOilGas.h
@@ -68,5 +68,5 @@ private:
     const double _krel_min;  ///< Minimum relative permeability
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.cpp
index 77d65ce200d32e673912fcb52fea515a5ac6754f..d14cd7aebab7bbb557a3fac4fefd2a2a0ed3ae34 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.cpp
@@ -46,5 +46,5 @@ double NonWettingPhaseVanGenuchten::getdValue(const double saturation_w) const
                 std::pow(Se, (1. - _m) / _m)) /
            (_saturation_max - _saturation_r);
 }
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.h
index 66fa666a1c761a5b9c4211697ed909d0f908566f..87420a4c10f5821ac4a2e540c199525eb9fd657e 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/NonWettingPhaseVanGenuchten.h
@@ -72,5 +72,5 @@ private:
     const double _krel_min;  ///< Minimum relative permeability
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h
index 6d80afc09be23d5f904f773b2fe333045d46f80b..7ba94a9810d33628fb568658270c3041e1822496 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeability.h
@@ -51,5 +51,5 @@ protected:
     const double _saturation_max;  ///< Maximum saturation.
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeabilityCurve.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeabilityCurve.h
index f4a3727a2383d864f4118c45de33a23d234db3e4..d4676428ef43584cb2f439d8fd958c100a972cc5 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeabilityCurve.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/RelativePermeabilityCurve.h
@@ -63,5 +63,5 @@ public:
 private:
     std::unique_ptr<MathLib::PiecewiseLinearInterpolation> _curve_data;
 };
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.cpp
index 4ccebdb24cd082f5f672b6d2b907b39f1a30d5c4..be11d6922851411be5e1200afec80fd12d4dca7f 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.cpp
@@ -39,5 +39,5 @@ double WettingPhaseBrooksCoreyOilGas::getdValue(const double saturation) const
     return ((3.0 + 2.0 / _m) * std::pow(Se, 2.0 + 2.0 / _m)) /
            (_saturation_max - _saturation_r);
 }
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.h
index de81cc669ddc4c0cc541a21a07138778e608b644..4fb7003dee3971065c6c04fe8805223f8d16f56a 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseBrooksCoreyOilGas.h
@@ -64,5 +64,5 @@ private:
     const double _krel_min;  ///< Minimum relative permeability
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.cpp b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.cpp
index 8ee6e83e781e632f1925407b474ae75ea11e8853..aafcb00532b6ddc2d2c72962075019c56fea2d71 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.cpp
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.cpp
@@ -48,5 +48,5 @@ double WettingPhaseVanGenuchten::getdValue(const double saturation) const
            (_saturation_max - _saturation_r);
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.h b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.h
index ef27881417a74f12ee8bcccc6fdcd6ed513bad5d..ee47217360ad0be47a043363bae97bbd7d931316 100644
--- a/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.h
+++ b/MaterialLib/PorousMedium/UnsaturatedProperty/RelativePermeability/WettingPhaseVanGenuchten.h
@@ -67,5 +67,5 @@ private:
     const double _krel_min;  ///< Minimum relative permeability
 };
 
-}  // end namespace
-}  // end namespace
+}  // namespace PorousMedium
+}  // namespace MaterialLib
diff --git a/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp b/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp
index cf24b3b0d03392ce3f95c6727ce97275b62eb0f7..5eed2b314b2418ee3642c847feb25f72e2892333 100644
--- a/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp
+++ b/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp
@@ -119,5 +119,5 @@ template std::map<int, std::unique_ptr<MaterialLib::Solids::MechanicsBase<3>>>
 createConstitutiveRelations<3>(
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters,
     BaseLib::ConfigTree const& config);
-}
-}
+}  // namespace Solids
+}  // namespace MaterialLib
diff --git a/MaterialLib/SolidModels/CreateConstitutiveRelation.h b/MaterialLib/SolidModels/CreateConstitutiveRelation.h
index 5031039142533acc280bf17d623eef7e97ac8b4f..9136a944b84dc804ba6b8421a273168db8ef436e 100644
--- a/MaterialLib/SolidModels/CreateConstitutiveRelation.h
+++ b/MaterialLib/SolidModels/CreateConstitutiveRelation.h
@@ -50,5 +50,5 @@ extern template std::map<int,
 createConstitutiveRelations<3>(
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters,
     BaseLib::ConfigTree const& config);
-}
-}
+}  // namespace Solids
+}  // namespace MaterialLib
diff --git a/MaterialLib/SolidModels/CreateCreepBGRa.h b/MaterialLib/SolidModels/CreateCreepBGRa.h
index f5adefbc8306d05e0f78c2006247cd2ddbc9b816..23b4c770c82ab14ec704edb42babcc81875dddc1 100644
--- a/MaterialLib/SolidModels/CreateCreepBGRa.h
+++ b/MaterialLib/SolidModels/CreateCreepBGRa.h
@@ -48,6 +48,6 @@ extern template std::unique_ptr<MaterialLib::Solids::MechanicsBase<3>>
 createCreepBGRa<3>(
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters,
     BaseLib::ConfigTree const& config);
-}
-}
-}
+}  // namespace Creep
+}  // namespace Solids
+}  // namespace MaterialLib
diff --git a/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp b/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp
index 6b5cab0d1aa28a7a6e6879c5d3758eeb89eb35c2..72f83be098f4c4b22aa4c52b96dda890b55140f4 100644
--- a/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp
+++ b/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp
@@ -40,4 +40,4 @@ NumLib::NewtonRaphsonSolverParameters createNewtonRaphsonSolverParameters(
 
     return {maximum_iterations, error_tolerance};
 }
-}
+}  // namespace MaterialLib
diff --git a/MaterialLib/SolidModels/Lubby2.h b/MaterialLib/SolidModels/Lubby2.h
index cc7c527e93ee2d6f3825ae24ef25c48caf907baf..58a0ebe58321c1a9786529bd21d761afd9279c26 100644
--- a/MaterialLib/SolidModels/Lubby2.h
+++ b/MaterialLib/SolidModels/Lubby2.h
@@ -98,7 +98,7 @@ struct LocalLubby2Properties
     double etaK;
     double etaM;
 };
-}
+}  // namespace detail
 
 template <int DisplacementDim>
 class Lubby2 final : public MechanicsBase<DisplacementDim>
diff --git a/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.cpp b/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.cpp
index 3d77bc224abb45ad829bad9af8697fef79a9e393..891ff1653ddf8fbf9a582c9f4f2c7c93118c9406 100644
--- a/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.cpp
+++ b/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.cpp
@@ -140,5 +140,5 @@ createTwoPhaseFlowMaterialProperties(
         std::move(fluid_config));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace MaterialLib
diff --git a/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h b/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h
index a61e3ac218a559ba2d8afbf8747b351f80b84bea..021ac92e594c1c6d03d1388e2bb4479e77720bda 100644
--- a/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h
+++ b/MaterialLib/TwoPhaseModels/CreateTwoPhaseFlowMaterialProperties.h
@@ -35,4 +35,4 @@ createTwoPhaseFlowMaterialProperties(
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters);
 
 }  // end namespace
-}  // end namespace
+}  // namespace MaterialLib
diff --git a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.cpp b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.cpp
index 97e68662b165583ddc96b3f20e3467534a3e3a52..f8a9b5a2d99c2751eb1f0ab571244dc958047aa1 100644
--- a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.cpp
+++ b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.cpp
@@ -182,5 +182,5 @@ double TwoPhaseFlowWithPPMaterialProperties::getWetRelativePermeability(
         return 1.0;
     return boost::math::pow<3>(saturation);
 }
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace MaterialLib
diff --git a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
index 4156a649fa7b2286c7e291ceefa2f5e5d6e16b24..4adb66bad51f2f10424b5ad3687742aa72e76596 100644
--- a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
+++ b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
@@ -138,5 +138,5 @@ private:
         _relative_permeability_models;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace MaterialLib
diff --git a/MathLib/Curve/CreatePiecewiseLinearCurve-impl.h b/MathLib/Curve/CreatePiecewiseLinearCurve-impl.h
index cd81af627cd1dd58ff1536acd29b3d037b7a43bb..8213360c91d734b7e93526071dad455d84a80a3f 100644
--- a/MathLib/Curve/CreatePiecewiseLinearCurve-impl.h
+++ b/MathLib/Curve/CreatePiecewiseLinearCurve-impl.h
@@ -40,4 +40,4 @@ std::unique_ptr<CurveType> createPiecewiseLinearCurve(
     }
     return std::make_unique<CurveType>(std::move(x), std::move(y));
 }
-}
+}  // namespace MathLib
diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp
index 48d829367ab620adbcc57e70e0c7d085c318f706..a6e9de4af8f5b84d26081abff03dcc7ab4fd8064 100644
--- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp
+++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp
@@ -93,4 +93,4 @@ double PiecewiseLinearMonotonicCurve::getInverseVariable(const double y) const
     return m * (y - yi) + xi;
 }
 
-}  // namespace
+}  // namespace MathLib
diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.h b/MathLib/Curve/PiecewiseLinearMonotonicCurve.h
index 283a0b84c603939c778cfd536b394225a68fd0c1..2b2d76a0e6f248e452827c25452e90f7800fc5f1 100644
--- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.h
+++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.h
@@ -44,4 +44,4 @@ private:
      */
     bool isStrongMonotonic() const;
 };
-}  // namespace
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendrePyramid.cpp b/MathLib/Integration/GaussLegendrePyramid.cpp
index 07556c3748d7ac03d90a1d45ee18fc871a6d6e51..ce2f4b448f7f3ee7ba352d57717265a67b0e6807 100644
--- a/MathLib/Integration/GaussLegendrePyramid.cpp
+++ b/MathLib/Integration/GaussLegendrePyramid.cpp
@@ -57,4 +57,4 @@ double const GaussLegendrePyramid<3>::W[13] = {
                                            0.419515737191525950
                                            };
 
-}
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendrePyramid.h b/MathLib/Integration/GaussLegendrePyramid.h
index 217fdd6ac0bea0b76b33093f373c49d689ff3fdb..e417c84bdfc39a20e7d862c37ee40c7880a63598 100644
--- a/MathLib/Integration/GaussLegendrePyramid.h
+++ b/MathLib/Integration/GaussLegendrePyramid.h
@@ -51,4 +51,4 @@ const std::array<std::array<double, 3>, GaussLegendrePyramid<1>::NPoints>
 template <>
 double const GaussLegendrePyramid<1>::W[1];
 #endif
-}
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendreTet.cpp b/MathLib/Integration/GaussLegendreTet.cpp
index 24fdbbb9817c9a0e3a5db488eef32f9d0d5d1ff6..a1d751d85403a645e793f7305533bf897fe1eb8a 100644
--- a/MathLib/Integration/GaussLegendreTet.cpp
+++ b/MathLib/Integration/GaussLegendreTet.cpp
@@ -63,4 +63,4 @@ static const double r = 0.0425460207770812 / 6.;
 
 double const GaussLegendreTet<3>::W[GaussLegendreTet<3>::NPoints] = {
     p, p, p, p, q, q, q, q, r, r, r, r, r, r};
-}
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendreTet.h b/MathLib/Integration/GaussLegendreTet.h
index 51249dcf5da24a7a65073c33ce7a35e1bbe53496..a30a8f7002e6ca6815e59938142a531f49700c37 100644
--- a/MathLib/Integration/GaussLegendreTet.h
+++ b/MathLib/Integration/GaussLegendreTet.h
@@ -51,4 +51,4 @@ const std::array<std::array<double, 3>, GaussLegendreTet<1>::NPoints>
 template <>
 double const GaussLegendreTet<1>::W[1];
 #endif
-}
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendreTri.cpp b/MathLib/Integration/GaussLegendreTri.cpp
index 9485205909333453ac4f2a1032d440dde04933dd..eb2bcef70b0acfefb4e2bedc806de1761e52227b 100644
--- a/MathLib/Integration/GaussLegendreTri.cpp
+++ b/MathLib/Integration/GaussLegendreTri.cpp
@@ -26,4 +26,4 @@ double const GaussLegendreTri<2>::W[3] = {1./3., 1./3., 1./3.};
 const std::array<std::array<double, 2>, GaussLegendreTri<3>::NPoints> GaussLegendreTri<3>::X = {{{{1./3., 1./3.}}, {{1./5., 3./5.}}, {{1./5., 1./5.}}, {{3./5., 1./5.}}}};
 double const GaussLegendreTri<3>::W[4] = {-27./48., 25./48., 25./48., 25./48.};
 
-}
+}  // namespace MathLib
diff --git a/MathLib/Integration/GaussLegendreTri.h b/MathLib/Integration/GaussLegendreTri.h
index c2018a715cefce379e8c9e8cf2f053891ac39b85..0a47bccdc87fcb4274f92f58309e1bafc3665f74 100644
--- a/MathLib/Integration/GaussLegendreTri.h
+++ b/MathLib/Integration/GaussLegendreTri.h
@@ -56,4 +56,4 @@ const std::array<std::array<double, 2>, GaussLegendreTri<1>::NPoints>
 template <>
 double const GaussLegendreTri<1>::W[1];
 #endif
-}
+}  // namespace MathLib
diff --git a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp
index 1b34ae676063b234db6a95cd123781c9ce789522..c89daa348245a7b96130b6c162d53112a3e3ecd8 100644
--- a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp
+++ b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp
@@ -131,4 +131,4 @@ double PiecewiseLinearInterpolation::getSupportMin() const
     assert(!_supp_pnts.empty());
     return _supp_pnts.front();
 }
-}  // end MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
index 935f47656e384c579d098844c447371f2581182e..fb00cd508686af3b9e84a20ae08c5b0fc01d1e07 100644
--- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
+++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
@@ -171,7 +171,7 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver(
     }
 }
 
-} // details
+}  // namespace details
 
 EigenLinearSolver::EigenLinearSolver(
                             const std::string& /*solver_name*/,
@@ -285,4 +285,4 @@ bool EigenLinearSolver::solve(EigenMatrix &A, EigenVector& b, EigenVector &x)
     return success;
 }
 
-} //MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.h b/MathLib/LinAlg/Eigen/EigenLinearSolver.h
index 65aaee9879ad514e096cfa5493720688d89db3a3..834b37dcc8afdd4aa2d08c5d315fcdf7b36c6d2e 100644
--- a/MathLib/LinAlg/Eigen/EigenLinearSolver.h
+++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.h
@@ -60,4 +60,4 @@ protected:
     std::unique_ptr<EigenLinearSolverBase> _solver;
 };
 
-} // MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenMapTools.h b/MathLib/LinAlg/Eigen/EigenMapTools.h
index af82b6fdd4ce837fddca8896d4f80fc5f51ebccd..b4efa62f24c37402d4095fdc7c471e6dee6e3ee5 100644
--- a/MathLib/LinAlg/Eigen/EigenMapTools.h
+++ b/MathLib/LinAlg/Eigen/EigenMapTools.h
@@ -209,4 +209,4 @@ inline Eigen::Map<Eigen::VectorXd> toVector(
     return {data.data(), static_cast<Eigen::VectorXd::Index>(data.size())};
 }
 
-}  // MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenOption.cpp b/MathLib/LinAlg/Eigen/EigenOption.cpp
index 47a8c46c81f7824ef9c33e81a32d0775cf7d3481..c509cf4684da1eaccbb4504f05c20d84169a250b 100644
--- a/MathLib/LinAlg/Eigen/EigenOption.cpp
+++ b/MathLib/LinAlg/Eigen/EigenOption.cpp
@@ -82,4 +82,4 @@ std::string EigenOption::getPreconName(PreconType const precon_type)
     return "Invalid";
 }
 
-} //MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenOption.h b/MathLib/LinAlg/Eigen/EigenOption.h
index f3cf3974676f0bbf6a6ddca9036dbb3ead92d2d4..aab3884ad51fee646392ef9f8be6d64d80a43d58 100644
--- a/MathLib/LinAlg/Eigen/EigenOption.h
+++ b/MathLib/LinAlg/Eigen/EigenOption.h
@@ -79,4 +79,4 @@ struct EigenOption final
 
 };
 
-}
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenTools.cpp b/MathLib/LinAlg/Eigen/EigenTools.cpp
index dd60c3efda75523ac3c8d8f263932af64bea143e..58e08c7bf77a1304972a83664ceff41939cd6cf7 100644
--- a/MathLib/LinAlg/Eigen/EigenTools.cpp
+++ b/MathLib/LinAlg/Eigen/EigenTools.cpp
@@ -62,7 +62,4 @@ void applyKnownSolution(EigenMatrix &A_, EigenVector &b_, EigenVector &/*x*/,
     A = AT.transpose();
 }
 
-} // MathLib
-
-
-
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenTools.h b/MathLib/LinAlg/Eigen/EigenTools.h
index 198d78559a4742464df47070352e530f843a1209..85194e70eb64048288d44bb2ce364ffb1b2388c3 100644
--- a/MathLib/LinAlg/Eigen/EigenTools.h
+++ b/MathLib/LinAlg/Eigen/EigenTools.h
@@ -44,4 +44,4 @@ void applyKnownSolution(Eigen::MatrixXd &A, Eigen::VectorXd &b, Eigen::VectorXd
     OGS_FATAL("Method not implemented."); // TODO implement
 }
 
-} // MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/Eigen/EigenVector.h b/MathLib/LinAlg/Eigen/EigenVector.h
index 065c60bbd4be8e77125d31945477f26d84c2822a..906592a6cb1c8e0ea2a6d22b9eb84473ba67aeff 100644
--- a/MathLib/LinAlg/Eigen/EigenVector.h
+++ b/MathLib/LinAlg/Eigen/EigenVector.h
@@ -121,4 +121,4 @@ private:
     RawVectorType _vec;
 };
 
-} // MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/LinAlg.h b/MathLib/LinAlg/LinAlg.h
index 129374da08607c1af669f04fe16c847933987b9a..cb777773b592c9c525a60f97e220ef86b3bd48b5 100644
--- a/MathLib/LinAlg/LinAlg.h
+++ b/MathLib/LinAlg/LinAlg.h
@@ -129,8 +129,8 @@ void matMultAdd(Matrix const& A, Vector const& v1, Vector const& v2, Vector& v3)
     v3 = v2 + A*v1;
 }
 
-}} // namespaces
-
+}  // namespace LinAlg
+}  // namespace MathLib
 
 // Global PETScMatrix/PETScVector //////////////////////////////////////////
 #ifdef USE_PETSC
diff --git a/MathLib/LinAlg/LinearSolverOptions.cpp b/MathLib/LinAlg/LinearSolverOptions.cpp
index e15dd3357d4c530a1eeae88e2c1e1dd9cc02f2f8..0f5a5158472d0908dc34b84adb33eba649d0e2db 100644
--- a/MathLib/LinAlg/LinearSolverOptions.cpp
+++ b/MathLib/LinAlg/LinearSolverOptions.cpp
@@ -22,4 +22,4 @@ ignoreOtherLinearSolvers(const BaseLib::ConfigTree &config,
     }
 }
 
-}
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/LinearSolverOptions.h b/MathLib/LinAlg/LinearSolverOptions.h
index 27e0b50ea781c1b1c796b015f5bffe9994da8a16..75557a0ba1edc14561c6ae14dfd59d610882d3b5 100644
--- a/MathLib/LinAlg/LinearSolverOptions.h
+++ b/MathLib/LinAlg/LinearSolverOptions.h
@@ -35,4 +35,4 @@ namespace MathLib
 void ignoreOtherLinearSolvers(BaseLib::ConfigTree const& config,
                               std::string const& solver_name);
 
-}
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/RowColumnIndices.h b/MathLib/LinAlg/RowColumnIndices.h
index 0fdb3ebe5b30dc85812801642601794970c897ab..7141ee25cead7974f6fbd0c74cbbf26c6d9c8092 100644
--- a/MathLib/LinAlg/RowColumnIndices.h
+++ b/MathLib/LinAlg/RowColumnIndices.h
@@ -26,4 +26,4 @@ struct RowColumnIndices
     LineIndex const& columns;
 };
 
-} // MathLib
+}  // namespace MathLib
diff --git a/MathLib/LinAlg/SetMatrixSparsity.h b/MathLib/LinAlg/SetMatrixSparsity.h
index 23d4376dac4c9cdc5ac0cf71aceaeb6da51a3ddd..3013e9d1c2aad3074a160c092f5c575e75cef070 100644
--- a/MathLib/LinAlg/SetMatrixSparsity.h
+++ b/MathLib/LinAlg/SetMatrixSparsity.h
@@ -31,7 +31,7 @@ void setMatrixSparsity(MATRIX& matrix, SPARSITY_PATTERN const& sparsity_pattern)
     set_sparsity(matrix, sparsity_pattern);
 }
 
-} // MathLib
+}  // namespace MathLib
 
 #ifdef USE_LIS
 #include "Lis/LisMatrix.h"
diff --git a/MathLib/LinearFunction.h b/MathLib/LinearFunction.h
index d004c1bff0df1a6d1927964265f6a67382941cef..47285852720eab7ae8a0abd0f6a5eadf7fba70ae 100644
--- a/MathLib/LinearFunction.h
+++ b/MathLib/LinearFunction.h
@@ -55,4 +55,4 @@ private:
     const std::array<T_TYPE, N_VARS+1> _coefficients;
 };
 
-} // MathLib
+}  // namespace MathLib
diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp
index f648c8d0ddf4a3fdec91045f6f2b398cbd46daa2..f26f016694a0d4e4278b3d9f100e0b5cc089abb8 100644
--- a/MathLib/MathTools.cpp
+++ b/MathLib/MathTools.cpp
@@ -43,6 +43,4 @@ double getAngle (const double p0[3], const double p1[3], const double p2[3])
     return std::acos (scalarProduct<double,3> (v0,v1) / (std::sqrt(scalarProduct<double,3>(v0,v0)) * sqrt(scalarProduct<double,3>(v1,v1))));
 }
 
-
-
-} // namespace
+}  // namespace MathLib
diff --git a/MathLib/MathTools.h b/MathLib/MathTools.h
index 0be695079ff0d240eed8bf0cd037354413be2671..623f2984e8b26bfe5667ecd1e394ccb4684a2ccc 100644
--- a/MathLib/MathTools.h
+++ b/MathLib/MathTools.h
@@ -105,4 +105,4 @@ template<typename Type> Type limitValueInInterval(const Type variable,
         return upper_bound;
     return variable;
 }
-} // namespace
+}  // namespace MathLib
diff --git a/MathLib/Nonlinear/Root1D.h b/MathLib/Nonlinear/Root1D.h
index 728cb75a7fee515aefa6928c6c4c08ee54f6ab6f..7da425ff2f720925880db391f78b94c547ef2fb4 100644
--- a/MathLib/Nonlinear/Root1D.h
+++ b/MathLib/Nonlinear/Root1D.h
@@ -38,8 +38,7 @@ inline bool almost_zero(double a)
     return std::abs(a) <= std::numeric_limits<double>::epsilon();
 }
 
-}
-
+}  // namespace detail
 
 //! Use the regula falsi method to find the root of some scalar function of one
 //! variable.
@@ -159,6 +158,6 @@ struct AndersonBjorck
     }
 };
 
-}
+}  // namespace Nonlinear
 
 } // namespace MathLib
diff --git a/MathLib/Point3dWithID.h b/MathLib/Point3dWithID.h
index ffd5e01999775af762f9dc005a3ee9ad0420e15a..87f8fe8a99eb3da226bb7dddd84a8a496d977291 100644
--- a/MathLib/Point3dWithID.h
+++ b/MathLib/Point3dWithID.h
@@ -66,4 +66,4 @@ protected:
     std::size_t _id;
 };
 
-}
+}  // namespace MathLib
diff --git a/MathLib/Vector3.h b/MathLib/Vector3.h
index f07e06ffa4bca9fb3434c124b08c1c20c0d4b283..aedfa32660264f00d31ff5b0b1632dce8499c7d1 100644
--- a/MathLib/Vector3.h
+++ b/MathLib/Vector3.h
@@ -191,4 +191,4 @@ using Vector3 = TemplateVector3<double>;
 double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v,
                     MathLib::Vector3 const& w);
 
-}
+}  // namespace MathLib
diff --git a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp
index 324caa7a5afa5a72068a225f1de18a5549a93138..7b71d284beac49dc1268aa4c528d4e6425c7dedc 100644
--- a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp
+++ b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp
@@ -93,5 +93,4 @@ std::unique_ptr<MeshLib::Mesh> appendLinesAlongPolylines(
     return new_mesh;
 }
 
-} // MeshGeoToolsLib
-
+}  // namespace MeshGeoToolsLib
diff --git a/MeshGeoToolsLib/AppendLinesAlongPolyline.h b/MeshGeoToolsLib/AppendLinesAlongPolyline.h
index 569a60e444443f874fa29863aea62510d631c00f..43ca120eae76cfd415f258d377a443d8065e253b 100644
--- a/MeshGeoToolsLib/AppendLinesAlongPolyline.h
+++ b/MeshGeoToolsLib/AppendLinesAlongPolyline.h
@@ -40,4 +40,4 @@ namespace MeshGeoToolsLib
  */
 std::unique_ptr<MeshLib::Mesh> appendLinesAlongPolylines(
     const MeshLib::Mesh& mesh, const GeoLib::PolylineVec& ply_vec);
-}
+}  // namespace MeshGeoToolsLib
diff --git a/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp b/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp
index 28738f42b30e3b527ef273eae91e73818d298901..588219f3ea1a3a9f754993aac7be44cd40d6652f 100644
--- a/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp
+++ b/MeshGeoToolsLib/BoundaryElementsAtPoint.cpp
@@ -48,4 +48,4 @@ BoundaryElementsAtPoint::~BoundaryElementsAtPoint()
     for (auto p : _boundary_elements)
         delete p;
 }
-}  // MeshGeoToolsLib
+}  // namespace MeshGeoToolsLib
diff --git a/MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h b/MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h
index cd0108fe87d2b75ba177597935112e74ee805dd5..9d8e36723ff4f37dac165d3d6fbcebe10ef63493 100644
--- a/MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h
+++ b/MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h
@@ -84,4 +84,4 @@ void resetMeshElementProperty(MeshLib::Mesh& mesh,
     }
 }
 
-}  // end namespace
+}  // namespace MeshGeoToolsLib
diff --git a/MeshLib/CoordinateSystem.cpp b/MeshLib/CoordinateSystem.cpp
index 5747dfa8c085607fd5f0d63ee26c36a842e048b6..c018788fb2726052770a95047502716967073875 100644
--- a/MeshLib/CoordinateSystem.cpp
+++ b/MeshLib/CoordinateSystem.cpp
@@ -49,4 +49,4 @@ unsigned char CoordinateSystem::getCoordinateSystem(const GeoLib::AABB &bbox) co
     return coords;
 }
 
-} // end
+}  // namespace MeshLib
diff --git a/MeshLib/CoordinateSystem.h b/MeshLib/CoordinateSystem.h
index 289c500f702fd1a03c409f0db80c2b29ece65e25..e02e4f3767999130e9ef37fe13efe0c045e1519d 100644
--- a/MeshLib/CoordinateSystem.h
+++ b/MeshLib/CoordinateSystem.h
@@ -76,4 +76,4 @@ private:
     unsigned char _type;
 };
 
-} // MeshLib
+}  // namespace MeshLib
diff --git a/MeshLib/ElementCoordinatesMappingLocal.cpp b/MeshLib/ElementCoordinatesMappingLocal.cpp
index 7044317130bf9532a4ff25a93ddc607c4afd5950..bd98db7fdd23ed2b6dc0d269a4a8981f1f250c9b 100644
--- a/MeshLib/ElementCoordinatesMappingLocal.cpp
+++ b/MeshLib/ElementCoordinatesMappingLocal.cpp
@@ -87,4 +87,4 @@ ElementCoordinatesMappingLocal::ElementCoordinatesMappingLocal(
     detail::rotateToLocal(_matR2global.transpose(), _points);
 }
 
-} // MeshLib
+}  // namespace MeshLib
diff --git a/MeshLib/ElementCoordinatesMappingLocal.h b/MeshLib/ElementCoordinatesMappingLocal.h
index 3416396b8f3f39762a63f6da901e3a9109aacba5..24aab080d9ebf9a3f2e4e6ce821cecc12852ad80 100644
--- a/MeshLib/ElementCoordinatesMappingLocal.h
+++ b/MeshLib/ElementCoordinatesMappingLocal.h
@@ -52,4 +52,4 @@ private:
     RotationMatrix _matR2global;
 };
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/ElementStatus.cpp b/MeshLib/ElementStatus.cpp
index 2933c1216db95fe10d7afe356efbcec19425a211..0b56d5661a8ab66bbf9dbf76c286da0fa34267f3 100644
--- a/MeshLib/ElementStatus.cpp
+++ b/MeshLib/ElementStatus.cpp
@@ -132,4 +132,4 @@ bool ElementStatus::isActiveNode(MeshLib::Node const* node) const
     return _active_nodes[node->getID()]>0;
 }
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/ElementStatus.h b/MeshLib/ElementStatus.h
index 16d0ca03bac171ad8f15560a66baae55f73081c7..d03007cd6a2d86503879547e50c18804108c40e7 100644
--- a/MeshLib/ElementStatus.h
+++ b/MeshLib/ElementStatus.h
@@ -71,4 +71,4 @@ protected:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/CellRule.cpp b/MeshLib/Elements/CellRule.cpp
index d87b278410f2d7641c841eff34c608d5e72fc074..3b617588fb671c86116fc79c333db81093ce6dc5 100644
--- a/MeshLib/Elements/CellRule.cpp
+++ b/MeshLib/Elements/CellRule.cpp
@@ -37,4 +37,4 @@ bool CellRule::testElementNodeOrder(const Element* e)
     return true;
 }
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/CellRule.h b/MeshLib/Elements/CellRule.h
index 106ea8f5b259a601ddc259132d6f662b1b788ed8..3f3f3f1673adeea894174b43c9e52db65d8908f4 100644
--- a/MeshLib/Elements/CellRule.h
+++ b/MeshLib/Elements/CellRule.h
@@ -31,4 +31,4 @@ public:
     static bool testElementNodeOrder(const Element* /*e*/);
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/EdgeReturn.cpp b/MeshLib/Elements/EdgeReturn.cpp
index aa1fa698d8494b934cf0f9edff9c25af32610da9..af522280d5bb754eee22527fc015c78b46a619f6 100644
--- a/MeshLib/Elements/EdgeReturn.cpp
+++ b/MeshLib/Elements/EdgeReturn.cpp
@@ -45,5 +45,4 @@ const Element* QuadraticEdgeReturn::getEdge(const Element* e, unsigned i)
     return nullptr;
 }
 
-} // end MeshLib
-
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/EdgeReturn.h b/MeshLib/Elements/EdgeReturn.h
index e647750710a18df125fc4310c685ce2a6193356b..794fbfe854b55deb7e9ebec0cf2be00d13c443c3 100644
--- a/MeshLib/Elements/EdgeReturn.h
+++ b/MeshLib/Elements/EdgeReturn.h
@@ -41,4 +41,4 @@ public:
     static const Element* getEdge(const Element* e, unsigned i);
 };
 
-} // end MeshLib
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/EdgeRule.h b/MeshLib/Elements/EdgeRule.h
index 601d49c0fc966ce32fd1e553a5c72e959787291a..deea3585230daeb339c3f4e48e3c1531388bc42a 100644
--- a/MeshLib/Elements/EdgeRule.h
+++ b/MeshLib/Elements/EdgeRule.h
@@ -37,4 +37,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp
index 5c9061bee495f3d4a2228e3856a99d59bdb80ec7..bf911e8f23e53ac26f8e9f38ae610c60443792cb 100644
--- a/MeshLib/Elements/Element.cpp
+++ b/MeshLib/Elements/Element.cpp
@@ -239,4 +239,4 @@ bool isPointInElementXY(MathLib::Point3d const& p, Element const& e)
          MeshLib::MeshElemType2String(e.getGeomType()).c_str());
     return false;
 }
-}
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h
index e6ffd9b6b432744b582e82171231fc9641c32a65..f9a5c02f39ca21ff06cd603faa277dee77d377a2 100644
--- a/MeshLib/Elements/Element.h
+++ b/MeshLib/Elements/Element.h
@@ -230,4 +230,4 @@ protected:
 /// @return true if the \f$p' \in e'\f$ and false if \f$p' \notin e'\f$
 bool isPointInElementXY(MathLib::Point3d const& p, Element const& e);
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/FaceRule.cpp b/MeshLib/Elements/FaceRule.cpp
index 4b4e7073a25bd6dca0bf3b9179feb4996e470c8f..169f4020a427f5ac3e7383ca4b4e27659a0e7bb2 100644
--- a/MeshLib/Elements/FaceRule.cpp
+++ b/MeshLib/Elements/FaceRule.cpp
@@ -39,5 +39,4 @@ MathLib::Vector3 FaceRule::getSurfaceNormal(const Element* e)
     return MathLib::crossProduct(u, v);
 }
 
-} /* namespace */
-
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/FaceRule.h b/MeshLib/Elements/FaceRule.h
index 3f3e9477a73179dca21e3dc1825c0a9d650e687c..ee1d42768c07c1c468abf7e607f4ead2baef2372 100644
--- a/MeshLib/Elements/FaceRule.h
+++ b/MeshLib/Elements/FaceRule.h
@@ -44,4 +44,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/HexRule20.h b/MeshLib/Elements/HexRule20.h
index e9e47efa1daa7e9dc1828a782006207042ea0d00..7e8b89fc041438c2ae0a6d6cb796e9c0f6baadb6 100644
--- a/MeshLib/Elements/HexRule20.h
+++ b/MeshLib/Elements/HexRule20.h
@@ -65,4 +65,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/HexRule8.h b/MeshLib/Elements/HexRule8.h
index 5bc4b57bb613039bc323047c0d66272830700558..ebf9de650b24903ebb3cc926a49ba0981e5a5df3 100644
--- a/MeshLib/Elements/HexRule8.h
+++ b/MeshLib/Elements/HexRule8.h
@@ -98,4 +98,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/LineRule2.h b/MeshLib/Elements/LineRule2.h
index 44037e34c0a4ea8424395abaa62dc7a258fd4d98..d5576eaf76b1b2bb91272f355c42e8690fb151ff 100644
--- a/MeshLib/Elements/LineRule2.h
+++ b/MeshLib/Elements/LineRule2.h
@@ -67,4 +67,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/LineRule3.h b/MeshLib/Elements/LineRule3.h
index 02b8f2a88852845e575d1f5a2180082ea2868ca2..0e961526d29b6d1fad6fd7cefe3b0f2724c1780e 100644
--- a/MeshLib/Elements/LineRule3.h
+++ b/MeshLib/Elements/LineRule3.h
@@ -37,4 +37,4 @@ public:
     using EdgeReturn = MeshLib::QuadraticEdgeReturn;
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/MapBulkElementPoint.cpp b/MeshLib/Elements/MapBulkElementPoint.cpp
index edb024cf742860ca53591d6e2bc0e8074b89ca05..d487f3e50685370860c6d9d4fddce9f25c701e16 100644
--- a/MeshLib/Elements/MapBulkElementPoint.cpp
+++ b/MeshLib/Elements/MapBulkElementPoint.cpp
@@ -128,4 +128,4 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& /*mesh*/,
 {
     return MathLib::ORIGIN;
 }
-}  // end namespace ProcessLib
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/MapBulkElementPoint.h b/MeshLib/Elements/MapBulkElementPoint.h
index 7ef88153aa2633b2185aee40fb44be52677b3e09..73bb897200b6bd489d7a9625360018342a9fc06c 100644
--- a/MeshLib/Elements/MapBulkElementPoint.h
+++ b/MeshLib/Elements/MapBulkElementPoint.h
@@ -63,4 +63,4 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh,
                                      std::size_t bulk_element_id,
                                      std::size_t bulk_face_id,
                                      MathLib::WeightedPoint3D const& wp);
-}  // end namespace ProcessLib
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/PointRule1.h b/MeshLib/Elements/PointRule1.h
index b92a6b0bc746fbd7e2cb7dd45ecbd47e7551bd62..6f4713efcc13c89f45b12dfadf87d0ae2a2738d3 100644
--- a/MeshLib/Elements/PointRule1.h
+++ b/MeshLib/Elements/PointRule1.h
@@ -60,4 +60,4 @@ public:
     /// Calculates the length of a line
     static double computeVolume(Node const* const* _nodes);
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/PrismRule15.h b/MeshLib/Elements/PrismRule15.h
index b570c683d467dc59bc3703f500537c1c49c4f427..22569761d3a62e7b2a0827e9716e056eea7fd187 100644
--- a/MeshLib/Elements/PrismRule15.h
+++ b/MeshLib/Elements/PrismRule15.h
@@ -66,4 +66,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/PrismRule6.h b/MeshLib/Elements/PrismRule6.h
index f9452b300011aac795c8e341c9deee020e1b7b3e..5e93fa003f4dc93dc8b81e45133174f129dcc34b 100644
--- a/MeshLib/Elements/PrismRule6.h
+++ b/MeshLib/Elements/PrismRule6.h
@@ -99,4 +99,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/PyramidRule13.h b/MeshLib/Elements/PyramidRule13.h
index 62ca80115900f2b1548bdf59fcae855650f64166..dffea470b058abc53eb138e53a7dc512c828ad6a 100644
--- a/MeshLib/Elements/PyramidRule13.h
+++ b/MeshLib/Elements/PyramidRule13.h
@@ -65,4 +65,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/PyramidRule5.h b/MeshLib/Elements/PyramidRule5.h
index f89a6e31223d873c4e396acd9caced4c621fa26a..bdf2c0f941208718113c8e437785e0ada0d9857a 100644
--- a/MeshLib/Elements/PyramidRule5.h
+++ b/MeshLib/Elements/PyramidRule5.h
@@ -98,4 +98,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/QuadRule4.h b/MeshLib/Elements/QuadRule4.h
index 324d89cb6c854cdbcdaee04f8c080e9b364fb5f7..8a78c7a62ab8e0a6bfd21b912ca8c65958c36cc9 100644
--- a/MeshLib/Elements/QuadRule4.h
+++ b/MeshLib/Elements/QuadRule4.h
@@ -80,4 +80,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/QuadRule8.h b/MeshLib/Elements/QuadRule8.h
index 54e125e344f550f387b21865e41b6f833da84f7a..ce7f906198c626b92de33bfd0d9b5c8ca752fa35 100644
--- a/MeshLib/Elements/QuadRule8.h
+++ b/MeshLib/Elements/QuadRule8.h
@@ -49,4 +49,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/QuadRule9.h b/MeshLib/Elements/QuadRule9.h
index cf04c23cc5aaf0906b831c52fea086348653832d..ebb77c291222309f8da233ff6abe1b079b2736f4 100644
--- a/MeshLib/Elements/QuadRule9.h
+++ b/MeshLib/Elements/QuadRule9.h
@@ -41,4 +41,4 @@ public:
     static const CellType cell_type = CellType::QUAD9;
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/TemplateElement-impl.h b/MeshLib/Elements/TemplateElement-impl.h
index a461bdea23b28721335be6e707ecaaab6cc68cd8..7f3cc733adffdfb76a83f53021d918f516e33c1e 100644
--- a/MeshLib/Elements/TemplateElement-impl.h
+++ b/MeshLib/Elements/TemplateElement-impl.h
@@ -79,6 +79,4 @@ bool TemplateElement<ELEMENT_RULE>::isEdge(unsigned idx1, unsigned idx2) const
     return false;
 }
 
-
-} // MeshLib
-
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/TemplateElement.h b/MeshLib/Elements/TemplateElement.h
index f69de977b48a28a98fabc05455d8cbd0f300608e..c4e2783e3dbf7fad1ebf8da47268f8d64506111b 100644
--- a/MeshLib/Elements/TemplateElement.h
+++ b/MeshLib/Elements/TemplateElement.h
@@ -159,6 +159,6 @@ public:
 
 };
 
-} // MeshLib
+}  // namespace MeshLib
 
 #include "TemplateElement-impl.h"
diff --git a/MeshLib/Elements/TetRule10.h b/MeshLib/Elements/TetRule10.h
index 6fad37db15f75dd20e27f033f3bd7c1737fdadb7..47cb951e1d3a4168f56643969ac5deb576a03c27 100644
--- a/MeshLib/Elements/TetRule10.h
+++ b/MeshLib/Elements/TetRule10.h
@@ -60,4 +60,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/TetRule4.h b/MeshLib/Elements/TetRule4.h
index f44241b1a8effa94caf77c0de6ced3a2c212b6cd..76ac9ac5930eedc03df275885900219b537b79ac 100644
--- a/MeshLib/Elements/TetRule4.h
+++ b/MeshLib/Elements/TetRule4.h
@@ -93,4 +93,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/TriRule3.h b/MeshLib/Elements/TriRule3.h
index 7e7e1e86f780cda639a5501728e42c8f0fc7a7cb..67178beb3acb9d4da378fcf7e9da93b44d0686b1 100644
--- a/MeshLib/Elements/TriRule3.h
+++ b/MeshLib/Elements/TriRule3.h
@@ -81,4 +81,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/TriRule6.h b/MeshLib/Elements/TriRule6.h
index a64fafed359388369fd711d0c22d37eadf0f163c..6323752aeb956e9ea6351c00c974b3677969c43d 100644
--- a/MeshLib/Elements/TriRule6.h
+++ b/MeshLib/Elements/TriRule6.h
@@ -52,4 +52,4 @@ public:
 
 }; /* class */
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Elements/VertexRule.h b/MeshLib/Elements/VertexRule.h
index b1a23173508a8252ffed2e9cbcb4e3cb695e3ddb..a8bc192db635eb438fa5c0663b1aad84a8df65fd 100644
--- a/MeshLib/Elements/VertexRule.h
+++ b/MeshLib/Elements/VertexRule.h
@@ -38,4 +38,4 @@ public:
 
 };
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/IO/Legacy/MeshIO.cpp b/MeshLib/IO/Legacy/MeshIO.cpp
index 9eab42dfd8d74604faf045a3720b602fdc08ef8d..74d3407ba85101ef6c2fafdd664b7b1804ebbca8 100644
--- a/MeshLib/IO/Legacy/MeshIO.cpp
+++ b/MeshLib/IO/Legacy/MeshIO.cpp
@@ -342,4 +342,4 @@ std::string MeshIO::ElemType2StringOutput(const MeshLib::MeshElemType t) const
 
 } // end namespace Legacy
 } // end namespace IO
-} // end namespace MeshLin
+}  // namespace MeshLib
diff --git a/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h b/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h
index b9e1e5321a0ed5b5fd2e204477cb3d746dcb7a88..28459a129819c41ef01036ad5ff4665677fce2c6 100644
--- a/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h
+++ b/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h
@@ -140,5 +140,5 @@ readPropertyVectorPartitionMetaData(std::istream& is)
         return boost::optional<PropertyVectorPartitionMetaData>();
     return boost::optional<PropertyVectorPartitionMetaData>(pvpmd);
 }
-}
-}
+}  // namespace IO
+}  // namespace MeshLib
diff --git a/MeshLib/IO/VtkIO/PVDFile.cpp b/MeshLib/IO/VtkIO/PVDFile.cpp
index 49c4da0659ef6d5b19a199bbc1234ed89c9ab60e..7aa484d1baeae0d57dc7817cb22534dc3b8a2e6c 100644
--- a/MeshLib/IO/VtkIO/PVDFile.cpp
+++ b/MeshLib/IO/VtkIO/PVDFile.cpp
@@ -42,5 +42,5 @@ void PVDFile::addVTUFile(const std::string &vtu_fname, double timestep)
     fh << "  </Collection>\n</VTKFile>\n";
 }
 
-} // IO
-} // MeshLib
+}  // namespace IO
+}  // namespace MeshLib
diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp
index de759c6875662db438e6d402a21d28f3ba194fce..c5a3c79d7beea0b4cb02b4a8ab06d17d2a05520e 100644
--- a/MeshLib/Mesh.cpp
+++ b/MeshLib/Mesh.cpp
@@ -421,4 +421,4 @@ std::unique_ptr<MeshLib::Mesh> createMeshFromElementSelection(
 
     return mesh;
 }
-}
+}  // namespace MeshLib
diff --git a/MeshLib/Mesh.h b/MeshLib/Mesh.h
index 7f9e8c77bf290b2ea617fe1ecf6b6b0d89f1cdc3..1349d2a75120a8ce0e2bf742c0666ccc736616d9 100644
--- a/MeshLib/Mesh.h
+++ b/MeshLib/Mesh.h
@@ -303,4 +303,4 @@ PropertyVector<int> const* materialIDs(Mesh const& mesh);
 std::unique_ptr<MeshLib::Mesh> createMeshFromElementSelection(
     std::string mesh_name, std::vector<MeshLib::Element*> const& elements);
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/MeshEditing/FlipElements.h b/MeshLib/MeshEditing/FlipElements.h
index 0fe3c7374a71abd8b3e60aabc44ab3f5034c381f..8229b036cf1dd1e72dd5d070343c2ea097488156 100644
--- a/MeshLib/MeshEditing/FlipElements.h
+++ b/MeshLib/MeshEditing/FlipElements.h
@@ -37,4 +37,4 @@ std::unique_ptr<MeshLib::Element> createFlippedElement(MeshLib::Element const& e
  */
 std::unique_ptr<MeshLib::Mesh> createFlippedMesh(MeshLib::Mesh const& mesh);
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshEditing/MeshRevision.h b/MeshLib/MeshEditing/MeshRevision.h
index ef961829dda1a9fbf1221d151d51229f3b95ce50..adcaa308d6536b3b632ae8cf47293b62c172c8a3 100644
--- a/MeshLib/MeshEditing/MeshRevision.h
+++ b/MeshLib/MeshEditing/MeshRevision.h
@@ -190,4 +190,4 @@ private:
     static const std::array<unsigned,8> _hex_diametral_nodes;
 };
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshEditing/RemoveMeshComponents.cpp b/MeshLib/MeshEditing/RemoveMeshComponents.cpp
index 6b5aa7b6bc49c6377d51a0346e9ac90001a11ce2..409776d7e4735d6ae6ec61011a3e3f963433d4db 100644
--- a/MeshLib/MeshEditing/RemoveMeshComponents.cpp
+++ b/MeshLib/MeshEditing/RemoveMeshComponents.cpp
@@ -39,7 +39,7 @@ std::vector<MeshLib::Element*> excludeElementCopy(
     return vec_dest_eles;
 }
 
-} // details
+}  // namespace details
 
 MeshLib::Mesh* removeElements(const MeshLib::Mesh& mesh, const std::vector<std::size_t> &removed_element_ids, const std::string &new_mesh_name)
 {
diff --git a/MeshLib/MeshEnums.cpp b/MeshLib/MeshEnums.cpp
index eaeae99bb360db13c5ccb05959474d6c4166a959..7090a3b0f49b9b34c28433c37d61e2b943c56573 100644
--- a/MeshLib/MeshEnums.cpp
+++ b/MeshLib/MeshEnums.cpp
@@ -145,4 +145,4 @@ const std::string MeshQualityType2String(const MeshQualityType t)
     return "none";
 }
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshEnums.h b/MeshLib/MeshEnums.h
index 03b341ce6cadefebd8295b8bf7afd9d120d1ab58..20f48c0cbd229f8059349e5bc6faa1bc8159f037 100644
--- a/MeshLib/MeshEnums.h
+++ b/MeshLib/MeshEnums.h
@@ -106,4 +106,4 @@ const std::string CellType2String(const CellType t);
 
 const std::string MeshQualityType2String(const MeshQualityType t);
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshGenerators/MeshGenerator.cpp b/MeshLib/MeshGenerators/MeshGenerator.cpp
index d70e2e033a94bb7435d975390caa1377469467e2..85794fb4f266bae76b4b7ced7535536bc81f6add 100644
--- a/MeshLib/MeshGenerators/MeshGenerator.cpp
+++ b/MeshLib/MeshGenerators/MeshGenerator.cpp
@@ -636,4 +636,4 @@ MeshGenerator::createSurfaceMesh(std::string const& mesh_name,
     return new MeshLib::Mesh(mesh_name, nodes, sfc_eles);
 }
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshGenerators/MeshGenerator.h b/MeshLib/MeshGenerators/MeshGenerator.h
index 3a34a39a74d1b3e807c9e883cf8938ef818eb464..514aa4664fd8111f464ff9e56ecc0baecb773b90 100644
--- a/MeshLib/MeshGenerators/MeshGenerator.h
+++ b/MeshLib/MeshGenerators/MeshGenerator.h
@@ -505,5 +505,5 @@ createSurfaceMesh(std::string const& mesh_name,
     std::array<std::size_t, 2> const& n_steps,
     const std::function<double(double,double)>& f);
 
-}  //MeshGenerator
-} //MeshLib
+}  // namespace MeshGenerator
+}  // namespace MeshLib
diff --git a/MeshLib/MeshInformation.cpp b/MeshLib/MeshInformation.cpp
index 89f53706ad57a22889e32a2016bdf84df72005b7..eb7188c408da1e8515c8815800e328ebaffba4cf 100644
--- a/MeshLib/MeshInformation.cpp
+++ b/MeshLib/MeshInformation.cpp
@@ -42,4 +42,4 @@ const std::array<unsigned, 7> MeshInformation::getNumberOfElementTypes(const Mes
     return n_element_types;
 }
 
-} //end MeshLib
+}  // namespace MeshLib
diff --git a/MeshLib/MeshInformation.h b/MeshLib/MeshInformation.h
index cfb1e8c3e9a69d69b5f01849e8100e654892968e..c59bb97a14b19db1170127d250db1aaf97cfa715 100644
--- a/MeshLib/MeshInformation.h
+++ b/MeshLib/MeshInformation.h
@@ -70,4 +70,4 @@ public:
 
 };
 
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/AngleSkewMetric.h b/MeshLib/MeshQuality/AngleSkewMetric.h
index 1f5e6e8ec687bb0f0c16deb2436847c7663e15e6..cbf721f3f3991ef2411156ad3a1d91bba7ad7ecb 100644
--- a/MeshLib/MeshQuality/AngleSkewMetric.h
+++ b/MeshLib/MeshQuality/AngleSkewMetric.h
@@ -43,4 +43,4 @@ private:
                                     double const* const n1, double const* const n2,
                                     double &min_angle, double &max_angle) const;
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/EdgeRatioMetric.h b/MeshLib/MeshQuality/EdgeRatioMetric.h
index 478128d1522dd3675a6848ab80919ced43d2e38e..6ef677f5a8800de6bfd89d5c8598bf77dbdc2e1f 100644
--- a/MeshLib/MeshQuality/EdgeRatioMetric.h
+++ b/MeshLib/MeshQuality/EdgeRatioMetric.h
@@ -47,4 +47,4 @@ private:
     double checkPyramid (std::vector<const MathLib::Point3d*> const& pnts) const;
     double checkHexahedron (std::vector<const MathLib::Point3d*> const& pnts) const;
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/ElementQualityMetric.h b/MeshLib/MeshQuality/ElementQualityMetric.h
index 6632006c207c223913b019bfd01301a591e93403..88d62720291d3811f5a9f08cf88f5c2ce1f390f1 100644
--- a/MeshLib/MeshQuality/ElementQualityMetric.h
+++ b/MeshLib/MeshQuality/ElementQualityMetric.h
@@ -60,4 +60,4 @@ protected:
     Mesh const& _mesh;
     std::vector<double> _element_quality_metric;
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/ElementSizeMetric.h b/MeshLib/MeshQuality/ElementSizeMetric.h
index 32b9fc9cae04ccc3e2b226ff921bcf3a5e82685e..87730d76ad359f416201a0a7d56792a2d9edb9d1 100644
--- a/MeshLib/MeshQuality/ElementSizeMetric.h
+++ b/MeshLib/MeshQuality/ElementSizeMetric.h
@@ -35,4 +35,4 @@ private:
     std::size_t calc2dQuality();
     std::size_t calc3dQuality();
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/RadiusEdgeRatioMetric.h b/MeshLib/MeshQuality/RadiusEdgeRatioMetric.h
index cdc32ceede35c9525f770be90c5bbaaddbad13d2..67a96afb40163e29d6107e1b4b9b1014a590eb46 100644
--- a/MeshLib/MeshQuality/RadiusEdgeRatioMetric.h
+++ b/MeshLib/MeshQuality/RadiusEdgeRatioMetric.h
@@ -31,4 +31,4 @@ public:
 
     void calculateQuality() override;
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/MeshQuality/SizeDifferenceMetric.h b/MeshLib/MeshQuality/SizeDifferenceMetric.h
index 925a4c88d19d787d192bea91638c25d42a4e7f9f..f05754b9bb9a3c7f140254f4d50af72cc9b0270a 100644
--- a/MeshLib/MeshQuality/SizeDifferenceMetric.h
+++ b/MeshLib/MeshQuality/SizeDifferenceMetric.h
@@ -31,4 +31,4 @@ public:
 
     void calculateQuality() override;
 };
-}
+}  // namespace MeshLib
diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp
index 857c524d8faaae677ac4b09a6618ba347de88a1b..fbe4f712caef382870d03bf18e32f62c91ba2554 100644
--- a/MeshLib/Node.cpp
+++ b/MeshLib/Node.cpp
@@ -62,5 +62,4 @@ bool isBaseNode(Node const& node)
     auto const local_index = e->getNodeIDinElement(&node);
     return local_index < n_base_nodes;
 }
-}
-
+}  // namespace MeshLib
diff --git a/MeshLib/Node.h b/MeshLib/Node.h
index 6db6d312242bc8898eaa37645342faa3248e008f..e3470fff3f2d4c0a39479487a64519b4a076a8d3 100644
--- a/MeshLib/Node.h
+++ b/MeshLib/Node.h
@@ -106,4 +106,4 @@ protected:
 /// is not connected to any element i.e. an unconnected node.
 bool isBaseNode(Node const& node);
 
-} /* namespace */
+}  // namespace MeshLib
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
index 9f3145952f27d97c6afee5f99ba23f7b846fb3c4..d4b399ca961032d0c345be52b87b3a79401de922 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h
@@ -478,4 +478,4 @@ template <class Scalar> vtkIdType VtkMeshNodalCoordinatesTemplate<Scalar>
 }
 
 #endif  // vtk version
-} // end namespace
+}  // namespace MeshLib
diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
index 4648ed22a1de9e52b624d818dd381ec51bcbee22..feb32368809d1fcaf888980bd4ad287b250768a6 100644
--- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
+++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h
@@ -131,6 +131,6 @@ private:
     double *TempDoubleArray;
 };
 
-} // end namespace
+}  // namespace MeshLib
 
 #include "VtkMeshNodalCoordinatesTemplate-impl.h"
diff --git a/MeshLib/convertMeshToGeo.cpp b/MeshLib/convertMeshToGeo.cpp
index bc1013cb0a418642fcf2bf0a65fdf4fe97d6f260..90bea97582218a5a0afc3b653977a830044ef40d 100644
--- a/MeshLib/convertMeshToGeo.cpp
+++ b/MeshLib/convertMeshToGeo.cpp
@@ -112,5 +112,4 @@ MeshLib::Mesh* convertSurfaceToMesh(const GeoLib::Surface &sfc, const std::strin
     return rev.simplifyMesh(mesh_with_duplicated_nodes.getName(), eps);
 }
 
-}
-
+}  // namespace MeshLib
diff --git a/MeshLib/convertMeshToGeo.h b/MeshLib/convertMeshToGeo.h
index 8f70413d537e68080bf32d07ae438656e7cc5d67..acd482b7caf2e9a3e700d221bd7630c3bb4b4379 100644
--- a/MeshLib/convertMeshToGeo.h
+++ b/MeshLib/convertMeshToGeo.h
@@ -46,4 +46,4 @@ namespace MeshLib
      */
     MeshLib::Mesh* convertSurfaceToMesh(const GeoLib::Surface &sfc, const std::string &mesh_name, double eps = std::numeric_limits<double>::epsilon());
 
-} // namespace
+    }  // namespace MeshLib
diff --git a/MeshLib/findElementsWithinRadius.cpp b/MeshLib/findElementsWithinRadius.cpp
index 8d51c46bb9a82b13a5f576170f202b8650b2cf16..7d146be077e3ab718a9401fa3f758573e90bc736 100644
--- a/MeshLib/findElementsWithinRadius.cpp
+++ b/MeshLib/findElementsWithinRadius.cpp
@@ -101,4 +101,4 @@ std::vector<std::size_t> findElementsWithinRadius(Element const& start_element,
 
     return {std::begin(found_elements), std::end(found_elements)};
 }
-}
+}  // namespace MeshLib
diff --git a/NumLib/DOF/ComputeSparsityPattern.cpp b/NumLib/DOF/ComputeSparsityPattern.cpp
index 053d0d2c3eda1cbed9adf1234fd173487fe07cae..7bbe2f4541e8a1825e90e914c8ebb917f287c554 100644
--- a/NumLib/DOF/ComputeSparsityPattern.cpp
+++ b/NumLib/DOF/ComputeSparsityPattern.cpp
@@ -76,4 +76,4 @@ GlobalSparsityPattern computeSparsityPattern(
 #endif
 }
 
-}
+}  // namespace NumLib
diff --git a/NumLib/DOF/ComputeSparsityPattern.h b/NumLib/DOF/ComputeSparsityPattern.h
index ddc668490c157e86b31d3fa0b146b664915d7857..0cf3606d0be75f1d1eff0d74fa6a828033455945 100644
--- a/NumLib/DOF/ComputeSparsityPattern.h
+++ b/NumLib/DOF/ComputeSparsityPattern.h
@@ -32,4 +32,4 @@ class LocalToGlobalIndexMap;
  */
 GlobalSparsityPattern computeSparsityPattern(
     LocalToGlobalIndexMap const& dof_table, MeshLib::Mesh const& mesh);
-}
+}  // namespace NumLib
diff --git a/NumLib/DOF/GlobalMatrixProviders.h b/NumLib/DOF/GlobalMatrixProviders.h
index 21eb66178624e761bf35d7251fd562bac97ce5f0..57d096e5659fc26e53c074daf5b965273f70c168 100644
--- a/NumLib/DOF/GlobalMatrixProviders.h
+++ b/NumLib/DOF/GlobalMatrixProviders.h
@@ -27,4 +27,4 @@ struct GlobalMatrixProvider
 
 void cleanupGlobalMatrixProviders();
 
-} // MathLib
+}  // namespace NumLib
diff --git a/NumLib/DOF/LocalToGlobalIndexMap.cpp b/NumLib/DOF/LocalToGlobalIndexMap.cpp
index 31cc95921e51eaaed5e962e984ca5064f16d70c3..c23e28d1a6ef7d61052271dc1e177f6619b2ba45 100644
--- a/NumLib/DOF/LocalToGlobalIndexMap.cpp
+++ b/NumLib/DOF/LocalToGlobalIndexMap.cpp
@@ -29,7 +29,7 @@ std::vector<T> to_cumulative(std::vector<T> const& vec)
     return result;
 }
 
-} // no named namespace
+}  // namespace
 
 int LocalToGlobalIndexMap::getGlobalComponent(int const variable_id,
                                               int const component_id) const
diff --git a/NumLib/DOF/SimpleMatrixVectorProvider.cpp b/NumLib/DOF/SimpleMatrixVectorProvider.cpp
index 49cbee04ee7e6e294d60c2604b538444f7379c4f..914aecb84a336aa78cf83331d5e76716ba35e7a9 100644
--- a/NumLib/DOF/SimpleMatrixVectorProvider.cpp
+++ b/NumLib/DOF/SimpleMatrixVectorProvider.cpp
@@ -51,8 +51,7 @@ transfer(std::map<MatVec*, std::size_t>& from_used,
     from_used.erase(it);
 }
 
-} // detail
-
+}  // namespace detail
 
 namespace NumLib
 {
@@ -257,4 +256,4 @@ SimpleMatrixVectorProvider::
         delete ptr_id.first;
 }
 
-} // MathLib
+}  // namespace NumLib
diff --git a/NumLib/Distribution/Distribution.cpp b/NumLib/Distribution/Distribution.cpp
index f20c22d2c8b9263b099cb289495cdad069069df6..2aef2ec8da4ea9e22badc94e1dbc679952d1f24e 100644
--- a/NumLib/Distribution/Distribution.cpp
+++ b/NumLib/Distribution/Distribution.cpp
@@ -33,4 +33,4 @@ std::vector<double> generateNodeValueDistribution(
     return vec_values;
 }
 
-} //NumLib
+}  // namespace NumLib
diff --git a/NumLib/Distribution/Distribution.h b/NumLib/Distribution/Distribution.h
index afcad351cd278fa7df4ee1b414cce18bf0028975..36771244c9704546afc25a323ddc08352735152e 100644
--- a/NumLib/Distribution/Distribution.h
+++ b/NumLib/Distribution/Distribution.h
@@ -33,4 +33,4 @@ std::vector<double> generateNodeValueDistribution(
     const MeshLib::Mesh &msh,
     const std::vector<std::size_t> &vec_node_ids);
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Extrapolation/Extrapolator.h b/NumLib/Extrapolation/Extrapolator.h
index e1183a85608fec5ed5a8775ae5a02b660f1c7388..0640f65268d4e2a24efdb46149220209be6042b8 100644
--- a/NumLib/Extrapolation/Extrapolator.h
+++ b/NumLib/Extrapolation/Extrapolator.h
@@ -56,4 +56,4 @@ public:
     virtual ~Extrapolator() = default;
 };
 
-} // namespace ProcessLib
+}  // namespace NumLib
diff --git a/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.cpp b/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.cpp
index 2025d57b0a7c4c5e5b5d09e60decca60471b6d4a..b74e572e4f3bfb8e658ac8ca4aad43142297f5e6 100644
--- a/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.cpp
+++ b/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.cpp
@@ -379,6 +379,6 @@ OGS_INSTANTIATE_NATURAL_COORDINATES_MAPPING_FIX(TetRule4, ShapeTet4, 3);
 OGS_INSTANTIATE_NATURAL_COORDINATES_MAPPING_FIX(TriRule3, ShapeTri3, 3);
 OGS_INSTANTIATE_NATURAL_COORDINATES_MAPPING_FIX(TriRule6, ShapeTri6, 3);
 
-} // detail
+}  // namespace detail
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.h b/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.h
index 24505d3e09dcf50c4277598adb9712b0d00e8fb0..528738cadfd6a82dee9a5dee7ec2098f4b80b425 100644
--- a/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.h
+++ b/NumLib/Fem/CoordinatesMapping/NaturalCoordinatesMapping.h
@@ -84,4 +84,4 @@ struct NaturalCoordinatesMapping
     }
 };
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Fem/CoordinatesMapping/ShapeMatrices-impl.h b/NumLib/Fem/CoordinatesMapping/ShapeMatrices-impl.h
index e5a8a5f473de526286ffe69ba6800d2d85335849..8172ed31b6bb23d935015628e4d6d32dbc725840 100644
--- a/NumLib/Fem/CoordinatesMapping/ShapeMatrices-impl.h
+++ b/NumLib/Fem/CoordinatesMapping/ShapeMatrices-impl.h
@@ -88,7 +88,7 @@ inline void setZero(ShapeMatrices<T_N, T_DNDR, T_J, T_DNDX> &shape, ShapeDataFie
     setZero(shape, ShapeDataFieldType<ShapeMatrixType::DNDX>());
 }
 
-} //detail
+}  // namespace detail
 
 template <class T_N, class T_DNDR, class T_J, class T_DNDX>
 inline void ShapeMatrices<T_N, T_DNDR, T_J, T_DNDX>::setZero()
@@ -121,5 +121,4 @@ std::ostream& operator<< (std::ostream &os, const ShapeMatrices<T_N, T_DNDR, T_J
     return os;
 }
 
-} // NumLib
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h b/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h
index 2175b76e039c7b94df47878d7d48b7b54ad6066c..e42183e2869b5a3c9ac91a04800b764d3b1ba062 100644
--- a/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h
+++ b/NumLib/Fem/CoordinatesMapping/ShapeMatrices.h
@@ -108,7 +108,6 @@ struct ShapeMatrices
     EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
 }; // ShapeMatrices
 
-
-} // NumLib
+}  // namespace NumLib
 
 #include "ShapeMatrices-impl.h"
diff --git a/NumLib/Fem/FiniteElement/C0IsoparametricElements.h b/NumLib/Fem/FiniteElement/C0IsoparametricElements.h
index 40cd749e95d25176964ae02ca8c6614b1a8f1db9..df304db07395b6f3b8180ec1650e6f19d5a6a103 100644
--- a/NumLib/Fem/FiniteElement/C0IsoparametricElements.h
+++ b/NumLib/Fem/FiniteElement/C0IsoparametricElements.h
@@ -145,4 +145,4 @@ struct FePYRA13
         TemplateIsoparametric<ShapePyra13, T_SHAPE_MATRIX_POLICY<ShapePyra13>>;
 };
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Fem/Integration/IntegrationPoint.h b/NumLib/Fem/Integration/IntegrationPoint.h
index 479ad6f0c02358686b815ddea23bcb6f87caf92b..04e88a8db4fa5a08dc8006927862f71c2001cf77 100644
--- a/NumLib/Fem/Integration/IntegrationPoint.h
+++ b/NumLib/Fem/Integration/IntegrationPoint.h
@@ -76,4 +76,4 @@ public:
         return 1;
     }
 };
-}
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeHex20-impl.h b/NumLib/Fem/ShapeFunction/ShapeHex20-impl.h
index 1d87d7d5fdf979d0bdd92184b28ea4267b86027c..51be47245250dc52d07cd47ba7333504abb5c14f 100644
--- a/NumLib/Fem/ShapeFunction/ShapeHex20-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeHex20-impl.h
@@ -48,7 +48,7 @@ inline double dShapeFunctionHexHQ_Middle(const double r, const double s, const d
     return 0.0;
 }
 
-}
+}  // namespace
 
 namespace NumLib
 {
@@ -125,5 +125,4 @@ void ShapeHex20::computeGradShapeFunction(const T_X &rst, T_N &dNdr)
     }
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeHex20.h b/NumLib/Fem/ShapeFunction/ShapeHex20.h
index f45bd79c08e7f864f5e9a3c8294c7e8164007ed2..04b7bc0cafc3b11fd076f626e2fc32e556e4a508 100644
--- a/NumLib/Fem/ShapeFunction/ShapeHex20.h
+++ b/NumLib/Fem/ShapeFunction/ShapeHex20.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeHex20-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeHex8-impl.h b/NumLib/Fem/ShapeFunction/ShapeHex8-impl.h
index 63640d1b369315c7ec51104b432f094bf9a069c0..524c843807bd681a012e9303e1778dae42df00df 100644
--- a/NumLib/Fem/ShapeFunction/ShapeHex8-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeHex8-impl.h
@@ -57,5 +57,4 @@ void ShapeHex8::computeGradShapeFunction(const T_X &r, T_N &dN)
     dN[23] = -dN[19];
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeHex8.h b/NumLib/Fem/ShapeFunction/ShapeHex8.h
index c3e52b7c0c7aaaa341f1ae963637befa46038d26..16f4be583b357fcbf2f2006cd1beb15c0456e248 100644
--- a/NumLib/Fem/ShapeFunction/ShapeHex8.h
+++ b/NumLib/Fem/ShapeFunction/ShapeHex8.h
@@ -62,6 +62,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeHex8-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeLine2-impl.h b/NumLib/Fem/ShapeFunction/ShapeLine2-impl.h
index 456e929a9732551a6fb95d69978e5b39cca8c814..4f2100611fd91b2dc8b00f9fc6162f1c64bfa69e 100644
--- a/NumLib/Fem/ShapeFunction/ShapeLine2-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeLine2-impl.h
@@ -24,5 +24,4 @@ void ShapeLine2::computeGradShapeFunction(const T_X &/*r*/, T_N &dN)
     dN[1] = 0.5;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeLine2.h b/NumLib/Fem/ShapeFunction/ShapeLine2.h
index 3b578cf79164ffc8f8fdb05b882f0ffcd90591a5..eee67f2ecd3c71382f493bb0b895c2d1fa572447 100644
--- a/NumLib/Fem/ShapeFunction/ShapeLine2.h
+++ b/NumLib/Fem/ShapeFunction/ShapeLine2.h
@@ -48,6 +48,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeLine2-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeLine3-impl.h b/NumLib/Fem/ShapeFunction/ShapeLine3-impl.h
index 9b547f8dc5fa1fe19c52006d34d5055b7b3dfda9..74dd1f60f1425a758bfa6cd95b89cc2082bcaee9 100644
--- a/NumLib/Fem/ShapeFunction/ShapeLine3-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeLine3-impl.h
@@ -26,5 +26,4 @@ void ShapeLine3::computeGradShapeFunction(const T_X &r, T_N &dN)
     dN[2] = -2.0 * r[0];
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeLine3.h b/NumLib/Fem/ShapeFunction/ShapeLine3.h
index edb947f6a29f8ae864962c659ed1d5974ea55d8e..11c586720b9f21aeeed56fe41b7d86e3a0df76ef 100644
--- a/NumLib/Fem/ShapeFunction/ShapeLine3.h
+++ b/NumLib/Fem/ShapeFunction/ShapeLine3.h
@@ -43,6 +43,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeLine3-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapePoint1.h b/NumLib/Fem/ShapeFunction/ShapePoint1.h
index 3d156cdc50e91e5b376a4d795a7e6e9eb70f5914..47ae0473fb4aa2b0a6aef43b7c54b0c53a6224ad 100644
--- a/NumLib/Fem/ShapeFunction/ShapePoint1.h
+++ b/NumLib/Fem/ShapeFunction/ShapePoint1.h
@@ -28,6 +28,6 @@ public:
     static const unsigned DIM = MeshElement::dimension;
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
-}
+}  // namespace NumLib
 
 #include "ShapePoint1-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapePrism15-impl.h b/NumLib/Fem/ShapeFunction/ShapePrism15-impl.h
index 1f37d99964d26d47e2bd019214cf207b7651aa35..541eea847154050f2b4fc87bfeef3d3b26af5080 100644
--- a/NumLib/Fem/ShapeFunction/ShapePrism15-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapePrism15-impl.h
@@ -131,5 +131,4 @@ void ShapePrism15::computeGradShapeFunction(const T_X &x, T_N &dN)
     dN[44] = -2.0 * L2 * t;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapePrism15.h b/NumLib/Fem/ShapeFunction/ShapePrism15.h
index 89dc2d82303caa94471cdd423e818fc6ab00196f..26dab800d4bb7e728a146c231b6d5c26adc14882 100644
--- a/NumLib/Fem/ShapeFunction/ShapePrism15.h
+++ b/NumLib/Fem/ShapeFunction/ShapePrism15.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapePrism15-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapePrism6-impl.h b/NumLib/Fem/ShapeFunction/ShapePrism6-impl.h
index a4c6d0cd39a5fd283d3d084f3181b93ec2a4e85f..5ec27d1c8c135a0cba14e8023297c441056709c1 100644
--- a/NumLib/Fem/ShapeFunction/ShapePrism6-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapePrism6-impl.h
@@ -53,5 +53,4 @@ void ShapePrism6::computeGradShapeFunction(const T_X &x, T_N &dN)
     dN[17] = -dN[14];
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapePrism6.h b/NumLib/Fem/ShapeFunction/ShapePrism6.h
index 22e47ec019838586ce6c01708065eebe0614ea00..12dd8456be5b1d9ac83b7f883ce7143f0ef8974a 100644
--- a/NumLib/Fem/ShapeFunction/ShapePrism6.h
+++ b/NumLib/Fem/ShapeFunction/ShapePrism6.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapePrism6-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapePyra13-impl.h b/NumLib/Fem/ShapeFunction/ShapePyra13-impl.h
index 1f6b454336422c6f24967731e2617337cf4119a3..5f07094edb7a67e5696abeb16b4ba8446515aca6 100644
--- a/NumLib/Fem/ShapeFunction/ShapePyra13-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapePyra13-impl.h
@@ -84,5 +84,4 @@ void ShapePyra13::computeGradShapeFunction(const T_X &x, T_N &dN)
     dN[38] = -0.5 * (1.0 - r) * (1.0 + s) * t;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapePyra13.h b/NumLib/Fem/ShapeFunction/ShapePyra13.h
index 2967afae3a6d13caebdbc6d9ea4d720da09aef92..d66f49fac800488a1e7e81d3baa32771b9f3bbd2 100644
--- a/NumLib/Fem/ShapeFunction/ShapePyra13.h
+++ b/NumLib/Fem/ShapeFunction/ShapePyra13.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapePyra13-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapePyra5-impl.h b/NumLib/Fem/ShapeFunction/ShapePyra5-impl.h
index aef0468d8ca1f8325f457af04e49b7a1eabe09d6..5d9f43a74a98ceed07532ced9860064b6615e97c 100644
--- a/NumLib/Fem/ShapeFunction/ShapePyra5-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapePyra5-impl.h
@@ -50,5 +50,4 @@ void ShapePyra5::computeGradShapeFunction(const T_X &x, T_N &dN)
     dN[14] = 0.5;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapePyra5.h b/NumLib/Fem/ShapeFunction/ShapePyra5.h
index 9a4f07422a5cacce79206bbc86c7ba8e3c29362b..2bd1fd5a52566efbd0fe70d383bc5908f646df1c 100644
--- a/NumLib/Fem/ShapeFunction/ShapePyra5.h
+++ b/NumLib/Fem/ShapeFunction/ShapePyra5.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapePyra5-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad4-impl.h b/NumLib/Fem/ShapeFunction/ShapeQuad4-impl.h
index 0f373d00dfc60bd018bbe6454dc06d771cbf1a9a..305c85c83cb72b9abf244e723f3f0b4c70174861 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad4-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad4-impl.h
@@ -35,5 +35,4 @@ void ShapeQuad4::computeGradShapeFunction(const T_X &r, T_N &dN)
     dN[7] = -(1.0 + r[0]) / 4;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad4.h b/NumLib/Fem/ShapeFunction/ShapeQuad4.h
index 15e77920f386ea3142e8a8a043383b4d82501996..2857a0198624dd337934f0be4e8162fb83e5d769 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad4.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad4.h
@@ -56,6 +56,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeQuad4-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad8-impl.h b/NumLib/Fem/ShapeFunction/ShapeQuad8-impl.h
index a909cbb1e803fbb0addddb56ab27f90dcdcf2f98..bba05a1a3e8cb7296f402a8f9ebb4920ff333dbb 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad8-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad8-impl.h
@@ -53,5 +53,4 @@ void ShapeQuad8::computeGradShapeFunction(const T_X &rs, T_N &dNdr)
     dNdr[15] = -(1 + r) * s;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad8.h b/NumLib/Fem/ShapeFunction/ShapeQuad8.h
index 6c7683d61666af104e0902e9247bf8c6ef8e23c0..c0fddbe933600b875f1b201d1e8f50bce4a111cd 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad8.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad8.h
@@ -43,6 +43,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeQuad8-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad9-impl.h b/NumLib/Fem/ShapeFunction/ShapeQuad9-impl.h
index 6ac7d32d6ec8ba8815a9f8249613a73549237220..fa08753f88d6f1e4853c8ea96e258dc50309a565 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad9-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad9-impl.h
@@ -46,5 +46,4 @@ void ShapeQuad9::computeGradShapeFunction(const T_X& r, T_N& dNdr)
     dNdr[17] = 2 * r[1] * (r[0] * r[0] - 1);
     dNdr[9] = (r[1] + 0.5) * r[0] * (r[0] + 1) / 2;
 }
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeQuad9.h b/NumLib/Fem/ShapeFunction/ShapeQuad9.h
index a47408472ffcb786b54e516863404f689b958a19..3e7154de0305a04905351fecde56adc759aab4dc 100644
--- a/NumLib/Fem/ShapeFunction/ShapeQuad9.h
+++ b/NumLib/Fem/ShapeFunction/ShapeQuad9.h
@@ -43,6 +43,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeQuad9-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeStaticConsts.cpp b/NumLib/Fem/ShapeFunction/ShapeStaticConsts.cpp
index e0bdcef97d4fbda860d23f0a2619c88fc0e60268..a21c0a6f318f18cfa51a11cda3c1038cf69e9527 100644
--- a/NumLib/Fem/ShapeFunction/ShapeStaticConsts.cpp
+++ b/NumLib/Fem/ShapeFunction/ShapeStaticConsts.cpp
@@ -88,4 +88,4 @@ const unsigned ShapeTri3::NPOINTS;
 const unsigned ShapeTri6::DIM;
 const unsigned ShapeTri6::NPOINTS;
 
-}
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeTet10-impl.h b/NumLib/Fem/ShapeFunction/ShapeTet10-impl.h
index 3c8a7e5559e260562d29669b09be1b38dd43a322..23db9d96bfce76906567443f75e433fd546f2dda 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTet10-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTet10-impl.h
@@ -62,5 +62,4 @@ void ShapeTet10::computeGradShapeFunction(const T_X &r, T_N &dNdr)
     dNdr[29] = 4.0 * r[1];
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeTet10.h b/NumLib/Fem/ShapeFunction/ShapeTet10.h
index 044176a8ddc0093fe6f858161a76760df3493386..6f032709cd3bdb9e3ce2dfc6b380aa301ee36bbc 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTet10.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTet10.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeTet10-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeTet4-impl.h b/NumLib/Fem/ShapeFunction/ShapeTet4-impl.h
index 5df41174c9e41477c031feddaed581375eadf9ea..4a0d8bcb072f79558a8a1dbef6cccd40f4229e60 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTet4-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTet4-impl.h
@@ -41,5 +41,4 @@ void ShapeTet4::computeGradShapeFunction(const T_X &/*r*/, T_N &dNdr)
     dNdr[11] = 1.0;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeTet4.h b/NumLib/Fem/ShapeFunction/ShapeTet4.h
index 6ec0c2d1617929debf98a3ec07a81518a2f815f7..b53b34f8bc53bfc0c7a002afaf9e53abb6a311e4 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTet4.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTet4.h
@@ -44,6 +44,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeTet4-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeTri3-impl.h b/NumLib/Fem/ShapeFunction/ShapeTri3-impl.h
index 0e191788706389d4d5897c576240fc763adb78ca..1303b669aa2067e4d6aa3b2734cfc9362aa0d390 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTri3-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTri3-impl.h
@@ -36,5 +36,4 @@ void ShapeTri3::computeGradShapeFunction(const T_X &/*r*/, T_N &dN)
     dN[5] = 1.0;
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeTri3.h b/NumLib/Fem/ShapeFunction/ShapeTri3.h
index 557e1a2bfc37970423471ab56174ebb9342f4ced..b3c9901c61117e092a441e89df64fd446d018ac3 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTri3.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTri3.h
@@ -57,6 +57,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeTri3-impl.h"
diff --git a/NumLib/Fem/ShapeFunction/ShapeTri6-impl.h b/NumLib/Fem/ShapeFunction/ShapeTri6-impl.h
index d0293c65843fc0b78bf7dc45a6f857a1578a052d..390433e03c1a624eebb2b675a22c8db53562f7cf 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTri6-impl.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTri6-impl.h
@@ -43,5 +43,4 @@ void ShapeTri6::computeGradShapeFunction(const T_X &r, T_N &dNdr)
     dNdr[11] = 4. * (1 - r[0] - 2. * r[1]); // dN6/dL2
 }
 
-}
-
+}  // namespace NumLib
diff --git a/NumLib/Fem/ShapeFunction/ShapeTri6.h b/NumLib/Fem/ShapeFunction/ShapeTri6.h
index 4f47a15411d987ad95e87224b1ca095bf6cd8d6c..d1854e185745047034d1bc87a63b0d1e40ae25f0 100644
--- a/NumLib/Fem/ShapeFunction/ShapeTri6.h
+++ b/NumLib/Fem/ShapeFunction/ShapeTri6.h
@@ -45,6 +45,6 @@ public:
     static const unsigned NPOINTS = MeshElement::n_all_nodes;
 };
 
-}
+}  // namespace NumLib
 
 #include "ShapeTri6-impl.h"
diff --git a/NumLib/Fem/ShapeMatrixPolicy.h b/NumLib/Fem/ShapeMatrixPolicy.h
index 05450d0961a467a2d6eaf9fdef4eb234c5419100..7f8d15f5996f12027e8999e693638ce495d1fa97 100644
--- a/NumLib/Fem/ShapeMatrixPolicy.h
+++ b/NumLib/Fem/ShapeMatrixPolicy.h
@@ -47,7 +47,7 @@ namespace detail
         using type = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
     };
 
-}   // detail
+    }  // namespace detail
 
 /// An implementation of ShapeMatrixPolicy using fixed size (compile-time) eigen
 /// matrices and vectors.
diff --git a/NumLib/Function/ISpatialFunction.h b/NumLib/Function/ISpatialFunction.h
index fe3e018ac7cb934845b81f181757149b86ccc5f3..f674a12c36b3325f9e71b5472d6e334e4b3b1834 100644
--- a/NumLib/Function/ISpatialFunction.h
+++ b/NumLib/Function/ISpatialFunction.h
@@ -35,4 +35,4 @@ public:
     virtual double operator()(const MathLib::Point3d& pnt) const = 0;
 };
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Function/LinearInterpolationAlongPolyline.cpp b/NumLib/Function/LinearInterpolationAlongPolyline.cpp
index a8bd96ea27168200aa55ba7f310e7eb8c5265065..281435abd18625a90f93b5bf2f63122b3b71ffe6 100644
--- a/NumLib/Function/LinearInterpolationAlongPolyline.cpp
+++ b/NumLib/Function/LinearInterpolationAlongPolyline.cpp
@@ -65,5 +65,4 @@ double LinearInterpolationAlongPolyline::operator()(const MathLib::Point3d& pnt)
     return dist>=0 ? _interpolation.getValue(dist) : _default_value;
 }
 
-} // NumLib
-
+}  // namespace NumLib
diff --git a/NumLib/Function/LinearInterpolationAlongPolyline.h b/NumLib/Function/LinearInterpolationAlongPolyline.h
index cdd1dbcfb8f8461a3c837c93d35fceb6672058e6..8e733c589ac30b45ba3d6930499ad99f3df489b4 100644
--- a/NumLib/Function/LinearInterpolationAlongPolyline.h
+++ b/NumLib/Function/LinearInterpolationAlongPolyline.h
@@ -75,4 +75,4 @@ private:
     const double _default_value;
 };
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Function/LinearInterpolationOnSurface.cpp b/NumLib/Function/LinearInterpolationOnSurface.cpp
index d917ff4a86960d8e6ba14b25944a0dabc5e59ae7..a04630323955f498721750cdc0f0a7005b347b41 100644
--- a/NumLib/Function/LinearInterpolationOnSurface.cpp
+++ b/NumLib/Function/LinearInterpolationOnSurface.cpp
@@ -110,5 +110,4 @@ double LinearInterpolationOnSurface::interpolateInTri(
     return val;
 }
 
-} // NumLib
-
+}  // namespace NumLib
diff --git a/NumLib/Function/LinearInterpolationOnSurface.h b/NumLib/Function/LinearInterpolationOnSurface.h
index 0d3bd1c23b6bbeb80fa5fc5cafdabd4fd922395d..ac020a81393c0dd448fad9607c06805094ec0956 100644
--- a/NumLib/Function/LinearInterpolationOnSurface.h
+++ b/NumLib/Function/LinearInterpolationOnSurface.h
@@ -94,4 +94,4 @@ private:
     const double _default_value;
 };
 
-} // NumLib
+}  // namespace NumLib
diff --git a/NumLib/Function/TemplateSpatialFunction.h b/NumLib/Function/TemplateSpatialFunction.h
index d5a9c4ae6f5e64fcd63f9a46c65619989de881cd..f645ace89e37a494ad7e46274a4676993278d964 100644
--- a/NumLib/Function/TemplateSpatialFunction.h
+++ b/NumLib/Function/TemplateSpatialFunction.h
@@ -48,4 +48,4 @@ private:
     const T_FUNCTION _f;
 };
 
-}
+}  // namespace NumLib
diff --git a/NumLib/IndexValueVector.h b/NumLib/IndexValueVector.h
index 16ef2cab8e86f3fa089b3d4f4505ef92cdfc6b50..587b4c6436a9432a24c3d1565537fd3200479fb9 100644
--- a/NumLib/IndexValueVector.h
+++ b/NumLib/IndexValueVector.h
@@ -21,4 +21,4 @@ struct IndexValueVector final
     std::vector<double> values;
 };
 
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterion.cpp b/NumLib/ODESolver/ConvergenceCriterion.cpp
index 1e7fb09b7950cb958c4e4f69dd812476919984c7..04c39d19a8bcf008faca861befd724de1eb24af0 100644
--- a/NumLib/ODESolver/ConvergenceCriterion.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterion.cpp
@@ -51,4 +51,4 @@ bool checkRelativeTolerance(const double reltol, const double numerator,
            std::abs(reltol) * (std::abs(denominator) + eps);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp b/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp
index 72776e38b594516f4877aea06baec47a5b536b57..50a5e55ec867a118b4333993d8c25f51662161cf 100644
--- a/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp
@@ -75,4 +75,4 @@ std::unique_ptr<ConvergenceCriterionDeltaX> createConvergenceCriterionDeltaX(
         std::move(abstol), std::move(reltol), norm_type);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionDeltaX.h b/NumLib/ODESolver/ConvergenceCriterionDeltaX.h
index 8d54841dbef26cc898d071515c91f59db733d6fe..3f451db5ef3addfd6d8e53b70175325c1072f82a 100644
--- a/NumLib/ODESolver/ConvergenceCriterionDeltaX.h
+++ b/NumLib/ODESolver/ConvergenceCriterionDeltaX.h
@@ -44,4 +44,4 @@ private:
 std::unique_ptr<ConvergenceCriterionDeltaX> createConvergenceCriterionDeltaX(
     BaseLib::ConfigTree const& config);
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp b/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp
index e3e75b604c7aa05dd525149b37bbd68af9fcdbdf..17df667db5ffb8ce53de3611823b6b169f5437ae 100644
--- a/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp
@@ -116,4 +116,4 @@ createConvergenceCriterionPerComponentDeltaX(const BaseLib::ConfigTree& config)
         std::move(*abstols), std::move(*reltols), norm_type);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
index adcca76a16bc46af2c1f1bf8dffd425769b8e026..a9c5d71a920255cb6562bc22191129f2ed10c398 100644
--- a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
@@ -151,4 +151,4 @@ createConvergenceCriterionPerComponentResidual(
         std::move(*abstols), std::move(*reltols), norm_type);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionResidual.cpp b/NumLib/ODESolver/ConvergenceCriterionResidual.cpp
index 55ab58362354a94f160e73f9d7670f6a18b84005..a2641d7cb50bf26b6f3935273e38c4554cfbc59b 100644
--- a/NumLib/ODESolver/ConvergenceCriterionResidual.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterionResidual.cpp
@@ -109,4 +109,4 @@ createConvergenceCriterionResidual(const BaseLib::ConfigTree& config)
         std::move(abstol), std::move(reltol), norm_type);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/ConvergenceCriterionResidual.h b/NumLib/ODESolver/ConvergenceCriterionResidual.h
index e20e23098728aa30c9d22f29044e2d1e152d37de..f410856ddb43c9caa22e68e171a86e9885e9a34b 100644
--- a/NumLib/ODESolver/ConvergenceCriterionResidual.h
+++ b/NumLib/ODESolver/ConvergenceCriterionResidual.h
@@ -46,4 +46,4 @@ private:
 std::unique_ptr<ConvergenceCriterionResidual> createConvergenceCriterionResidual(
     BaseLib::ConfigTree const& config);
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/EquationSystem.h b/NumLib/ODESolver/EquationSystem.h
index be4eb2b7533c647680f0d1b87b972507266b4d45..c64c62ade9f5cc227d07ad9e736af40be9a13f46 100644
--- a/NumLib/ODESolver/EquationSystem.h
+++ b/NumLib/ODESolver/EquationSystem.h
@@ -64,4 +64,4 @@ public:
 };
 
 //! @}
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/MatrixTranslator.cpp b/NumLib/ODESolver/MatrixTranslator.cpp
index 930a2f07c07dff40605e6682517250db35d6422a..a65c0dfb552d1023d65d2ca9e4db6364fac963e9 100644
--- a/NumLib/ODESolver/MatrixTranslator.cpp
+++ b/NumLib/ODESolver/MatrixTranslator.cpp
@@ -222,4 +222,4 @@ void MatrixTranslatorCrankNicolson<
     LinAlg::scale(_b_bar, 1.0 - theta);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/MatrixTranslator.h b/NumLib/ODESolver/MatrixTranslator.h
index 0fce925f462659d518bd1aafd240e1867a53a9ae..b82b508e5a6641311465c05758c30bbd348de5dd 100644
--- a/NumLib/ODESolver/MatrixTranslator.h
+++ b/NumLib/ODESolver/MatrixTranslator.h
@@ -308,4 +308,4 @@ std::unique_ptr<MatrixTranslator<ODETag>> createMatrixTranslator(
 }
 
 //! @}
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/NonlinearSolver.cpp b/NumLib/ODESolver/NonlinearSolver.cpp
index ae8d9419402d5aa807c37433b0ed556fe8a30e10..5a8eb8f63998030d6b5963007ae5666b9014619b 100644
--- a/NumLib/ODESolver/NonlinearSolver.cpp
+++ b/NumLib/ODESolver/NonlinearSolver.cpp
@@ -359,4 +359,4 @@ createNonlinearSolver(GlobalLinearSolver& linear_solver,
     }
     OGS_FATAL("Unsupported nonlinear solver type");
 }
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/NonlinearSystem.h b/NumLib/ODESolver/NonlinearSystem.h
index 8cb605e54ca0641f085ddd0813968d5ebafd117e..35fa141a85755a4f4d80cc428b5b63530bcfaed0 100644
--- a/NumLib/ODESolver/NonlinearSystem.h
+++ b/NumLib/ODESolver/NonlinearSystem.h
@@ -106,4 +106,4 @@ public:
 };
 
 //! @}
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/TimeDiscretization.cpp b/NumLib/ODESolver/TimeDiscretization.cpp
index 233892fb53bcf904eaf039c0e3e6fdd2b0b3c0b7..3df5e23d2929174b25679f8fcc4d02760904c22f 100644
--- a/NumLib/ODESolver/TimeDiscretization.cpp
+++ b/NumLib/ODESolver/TimeDiscretization.cpp
@@ -107,7 +107,7 @@ const double BDF_Coeffs[6][7] = {
     // coefficient of (for BDF(6), the oldest state, x_n, is always rightmost)
     //        x_+6, x_+5, x_+4,       x_+3,  x_+2, x_+1,     x_n
 };
-}
+}  // namespace detail
 
 double BackwardDifferentiationFormula::getNewXWeight() const
 {
diff --git a/NumLib/ODESolver/TimeDiscretization.h b/NumLib/ODESolver/TimeDiscretization.h
index 8eeceb1ff977cb3a214f652da34cc4a6791ebf80..c1b5db164c9e5c62d74757512b0c5ca03ca67882 100644
--- a/NumLib/ODESolver/TimeDiscretization.h
+++ b/NumLib/ODESolver/TimeDiscretization.h
@@ -518,4 +518,4 @@ private:
 };
 
 //! @}
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/TimeDiscretizationBuilder.cpp b/NumLib/ODESolver/TimeDiscretizationBuilder.cpp
index 2d608f6dc15a79b3d5c6fdabfda80c4e01540a4c..e6a8d73de1fd75aa3d233f987cfaed81f51d4a29 100644
--- a/NumLib/ODESolver/TimeDiscretizationBuilder.cpp
+++ b/NumLib/ODESolver/TimeDiscretizationBuilder.cpp
@@ -46,4 +46,4 @@ std::unique_ptr<TimeDiscretization> createTimeDiscretization(
 
     OGS_FATAL("Unrecognized time discretization type `%s'", type.c_str());
 }
-}
+}  // namespace NumLib
diff --git a/NumLib/ODESolver/TimeDiscretizedODESystem.h b/NumLib/ODESolver/TimeDiscretizedODESystem.h
index 66967798fd0cfa1cd8ba37f452dadfc452f32981..913df22fbdb5fb9046f143c94c6d70feba8bb48e 100644
--- a/NumLib/ODESolver/TimeDiscretizedODESystem.h
+++ b/NumLib/ODESolver/TimeDiscretizedODESystem.h
@@ -245,4 +245,4 @@ private:
 };
 
 //! @}
-}
+}  // namespace NumLib
diff --git a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
index f9fa3c9413072d759942b7e0ae235b1575e365ca..52dda10f01934d95304c616ad29cbe9bb64b6b1f 100644
--- a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
+++ b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.cpp
@@ -62,4 +62,4 @@ double FixedTimeStepping::computeEnd(double t_initial,
     return std::min(t_end, t_sum);
 }
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.h b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
index 9c555b8af2ac750c82c514c2e044180717db2d9c..b7fdf291aebdb2c1d2ee2e6eabfdd61793838161 100644
--- a/NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
+++ b/NumLib/TimeStepping/Algorithms/FixedTimeStepping.h
@@ -68,4 +68,4 @@ private:
                              const std::vector<double>& dt_vector);
 };
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/NumLib/TimeStepping/TimeStep.h b/NumLib/TimeStepping/TimeStep.h
index 5eede2eb3780cf9140012369f78ebee9e74155c4..225fa46e367388950129ffea18dc4f7df76c5afd 100644
--- a/NumLib/TimeStepping/TimeStep.h
+++ b/NumLib/TimeStepping/TimeStep.h
@@ -122,4 +122,4 @@ private:
     std::size_t _steps;
 };
 
-}  // NumLib
+}  // namespace NumLib
diff --git a/ProcessLib/AbstractJacobianAssembler.h b/ProcessLib/AbstractJacobianAssembler.h
index 40d17a1b5240d5e68e566be48e3ac5010f766c73..d433649e89a439fc21931a598585401c64859ca3 100644
--- a/ProcessLib/AbstractJacobianAssembler.h
+++ b/ProcessLib/AbstractJacobianAssembler.h
@@ -49,4 +49,4 @@ public:
     virtual ~AbstractJacobianAssembler() = default;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/AnalyticalJacobianAssembler.cpp b/ProcessLib/AnalyticalJacobianAssembler.cpp
index eb888a882923535589b147211a7a030e0b00cd2f..4f463cc9dcbf60e3f01ed97e25fa14f69c6ba74f 100644
--- a/ProcessLib/AnalyticalJacobianAssembler.cpp
+++ b/ProcessLib/AnalyticalJacobianAssembler.cpp
@@ -38,4 +38,4 @@ void AnalyticalJacobianAssembler::assembleWithJacobianForStaggeredScheme(
         local_b_data, local_Jac_data, local_coupled_solutions);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/AnalyticalJacobianAssembler.h b/ProcessLib/AnalyticalJacobianAssembler.h
index e2d11513eb58423d8423d8735e85f1f43db3de0f..c5045c8438dbdc89e07a884673e4895aef35a5a7 100644
--- a/ProcessLib/AnalyticalJacobianAssembler.h
+++ b/ProcessLib/AnalyticalJacobianAssembler.h
@@ -47,4 +47,4 @@ public:
         LocalCoupledSolutions const& local_coupled_solutions) override;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/BoundaryCondition.h b/ProcessLib/BoundaryCondition/BoundaryCondition.h
index 4f6da3c40515b8989ce9b086d15697cfa472204e..127bbe49f24b29399f5fcbcec10980692e95e8a5 100644
--- a/ProcessLib/BoundaryCondition/BoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/BoundaryCondition.h
@@ -59,4 +59,4 @@ public:
     virtual ~BoundaryCondition() = default;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h
index 3f6bdca9084c5ed488100c06d1d90163a0a77f64..d957ef0e18d6d37773661f665525cbe0b7d7fa27 100644
--- a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h
+++ b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h
@@ -65,5 +65,4 @@ private:
     std::vector<std::unique_ptr<ParameterBase>> const& _parameters;
 };
 
-
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h
index 0db3f2e927a44691badda495e0e59323cdbe0606..87a351ca4aa3d9a9836d55ee97a63196bf4f5544 100644
--- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h
+++ b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryConditionLocalAssembler.h
@@ -170,4 +170,4 @@ private:
     MathLib::Vector3 const _surface_element_normal;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp
index fc79b03e4de1868658e7101abb7b61c5c7a7ab68..0e16093b5b61c7c4aa14c9868e08a5571eeb3b2f 100644
--- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp
+++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp
@@ -95,4 +95,4 @@ void getEssentialBCValuesLocal(
         }
     }
 }
-}  // end of name space
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h
index 509b095407bbd0f8a5b6e7b078ac83e387b238be..db69d1b76a40fcd8c842f20655d30b5b07fd0ab0 100644
--- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h
+++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.h
@@ -51,4 +51,4 @@ void getEssentialBCValuesLocal(
     int const variable_id, int const component_id, const double t,
     GlobalVector const& x,
     NumLib::IndexValueVector<GlobalIndexType>& bc_values);
-}  // end of name space
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h b/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h
index 7dd34ab153c4cd0713f5a82087facdf8156bac4f..cbbf16746a5a4aa1b7b6d9ca03db88e87975088e 100644
--- a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h
+++ b/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h
@@ -92,4 +92,4 @@ void GenericNaturalBoundaryCondition<
         _local_assemblers, *_dof_table_boundary, t, x, K, b, Jac);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/GenericNonuniformNaturalBoundaryCondition.h b/ProcessLib/BoundaryCondition/GenericNonuniformNaturalBoundaryCondition.h
index 9fd4a8affb16a11b438046c795104c28bde96a8e..f308222367490039c62ee42620e1673078bc06fc 100644
--- a/ProcessLib/BoundaryCondition/GenericNonuniformNaturalBoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/GenericNonuniformNaturalBoundaryCondition.h
@@ -54,6 +54,6 @@ private:
         _local_assemblers;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
 
 #include "GenericNonuniformNaturalBoundaryCondition-impl.h"
diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp
index 142bee514e6613c4d555d1c848687f0c14a5b2a4..a94d1f6588b788fa866e895fded3ff5413846df4 100644
--- a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp
+++ b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp
@@ -48,4 +48,4 @@ std::unique_ptr<NeumannBoundaryCondition> createNeumannBoundaryCondition(
         component_id, global_dim, bc_mesh, param);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h
index 03a0deed29f7f142e030980487efeec635ef4b8b..e9dd44035d2921d2f9c8ff96cd8ff55f31697146 100644
--- a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.h
@@ -25,4 +25,4 @@ std::unique_ptr<NeumannBoundaryCondition> createNeumannBoundaryCondition(
     unsigned const shapefunction_order, unsigned const global_dim,
     std::vector<std::unique_ptr<ParameterBase>> const& parameters);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.cpp
index 2d7098b76e631c20364cd95bfd5f09bc6c004bcf..5786e0947c6f2c3840e12746fe58fdfcdb1ec01b 100644
--- a/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.cpp
+++ b/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.cpp
@@ -60,4 +60,4 @@ createNonuniformDirichletBoundaryCondition(
         boundary_mesh, *property, dof_table, variable_id, component_id);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.h b/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.h
index 38daf78ed68c13ff389f7452f2dc0b4034b0825b..4d81295cf729077a4afe1c387371510b8732d95e 100644
--- a/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/NonuniformDirichletBoundaryCondition.h
@@ -124,4 +124,4 @@ createNonuniformDirichletBoundaryCondition(
     NumLib::LocalToGlobalIndexMap const& dof_table, int const variable_id,
     int const component_id);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.cpp
index baa479cec33278d42754b4e285fb2af470dd5b9e..bbe963d3cae71e39349c59936f8ab09d2a3d15c0 100644
--- a/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.cpp
+++ b/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.cpp
@@ -89,4 +89,4 @@ createNonuniformNeumannBoundaryCondition(
             variable_id, component_id});
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.h b/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.h
index 31a05504673134b4ee49235175a9ef8204043abd..50cb24c44bbb2fecef3e63215f83fc149e864a40 100644
--- a/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/NonuniformNeumannBoundaryCondition.h
@@ -27,4 +27,4 @@ createNonuniformNeumannBoundaryCondition(
     int const component_id, unsigned const integration_order,
     unsigned const shapefunction_order, const MeshLib::Mesh& bulk_mesh);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp
index dcfed5bdd7dee5f4427613cef907b88147c059ac..3f7870f9dbd4cb6af58022b840d0ac0da75f37c0 100644
--- a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp
+++ b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp
@@ -51,4 +51,4 @@ std::unique_ptr<RobinBoundaryCondition> createRobinBoundaryCondition(
         RobinBoundaryConditionData{alpha, u_0});
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.h b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.h
index b477a5356195c1cca9af1d93ce33cd79f01a4f5e..30b8c941df7ddde65665e5b4a52c2e60109f459b 100644
--- a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.h
+++ b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.h
@@ -36,4 +36,4 @@ std::unique_ptr<RobinBoundaryCondition> createRobinBoundaryCondition(
     unsigned const shapefunction_order, unsigned const global_dim,
     std::vector<std::unique_ptr<ParameterBase>> const& parameters);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h b/ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h
index 5e8992c56e88465cbf3f94c8255f5cb777926de1..715cbc137ca4a7d4cdedf35010c04e1d9e0a3214 100644
--- a/ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h
+++ b/ProcessLib/BoundaryCondition/RobinBoundaryConditionLocalAssembler.h
@@ -91,4 +91,4 @@ public:
     EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/CentralDifferencesJacobianAssembler.cpp b/ProcessLib/CentralDifferencesJacobianAssembler.cpp
index e8702cf9d08a7f9cc93ef0d78927ec4b0b322cfe..bed278a60f443935f2aaf143e42d7e4e1a9cef77 100644
--- a/ProcessLib/CentralDifferencesJacobianAssembler.cpp
+++ b/ProcessLib/CentralDifferencesJacobianAssembler.cpp
@@ -170,4 +170,4 @@ createCentralDifferencesJacobianAssembler(BaseLib::ConfigTree const& config)
         std::move(abs_eps));
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/CentralDifferencesJacobianAssembler.h b/ProcessLib/CentralDifferencesJacobianAssembler.h
index cb4009a68d975e3bb491513ae9680d896dbf5106..a0adf14797bd060966ab4baed7dc91c9132a2df1 100644
--- a/ProcessLib/CentralDifferencesJacobianAssembler.h
+++ b/ProcessLib/CentralDifferencesJacobianAssembler.h
@@ -71,4 +71,4 @@ private:
 std::unique_ptr<CentralDifferencesJacobianAssembler>
 createCentralDifferencesJacobianAssembler(BaseLib::ConfigTree const& config);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/CoupledSolutionsForStaggeredScheme.h b/ProcessLib/CoupledSolutionsForStaggeredScheme.h
index f7b238847cecf2bc89352fa8cca79871ea66b622..3f6db1a17a144cdbb52440110eaa37be8d809690 100644
--- a/ProcessLib/CoupledSolutionsForStaggeredScheme.h
+++ b/ProcessLib/CoupledSolutionsForStaggeredScheme.h
@@ -94,4 +94,4 @@ std::vector<std::vector<double>> getPreviousLocalSolutions(
 std::vector<std::vector<double>> getCurrentLocalSolutions(
     const CoupledSolutionsForStaggeredScheme& cpl_xs,
     const std::vector<std::vector<GlobalIndexType>>& indices);
-}  // end of ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/CreateJacobianAssembler.cpp b/ProcessLib/CreateJacobianAssembler.cpp
index ba253bc59890dd951d622bca1e65a4f2aa9a9ab3..b149987e13e0cf392ef9c9c420c61bfa2d0c1ce5 100644
--- a/ProcessLib/CreateJacobianAssembler.cpp
+++ b/ProcessLib/CreateJacobianAssembler.cpp
@@ -40,4 +40,4 @@ std::unique_ptr<AbstractJacobianAssembler> createJacobianAssembler(
 
     OGS_FATAL("Unknown Jacobian assembler type: `%s'.", type.c_str());
 }
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Deformation/LinearBMatrix.h b/ProcessLib/Deformation/LinearBMatrix.h
index e6322a6dde55be4b2a64ec7d8746397b3c7a8806..b30419ae88e698d365c0bee8e6f594c86d607f3e 100644
--- a/ProcessLib/Deformation/LinearBMatrix.h
+++ b/ProcessLib/Deformation/LinearBMatrix.h
@@ -30,7 +30,7 @@ void fillBMatrix2DCartesianPart(DNDX_Type const& dNdx, BMatrixType& B)
         B(0, i) = dNdx(0, i);
     }
 }
-}  // detail
+}  // namespace detail
 
 /// Fills a B-matrix based on given shape function dN/dx values.
 template <int DisplacementDim,
diff --git a/ProcessLib/HydroMechanics/CreateLocalAssemblers.h b/ProcessLib/HydroMechanics/CreateLocalAssemblers.h
index 6563b30f391662063ecebe9fc9a3af3236ade520..ebb76b8ae9067d1a869de67eec18bda9636d5646 100644
--- a/ProcessLib/HydroMechanics/CreateLocalAssemblers.h
+++ b/ProcessLib/HydroMechanics/CreateLocalAssemblers.h
@@ -81,6 +81,6 @@ void createLocalAssemblers(
         dof_table, shapefunction_order, mesh_elements, local_assemblers,
         std::forward<ExtraCtorArgs>(extra_ctor_args)...);
 }
-}  // HydroMechanics
+}  // namespace HydroMechanics
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.cpp b/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.cpp
index c2f9718668280bac36b929995553b7b1c126654a..fff96752fab05c40f110fd29a362cf9cc0f624fe 100644
--- a/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.cpp
+++ b/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.cpp
@@ -101,5 +101,5 @@ createLiquidFlowMaterialProperties(
         std::move(porosity_models), std::move(storage_models), material_ids);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.h b/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.h
index 58c80b85caa28cfba45dd105da4d8adb9189652f..6721514df1baf9c78a3ceb2d830fbadf9a57bcf2 100644
--- a/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.h
+++ b/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.h
@@ -47,5 +47,5 @@ createLiquidFlowMaterialProperties(
     std::vector<std::unique_ptr<ParameterBase>> const& parameters,
     MeshLib::PropertyVector<int> const* const material_ids);
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp
index 5120d3c421bf60827a6e2a6eafa9ca8ced61b963..e9a2ec112fa8bce5a5ff547a479a2e230a9a3b3b 100644
--- a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp
+++ b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.cpp
@@ -108,5 +108,5 @@ std::unique_ptr<Process> createLiquidFlowProcess(
         reference_temperature, mat_config}};
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.h b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.h
index ee7431f62afaf2c093eb449c7356e58c9f406af2..2ae8ebce567d18cea6456d2bf8d620f9c031827e 100644
--- a/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.h
+++ b/ProcessLib/LiquidFlow/CreateLiquidFlowProcess.h
@@ -27,4 +27,4 @@ std::unique_ptr<Process> createLiquidFlowProcess(
     unsigned const integration_order,
     BaseLib::ConfigTree const& config);
 }  // end of namespace
-}  // end of namespace
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
index ab16c17850b32e674ece3de5b9b80a03c47bb7f7..c12919c33284197813d20c8ce2000de6b6459def 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
+++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h
@@ -271,5 +271,5 @@ void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>::
     }
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h
index 82029659baef8835cd39609a9cb4330d2302cf74..da251f2404dfa866b99579f8ab21c0aa2d7be6ab 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h
+++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h
@@ -220,7 +220,7 @@ private:
     const LiquidFlowMaterialProperties& _material_properties;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
 
 #include "LiquidFlowLocalAssembler-impl.h"
diff --git a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.cpp b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.cpp
index 83878977d2671447fb8bf995ef423e46f0bb52dd..014d585f99a164aa241d41d3d2fb28ada934bbfb 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.cpp
+++ b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.cpp
@@ -102,5 +102,5 @@ Eigen::MatrixXd const& LiquidFlowMaterialProperties::getPermeability(
                                                                  0.0);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
index 69aa2a3b1d5e2f44941c92fff09ab59961720e4d..2fdc8c838930c27a9e67815d0978f37eb4ae51e9 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
+++ b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
@@ -124,5 +124,5 @@ private:
     // Such property vectors will be added here if they are needed.
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp b/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp
index cc95c385f452358ce824a1245fc7c6297ccdc0cc..a2f82b798fa94de43dfcce984a3b26bfec23e4f8 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp
+++ b/ProcessLib/LiquidFlow/LiquidFlowProcess.cpp
@@ -131,5 +131,5 @@ void LiquidFlowProcess::computeSecondaryVariableConcrete(const double t,
         getDOFTable(process_id), t, x, _coupled_solutions);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LiquidFlow/LiquidFlowProcess.h b/ProcessLib/LiquidFlow/LiquidFlowProcess.h
index 38acf770fe02a366d59f55933b52a11478502e5b..21259b69d0443530e35f6cf28818b3fb939e45f8 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowProcess.h
+++ b/ProcessLib/LiquidFlow/LiquidFlowProcess.h
@@ -106,5 +106,5 @@ private:
         _local_assemblers;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace LiquidFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/LocalAssemblerTraits.h b/ProcessLib/LocalAssemblerTraits.h
index 29b4f743f5290e27ebf0f913e8279c3b6755a718..533449d4900906dab72c3340a60216de113d30d2 100644
--- a/ProcessLib/LocalAssemblerTraits.h
+++ b/ProcessLib/LocalAssemblerTraits.h
@@ -233,4 +233,4 @@ static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 1,
         " Maybe you forgot to include some header file.");
 #endif
 
-}
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/ConstantParameter.cpp b/ProcessLib/Parameter/ConstantParameter.cpp
index 5361c27c4024f60205e903a0d2e213f8935b0c13..018b2ad07f668082351d5ce6ae58d8b7c2007061 100644
--- a/ProcessLib/Parameter/ConstantParameter.cpp
+++ b/ProcessLib/Parameter/ConstantParameter.cpp
@@ -60,4 +60,4 @@ std::unique_ptr<ParameterBase> createConstantParameter(
     return std::make_unique<ConstantParameter<double>>(name, values);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/ConstantParameter.h b/ProcessLib/Parameter/ConstantParameter.h
index 1e62a24c9ad817fd662deeb7086e243578fa25e3..75a3f1adbead46cc3b6112ff0f9e490c924d5f43 100644
--- a/ProcessLib/Parameter/ConstantParameter.h
+++ b/ProcessLib/Parameter/ConstantParameter.h
@@ -71,4 +71,4 @@ private:
 std::unique_ptr<ParameterBase> createConstantParameter(
     std::string const& name, BaseLib::ConfigTree const& config);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/CurveScaledParameter.cpp b/ProcessLib/Parameter/CurveScaledParameter.cpp
index 25a5d0e116cbf272837669b54c658f75d6ccc428..a73b48e365fd23ff639a64618107b189e1ea0402 100644
--- a/ProcessLib/Parameter/CurveScaledParameter.cpp
+++ b/ProcessLib/Parameter/CurveScaledParameter.cpp
@@ -40,4 +40,4 @@ std::unique_ptr<ParameterBase> createCurveScaledParameter(
         name, *curve_it->second, referenced_parameter_name);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/CurveScaledParameter.h b/ProcessLib/Parameter/CurveScaledParameter.h
index 93441d29873f092ad4c9038d1547fe324d2b09e0..3e4babb03045cd949e84faf603e6b08d1fe71a72 100644
--- a/ProcessLib/Parameter/CurveScaledParameter.h
+++ b/ProcessLib/Parameter/CurveScaledParameter.h
@@ -70,4 +70,4 @@ std::unique_ptr<ParameterBase> createCurveScaledParameter(
              std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
         curves);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/FunctionParameter.cpp b/ProcessLib/Parameter/FunctionParameter.cpp
index d5f88b071430c1932cbe05964cbdeb782a55be8e..2a943202e54dd6ec8c7eea4f1b3ad0bc39b97a1b 100644
--- a/ProcessLib/Parameter/FunctionParameter.cpp
+++ b/ProcessLib/Parameter/FunctionParameter.cpp
@@ -34,4 +34,4 @@ std::unique_ptr<ParameterBase> createFunctionParameter(
         name, mesh, vec_expressions);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/FunctionParameter.h b/ProcessLib/Parameter/FunctionParameter.h
index a30ee3b10dffba5ad9f57546238bb42c23ae96bc..e90f998362f12f789efb165d9eff578cc6ca1131 100644
--- a/ProcessLib/Parameter/FunctionParameter.h
+++ b/ProcessLib/Parameter/FunctionParameter.h
@@ -113,4 +113,4 @@ std::unique_ptr<ParameterBase> createFunctionParameter(
     std::string const& name, BaseLib::ConfigTree const& config,
     MeshLib::Mesh const& mesh);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/GroupBasedParameter.cpp b/ProcessLib/Parameter/GroupBasedParameter.cpp
index dd589f82a1124f63c06921a187f10af764c4e37e..d4eea5abf4c1019ba21722cc3f259c27dbc4040a 100644
--- a/ProcessLib/Parameter/GroupBasedParameter.cpp
+++ b/ProcessLib/Parameter/GroupBasedParameter.cpp
@@ -95,4 +95,4 @@ std::unique_ptr<ParameterBase> createGroupBasedParameter(
     OGS_FATAL("Mesh item type of the specified property is not supported.");
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/GroupBasedParameter.h b/ProcessLib/Parameter/GroupBasedParameter.h
index 092a11e704a1318b755959912ab60ace8397e702..86a51e7cfd92f952e5a3f5c6e71b6207f3b54978 100644
--- a/ProcessLib/Parameter/GroupBasedParameter.h
+++ b/ProcessLib/Parameter/GroupBasedParameter.h
@@ -94,4 +94,4 @@ std::unique_ptr<ParameterBase> createGroupBasedParameter(
     BaseLib::ConfigTree const& config,
     MeshLib::Mesh const& mesh);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/MeshElementParameter.cpp b/ProcessLib/Parameter/MeshElementParameter.cpp
index 22c1dd88d6ceae61b151bf2f5e593dc3385963c0..aaa20760daabe2547be608b521c9b409c9edf835 100644
--- a/ProcessLib/Parameter/MeshElementParameter.cpp
+++ b/ProcessLib/Parameter/MeshElementParameter.cpp
@@ -35,4 +35,4 @@ std::unique_ptr<ParameterBase> createMeshElementParameter(
     return std::make_unique<MeshElementParameter<double>>(name, *property);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/MeshElementParameter.h b/ProcessLib/Parameter/MeshElementParameter.h
index 9bb6de3e92c6563778b100cfef5e95e3cd0e4ad1..1146105622d4fe12c8977ae5970bb94ef338d097 100644
--- a/ProcessLib/Parameter/MeshElementParameter.h
+++ b/ProcessLib/Parameter/MeshElementParameter.h
@@ -84,4 +84,4 @@ std::unique_ptr<ParameterBase> createMeshElementParameter(
     std::string const& name, BaseLib::ConfigTree const& config,
     MeshLib::Mesh const& mesh);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/MeshNodeParameter.cpp b/ProcessLib/Parameter/MeshNodeParameter.cpp
index b86295f5896d34f042ca314bd4de6abd7396a957..48fc8f5a281de41edd95e91a6145056f32da9d3e 100644
--- a/ProcessLib/Parameter/MeshNodeParameter.cpp
+++ b/ProcessLib/Parameter/MeshNodeParameter.cpp
@@ -35,4 +35,4 @@ std::unique_ptr<ParameterBase> createMeshNodeParameter(
     return std::make_unique<MeshNodeParameter<double>>(name, *property);
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/MeshNodeParameter.h b/ProcessLib/Parameter/MeshNodeParameter.h
index bda0426bda447fdabd825e8dc982a648efc9b78c..5c013c22dcf87e60395b2489022091d78c3d2aea 100644
--- a/ProcessLib/Parameter/MeshNodeParameter.h
+++ b/ProcessLib/Parameter/MeshNodeParameter.h
@@ -88,4 +88,4 @@ std::unique_ptr<ParameterBase> createMeshNodeParameter(
     std::string const& name, BaseLib::ConfigTree const& config,
     MeshLib::Mesh const& mesh);
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/Parameter.cpp b/ProcessLib/Parameter/Parameter.cpp
index 0061e4ab4369b9c5f43385d02e6feb231d09561c..8d21a617f5c826b559ec5932ecacb0f8e8648c03 100644
--- a/ProcessLib/Parameter/Parameter.cpp
+++ b/ProcessLib/Parameter/Parameter.cpp
@@ -74,4 +74,4 @@ std::unique_ptr<ParameterBase> createParameter(
     OGS_FATAL("Cannot construct a parameter of given type '%s'.", type.c_str());
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Parameter/SpatialPosition.h b/ProcessLib/Parameter/SpatialPosition.h
index f3366a4c19cb54b8d0bce64b884d30b5474d7a14..30a87e0973348680a2f3474f699b54845094e2e7 100644
--- a/ProcessLib/Parameter/SpatialPosition.h
+++ b/ProcessLib/Parameter/SpatialPosition.h
@@ -86,4 +86,4 @@ private:
     boost::optional<MathLib::TemplatePoint<double, 3>> _coordinates;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp
index abd0b04373efeaced66f0d8eab9979fdd02aaa88..5e9a684bdf5e673d5638ec9b767cb0ce2f804757 100644
--- a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp
+++ b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp
@@ -111,5 +111,5 @@ PorousMediaProperties createPorousMediaProperties(
                                  std::move(material_ids)};
 }
 
-}  // namespace ComponentTransport
+}  // namespace RichardsComponentTransport
 }  // namespace ProcessLib
diff --git a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp
index 941d2b747925e4bb9fb439bf93ec38dd84d76bdf..042d0237a99f1719f8a4eced668048c6dcaea539 100644
--- a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp
+++ b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp
@@ -54,5 +54,5 @@ PorousMediaProperties::getRelativePermeability(
 {
     return *_relative_permeability_models[getMaterialID(pos)];
 }
-}
-}
+}  // namespace RichardsComponentTransport
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h
index 30b773a7f98529cf04b099f23efd5d390a5e7986..1abc5850bed921c26d1a58230af9752bc398c69b 100644
--- a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h
+++ b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h
@@ -104,5 +104,5 @@ private:
     std::vector<int> _material_ids;
 };
 
-}
-}
+}  // namespace RichardsComponentTransport
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.cpp b/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.cpp
index 609c88518dc2beeb7ab581d28f5b9683fba77094..4bed8c3f514e99f41fc1330581a29ecfaf3d34fa 100644
--- a/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.cpp
+++ b/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.cpp
@@ -114,5 +114,5 @@ createRichardsFlowMaterialProperties(
             std::move(relative_permeability_models)}};
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace RichardsFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.h b/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.h
index 7e91a36e5a9de84db90321697f7e997f7730206d..20731abc377cdc4d2150d1ca56c22d68a6e86e9f 100644
--- a/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.h
+++ b/ProcessLib/RichardsFlow/CreateRichardsFlowMaterialProperties.h
@@ -26,4 +26,4 @@ createRichardsFlowMaterialProperties(
     std::vector<std::unique_ptr<ParameterBase>> const& parameters);
 
 }  // end namespace
-}  // end namespace
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.cpp b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.cpp
index 94e78cce43fe1602499637f4defad4d3cb0881e8..7d2a6f268eb5b3875807cba998a92343e6bbc867 100644
--- a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.cpp
+++ b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.cpp
@@ -155,5 +155,5 @@ double RichardsFlowMaterialProperties::getSaturationDerivative2(
         _capillary_pressure_models[material_id]->getd2PcdS2(saturation);
     return -d2pcdsw2 / boost::math::pow<3>(dpcdsw);
 }
-}  // end of namespace
-}  // end of namespace
+}  // namespace RichardsFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
index a9a4143417b08de4b40cf8fe13bea3395f78dee8..c75561c3811a96a2e206b6a2f9b62469568201dc 100644
--- a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
+++ b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
@@ -127,5 +127,5 @@ private:
         _relative_permeability_models;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace RichardsFlow
+}  // namespace ProcessLib
diff --git a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
index 84bd037a408eef55928ba16530ac6058951978a6..4c13e909d0bc90d06b53022bbce523c60fe77be4 100644
--- a/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
+++ b/ProcessLib/SmallDeformation/CreateLocalAssemblers.h
@@ -79,6 +79,6 @@ void createLocalAssemblers(
         dof_table, mesh_elements, local_assemblers,
         std::forward<ExtraCtorArgs>(extra_ctor_args)...);
 }
-}  // SmallDeformation
+}  // namespace SmallDeformation
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/SourceTerms/SourceTermCollection.cpp b/ProcessLib/SourceTerms/SourceTermCollection.cpp
index d7678b3f7512cd29cc830a0940608f22a956f5e9..83622d076b67f1f5e37945dd2c0b04756a6e8ead 100644
--- a/ProcessLib/SourceTerms/SourceTermCollection.cpp
+++ b/ProcessLib/SourceTerms/SourceTermCollection.cpp
@@ -36,4 +36,4 @@ void SourceTermCollection::integrate(const double t, GlobalVector const& x,
         st->integrate(t, x, b, jac);
 }
 
-}
+}  // namespace ProcessLib
diff --git a/ProcessLib/SourceTerms/SourceTermCollection.h b/ProcessLib/SourceTerms/SourceTermCollection.h
index be718426a4893f5483de8b9c6adfab77526d415f..7de8a0747fcada3397143160c1235e0981341d52 100644
--- a/ProcessLib/SourceTerms/SourceTermCollection.h
+++ b/ProcessLib/SourceTerms/SourceTermCollection.h
@@ -37,4 +37,4 @@ private:
     std::vector<std::unique_ptr<ParameterBase>> const& _parameters;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/SourceTerms/SourceTermConfig.h b/ProcessLib/SourceTerms/SourceTermConfig.h
index 9c7b85fb93e478364d360e7c5e05dfa1989fbdff..5d85f55f8e5b508788460b1a66ce50312f2ad9f6 100644
--- a/ProcessLib/SourceTerms/SourceTermConfig.h
+++ b/ProcessLib/SourceTerms/SourceTermConfig.h
@@ -35,4 +35,4 @@ struct SourceTermConfig final
     boost::optional<int> const component_id;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h b/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
index 2f17377a48a180225966b6b5b6ed3228ac9c8887..c4e1aa2a7adc3c4364de9a0f17e87fedac0a27ab 100644
--- a/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
+++ b/ProcessLib/SurfaceFlux/SurfaceFluxLocalAssembler.h
@@ -170,4 +170,4 @@ private:
     std::size_t _bulk_face_id;
 };
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESLocalAssemblerData.cpp b/ProcessLib/TES/TESLocalAssemblerData.cpp
index 02e3137557ce55330ff1c33044cd84bce0509b1c..5592c1c281f451f65c62d1855f64b28567a5d0d0 100644
--- a/ProcessLib/TES/TESLocalAssemblerData.cpp
+++ b/ProcessLib/TES/TESLocalAssemblerData.cpp
@@ -27,5 +27,5 @@ TESLocalAssemblerData::TESLocalAssemblerData(AssemblyParams const& ap_,
 }
 
 TESLocalAssemblerData::~TESLocalAssemblerData() = default;
-}
-}  // namespaces
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESLocalAssemblerData.h b/ProcessLib/TES/TESLocalAssemblerData.h
index b8b2e72aecfb8903869d7894a89d987936cadd5a..ac5655134836f61bbb1c0af85e1f50795d3164c9 100644
--- a/ProcessLib/TES/TESLocalAssemblerData.h
+++ b/ProcessLib/TES/TESLocalAssemblerData.h
@@ -53,5 +53,5 @@ struct TESLocalAssemblerData
     std::vector<double> reaction_rate_prev_ts;  // could also be calculated from
                                                 // solid_density_prev_ts
 };
-}
-}  // namespaces
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESLocalAssemblerInner-fwd.h b/ProcessLib/TES/TESLocalAssemblerInner-fwd.h
index dadc2e7f6aa0e7ebc659b6205d302d9bfe92d578..f7e20ed410b822bbe3903babd7c751ea870bd0f7 100644
--- a/ProcessLib/TES/TESLocalAssemblerInner-fwd.h
+++ b/ProcessLib/TES/TESLocalAssemblerInner-fwd.h
@@ -26,5 +26,5 @@ static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 1,
 static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 0,
               "inconsistent use of macros");
 #endif
-}
-}
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESLocalAssemblerInner.cpp b/ProcessLib/TES/TESLocalAssemblerInner.cpp
index 5792be92610d2ba141a3d6067191fa1d8af79d8b..6a83238662388c310b4f145fda1161b81cc9b564 100644
--- a/ProcessLib/TES/TESLocalAssemblerInner.cpp
+++ b/ProcessLib/TES/TESLocalAssemblerInner.cpp
@@ -31,5 +31,5 @@ static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 1,
 static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 0,
               "inconsistent use of macros");
 #endif
-}
-}
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESOGS5MaterialModels.cpp b/ProcessLib/TES/TESOGS5MaterialModels.cpp
index b8098f829e4947fba647a536bfd466a0d8df4984..c6476cb4c57862540fee19d808406a73d6b67f3e 100644
--- a/ProcessLib/TES/TESOGS5MaterialModels.cpp
+++ b/ProcessLib/TES/TESOGS5MaterialModels.cpp
@@ -31,5 +31,5 @@ const double FluidViscosityN2::C[5] = {-20.09997, 3.4376416, -1.4470051,
 const double FluidHeatConductivityH2O::a[4] = {0.0102811, 0.0299621, 0.0156146,
                                                -0.00422464};
 
-}  // TES
-}  // ProcessLib
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/TES/TESOGS5MaterialModels.h b/ProcessLib/TES/TESOGS5MaterialModels.h
index feeaf98d04cf9a8b62c64497719d9efca31b94af..19bded3c007af4d07989f5e721d9f8b307378581 100644
--- a/ProcessLib/TES/TESOGS5MaterialModels.h
+++ b/ProcessLib/TES/TESOGS5MaterialModels.h
@@ -399,5 +399,5 @@ inline double fluid_heat_conductivity(const double p,
     return k0 * x0 / (x0 + x1 * phi_12) + k1 * x1 / (x1 + x0 * phi_21);
 }
 
-}  // TES
-}  // ProcessLib
+}  // namespace TES
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp
index bc503cf69445ab133b870d6f41816b76603c1d85..66c73326055f8a120e6df222699c1bec5460d340 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.cpp
@@ -102,5 +102,5 @@ createThermalTwoPhaseFlowWithPPMaterialProperties(
         std::move(vapor_property));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h
index c4c4c47d82c9f0cd5e3d3291c3d95590794de203..e51387b61b7168386ad42179157ad798b7784357 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPMaterialProperties.h
@@ -34,4 +34,4 @@ createThermalTwoPhaseFlowWithPPMaterialProperties(
     std::vector<std::unique_ptr<ProcessLib::ParameterBase>> const& parameters);
 
 }  // end namespace
-}  // end namespace
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp
index 46c5e5f0cb973d41fae7756d79a5ec44dd71132a..42ad27fc7960b024fcc4f180f9cf73bde6003808 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp
@@ -141,5 +141,5 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess(
         mat_config, curves);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h
index b8bc02381339bc2bc4ba169390a03a1ae14466b8..bb93b33d64e2674760c4888b36f6bfc97281992c 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.h
@@ -27,5 +27,5 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess(
     std::map<std::string,
              std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
         curves);
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h
index 7ad7932f9f34215644eec6f1de99c838590419bb..27c39c433f38cb97d6b28feafb376a95fdd4c314 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h
@@ -466,5 +466,5 @@ void ThermalTwoPhaseFlowWithPPLocalAssembler<
     }  // end of mass-lumping
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h
index 56dacfe2dddc80c45d8ae18c7351e3acce5ba185..e20b9b761bb482d7dfb70295c24b7a0eb44c036f 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPLocalAssembler.h
@@ -190,7 +190,7 @@ private:
     static const int temperature_size = ShapeFunction::NPOINTS;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
 
 #include "ThermalTwoPhaseFlowWithPPLocalAssembler-impl.h"
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp
index dedf9f7a95c5b180721f2302173e06d74815c143..52e4dc7d8a938991b6b173d0be15d62eedfccdfa 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.cpp
@@ -204,5 +204,5 @@ ThermalTwoPhaseFlowWithPPMaterialProperties::getLiquidWaterEnthalpySimple(
     return heat_capacity_liquid_water * (temperature - CelsiusZeroInKelvin);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
index 7bdd9de80f14a1ca8d199afcfd382611b213f6f5..91469113e1af1aa809f7e016ad94a23979281314 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
@@ -143,5 +143,5 @@ private:
         _water_vapor_properties;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp
index c47f5e5d6c881c3f8f322f17581c16456f758a84..a89fa3b1920fbeb933b22b2d532c0efd3c83d764 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.cpp
@@ -124,5 +124,5 @@ void ThermalTwoPhaseFlowWithPPProcess::preTimestepConcreteProcess(
         delta_t);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h
index ea4be1ea6613993254e3b560226c7cca02a2c86f..d4aeb57f12b801537adaf8a11826f5ce9e73c1f4 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcess.h
@@ -78,5 +78,5 @@ private:
         _local_assemblers;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace ThermalTwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h
index d138a24857bd142cd21622abe0027cc78b9a247d..fce7cd756476be3273499ded034d7d210f8bf3d4 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPProcessData.h
@@ -75,5 +75,5 @@ struct ThermalTwoPhaseFlowWithPPProcessData
     std::unique_ptr<ThermalTwoPhaseFlowWithPPMaterialProperties> material;
 };
 
-}  // namespace TwoPhaseFlowWithPP
+}  // namespace ThermalTwoPhaseFlowWithPP
 }  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.cpp
index acae56e36cf298b7a83e12f01623ea7ddec04eec..990d7e062a97ed84634857f89e0dbe90ca7d8c78 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.cpp
@@ -135,5 +135,5 @@ createTwoPhaseFlowWithPPMaterialProperties(
         std::move(relative_permeability_models));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.h
index 27f262c11ed1477bf9f875923f966e80f579e006..4c76a9c9f18acd7402f48ba690d00af76413eacb 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPMaterialProperties.h
@@ -27,4 +27,4 @@ createTwoPhaseFlowWithPPMaterialProperties(
     std::vector<std::unique_ptr<ParameterBase>> const& parameters);
 
 }  // end namespace
-}  // end namespace
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp
index 2cde552489dd9c9a73ac195bd6ac58d83a054f38..e39c4e559e06a07885f5e0647619a4bf7a970258 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.cpp
@@ -101,5 +101,5 @@ std::unique_ptr<Process> createTwoPhaseFlowWithPPProcess(
         mat_config, curves);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.h b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.h
index 015745d9e315f7d682f5f5abf3044d5af9236e75..b54f71fc9fe4883f93dfe97a83fa640f6baa4398 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/CreateTwoPhaseFlowWithPPProcess.h
@@ -26,5 +26,5 @@ std::unique_ptr<Process> createTwoPhaseFlowWithPPProcess(
     std::map<std::string,
              std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
         curves);
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler-impl.h b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler-impl.h
index d350d5ac6ece4595f6312e29f712abba2d0b76c0..b8afab6c800f6eff14fabced9e9954f5566bbce7 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler-impl.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler-impl.h
@@ -203,5 +203,5 @@ void TwoPhaseFlowWithPPLocalAssembler<
     }  // end of mass-lumping
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler.h b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler.h
index 3ccb6e15a0948b61247607da88d740bf2c2e388e..1a8803d8c2ec742ab6e28ead214b5e233ea9036d 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPLocalAssembler.h
@@ -189,7 +189,7 @@ private:
     static const int cap_pressure_size = ShapeFunction::NPOINTS;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
 
 #include "TwoPhaseFlowWithPPLocalAssembler-impl.h"
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.cpp
index 4a4cfefd30a595fcb2eaa78bb8c20390a129f51b..d3bbc9dae0eed9a6de57b75edf62ee8bb8ae035a 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.cpp
@@ -166,5 +166,5 @@ double TwoPhaseFlowWithPPMaterialProperties::getSaturationDerivative(
         _capillary_pressure_models[material_id]->getdPcdS(saturation);
     return 1 / dpcdsw;
 }
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
index 2116128350e8e1c8c6b34e4ba8b4ad7e0df95a72..cbb231317b045df0165d5a398d1cb50b0d1f1122 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
@@ -126,5 +126,5 @@ protected:
         _relative_permeability_models;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp
index 4d8ce27151b46d1f306baa3b52ec61c5a18eaeae..fef16fc7939c0001ebeff98811108e285804cd1a 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.cpp
@@ -109,5 +109,5 @@ void TwoPhaseFlowWithPPProcess::assembleWithJacobianConcreteProcess(
         xdot, dxdot_dx, dx_dx, M, K, b, Jac, _coupled_solutions);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.h b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.h
index 72fa5ea548a7ee1a69ea80091b7b5c49d194b90c..aa02ffce5b126ed2cbad2d4b2c8cf91af1f24b9a 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPProcess.h
@@ -72,5 +72,5 @@ private:
         _local_assemblers;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPP
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp
index f91e3f2e0affe4ee835961fa94f162f5a9e9a5fc..92169a8af86ea2f70268514bd0555ebb8e38824b 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.cpp
@@ -136,5 +136,5 @@ createTwoPhaseFlowPrhoMaterialProperties(
         std::move(_relative_permeability_models));
 }
 
-}  // end namespace
-}  // end namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.h
index 3e6941e86f8e6d34f51c231183719d80f2a43c77..e1091706484cd4cfa447b16001489a4e5584a55a 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowPrhoMaterialProperties.h
@@ -27,4 +27,4 @@ createTwoPhaseFlowPrhoMaterialProperties(
     std::vector<std::unique_ptr<ParameterBase>> const& parameters);
 
 }  // end namespace
-}  // end namespace
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp
index 80334f779148ae8b58d2bec91ac5b314ca7a5996..14a64c323b3a4ba13647dca8d11f5edfd92e7d15 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.cpp
@@ -114,5 +114,5 @@ std::unique_ptr<Process> createTwoPhaseFlowWithPrhoProcess(
         mat_config, curves);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.h b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.h
index b4a338c2364c0cad7cdec74631ee047fc939d027..a3bae4de32f535342f402ab1372013c0de2dca13 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/CreateTwoPhaseFlowWithPrhoProcess.h
@@ -26,5 +26,5 @@ std::unique_ptr<Process> createTwoPhaseFlowWithPrhoProcess(
     std::map<std::string,
              std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const&
         curves);
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler-impl.h b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler-impl.h
index 62f5c7e15000aa3c6405c4527de6ac112d6f268b..16c72c1050be4bf8ead8b4cd19395ec3e39fb974 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler-impl.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler-impl.h
@@ -228,5 +228,5 @@ void TwoPhaseFlowWithPrhoLocalAssembler<
     }  // end of mass-lumping
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler.h b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler.h
index ece7fb478152835066fc7408326d23b5de3a75ab..bcadbaa67ea439c52e126528335e29d3b639dca2 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoLocalAssembler.h
@@ -189,7 +189,7 @@ private:
     static const int cap_pressure_size = ShapeFunction::NPOINTS;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
 
 #include "TwoPhaseFlowWithPrhoLocalAssembler-impl.h"
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp
index 12d80a3cd6078075836d84628bb6df5ce1ae156d..3af15e53b8a02f9862d3629eef023e4c12d686cc 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp
@@ -383,5 +383,5 @@ double TwoPhaseFlowWithPrhoMaterialProperties::calculatedXmdP(
         return 0.0;
     return HenryConstantH2 * H2 * (1 + dPC_dSw * dSwdP);
 }
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
index 4493e0877846a92f9ce23d34bf5467c20d5bfdfa..855bf123db4061d2c3526ca395eb0a86094f1658 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
@@ -188,5 +188,5 @@ private:
                           int current_material_id) const;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp
index 2560399bf1041fc57803da36cfa108bd05e11dce..c7edce1501694411527954fc6b5353978d50eb48 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.cpp
@@ -122,5 +122,5 @@ void TwoPhaseFlowWithPrhoProcess::preTimestepConcreteProcess(
         dt);
 }
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.h b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.h
index 54f49a23527ac29ca2eaad59a8bbfd93caa55267..a21372a31a1f85e692c2cf381fe7e8f3ee563470 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoProcess.h
@@ -73,5 +73,5 @@ private:
         _local_assemblers;
 };
 
-}  // end of namespace
-}  // end of namespace
+}  // namespace TwoPhaseFlowWithPrho
+}  // namespace ProcessLib
diff --git a/ProcessLib/Utils/CreateLocalAssemblers.h b/ProcessLib/Utils/CreateLocalAssemblers.h
index 6669366fdc1541d7a73571f839156f2b885fab00..e73de6b710b62af096723cd56e5acf7d21c75b06 100644
--- a/ProcessLib/Utils/CreateLocalAssemblers.h
+++ b/ProcessLib/Utils/CreateLocalAssemblers.h
@@ -99,4 +99,4 @@ void createLocalAssemblers(
     }
 }
 
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Utils/InitShapeMatrices.h b/ProcessLib/Utils/InitShapeMatrices.h
index 875bd01ef8694297376b85b0e453059f7c7a0434..10228ee919e3c62954ded87d2e28cb27ab0c17f6 100644
--- a/ProcessLib/Utils/InitShapeMatrices.h
+++ b/ProcessLib/Utils/InitShapeMatrices.h
@@ -60,4 +60,4 @@ double interpolateXCoordinate(
     return fe.interpolateZerothCoordinate(N);
 }
 
-} // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/Utils/ProcessUtils.h b/ProcessLib/Utils/ProcessUtils.h
index 11199ccc7e66cc91a602a4ad755d2fa32c8bd724..db0c80256476acbc5eb5636c204f667c9b214672 100644
--- a/ProcessLib/Utils/ProcessUtils.h
+++ b/ProcessLib/Utils/ProcessUtils.h
@@ -124,4 +124,4 @@ Parameter<ParameterDataType>& findParameter(
 
     return findParameter<ParameterDataType>(name, parameters, num_components);
 }
-}  // ProcessLib
+}  // namespace ProcessLib
diff --git a/ProcessLib/VariableTransformation.h b/ProcessLib/VariableTransformation.h
index 5e652cf691973771d8fa1f96c63ce12c34966e95..2f00a1d20f9985f1474a20a513cf46a871bfeb83 100644
--- a/ProcessLib/VariableTransformation.h
+++ b/ProcessLib/VariableTransformation.h
@@ -84,4 +84,4 @@ private:
 };
 
 using Trafo = ProcessLib::TrafoScale;
-}
+}  // namespace ProcessLib
diff --git a/Tests/AutoCheckTools.h b/Tests/AutoCheckTools.h
index 5121a6867e1b167a63343150ca15fef8a573d774..1b121bf50c73fc43dac71c18c2e222e968847598 100644
--- a/Tests/AutoCheckTools.h
+++ b/Tests/AutoCheckTools.h
@@ -27,7 +27,7 @@ std::ostream& operator<<(std::ostream& os, std::array<T, N> const& array)
     os << "]";
     return os;
 }
-}
+}  // namespace std
 
 namespace autocheck
 {
diff --git a/Tests/MeshLib/TestAddLayerToMesh.cpp b/Tests/MeshLib/TestAddLayerToMesh.cpp
index e62788d41a326224287f04b752b0ef2371232ee1..048039aa0a6fccf51ce33ca3b87fde89bed14732 100644
--- a/Tests/MeshLib/TestAddLayerToMesh.cpp
+++ b/Tests/MeshLib/TestAddLayerToMesh.cpp
@@ -53,7 +53,7 @@ namespace AddLayerValidation
         for (std::size_t i=0; i<nNodes; ++i)
             ASSERT_EQ((*input.getNode(i))[2] + height, (*output.getNode(i))[2]);
     }
-};
+    }  // namespace AddLayerValidation
 
 TEST(MeshLib, AddTopLayerToLineMesh)
 {
diff --git a/Tests/MeshLib/TestCoordinatesMappingLocal.cpp b/Tests/MeshLib/TestCoordinatesMappingLocal.cpp
index 95502a1f277cd8053d8f1e6f975cea8f36d146e2..c69faf423e01c2e3f0313504c3f74bc2bd9d50ed 100644
--- a/Tests/MeshLib/TestCoordinatesMappingLocal.cpp
+++ b/Tests/MeshLib/TestCoordinatesMappingLocal.cpp
@@ -67,7 +67,7 @@ std::unique_ptr<MeshLib::Line> createLine(std::array<double, 3> const& a,
         return createLine({{0.0, 0.0, 0.0}}, {{2./sqrt(3), 2./sqrt(3), 2./sqrt(3)}});
     }
 
-};
+    }  // namespace TestLine2
 
 namespace TestQuad4
 {
@@ -118,7 +118,7 @@ std::unique_ptr<MeshLib::Quad> createQuad(std::array<double, 3> const& a,
             {{0.0, -1.0, -1.0}},
             {{0.0,  1.0, -1.0}});
     }
-};
+    }  // namespace TestQuad4
 
 #if 0
 // keep this function for debugging
diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h b/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h
index fe375c29d75a690988e607104844f7821e64cc80..f3a1c67c712573b7bc61ade9c4f7425d33ca326e 100644
--- a/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h
+++ b/Tests/NumLib/CoordinatesMappingTestData/TestHex8.h
@@ -119,4 +119,4 @@ const double TestHex8::cl_exp_J[dim*dim] = {0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0
 const double TestHex8::cl_exp_detJ = -1.;
 const double TestHex8::ze_exp_J[dim*dim] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0};
 
-}
+}  // namespace CoordinatesMappingTestData
diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h b/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h
index f0ca7ce94d9eadb0a77db5de39fe92206886c07b..eb896fa5037428809ba97519a025029569e65230 100644
--- a/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h
+++ b/Tests/NumLib/CoordinatesMappingTestData/TestLine2.h
@@ -97,4 +97,4 @@ const double TestLine2::cl_exp_J[dim*dim] = {-1.};
 const double TestLine2::cl_exp_detJ = -1;
 const double TestLine2::ze_exp_J[dim*dim] = {0.0};
 
-}
+}  // namespace CoordinatesMappingTestData
diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h b/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h
index 4e05d64656bf7144f5e6a2b1f75cf87b75f2c3aa..dba98fbdd65b0a278cae40d86cf4e4c90b044405 100644
--- a/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h
+++ b/Tests/NumLib/CoordinatesMappingTestData/TestLine3.h
@@ -100,4 +100,4 @@ const double TestLine3::ir_exp_dNdx[dim * e_nnodes] = {0, 0.5, -0.5};
 const double TestLine3::cl_exp_J[dim * dim] = {-1.};
 const double TestLine3::cl_exp_detJ = -1;
 const double TestLine3::ze_exp_J[dim * dim] = {0.0};
-}
+}  // namespace CoordinatesMappingTestData
diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h b/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h
index 336594fa0aa9b7aba53c2ff82a1225de21db8752..eba1c523d7839481a53bad99d5c697bbf1211c84 100644
--- a/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h
+++ b/Tests/NumLib/CoordinatesMappingTestData/TestQuad4.h
@@ -99,4 +99,4 @@ const double TestQuad4::cl_exp_J[dim*dim] = {0.0, 1.0, 1.0, 0.0};
 const double TestQuad4::cl_exp_detJ = -1.;
 const double TestQuad4::ze_exp_J[dim*dim] = {1.0, 0.0, 0.0, 0.0};
 
-}
+}  // namespace CoordinatesMappingTestData
diff --git a/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h b/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h
index c8440a1e5e79de93ae1d79607d5d62527efef0f0..ebe8b120ed89b8a58eea17f00f388f50e80cdbf2 100644
--- a/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h
+++ b/Tests/NumLib/CoordinatesMappingTestData/TestTri3.h
@@ -94,4 +94,4 @@ const double TestTri3::cl_exp_J[dim*dim] = {0.0, 1.0, 1.0, 0.0};
 const double TestTri3::cl_exp_detJ = -1.;
 const double TestTri3::ze_exp_J[dim*dim] = {1.0, 0.0, 1.0, 0.0};
 
-}
+}  // namespace CoordinatesMappingTestData
diff --git a/Tests/NumLib/FeTestData/MatrixTools.h b/Tests/NumLib/FeTestData/MatrixTools.h
index 15a2efcabefb2ea0836882303b4ccc1aaf0a1737..40ab6b1136591ffd1da6c9951c60d6d7a07bcc9a 100644
--- a/Tests/NumLib/FeTestData/MatrixTools.h
+++ b/Tests/NumLib/FeTestData/MatrixTools.h
@@ -32,4 +32,4 @@ inline void setIdentityMatrix(unsigned dim, T_MATRIX &m)
         m(i,i) = 1.0;
 }
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeHEX20.h b/Tests/NumLib/FeTestData/TestFeHEX20.h
index 8684e285eabe8d88399c9d80b7f25f335ceb62bd..23d5d791d971c8e0fbb9e1de6da271ab9dd29393 100644
--- a/Tests/NumLib/FeTestData/TestFeHEX20.h
+++ b/Tests/NumLib/FeTestData/TestFeHEX20.h
@@ -71,4 +71,4 @@ public:
     double getVolume() const { return 1.0; }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeHEX8.h b/Tests/NumLib/FeTestData/TestFeHEX8.h
index 446fcb7d64136e9258ac36f19787913b2dcee580..027b1863a366397af10948aafe1598b816dbb337 100644
--- a/Tests/NumLib/FeTestData/TestFeHEX8.h
+++ b/Tests/NumLib/FeTestData/TestFeHEX8.h
@@ -89,4 +89,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeLINE2.h b/Tests/NumLib/FeTestData/TestFeLINE2.h
index c7e4c835e7cfc0a62c9d7937107ff90d574fd3bb..3eb8460b42f062a873ef4f2bd0e669cf3f3682f2 100644
--- a/Tests/NumLib/FeTestData/TestFeLINE2.h
+++ b/Tests/NumLib/FeTestData/TestFeLINE2.h
@@ -69,4 +69,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeLINE2Y.h b/Tests/NumLib/FeTestData/TestFeLINE2Y.h
index 91d024489ac624a5081e5f7bc5921a27562a84c8..1f60bf89edd83355eff53f5969cc7e2e01f8e292 100644
--- a/Tests/NumLib/FeTestData/TestFeLINE2Y.h
+++ b/Tests/NumLib/FeTestData/TestFeLINE2Y.h
@@ -68,4 +68,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeLINE3.h b/Tests/NumLib/FeTestData/TestFeLINE3.h
index 0264551d8287a14dbb960b32c57b369e8d798ac5..a9c410e33c4007e164e70daaeb898aa65430f31b 100644
--- a/Tests/NumLib/FeTestData/TestFeLINE3.h
+++ b/Tests/NumLib/FeTestData/TestFeLINE3.h
@@ -71,4 +71,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFePRISM15.h b/Tests/NumLib/FeTestData/TestFePRISM15.h
index 510be3dc9ef66b8aff2178c4e212df633bbf4e07..a9f68e0912721f58e4d642d510005d66c77de2ad 100644
--- a/Tests/NumLib/FeTestData/TestFePRISM15.h
+++ b/Tests/NumLib/FeTestData/TestFePRISM15.h
@@ -67,4 +67,4 @@ public:
     double getVolume() const { return 0.0625; }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFePRISM6.h b/Tests/NumLib/FeTestData/TestFePRISM6.h
index 2d55a1bb3e1e60aee7f6507d98e93bfefb348e69..dd888b0f221de1012a81108a6a39a8244ac867a8 100644
--- a/Tests/NumLib/FeTestData/TestFePRISM6.h
+++ b/Tests/NumLib/FeTestData/TestFePRISM6.h
@@ -82,4 +82,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFePYRA13.h b/Tests/NumLib/FeTestData/TestFePYRA13.h
index b782cf442feb084a07f5158945638dba11a47428..789c4c171c7fa2b16b5633157cd8371ab407eeb6 100644
--- a/Tests/NumLib/FeTestData/TestFePYRA13.h
+++ b/Tests/NumLib/FeTestData/TestFePYRA13.h
@@ -63,4 +63,4 @@ public:
     double getVolume() const { return 0.5 * 0.5 * 0.25 / 3.0; }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFePYRA5.h b/Tests/NumLib/FeTestData/TestFePYRA5.h
index dbb8aa29d5a09ebe1de95edf43f58f76ec2ff44f..48fb323a8c6dccba10a150d607f7b3f7fccc712e 100644
--- a/Tests/NumLib/FeTestData/TestFePYRA5.h
+++ b/Tests/NumLib/FeTestData/TestFePYRA5.h
@@ -78,4 +78,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeQUAD4.h b/Tests/NumLib/FeTestData/TestFeQUAD4.h
index b6f44cc87962afc3bad8972a0e39e1db1912a45d..21f43b1f644b468cd441db2aab0a53ddd4cd5290 100644
--- a/Tests/NumLib/FeTestData/TestFeQUAD4.h
+++ b/Tests/NumLib/FeTestData/TestFeQUAD4.h
@@ -77,4 +77,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeQUAD8.h b/Tests/NumLib/FeTestData/TestFeQUAD8.h
index 23cec38b663248fa396af9d2e30ded0ba11b66d1..3833def51314a319bd4b3e97b0b85c20fec31a4c 100644
--- a/Tests/NumLib/FeTestData/TestFeQUAD8.h
+++ b/Tests/NumLib/FeTestData/TestFeQUAD8.h
@@ -67,4 +67,4 @@ public:
     }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeQUAD9.h b/Tests/NumLib/FeTestData/TestFeQUAD9.h
index 0f09d39079174497346acf1ff35cb9412a0a3bcc..e1737ee7bd349048acda47febfb8d99e062c7d1d 100644
--- a/Tests/NumLib/FeTestData/TestFeQUAD9.h
+++ b/Tests/NumLib/FeTestData/TestFeQUAD9.h
@@ -68,4 +68,4 @@ public:
     }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeTET10.h b/Tests/NumLib/FeTestData/TestFeTET10.h
index 07c8b053121e5e06df606795d171120581c55ba7..e6f50c56ea0d69519088ed55676d10d939b82a5c 100644
--- a/Tests/NumLib/FeTestData/TestFeTET10.h
+++ b/Tests/NumLib/FeTestData/TestFeTET10.h
@@ -60,4 +60,4 @@ public:
     double getVolume() const { return 1.0 / 6.; }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeTET4.h b/Tests/NumLib/FeTestData/TestFeTET4.h
index bd4afad000f037a6d71d5315dfd89ae3deb14928..ef9b9eeab4982ac57076be78cc706a205b63b501 100644
--- a/Tests/NumLib/FeTestData/TestFeTET4.h
+++ b/Tests/NumLib/FeTestData/TestFeTET4.h
@@ -75,4 +75,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeTRI3.h b/Tests/NumLib/FeTestData/TestFeTRI3.h
index 76a19f7f4fdf06f1fcc8215b8043c03983bc7ce8..4c002b247fb42da27a0bacb08c1af362007b3bcc 100644
--- a/Tests/NumLib/FeTestData/TestFeTRI3.h
+++ b/Tests/NumLib/FeTestData/TestFeTRI3.h
@@ -73,4 +73,4 @@ public:
     }
 };
 
-} // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/FeTestData/TestFeTRI6.h b/Tests/NumLib/FeTestData/TestFeTRI6.h
index d7335a8dbc8768a9f98ecce3476ba5920e87ea75..edff402f176b0d02ecc119d7f5926ef021f4f54a 100644
--- a/Tests/NumLib/FeTestData/TestFeTRI6.h
+++ b/Tests/NumLib/FeTestData/TestFeTRI6.h
@@ -74,4 +74,4 @@ public:
     }
 };
 
-}  // namespace
+}  // namespace FeTestData
diff --git a/Tests/NumLib/TestExtrapolation.cpp b/Tests/NumLib/TestExtrapolation.cpp
index 7b8f778525a548fb530a74541048e86a30e47410..0f61a9e4c567f0807e6f45b1f7c2b386a442228a 100644
--- a/Tests/NumLib/TestExtrapolation.cpp
+++ b/Tests/NumLib/TestExtrapolation.cpp
@@ -243,7 +243,7 @@ void extrapolate(ExtrapolationTestProcess const& pcs,
     EXPECT_GT(tolerance_dx, dx_norm);
 }
 
-}  // anonymous namespace
+}  // namespace ExtrapolationTest
 
 #ifndef USE_PETSC
 TEST(NumLib, Extrapolation)
diff --git a/Tests/NumLib/TestFe.cpp b/Tests/NumLib/TestFe.cpp
index 59ddcc0c164048c5626b631d78e4d97cb15403f7..130da6f5dfd7b23bb22cb7d573537e950e3278e9 100644
--- a/Tests/NumLib/TestFe.cpp
+++ b/Tests/NumLib/TestFe.cpp
@@ -71,7 +71,7 @@ using TestTypes =
                      TestCase<TestFeQUAD4, EigenFixedShapeMatrixPolicy>,
                      TestCase<TestFeTET4, EigenFixedShapeMatrixPolicy>,
                      TestCase<TestFeTRI3, EigenFixedShapeMatrixPolicy>>;
-}
+}  // namespace
 
 template <class T>
 class NumLibFemIsoTest : public ::testing::Test, public T::TestFeType
diff --git a/Tests/NumLib/TestGradShapeFunction.cpp b/Tests/NumLib/TestGradShapeFunction.cpp
index 01c8bf2b60763c16f0227eea8002d11083e3071f..a59f0c8cbd155b44a7e66650f0f300fc187c9a27 100644
--- a/Tests/NumLib/TestGradShapeFunction.cpp
+++ b/Tests/NumLib/TestGradShapeFunction.cpp
@@ -98,7 +98,7 @@ using TestTypes =
                      TestCase<TestFeTET10, EigenFixedShapeMatrixPolicy>,
                      TestCase<TestFeTRI3, EigenFixedShapeMatrixPolicy>,
                      TestCase<TestFeTRI6, EigenFixedShapeMatrixPolicy>>;
-}
+}  // namespace
 
 template <class T>
 class GradShapeFunctionTest : public ::testing::Test, public T::TestFeType
diff --git a/Tests/NumLib/TestShapeFunctions.cpp b/Tests/NumLib/TestShapeFunctions.cpp
index a4e3c586f25f7d00f60833b47a8f55973ba48590..029b09b3b9808c3bc4fcd539c91b53bcc80adde2 100644
--- a/Tests/NumLib/TestShapeFunctions.cpp
+++ b/Tests/NumLib/TestShapeFunctions.cpp
@@ -83,7 +83,7 @@ struct NaturalPointGenerator
     }
 };
 
-}
+}  // namespace autocheck
 
 namespace ac = autocheck;
 using namespace NumLib;
diff --git a/Tests/ProcessLib/LIE/TestLIE.cpp b/Tests/ProcessLib/LIE/TestLIE.cpp
index eaef9e7883b4654274846d3512ff4e62d1e6f0b5..d27edb01f688f07ff5d5b835a71bf0976c26d875 100644
--- a/Tests/ProcessLib/LIE/TestLIE.cpp
+++ b/Tests/ProcessLib/LIE/TestLIE.cpp
@@ -51,7 +51,7 @@ std::unique_ptr<MeshLib::Mesh> createLine(
 
 const double eps = std::numeric_limits<double>::epsilon();
 
-}
+}  // namespace
 
 TEST(LIE, rotationMatrixXYTriangle)
 {