Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Nektar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Castiglioni
Nektar
Commits
7ffffd7e
Commit
7ffffd7e
authored
12 years ago
by
Chris Cantwell
Browse files
Options
Downloads
Patches
Plain Diff
Reverted 'processors' to 'processes' in Transposition class.
Cleaned up code to meet coding standards.
parent
74d2de70
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library/LibUtilities/Communication/Transposition.cpp
+327
-236
327 additions, 236 deletions
library/LibUtilities/Communication/Transposition.cpp
library/LibUtilities/Communication/Transposition.h
+87
-72
87 additions, 72 deletions
library/LibUtilities/Communication/Transposition.h
with
414 additions
and
308 deletions
library/LibUtilities/Communication/Transposition.cpp
+
327
−
236
View file @
7ffffd7e
This diff is collapsed.
Click to expand it.
library/LibUtilities/Communication/Transposition.h
+
87
−
72
View file @
7ffffd7e
...
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment