예제 #1
0
  void computeEnergy(SystemInterface &s) {
    dds_float box[3];
    int per[3];
    for (int i=0;i<3;i++)
    {
     box[i]=s.box()[i];
     per[i] = (PERIODIC(i));
    }
    DipolarDirectSum_kernel_wrapper_energy(k,s.npart_gpu(),
					 s.rGpuBegin(), s.dipGpuBegin(), box,per,(&(((CUDA_energy*)s.eGpu())->dipolar)));
 };
예제 #2
0
  void computeForces(SystemInterface &s) {
    dds_float box[3];
    int per[3];
    for (int i=0;i<3;i++)
    {
     box[i]=s.box()[i];
     per[i] = (PERIODIC(i));
    }
    DipolarDirectSum_kernel_wrapper_force(k,s.npart_gpu(),
					 s.rGpuBegin(), s.dipGpuBegin(), s.fGpuBegin(),s.torqueGpuBegin(),box,per);
  };