Skip to content

Commit

Permalink
Move Brownian Dynamics globals in a struct
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Jan 22, 2020
1 parent 3f29600 commit daa5dcd
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 188 deletions.
16 changes: 8 additions & 8 deletions src/core/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,21 @@ const std::unordered_map<int, Datafield> fields{
{&thermo_virtual, Datafield::Type::BOOL, 1, "thermo_virtual"}},
#ifndef PARTICLE_ANISOTROPY
{FIELD_BROWNIAN_GAMMA_ROTATION,
{&brownian_gamma_rotation, Datafield::Type::DOUBLE, 1,
"gamma_rot"}}, /* 57 from thermostat.cpp */
{&brownian.gamma_rotation, Datafield::Type::DOUBLE, 1,
"brownian.gamma_rotation"}}, /* 57 from thermostat.cpp */
#else
{FIELD_BROWNIAN_GAMMA_ROTATION,
{brownian_gamma_rotation.data(), Datafield::Type::DOUBLE, 3,
"gamma_rot"}}, /* 57 from thermostat.cpp */
{brownian.gamma_rotation.data(), Datafield::Type::DOUBLE, 3,
"brownian.gamma_rotation"}}, /* 57 from thermostat.cpp */
#endif
#ifndef PARTICLE_ANISOTROPY
{FIELD_BROWNIAN_GAMMA,
{&brownian_gamma, Datafield::Type::DOUBLE, 1,
"gamma"}}, /* 58 from thermostat.cpp */
{&brownian.gamma, Datafield::Type::DOUBLE, 1,
"brownian.gamma"}}, /* 58 from thermostat.cpp */
#else
{FIELD_BROWNIAN_GAMMA,
{brownian_gamma.data(), Datafield::Type::DOUBLE, 3,
"gamma"}}, /* 58 from thermostat.cpp */
{brownian.gamma.data(), Datafield::Type::DOUBLE, 3,
"brownian.gamma"}}, /* 58 from thermostat.cpp */
#endif // PARTICLE_ANISOTROPY
};

Expand Down
4 changes: 2 additions & 2 deletions src/core/global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ enum Fields {
FIELD_FORCE_CAP,
FIELD_THERMO_VIRTUAL,
FIELD_SWIMMING_PARTICLES_EXIST,
/** index of \ref brownian_gamma */
/** index of \ref BrownianThermostat::gamma */
FIELD_BROWNIAN_GAMMA,
/** index of \ref brownian_gamma_rotation */
/** index of \ref BrownianThermostat::gamma_rotation */
FIELD_BROWNIAN_GAMMA_ROTATION,
};

Expand Down
Loading

0 comments on commit daa5dcd

Please sign in to comment.