Nektar++
Transposition.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Transposition.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Manager class for homogeneous data transposition
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 #ifndef NEKTAR_LIB_UTILITIES_HOMOGENEOUS1D_H
35 #define NEKTAR_LIB_UTILITIES_HOMOGENEOUS1D_H
36 
41 
42 namespace Nektar
43 {
44 namespace LibUtilities
45 {
46 class BasisKey;
47 }
48 }
49 
50 namespace Nektar
51 {
52 namespace LibUtilities
53 {
55 {
65  eNoTrans
66 };
67 
69 {
70 public:
74 
76  const LibUtilities::BasisKey &HomoBasis1,
78 
80  const LibUtilities::BasisKey &HomoBasis1,
81  const LibUtilities::BasisKey &HomoBasis2,
83 
85 
86  LIB_UTILITIES_EXPORT unsigned int GetK(int i);
87 
89 
90  LIB_UTILITIES_EXPORT unsigned int GetPlaneID(int i);
91 
92  LIB_UTILITIES_EXPORT unsigned int GetStripID(void);
93 
95 
97  const Array<OneD, const NekDouble> &inarray,
98  Array<OneD, NekDouble> &outarray, bool UseNumMode = false,
100 
102 
104 
105 protected:
107 
108 private:
110  const Array<OneD, const NekDouble> &inarray,
111  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
112 
114  const Array<OneD, const NekDouble> &inarray,
115  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
116 
118  const Array<OneD, const NekDouble> &inarray,
119  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
120 
122  const Array<OneD, const NekDouble> &inarray,
123  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
124 
126  const Array<OneD, const NekDouble> &inarray,
127  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
128 
130  const Array<OneD, const NekDouble> &inarray,
131  Array<OneD, NekDouble> &outarray, bool UseNumMode = false);
132 
134 
135  /// Number of homogeneous points on each processor per direction.
137 
138  /// Total homogeneous points per direction.
140 
141  /// Total number of homogeneous coefficients.
143 
145 
146  /// Rank of process
148 
149  /// IDs of the planes on the processes.
151 
152  /// IDs of the strips on the processes.
153  unsigned int m_strip_ID;
154 
155  /// Fourier wave numbers associated with the planes.
157 
158  /// MPI_Alltoallv map containing size of send/recv buffer.
160 
161  /// MPI_Alltoallv offset map of send/recv buffer in global vector.
163 };
164 
165 typedef std::shared_ptr<Transposition> TranspositionSharedPtr;
166 }
167 }
168 #endif
#define LIB_UTILITIES_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:50
void TransposeXYtoZ(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
void TransposeYZtoZY(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
void TransposeZtoXY(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
void SetSpecVanVisc(Array< OneD, NekDouble > visc)
NekDouble GetSpecVanVisc(const int k)
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.
void Transpose(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false, TranspositionDir dir=eNoTrans)
Array< OneD, unsigned int > GetPlanesIDs(void)
void TransposeXtoYZ(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.
Transposition(const LibUtilities::BasisKey &HomoBasis0, LibUtilities::CommSharedPtr hcomm0, LibUtilities::CommSharedPtr hcomm1)
Array< OneD, int > m_num_points_per_proc
Number of homogeneous points on each processor per direction.
void TransposeYZtoX(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
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.
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 TransposeZYtoYZ(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseNumMode=false)
std::shared_ptr< Transposition > TranspositionSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:54
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
double NekDouble