From 1264be2409b37ea9e847df765329d45ed632046c Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 2 Oct 2019 11:10:24 -0600 Subject: [PATCH 01/11] cmake: generate version.hpp at compile time to avoid rebuilds --- cmake/version.cmake | 13 +++++++------ src/config/CMakeLists.txt | 14 ++++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cmake/version.cmake b/cmake/version.cmake index a630119b2d9..37897e11468 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -1,9 +1,7 @@ -find_package(Git) - -if(GIT_FOUND) +if(GIT_EXECUTABLE) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -11,14 +9,14 @@ execute_process( # Get the latest abbreviated commit hash of the working branch execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE ) execute_process( COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD -- - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" RESULT_VARIABLE res OUTPUT_VARIABLE out OUTPUT_STRIP_TRAILING_WHITESPACE @@ -30,3 +28,6 @@ else() set(GIT_STATE "DIRTY") endif() endif() + +configure_file(${PROJECT_SOURCE_DIR}/src/config/version.hpp.in version.hpp.tmp) +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different version.hpp.tmp version.hpp) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 618e4e59c60..dacb11e0df6 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -39,10 +39,12 @@ install(TARGETS EspressoConfig LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd) set_target_properties(EspressoConfig PROPERTIES SOVERSION ${SOVERSION}) target_include_directories(EspressoConfig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +find_package(Git) # Parse repository info from git if available -include(version) - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/version.hpp.in - ${CMAKE_CURRENT_BINARY_DIR}/version.hpp - ) +# Run this a build time to avoid rebuilds +add_custom_target(version COMMAND ${CMAKE_COMMAND} + -DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" + -DGIT_EXECUTABLE="${GIT_EXECUTABLE}" + -P ${PROJECT_SOURCE_DIR}/cmake/version.cmake) +set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES version.hpp version.hpp.tmp) +add_dependencies(EspressoConfig version) From f6a465d5dacbe2c7108a21844f4326926907789c Mon Sep 17 00:00:00 2001 From: Kai Szuttor <2150555+KaiSzuttor@users.noreply.github.com> Date: Fri, 11 Oct 2019 16:04:28 +0200 Subject: [PATCH 02/11] Update CMakeLists.txt --- src/config/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index dacb11e0df6..315c217de17 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -41,7 +41,7 @@ target_include_directories(EspressoConfig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${C find_package(Git) # Parse repository info from git if available -# Run this a build time to avoid rebuilds +# Run this at build time to avoid rebuilds add_custom_target(version COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" -DGIT_EXECUTABLE="${GIT_EXECUTABLE}" From 615927b1013268a6e6671c22d035d478722e3a60 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 18 Oct 2019 07:57:38 -0600 Subject: [PATCH 03/11] fix PROJECT_VERSION expansion --- src/config/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 6aada614542..0507a96864e 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -43,6 +43,7 @@ find_package(Git) # Run this at build time to avoid rebuilds add_custom_target(version COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" + -DPROJECT_VERSION="${PROJECT_VERSION}" -DGIT_EXECUTABLE="${GIT_EXECUTABLE}" -P ${PROJECT_SOURCE_DIR}/cmake/version.cmake) set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES version.hpp version.hpp.tmp) From 180b58e2460a8b05461340ec1c9a3b73847f5ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Fri, 18 Oct 2019 13:50:31 +0200 Subject: [PATCH 04/11] Next version is 4.2 Fix regression from 7f455cb6. --- src/config/version.hpp.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/version.hpp.in b/src/config/version.hpp.in index dc922562f97..22923ab7f08 100644 --- a/src/config/version.hpp.in +++ b/src/config/version.hpp.in @@ -1,8 +1,8 @@ #ifndef VERSION_HPP #define VERSION_HPP -#define ESPRESSO_VERSION_MAJOR 5 -#define ESPRESSO_VERSION_MINOR 0 +#define ESPRESSO_VERSION_MAJOR 4 +#define ESPRESSO_VERSION_MINOR 2 #define ESPRESSO_VERSION "@PROJECT_VERSION@" #define GIT_BRANCH "@GIT_BRANCH@" #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@" From 88da3ead93cc0839dce5de705c1670b1992196d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Fri, 18 Oct 2019 14:03:05 +0200 Subject: [PATCH 05/11] Get branch/commit/state as string, not bytestring --- src/python/espressomd/version.pyx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/python/espressomd/version.pyx b/src/python/espressomd/version.pyx index 7be8aad623a..77d2af070b7 100644 --- a/src/python/espressomd/version.pyx +++ b/src/python/espressomd/version.pyx @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from espressomd.utils import to_str + def major(): """Prints the major version of Espresso. @@ -38,14 +40,14 @@ def git_branch(): """Git branch of the build if known, otherwise empty. """ - return GIT_BRANCH + return to_str(GIT_BRANCH) def git_commit(): """Git commit of the build if known, otherwise empty. """ - return GIT_COMMIT_HASH + return to_str(GIT_COMMIT_HASH) def git_state(): @@ -54,4 +56,4 @@ def git_state(): was not changed from git_commit(), "DIRTY" otherwise. """ - return GIT_STATE + return to_str(GIT_STATE) From 931df851a705a349b205858458aea7a51cc777b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Fri, 18 Oct 2019 14:05:06 +0200 Subject: [PATCH 06/11] Narrow include of version.hpp --- src/config/config.hpp | 1 - src/core/io/writer/h5md_core.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/config.hpp b/src/config/config.hpp index 79f1084bcf1..130e29d5cbb 100644 --- a/src/config/config.hpp +++ b/src/config/config.hpp @@ -34,7 +34,6 @@ #define MPICH_SKIP_MPICXX #include "config-features.hpp" -#include "version.hpp" /** P3M: Default for number of interpolation points of the charge assignment function. */ diff --git a/src/core/io/writer/h5md_core.cpp b/src/core/io/writer/h5md_core.cpp index 3b9326db3db..97ef8a2ae8a 100644 --- a/src/core/io/writer/h5md_core.cpp +++ b/src/core/io/writer/h5md_core.cpp @@ -24,6 +24,7 @@ #include "communication.hpp" #include "grid.hpp" #include "integrate.hpp" +#include "version.hpp" #include From 5a24b14a218555656daa4bb4aa23c38d2f8f8701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Fri, 18 Oct 2019 16:50:51 +0200 Subject: [PATCH 07/11] Cleanup CMake Fix indentation, rename output variables, remove superfluous quotes around string variables. CMake quotes string variables implicitly when passed to functions, even if they contain whitespaces. Quotes are only necessary when setting a string variable. --- cmake/version.cmake | 50 ++++++++++++++++++++------------------- src/config/CMakeLists.txt | 6 ++--- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/cmake/version.cmake b/cmake/version.cmake index 37897e11468..175632e978f 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -1,33 +1,35 @@ if(GIT_EXECUTABLE) -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE -) + # Get the name of the working branch + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) -# Get the latest abbreviated commit hash of the working branch -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE + # Get the latest abbreviated commit hash of the working branch + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE ) -execute_process( - COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD -- - WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" - RESULT_VARIABLE res - OUTPUT_VARIABLE out - OUTPUT_STRIP_TRAILING_WHITESPACE + # Get branch status + execute_process( + COMMAND ${GIT_EXECUTABLE} diff-index --quiet HEAD -- + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + RESULT_VARIABLE GIT_DIFF_INDEX_RESULT + OUTPUT_VARIABLE GIT_DIFF_INDEX_OUTPUT + OUTPUT_STRIP_TRAILING_WHITESPACE ) + if(GIT_DIFF_INDEX_RESULT EQUAL 0) + set(GIT_STATE "CLEAN") + else() + set(GIT_STATE "DIRTY") + endif() -if(res EQUAL 0) - set(GIT_STATE "CLEAN") -else() - set(GIT_STATE "DIRTY") - endif() -endif() +endif(GIT_EXECUTABLE) configure_file(${PROJECT_SOURCE_DIR}/src/config/version.hpp.in version.hpp.tmp) execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different version.hpp.tmp version.hpp) diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 0507a96864e..e86f46f4424 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -42,9 +42,9 @@ find_package(Git) # Parse repository info from git if available # Run this at build time to avoid rebuilds add_custom_target(version COMMAND ${CMAKE_COMMAND} - -DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" - -DPROJECT_VERSION="${PROJECT_VERSION}" - -DGIT_EXECUTABLE="${GIT_EXECUTABLE}" + -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} + -DPROJECT_VERSION=${PROJECT_VERSION} + -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -P ${PROJECT_SOURCE_DIR}/cmake/version.cmake) set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES version.hpp version.hpp.tmp) add_dependencies(EspressoConfig version) From e11b283ffdd17d2d836114d6f7b74548713608e8 Mon Sep 17 00:00:00 2001 From: Florian Weik Date: Fri, 18 Oct 2019 17:39:51 +0200 Subject: [PATCH 08/11] python: Remove rotation flag redefinition --- src/python/espressomd/particle_data.pxd | 4 ++++ src/python/espressomd/particle_data.pyx | 15 ++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/python/espressomd/particle_data.pxd b/src/python/espressomd/particle_data.pxd index cf909a42a88..1ab96d2b4cf 100644 --- a/src/python/espressomd/particle_data.pxd +++ b/src/python/espressomd/particle_data.pxd @@ -31,6 +31,10 @@ include "myconfig.pxi" cdef extern from "particle_data.hpp": # DATA STRUCTURES + int ROTATION_X + int ROTATION_Y + int ROTATION_Z + # Note: Conditional compilation is not possible within ctypedef blocks. # Therefore, only member variables are imported here, which are always compiled into Espresso. # For all other properties, getter-functions have to be used on the c diff --git a/src/python/espressomd/particle_data.pyx b/src/python/espressomd/particle_data.pyx index 1b76dc8b94d..053bca5d6cf 100644 --- a/src/python/espressomd/particle_data.pyx +++ b/src/python/espressomd/particle_data.pyx @@ -44,9 +44,6 @@ def _COORD_FIXED(coord): COORDS_FIX_MASK = _COORD_FIXED(0) | _COORD_FIXED(1) | _COORD_FIXED(2) PARTICLE_EXT_TORQUE = 16 -ROT_X = 2 -ROT_Y = 4 -ROT_Z = 8 # List of particle attributes for pickle and the like # Autogenerated from the class. Everything which is of the same @@ -1060,11 +1057,11 @@ cdef class ParticleHandle: rot = 0 if _rot[0]: - rot += ROT_X + rot += ROTATION_X if _rot[1]: - rot += ROT_Y + rot += ROTATION_Y if _rot[2]: - rot += ROT_Z + rot += ROTATION_Z set_particle_rotation(self._id, rot) def __get__(self): @@ -1073,11 +1070,11 @@ cdef class ParticleHandle: pointer_to_rotation(self.particle_data, _rot) rot = _rot[0] res = np.zeros(3, dtype=int) - if rot & ROT_X: + if rot & ROTATION_X: res[0] = 1 - if rot & ROT_Y: + if rot & ROTATION_Y: res[1] = 1 - if rot & ROT_Z: + if rot & ROTATION_Z: res[2] = 1 return array_locked(res) From 4ac4a557fcdc936be94ac44277f600ae7e2473bd Mon Sep 17 00:00:00 2001 From: Florian Weik Date: Fri, 18 Oct 2019 18:15:01 +0200 Subject: [PATCH 09/11] core: Turn rotation flags into enum --- src/core/Particle.hpp | 13 ++++++++++++- src/core/rotation.hpp | 4 ---- src/python/espressomd/particle_data.pxd | 1 - 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/core/Particle.hpp b/src/core/Particle.hpp index 12484af8f03..8bf08b5c42b 100644 --- a/src/core/Particle.hpp +++ b/src/core/Particle.hpp @@ -25,6 +25,13 @@ #include #include +enum : int { + ROTATION_FIXED = 0u, + ROTATION_X = 1u, + ROTATION_Y = 2u, + ROTATION_Z = 4u +}; + /** Properties of a particle which are not supposed to * change during the integration, but have to be known * for all ghosts. Ghosts are particles which are @@ -59,7 +66,11 @@ struct ParticleProperties { #endif /** bitfield for the particle axes of rotation */ - int rotation = 0; +#ifdef ROTATION + int rotation = ROTATION_FIXED; +#else + constexpr int = ROTATION_FIXED; +#endif /** charge. */ #ifdef ELECTROSTATICS diff --git a/src/core/rotation.hpp b/src/core/rotation.hpp index 777a8895e69..d6c2a0886ec 100644 --- a/src/core/rotation.hpp +++ b/src/core/rotation.hpp @@ -33,10 +33,6 @@ #include #include -constexpr const int ROTATION_X = 2; -constexpr const int ROTATION_Y = 4; -constexpr const int ROTATION_Z = 8; - /** Propagate angular velocities and update quaternions on a particle */ void propagate_omega_quat_particle(Particle &p); diff --git a/src/python/espressomd/particle_data.pxd b/src/python/espressomd/particle_data.pxd index 1ab96d2b4cf..201fa8febc0 100644 --- a/src/python/espressomd/particle_data.pxd +++ b/src/python/espressomd/particle_data.pxd @@ -30,7 +30,6 @@ include "myconfig.pxi" cdef extern from "particle_data.hpp": # DATA STRUCTURES - int ROTATION_X int ROTATION_Y int ROTATION_Z From 9259bb428c98b079acd21a29c48f151e46c151c2 Mon Sep 17 00:00:00 2001 From: Florian Weik Date: Fri, 18 Oct 2019 19:51:34 +0200 Subject: [PATCH 10/11] core: Switched rotation axis flags to unsigned. --- src/core/Particle.hpp | 8 +++++--- src/core/particle_data.cpp | 11 +++++------ src/core/particle_data.hpp | 1 - src/python/espressomd/particle_data.pxd | 9 +++++---- src/python/espressomd/particle_data.pyx | 5 ++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/core/Particle.hpp b/src/core/Particle.hpp index 8bf08b5c42b..10eb844fdcf 100644 --- a/src/core/Particle.hpp +++ b/src/core/Particle.hpp @@ -25,7 +25,9 @@ #include #include -enum : int { +#include + +enum : uint8_t { ROTATION_FIXED = 0u, ROTATION_X = 1u, ROTATION_Y = 2u, @@ -67,9 +69,9 @@ struct ParticleProperties { /** bitfield for the particle axes of rotation */ #ifdef ROTATION - int rotation = ROTATION_FIXED; + uint8_t rotation = ROTATION_FIXED; #else - constexpr int = ROTATION_FIXED; + static constexpr uint8_t rotation = ROTATION_FIXED; #endif /** charge. */ diff --git a/src/core/particle_data.cpp b/src/core/particle_data.cpp index b2b25d8a1a4..fd77c5d16cb 100644 --- a/src/core/particle_data.cpp +++ b/src/core/particle_data.cpp @@ -137,7 +137,9 @@ using UpdatePropertyMessage = boost::variant #ifdef MEMBRANE_COLLISION , UpdateProperty #endif - , UpdateProperty +#ifdef ROTATION + , UpdateProperty +#endif #ifdef ELECTROSTATICS , UpdateProperty #endif @@ -842,7 +844,8 @@ constexpr Utils::Vector3d ParticleProperties::rinertia; #endif #ifdef ROTATION void set_particle_rotation(int part, int rot) { - mpi_update_particle_property(part, rot); + mpi_update_particle_property(part, + rot); } #endif #ifdef ROTATION @@ -1550,10 +1553,6 @@ void pointer_to_temperature(Particle const *p, double const *&res) { } #endif // LANGEVIN_PER_PARTICLE -void pointer_to_rotation(Particle const *p, int const *&res) { - res = &(p->p.rotation); -} - #ifdef ENGINE void pointer_to_swimming(Particle const *p, ParticleParametersSwimming const *&swim) { diff --git a/src/core/particle_data.hpp b/src/core/particle_data.hpp index 6122b68f726..c806bbdb96a 100644 --- a/src/core/particle_data.hpp +++ b/src/core/particle_data.hpp @@ -587,7 +587,6 @@ void pointer_to_gamma_rot(Particle const *p, double const *&res); #endif #endif // LANGEVIN_PER_PARTICLE #ifdef ROTATION -void pointer_to_rotation(Particle const *p, int const *&res); #endif #ifdef ENGINE diff --git a/src/python/espressomd/particle_data.pxd b/src/python/espressomd/particle_data.pxd index 201fa8febc0..ef9bffb5b46 100644 --- a/src/python/espressomd/particle_data.pxd +++ b/src/python/espressomd/particle_data.pxd @@ -23,6 +23,7 @@ from espressomd.utils cimport Vector4d, Vector3d, Vector3i, List, Span from espressomd.utils import array_locked from libcpp cimport bool from libcpp.memory cimport unique_ptr +from libc cimport stdint include "myconfig.pxi" @@ -30,9 +31,9 @@ include "myconfig.pxi" cdef extern from "particle_data.hpp": # DATA STRUCTURES - int ROTATION_X - int ROTATION_Y - int ROTATION_Z + stdint.uint8_t ROTATION_X + stdint.uint8_t ROTATION_Y + stdint.uint8_t ROTATION_Z # Note: Conditional compilation is not possible within ctypedef blocks. # Therefore, only member variables are imported here, which are always compiled into Espresso. @@ -43,6 +44,7 @@ cdef extern from "particle_data.hpp": int mol_id int type double mass + stdint.uint8_t rotation ctypedef struct particle_position "ParticlePosition": Vector3d p @@ -101,7 +103,6 @@ cdef extern from "particle_data.hpp": IF ROTATION: void set_particle_rotation(int part, int rot) - void pointer_to_rotation(const particle * p, const int * & res) void set_particle_q(int part, double q) diff --git a/src/python/espressomd/particle_data.pyx b/src/python/espressomd/particle_data.pyx index 053bca5d6cf..97654dbb9e5 100644 --- a/src/python/espressomd/particle_data.pyx +++ b/src/python/espressomd/particle_data.pyx @@ -1066,9 +1066,8 @@ cdef class ParticleHandle: def __get__(self): self.update_particle_data() - cdef const int * _rot = NULL - pointer_to_rotation(self.particle_data, _rot) - rot = _rot[0] + rot = self.particle_data.p.rotation + res = np.zeros(3, dtype=int) if rot & ROTATION_X: res[0] = 1 From e2945b3a85b5291e39049cf39afdacd85541e23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Fri, 18 Oct 2019 19:42:25 +0200 Subject: [PATCH 11/11] Minor fixes --- src/core/Particle.hpp | 4 ++-- src/core/particle_data.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Particle.hpp b/src/core/Particle.hpp index 10eb844fdcf..74465f05093 100644 --- a/src/core/Particle.hpp +++ b/src/core/Particle.hpp @@ -55,8 +55,8 @@ struct ParticleProperties { constexpr static double mass{1.0}; #endif /* MASS */ -#ifdef ROTATIONAL_INERTIA /** rotational inertia */ +#ifdef ROTATIONAL_INERTIA Utils::Vector3d rinertia = {1., 1., 1.}; #else static constexpr Utils::Vector3d rinertia = {1., 1., 1.}; @@ -118,7 +118,7 @@ struct ParticleProperties { } vs_relative; #endif #else /* VIRTUAL_SITES */ - static constexpr const bool is_virtual = false; + static constexpr bool is_virtual = false; #endif /* VIRTUAL_SITES */ #ifdef LANGEVIN_PER_PARTICLE diff --git a/src/core/particle_data.cpp b/src/core/particle_data.cpp index fd77c5d16cb..0f48c9b1192 100644 --- a/src/core/particle_data.cpp +++ b/src/core/particle_data.cpp @@ -168,7 +168,7 @@ using UpdatePropertyMessage = boost::variant , UpdateProperty #else , UpdateProperty -#endif // ROTATIONAL_INERTIA +#endif // PARTICLE_ANISOTROPY #endif // ROTATION #endif // LANGEVIN_PER_PARTICLE #ifdef EXTERNAL_FORCES