Commit 8457fe6a authored by BLANCHARD Pierre's avatar BLANCHARD Pierre
Browse files

Added missing multiplication by target PhysVal in M2P force computation of adaptive kernels...

parent e95ada35
......@@ -229,6 +229,7 @@ public:
const FReal*const positionsZ = particles->getPositions()[2];
// get potential
FReal*const physVal = particles->getPhysicalValues(/*idxPot*/);
FReal*const potentials = particles->getPotentials(/*idxPot*/);
FReal*const fx = particles->getForcesX(/*idxPot*/);
FReal*const fy = particles->getForcesY(/*idxPot*/);
......@@ -250,9 +251,9 @@ public:
MatrixKernel->evaluateBlockAndDerivative(x,Y[n],Kxy,dKxy);
potentials[idxPart] += Kxy[0] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fx[idxPart] += -dKxy[0] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fy[idxPart] += -dKxy[1] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fz[idxPart] += -dKxy[2] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fx[idxPart] += -dKxy[0] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fy[idxPart] += -dKxy[1] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fz[idxPart] += -dKxy[2] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
}
......
......@@ -296,6 +296,7 @@ public:
const FReal*const positionsZ = particles->getPositions()[2];
// get potential
FReal*const physVal = particles->getPhysicalValues(/*idxPot*/);
FReal*const potentials = particles->getPotentials(/*idxPot*/);
FReal*const fx = particles->getForcesX(/*idxPot*/);
FReal*const fy = particles->getForcesY(/*idxPot*/);
......@@ -317,9 +318,9 @@ public:
MatrixKernel->evaluateBlockAndDerivative(x,Y[n],Kxy,dKxy);
potentials[idxPart] += Kxy[0] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fx[idxPart] += -dKxy[0] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fy[idxPart] += -dKxy[1] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fz[idxPart] += -dKxy[2] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fx[idxPart] += -dKxy[0] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fy[idxPart] += -dKxy[1] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
fz[idxPart] += -dKxy[2] * physVal[idxPart] * MultipoleExpansion[/*idxLhs*nnodes+*/n];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment