Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
amlucas committed Oct 17, 2022
1 parent abba742 commit 71a83df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/mirheo/plugins/magnetic_dipole_interactions.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@

#include <mpi.h>

namespace mirheo
{
namespace mirheo {
namespace magnetic_dipole_interactions_plugin_kernels {

namespace magnetic_dipole_interactions_plugin_kernels
{
__global__ void collectRigidInfo(const DomainInfo domain, const ROVview view, real4 *rigidPosQuat)
{
const int gid = blockIdx.x * blockDim.x + threadIdx.x;
Expand All @@ -34,11 +32,12 @@ __global__ void collectRigidInfo(const DomainInfo domain, const ROVview view, re
*/
__device__ inline real3 difference(real3 a, real3 b, real3 L, bool periodic)
{
const real3 h = 0.5_r * L;
real3 d = a - b;

if (periodic)
{
const real3 h = 0.5_r * L;

if (d.x < -h.x) d.x += L.x;
if (d.x > h.x) d.x -= L.x;

Expand Down

0 comments on commit 71a83df

Please sign in to comment.