Skip to content
Snippets Groups Projects
Commit 7ffffd7e authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Reverted 'processors' to 'processes' in Transposition class.

Cleaned up code to meet coding standards.
parent 74d2de70
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Manager class for homogeneous data transposition
// Description: Manager class for homogeneous data transposition
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_LIB_UTILITIES_HOMOGENEOUS1D_H
......@@ -59,90 +59,105 @@ namespace Nektar
eZtoX,
eNoTrans
};
class Transposition
{
public:
LIB_UTILITIES_EXPORT Transposition(const LibUtilities::BasisKey &HomoBasis0,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT Transposition(const LibUtilities::BasisKey &HomoBasis0,
const LibUtilities::BasisKey &HomoBasis1,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT Transposition(const LibUtilities::BasisKey &HomoBasis0,
const LibUtilities::BasisKey &HomoBasis1,
const LibUtilities::BasisKey &HomoBasis2,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT Transposition(
const LibUtilities::BasisKey &HomoBasis0,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT Transposition(
const LibUtilities::BasisKey &HomoBasis0,
const LibUtilities::BasisKey &HomoBasis1,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT Transposition(
const LibUtilities::BasisKey &HomoBasis0,
const LibUtilities::BasisKey &HomoBasis1,
const LibUtilities::BasisKey &HomoBasis2,
LibUtilities::CommSharedPtr hcomm);
LIB_UTILITIES_EXPORT ~Transposition();
LIB_UTILITIES_EXPORT unsigned int GetK(int i);
LIB_UTILITIES_EXPORT Array<OneD, unsigned int> GetKs(void);
LIB_UTILITIES_EXPORT unsigned int GetPlaneID(int i);
LIB_UTILITIES_EXPORT Array<OneD, unsigned int> GetPlanesIDs(void);
LIB_UTILITIES_EXPORT void Transpose(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false,
TranspositionDir dir = eNoTrans);
LIB_UTILITIES_EXPORT void Transpose(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false,
TranspositionDir dir = eNoTrans);
protected:
CommSharedPtr m_hcomm;
private:
LIB_UTILITIES_EXPORT void TransposeXYtoZ(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeZtoXY(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeXtoYZ(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeYZtoX(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeYZtoZY(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeZYtoYZ(const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeXYtoZ(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeZtoXY(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeXtoYZ(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeYZtoX(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeYZtoZY(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
LIB_UTILITIES_EXPORT void TransposeZYtoYZ(
const Array<OneD,const NekDouble> &inarray,
Array<OneD, NekDouble> &outarray,
bool UseNumMode = false);
int m_num_homogeneous_directions;
Array<OneD,int> m_num_points_per_proc; // number of homogenous points on each processor for each of the three homogeneous direction
Array<OneD,int> m_num_homogeneous_points; // total number of homogeneous point per homogeneous direction
Array<OneD,int> m_num_homogeneous_coeffs; // total number homogeneous coefficients
Array<OneD,int> m_num_processors;
int m_rank_id; // rank of the process
Array<OneD, unsigned int> m_planes_IDs; // IDs of the planes on the process
Array<OneD, unsigned int> m_K; // Fourier wave numbers associated with the planes on the process
Array<OneD,int> m_SizeMap; // MPI_Alltoallv map containing the size of send/rec buffer
Array<OneD,int> m_OffsetMap; // MPI_Alltoallv map containing the offset of send/rec buffer in the global vector
/// Number of homogeneous points on each processor per direction.
Array<OneD,int> m_num_points_per_proc;
/// Total homogeneous points per direction.
Array<OneD,int> m_num_homogeneous_points;
/// Total number of homogeneous coefficients.
Array<OneD,int> m_num_homogeneous_coeffs;
Array<OneD,int> m_num_processes;
/// Rank of process
int m_rank_id;
/// IDs of the planes on the processes.
Array<OneD, unsigned int> m_planes_IDs;
/// Fourier wave numbers associated with the planes.
Array<OneD, unsigned int> m_K;
/// MPI_Alltoallv map containing size of send/recv buffer.
Array<OneD,int> m_SizeMap;
/// MPI_Alltoallv offset map of send/recv buffer in global vector.
Array<OneD,int> m_OffsetMap;
};
typedef boost::shared_ptr<Transposition> TranspositionSharedPtr;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment