public void AllocateBuffersAndCreatePlansParallel(int nx, int ny, int nz, Mpi mpi) { CustomFft = new CustomDistributedFft(mpi, _profiler); IsParallel = true; var localSize3Nz = CustomDistributedFft.GetLocalSize(mpi, nx * 2, ny * 2, 3 * nz); var ranks = Enumerable.Range(0, mpi.Size / 2).ToArray(); RealModelPart = mpi.Merge(ranks); _inputBuffer = _memoryProvider.AllocateComplex(localSize3Nz); _outputBuffer = _memoryProvider.AllocateComplex(localSize3Nz); Plan3Nz = CreatePlan2D(CustomFft, mpi, _inputBuffer, _outputBuffer, nx * 2, ny * 2, 3 * nz); Plan1Nz = CreatePlan2D(CustomFft, mpi, _inputBuffer, _outputBuffer, nx * 2, ny * 2, 1 * nz); Plan3 = CreatePlan2D(CustomFft, mpi, _inputBuffer, _outputBuffer, nx * 2, ny * 2, 3); Plan1 = CreatePlan2D(CustomFft, mpi, _inputBuffer, _outputBuffer, nx * 2, ny * 2, 1); }