34#include <gmock/gmock.h>
53namespace grid_generator_test
122using namespace grid_generator_test;
134 std::shared_ptr<LevelGridBuilderStub>
builder;
142 void SetUp()
override
144 para = std::make_shared<Parameter>();
147 para->parH[
i] = std::make_shared<LBMSimulationParameter>();
148 para->parD[
i] = std::make_shared<LBMSimulationParameter>();
150 para->setNumprocs(2);
152 builder = std::make_shared<LevelGridBuilderStub>(
nullptr);
157 std::make_unique<IndexRearrangementForStreamsDouble>(
para,
builder, *communicator));
164 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsX.size(), testing::Eq(0));
165 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsY.size(), testing::Eq(0));
166 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsZ.size(), testing::Eq(0));
171 builder->numberOfSendIndices = 1;
173 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsX.size(),
175 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsY.size(), testing::Eq(0));
176 EXPECT_THAT(para->getParH(level)->sendProcessNeighborsZ.size(), testing::Eq(0));
std::shared_ptr< LevelGridBuilderStub > builder
SPtr< GridGenerator > gridGenerator
class that is used to rearrange the arrays of node indices for communication between gpus....
CudaMemoryManagerDouble(std::shared_ptr< Parameter > parameter)
void cudaAllocProcessNeighbor(const ProcessNeighbor27 &, const ProcessNeighbor27 &) override
void cudaCopyProcessNeighborIndex(const ProcessNeighbor27 &, const ProcessNeighbor27 &) const override
IndexRearrangementForStreamsDouble(std::shared_ptr< Parameter > para, std::shared_ptr< GridBuilder > builder, vf::parallel::Communicator &communicator)
std::array< ProcessNeighbor27, 4 > initCommunicationArraysForCommAfterFinetoCoarse(const ProcessNeighbor27 &, const ProcessNeighbor27 &, const ProcessNeighbor27 &, const ProcessNeighbor27 &, int, int) const override
Initialize the arrays for the communication after the interpolation from fine to coarse.
LevelGridBuilderStub(SPtr< Grid > grid)
uint getCommunicationProcess(int direction) override
void getSendIndices(uint *sendIndices, int direction, int level) override
uint getNumberOfGridLevels() const override
uint getNumberOfReceiveIndices(int direction, uint level) override
uint getNumberOfSendIndices(int direction, uint level) override
void getReceiveIndices(uint *recvIndices, int direction, int level) override
An abstract class for communication between processes in parallel computation.
static std::shared_ptr< Communicator > getInstance()
std::shared_ptr< T > SPtr
TEST_F(GridGeneratorTests_initalValuesDomainDecompostion, whenNoCommunication_sendProcessNeighborShouldNotExist)