Commit 3a75b5cd authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Remove buggy comment symbol in P2P documentation

parent 1270ebc2
/*! \page p2p P2P
* In this section, we briefly discuss the 3 P2P functions that the kernels have to implement.
* <pre class='brush: cpp'>
* virtual void P2P(const FTreeCoordinate& inLeafPosition,
* ContainerClass* const FRestrict targets, const ContainerClass* const FRestrict sources,
* ContainerClass* const directNeighborsParticles[], const int neighborPositions[],
* const int size) = 0;
*
* virtual void P2POuter(const FTreeCoordinate& /*inLeafPosition*/,
* ContainerClass* const FRestrict /*targets*/,
* ContainerClass* const /*directNeighborsParticles*/[], const int /*neighborPositions*/[],
* const int /*size*/) = 0;
*
* virtual void P2PRemote(const FTreeCoordinate& /*inLeafPosition*/,
* ContainerClass* const FRestrict /*targets*/, const ContainerClass* const FRestrict /*sources*/,
* const ContainerClass* const /*directNeighborsParticles*/[],
* const int /*neighborPositions*/[], const int /*size*/) {
*
* virtual void P2POuter(const FTreeCoordinate& inLeafPosition,
* ContainerClass* const FRestrict targets,
* ContainerClass* const directNeighborsParticles[], const int neighborPositions[],
* const int size) = 0;
*
* virtual void P2PRemote(const FTreeCoordinate& inLeafPosition,
* ContainerClass* const FRestrict targets, const ContainerClass* const FRestrict sources,
* const ContainerClass* const directNeighborsParticles[],
* const int neighborPositions[], const int size) {
* }
* </pre>
* These functions are not necessary called at all times, it depends on the target=source or target!=source (TSM) configuration.
* The maximum number of neighbors (size) is 26 (+/-1 in each dimension) and the relative positions each neighbors is given in directNeighborsParticles.
* The relative position is filled by the formula: (((idxX + 1) * 3) + (idxY +1)) * 3 + idxZ + 1
* This formula is given in the FOctree class, and getLeafsNeighbors method.
* \section P2P
* The P2P is always called (only once!) for each leaf and it provides the target leaf ptr,
* the source ptr and maybe some neighbors.
* If the source ptr is equal to the target ptr it means that we are in a NO-tsm and that the same particles exist in both leaves.
* It also means that the neighbors are both sources and targets too.
* Such that a usual implementation is given by (see FRotationKernel):
* <pre class='brush: cpp'>
* void P2P(const FTreeCoordinate& inPosition,
* ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict inSources,
......@@ -50,20 +50,20 @@
* }
* }
* </pre>
* In this code we check if we are in TSM or not by comparing the pointers.
* If we are in source=target then we carefully compute the P2P inside the leaf (Inner) and
* then call the P2POuter for the neighbors.
* Otherwise we use the P2PRemote.
* \section P2POuter
* The P2P is use when some contribution should be added in NO TSM (so with target=source).
* This is why the source leaf is not provided because the it should be taken into account in the P2P function.
* We usually deal with symmetric (or anti-symmetric) functions and so a classic implementation is given by:
* <pre class='brush: cpp'>
* void P2POuter(const FTreeCoordinate& /*inLeafPosition*/,
* void P2POuter(const FTreeCoordinate& inLeafPosition,
* ContainerClass* const FRestrict inTargets,
* ContainerClass* const inNeighbors[], const int neighborPositions[],
* const int inSize) override {
......@@ -75,12 +75,12 @@
* FP2PRT<FReal>::template FullMutual<ContainerClass>(inTargets,inNeighbors,nbNeighborsToCompute);
* }
* </pre>
* Here we proceed only the neighbors with a relative position < 14 because we compute in both ways (Fij=-Fji).
* So the neighbors > 14 are going to be computed when the current cell will be in their neighbor data.
* \section P2PRemote
* The P2PRemote is used to add contributions in the TSM configuration or from remote leaves (when using MPI).
* This is why the neighbors are const.
* Remember that in ScalFMM a const is maybe a way to ensure that you are not modifying data share between several threads.
......
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