diff --git a/MathLib/LinAlg/Eigen/EigenVector.h b/MathLib/LinAlg/Eigen/EigenVector.h index 981139dd5952ffb040c00e8b491713fa73b25930..ffe5221060d1df338cbbb5c57d4c57c02f19c1a1 100644 --- a/MathLib/LinAlg/Eigen/EigenVector.h +++ b/MathLib/LinAlg/Eigen/EigenVector.h @@ -93,7 +93,8 @@ public: template<class T_SUBVEC> void add(const std::vector<IndexType> &pos, const T_SUBVEC &sub_vec) { - for (std::size_t i=0; i<pos.size(); ++i) { + auto const length = pos.size(); + for (std::size_t i=0; i<length; ++i) { add(pos[i], sub_vec[i]); } } diff --git a/MeshLib/Elements/TemplateElement.h b/MeshLib/Elements/TemplateElement.h index 791409b86238dc7eed536f108798d3f110a3ff97..0a166532a8c4022fae51fee9945ef3411ed63f78 100644 --- a/MeshLib/Elements/TemplateElement.h +++ b/MeshLib/Elements/TemplateElement.h @@ -59,9 +59,6 @@ public: /// Copy constructor TemplateElement(const TemplateElement &e); - /// Destructor - ~TemplateElement() override = default; - /// Returns a copy of this object. Element* clone() const override { return new TemplateElement(*this); } Element* clone(Node** nodes, std::size_t id) const override diff --git a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h index e726ab7f5e0208dd367119593255525a9e6285b4..827e01ba96b7ac2586ab7142bb12590c9f91155d 100644 --- a/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h +++ b/ProcessLib/BoundaryCondition/BoundaryConditionCollection.h @@ -29,7 +29,8 @@ public: std::vector<NumLib::IndexValueVector<GlobalIndexType>> const* getKnownSolutions(double const t) const { - for (std::size_t i=0; i<_boundary_conditions.size(); ++i) { + auto const n_bcs = _boundary_conditions.size(); + for (std::size_t i=0; i<n_bcs; ++i) { auto const& bc = *_boundary_conditions[i]; auto& dirichlet_storage = _dirichlet_bcs[i]; bc.getEssentialBCValues(t, dirichlet_storage); diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index 033250f54042b30ddac57289edf682ca7164eb72..95ced845a5151344a5a93c2ad18ce477a69f5778 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -93,7 +93,7 @@ if(COMPILER_IS_INTEL) message(STATUS "Set Intel release flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG") endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHOST -O3 -no-prec-div -DNDEBUG") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHOST") endif() # COMPILER_IS_INTEL # Profiling