74 int global_rank_id = hcomm0->GetColumnComm()->GetRank();
75 int NumStrips = hcomm0->GetColumnComm()->GetSize() /
m_hcomm->GetSize();
82 : (global_rank_id - NumStrips);
157 ASSERTL0(
false,
"Transposition is not set up for 3D.");
238 ASSERTL0(
false,
"Transposition not implemented yet.");
243 ASSERTL0(
false,
"Transposition not implemented yet.");
248 ASSERTL0(
false,
"Transposition not implemented yet.");
253 ASSERTL0(
false,
"Transposition type does not exist.");
276 int num_pencil_per_proc =
302 while (index < num_points_per_plane)
304 copy_len = num_pencil_per_proc < (num_points_per_plane - index)
305 ? num_pencil_per_proc
306 : (num_points_per_plane - index);
311 &(inarray[index + (i * num_points_per_plane)]), 1,
312 &(outarray[cnt]), 1);
314 cnt += num_pencil_per_proc;
323 for (i = 0; i < packed_len; ++i)
326 &(tmp_outarray[i * num_pencil_per_proc]), 1,
327 &(outarray[i]), packed_len);
336 int i, pts_per_plane;
351 ASSERTL1(&inarray[0] != &outarray[0],
352 "Inarray and outarray cannot be the same");
354 for (i = 0; i < packed_len; ++i)
356 Vmath::Vcopy(pts_per_plane, &(inarray[i * pts_per_plane]), 1,
357 &(outarray[i]), packed_len);
380 int num_pencil_per_proc =
408 for (i = 0; i < packed_len; ++i)
410 Vmath::Vcopy(num_pencil_per_proc, &(inarray[i]), packed_len,
411 &(tmp_inarray[i * num_pencil_per_proc]), 1);
417 while (index < num_points_per_plane)
419 copy_len = num_pencil_per_proc < (num_points_per_plane - index)
420 ? num_pencil_per_proc
421 : (num_points_per_plane - index);
426 &(outarray[index + (i * num_points_per_plane)]),
429 cnt += num_pencil_per_proc;
441 int i, pts_per_plane;
458 ASSERTL1(&inarray[0] != &outarray[0],
459 "Inarray and outarray cannot be the same");
461 for (i = 0; i < packed_len; ++i)
464 &(outarray[i * pts_per_plane]), 1);
479 ASSERTL0(
false,
"Parallel transposition not implemented yet for "
480 "3D-Homo-2D approach.");
502 ASSERTL1(&inarray[0] != &outarray[0],
503 "Inarray and outarray cannot be the same");
505 for (i = 0; i < packed_len; ++i)
507 Vmath::Vcopy(pts_per_line, &(inarray[i * pts_per_line]), 1,
508 &(outarray[i]), packed_len);
523 ASSERTL0(
false,
"Parallel transposition not implemented yet for "
524 "3D-Homo-2D approach.");
546 ASSERTL1(&inarray[0] != &outarray[0],
547 "Inarray and outarray cannot be the same");
549 for (i = 0; i < packed_len; ++i)
552 &(outarray[i * pts_per_line]), 1);
563 [[maybe_unused]]
bool UseNumMode)
567 ASSERTL0(
false,
"Parallel transposition not implemented yet for "
568 "3D-Homo-2D approach.");
575 int pts_per_line = s / n;
582 &(outarray[i * packed_len]), 1);
593 [[maybe_unused]]
bool UseNumMode)
597 ASSERTL0(
false,
"Parallel transposition not implemented yet for "
598 "3D-Homo-2D approach.");
605 int pts_per_line = s / n;
609 for (
int i = 0; i < packed_len; ++i)
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
int GetNumPoints() const
Return points order at which basis is defined.
BasisType GetBasisType() const
Return type of expansion basis.
int GetNumModes() const
Returns the order of the basis.
void TransposeYZtoZY(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
unsigned int GetStripID(void)
int m_rank_id
Rank of process.
Array< OneD, unsigned int > GetKs(void)
unsigned int m_strip_ID
IDs of the strips on the processes.
Array< OneD, int > m_num_homogeneous_coeffs
Total number of homogeneous coefficients.
Array< OneD, unsigned int > GetPlanesIDs(void)
void TransposeYZtoX(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
Array< OneD, int > m_OffsetMap
MPI_Alltoallv offset map of send/recv buffer in global vector.
void Transpose(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false, TranspositionDir dir=eNoTrans)
Transposition(const LibUtilities::BasisKey &HomoBasis0, LibUtilities::CommSharedPtr hcomm0, LibUtilities::CommSharedPtr hcomm1)
unsigned int GetPlaneID(int i)
void TransposeXtoYZ(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
Array< OneD, int > m_num_processes
Array< OneD, int > m_num_points_per_proc
Number of homogeneous points on each processor per direction.
Array< OneD, int > m_SizeMap
MPI_Alltoallv map containing size of send/recv buffer.
Array< OneD, int > m_num_homogeneous_points
Total homogeneous points per direction.
int m_num_homogeneous_directions
Array< OneD, unsigned int > m_K
Fourier wave numbers associated with the planes.
Array< OneD, unsigned int > m_planes_IDs
IDs of the planes on the processes.
void TransposeZtoXY(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
void TransposeXYtoZ(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
void TransposeZYtoYZ(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
@ eFourierSingleMode
Fourier ModifiedExpansion with just the first mode .
@ eFourierHalfModeIm
Fourier Modified expansions with just the imaginary part of the first mode .
@ eFourierHalfModeRe
Fourier Modified expansions with just the real part of the first mode .
@ eFourier
Fourier Expansion .
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)