diff --git a/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.h b/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.h index c6116ea37e6a6b17c7c3ded73d3e8478f07c41da..c8f281702f1b8121dfb9f7d3e0d0343f9a0374c4 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.h +++ b/src/gpu/VirtualFluids_GPU/Communication/ExchangeData27.h @@ -10,7 +10,7 @@ //! \file ExchangeData27.h //! \ingroup GPU //! \author Martin Schoenherr, Anna Wellmann -//! \brief routines for data exchange when running simulations on multiple GPUs +//! \brief Routines for data exchange when running simulations on multiple GPUs ////////////////////////////////////////////////////////////////////////// // 1D domain decomposition @@ -23,19 +23,19 @@ extern "C" void exchangePostCollDataGPU27(Parameter *para, vf::gpu::Communicator // functions used for all directions -//! \brief collect the send nodes in a buffer on the gpu +//! \brief Collect the send nodes in a buffer on the gpu extern "C" void collectNodesInSendBufferGPU(Parameter *para, int level, int streamIndex, std::vector<ProcessNeighbor27> *sendProcessNeighbor, unsigned int numberOfSendProcessNeighbors); -//! \brief distribute the receive nodes from the buffer on the gpu +//! \brief Distribute the receive nodes from the buffer on the gpu extern "C" void scatterNodesFromRecvBufferGPU(Parameter *para, int level, int streamIndex, std::vector<ProcessNeighbor27> *recvProcessNeighborDev, unsigned int numberOfRecvProcessNeighbors); -//! \brief copy nodes which are part of the communication in multiple directions +//! \brief Copy nodes which are part of the communication in multiple directions //! \details The nodes are copied from the receive buffer in one direction to the send buffer in another direction. The //! copy operation is conducted on the cpu. -//! \ref see master thesis of Anna Wellmann (p. 56f: "Communication Hiding bei -//! der Verwendung eines uniformen Simulationsgitters") +//! See [master thesis of Anna Wellmann (p. 56f: "Communication Hiding bei +//! der Verwendung eines uniformen Simulationsgitters")] //! \param edgeNodes determines from where to where the nodes are //! copied //! \param recvProcessNeighborHost is a reference to the receive buffer on the host, nodes are copied from here @@ -47,16 +47,16 @@ extern "C" void copyEdgeNodes(std::vector<LBMSimulationParameter::EdgeNodePositi ////////////////////////////////////////////////////////////////////////// // x -//! \brief collect the send nodes for communication in the x direction in a buffer on the gpu -//! \details needed to exchange all nodes, used in the communication after collision step +//! \brief Collect the send nodes for communication in the x direction in a buffer on the gpu +//! \details Needed to exchange all nodes, used in the communication after collision step extern "C" void prepareExchangeCollDataXGPU27AllNodes(Parameter *para, int level, int streamIndex); -//! \brief collect the send nodes for communication in the x direction in a buffer on the gpu +//! \brief Collect the send nodes for communication in the x direction in a buffer on the gpu //! \details Only exchange nodes which are part of the interpolation process on refined grids. This function is used in //! the exchange which takes place after the interpolation fine to coarse and before the interpolation coarse to fine. -//! \ref see master thesis of Anna Wellmann +//! See [master thesis of Anna Wellmann] extern "C" void prepareExchangeCollDataXGPU27AfterFtoC(Parameter *para, int level, int streamIndex); -//! \brief exchange routine in x direction for simulations on multiple gpus -//! \details send and receive the nodes from the communication buffers on the gpus +//! \brief Exchange routine in x direction for simulations on multiple gpus +//! \details Send and receive the nodes from the communication buffers on the gpus. //! \param Communicator is needed for the communication between the processes with mpi //! \param CudaMemoryManager is needed for moving the data between host and device //! \param streamIndex is the index of a CUDA Stream, which is needed for communication hiding @@ -68,23 +68,24 @@ extern "C" void exchangeCollDataXGPU27(Parameter *para, vf::gpu::Communicator &c std::vector<ProcessNeighbor27> *recvProcessNeighborDev, std::vector<ProcessNeighbor27> *sendProcessNeighborHost, std::vector<ProcessNeighbor27> *recvProcessNeighborHost); -//! \brief calls exchangeCollDataXGPU27() for exchanging all nodes -//! \details used in the communication after collision step +//! \brief Calls exchangeCollDataXGPU27() for exchanging all nodes +//! \details Used in the communication after collision step extern "C" void exchangeCollDataXGPU27AllNodes(Parameter *para, vf::gpu::Communicator &comm, CudaMemoryManager *cudaManager, int level, int streamIndex); -//! \brief calls exchangeCollDataXGPU27() for exchanging the nodes, which are part of the communication between the two -//! interpolation processes on refined grids \details Only exchange nodes which are part of the interpolation process on +//! \brief Calls exchangeCollDataXGPU27() for exchanging the nodes, which are part of the communication between the two +//! interpolation processes on refined grids +//! \details Only exchange nodes which are part of the interpolation process on //! refined grids. This function is used in the exchange which takes place after the interpolation fine to coarse and -//! before the interpolation coarse to fine. \ref see master thesis of Anna Wellmann +//! before the interpolation coarse to fine. See [master thesis of Anna Wellmann] extern "C" void exchangeCollDataXGPU27AfterFtoC(Parameter *para, vf::gpu::Communicator &comm, CudaMemoryManager *cudaManager, int level, int streamIndex); -//! \brief distribute the receive nodes (x direction) from the buffer on the gpu -//! \details needed to exchange all nodes, used in the communication after collision step +//! \brief Distribute the receive nodes (x direction) from the buffer on the gpu +//! \details Needed to exchange all nodes, used in the communication after collision step extern "C" void scatterNodesFromRecvBufferXGPU27AllNodes(Parameter *para, int level, int streamIndex); -//! \brief distribute the receive nodes (x direction) from the buffer on the gpu +//! \brief Distribute the receive nodes (x direction) from the buffer on the gpu //! \details Only exchange nodes which are part of the interpolation process on refined grids. This function is used in //! the exchange which takes place after the interpolation fine to coarse and before the interpolation coarse to fine. -//! \ref see master thesis of Anna Wellmann +//! See [master thesis of Anna Wellmann] extern "C" void scatterNodesFromRecvBufferXGPU27AfterFtoC(Parameter *para, int level, int streamIndex); ////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h index f5b1ada0e475f4c8a3b214772dc290a3c1a40699..3c68ef7c57bc37b9c1f713df1052d483bee3bda1 100644 --- a/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h +++ b/src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.h @@ -1,7 +1,7 @@ //! \file IndexRearrangementForStreams.h //! \ingroup GPU //! \author Anna Wellmann -//! \ref master thesis of Anna Wellmann +//! \details See [master thesis of Anna Wellmann] #ifndef IndexRearrangementForStreams_H #define IndexRearrangementForStreams_H @@ -24,24 +24,22 @@ class Communicator; class IndexRearrangementForStreams { public: - //! \brief construct IndexRearrangementForStreams object + //! \brief Construct IndexRearrangementForStreams object IndexRearrangementForStreams(std::shared_ptr<Parameter> para, std::shared_ptr<GridBuilder> builder, vf::gpu::Communicator& communicator); ////////////////////////////////////////////////////////////////////////// // communication after coarse to fine ////////////////////////////////////////////////////////////////////////// - //! \brief initialize the arrays for the communication after the interpolation from fine to coarse in x direction + //! \brief Initialize the arrays for the communication after the interpolation from fine to coarse in x direction //! \details Only the nodes involved in the interpolation need to be exchanged. Therefore in this method all nodes, //! which are part of the interpolation as well as the communication, are identified. - //! - //! \ref see master thesis of Anna - //! Wellmann (p. 59-62: "Reduzieren der auszutauschenden Knoten") + //!See [master thesis of Anna Wellmann (p. 59-62: "Reduzieren der auszutauschenden Knoten")] void initCommunicationArraysForCommAfterFinetoCoarseX(const uint &level, int j, int direction); - //! \brief initialize the arrays for the communication after the interpolation from fine to coarse in y direction + //! \brief Initialize the arrays for the communication after the interpolation from fine to coarse in y direction //! \details --> see x direction void initCommunicationArraysForCommAfterFinetoCoarseY(const uint &level, int j, int direction); - //! \brief initialize the arrays for the communication after the interpolation from fine to coarse in z direction + //! \brief Initialize the arrays for the communication after the interpolation from fine to coarse in z direction //! \details --> see x direction void initCommunicationArraysForCommAfterFinetoCoarseZ(const uint &level, int j, int direction); @@ -50,7 +48,7 @@ public: // split interpolation cells ////////////////////////////////////////////////////////////////////////// - //! \brief split the interpolation cells from coarse to fine into border an bulk + //! \brief Split the interpolation cells from coarse to fine into border an bulk //! \details For communication hiding, the interpolation cells from the coarse to the fine grid need to be split //! into two groups: //! @@ -58,10 +56,10 @@ public: //! //! - the other cells which are not directly related to the communication between the two gpus --> "bulk" //! - //! \ref see master thesis of Anna Wellmann (p. 62-68: "Ãœberdeckung der reduzierten Kommunikation") + //! see [master thesis of Anna Wellmann (p. 62-68: "Ãœberdeckung der reduzierten Kommunikation")] void splitCoarseToFineIntoBorderAndBulk(const uint &level); - //! \brief split the interpolation cells from fine to coarse into border an bulk + //! \brief Split the interpolation cells from fine to coarse into border an bulk //! \details For communication hiding, the interpolation cells from the fine to the coarse grid need to be split //! into two groups: //! @@ -69,7 +67,7 @@ public: //! //! - the other cells which are not directly related to the communication between the two gpus --> "bulk" //! - //! \ref see master thesis of Anna Wellmann (p. 62-68: "Ãœberdeckung der reduzierten Kommunikation") + //! See [master thesis of Anna Wellmann (p. 62-68: "Ãœberdeckung der reduzierten Kommunikation")] void splitFineToCoarseIntoBorderAndBulk(const uint &level); private: @@ -77,7 +75,7 @@ private: // communication after coarse to fine ////////////////////////////////////////////////////////////////////////// - //! \brief inits pointers for reduced communication after interpolation fine to coarse by copying them from "normal" + //! \brief Initializes pointers for reduced communication after interpolation fine to coarse by copying them from "normal" //! communication void copyProcessNeighborToCommAfterFtoCX(const uint &level, int indexOfProcessNeighbor); void copyProcessNeighborToCommAfterFtoCY(const uint &level, int indexOfProcessNeighbor); @@ -90,7 +88,7 @@ private: void reorderSendIndicesForCommAfterFtoCZ(int direction, int level, int indexOfProcessNeighbor, std::vector<uint> &sendIndicesForCommAfterFtoCPositions); - //! \brief the send indices are reordered for the communication after the interpolation from fine to coarse + //! \brief The send indices are reordered for the communication after the interpolation from fine to coarse //! \details The indices of nodes which are part of the interpolation are moved to the front of vector with the send //! indices. //! \pre para->getParH(level)->intCF needs to be inititalized @@ -99,22 +97,22 @@ private: //! \param sendIndicesForCommAfterFtoCPositions stores each sendIndex's positions before reordering void reorderSendIndicesForCommAfterFtoC(int *sendIndices, int &numberOfSendNodesAfterFtoC, int direction, int level, std::vector<uint> &sendIndicesForCommAfterFtoCPositions); - //! \brief check if a sparse index occurs in the ICellFCC + //! \brief Check if a sparse index occurs in the ICellFCC bool isSparseIndexInICellFCC(uint sizeOfICellFCC, int sparseIndexSend, int level); - //! \brief aggregate all nodes in the coarse cells for the interpolation in coarse to fine + //! \brief Aggregate all nodes in the coarse cells for the interpolation in coarse to fine //! \details For the coarse cells in the interpolation from coarse to fine only one node is stored. This methods //! looks for the other nodes of each cell and puts them into vector. Duplicate nodes are only stored once. void aggregateNodesInICellCFC(int level, std::vector<uint> &nodesCFC); - //! \brief add index to sendIndicesAfterFtoC and sendIndicesForCommAfterFtoCPositions, but omit indices which are already in sendIndicesAfterFtoC + //! \brief Add index to sendIndicesAfterFtoC and sendIndicesForCommAfterFtoCPositions, but omit indices which are already in sendIndicesAfterFtoC void addUniqueIndexToCommunicationVectors(std::vector<int> &sendIndicesAfterFtoC, int &sparseIndexSend, std::vector<unsigned int> &sendIndicesForCommAfterFtoCPositions, uint &posInSendIndices) const; - //! \brief find if a sparse index is a send index. If true, call addUniqueIndexToCommunicationVectors() + //! \brief Find if a sparse index is a send index. If true, call addUniqueIndexToCommunicationVectors() void findIfSparseIndexIsInSendIndicesAndAddToCommVectors(int sparseIndex, int *sendIndices, uint numberOfSendIndices, std::vector<int> &sendIndicesAfterFtoC, std::vector<uint> &sendIndicesForCommAfterFtoCPositions) const; - //! \brief find all indices which are not part of the communication after the interpolation from fine to coarse + //! \brief Find all indices which are not part of the communication after the interpolation from fine to coarse void findIndicesNotInCommAfterFtoC(const uint &numberOfSendOrRecvIndices, int *sendOrReceiveIndices, std::vector<int> &sendOrReceiveIndicesAfterFtoC, std::vector<int> &sendOrIndicesOther); @@ -126,7 +124,7 @@ private: void reorderRecvIndicesForCommAfterFtoCZ(int direction, int level, int indexOfProcessNeighbor, std::vector<uint> &sendIndicesForCommAfterFtoCPositions); - //! \brief reorder the receive indices in the same way that the send indices were reordered. + //! \brief Reorder the receive indices in the same way that the send indices were reordered. //! \details When the send indices are reordered, the receive indices need to be reordered accordingly. //! \pre sendIndicesForCommAfterFtoCPositions should not be empty //! \param recvIndices is the pointer to the vector with the receive indices, which will be reordered in this function