![]() |
Documentation 6b54b78464
|
#include <CParallelDataSorter.hpp>
Public Member Functions | |
| CParallelDataSorter (CConfig *config, const vector< string > &valFieldNames) | |
| Constructor. | |
| virtual | ~CParallelDataSorter () |
| Destructor. | |
| virtual void | SortOutputData () |
| Sort the output data for each grid node into a linear partitioning across all processors. | |
| virtual void | SortConnectivity (CConfig *config, CGeometry *geometry, bool val_sort=true) |
| Sort the connectivities (volume and surface) into data structures. | |
| virtual void | SortConnectivity (CConfig *config, CGeometry *geometry, const vector< string > &markerList) |
| Sort the connectivities into data structures (only for surface data sorters). | |
| unsigned long | GetnPoints () const |
| Get the number of points the local rank owns. | |
| unsigned long | GetnLocalPointsBeforeSort () const |
| Get the number of points to sort. | |
| unsigned long | GetnPointsGlobal () const |
| Get the global number of points (accumulated from all ranks) | |
| unsigned long | GetnElem () const |
| Get the global of elements (accumulated from all ranks and element types) | |
| unsigned long | GetnElem (GEO_TYPE type) const |
| Get the local number of elements of a specific type that the current rank owns \input type - The type of element, ref GEO_TYPE. | |
| unsigned long | GetnElemGlobal (GEO_TYPE type) const |
| Get the global number of elements of a specific type \input type - The type of element, ref GEO_TYPE. | |
| unsigned long | GetnElemGlobal () const |
| Get the global number of elements. | |
| unsigned long | GetnConnGlobal () const |
| Get the global number entries of the connectivity array. | |
| unsigned long | GetnConn () const |
| Get the local number entries of the connectivity array. | |
| unsigned long | GetnElemCumulative (unsigned short rank) const |
| Get the cumulated number of elements \input rank - the processor rank. | |
| unsigned long | GetnElemConnCumulative (unsigned short rank) const |
| Get the cumulated number of entries of the connectivity array \input rank - the processor rank. | |
| unsigned long | GetElemConnectivity (GEO_TYPE type, unsigned long iElem, unsigned long iNode) const |
| Get the connectivity of specific element. \input type - The type of element, ref GEO_TYPE \input iElem - The element ID \input iNode - The node ID. | |
| virtual unsigned long | GetNodeBegin (unsigned short rank) const |
| Beginning node ID of the linear partition owned by a specific processor. \input rank - the processor rank. | |
| unsigned long | GetNodeEnd (unsigned short rank) const |
| Ending node ID of the linear partition owned by a specific processor. | |
| passivedouble | GetData (unsigned short iField, unsigned long iPoint) const |
| Get the value of the linear partitioned data. \input iField - the output field ID. \input iPoint - the point ID. | |
| const passivedouble * | GetData () const |
| Get the pointer to the sorted linear partitioned data. | |
| virtual unsigned long | GetGlobalIndex (unsigned long iPoint) const |
| Get the global index of a point. \input iPoint - the point ID. | |
| virtual unsigned long | GetnPointCumulative (unsigned short rank) const |
| Get the cumulated number of points \input rank - the processor rank. | |
| unsigned long | GetnPointLinear (unsigned short rank) const |
| Get the linear number of points \input rank - the processor rank. | |
| bool | GetConnectivitySorted () const |
| Check whether the current connectivity is sorted (i.e. if SortConnectivity has been called) | |
| void | SetUnsortedData (unsigned long iPoint, unsigned short iField, su2double data) |
| Set the value of a specific field at a point. PrepareSendBuffers must be called before using this function. | |
| passivedouble | GetUnsortedData (unsigned long iPoint, unsigned short iField) const |
| virtual unsigned short | FindProcessor (unsigned long iPoint) const |
| Get the Processor ID a Point belongs to. | |
| const vector< string > & | GetFieldNames () const |
| Get the vector containing the names of the output fields. | |
| const vector< string > & | GetRequiredFieldNames () const |
| Get the vector containing the names of the required output fields. | |
| void | SetRequiredFieldNames (const vector< string > &req_field_names) |
| Set the vector of required output fields. | |
| unsigned short | GetnDim () const |
| Get the spatial dimension. | |
| void | SetTotalElements () |
| Set the total number of elements after sorting individual element types. | |
Protected Member Functions | |
| void | PrepareSendBuffers (std::vector< unsigned long > &globalID) |
| Prepare the send buffers by filling them with the global indices. After calling this function, the data buffer for sending can be filled with the ::SetUnsorted_Data() routine. | |
Protected Attributes | ||
| const int | rank | |
| The MPI rank. | ||
| const int | size | |
| The MPI size, aka the number of processors. | ||
| unsigned long | nGlobalPointBeforeSort | |
| Global number of points without halos before sorting. | ||
| unsigned long | nLocalPointsBeforeSort | |
| Local number of points without halos before sorting on this proc. | ||
| int * | Conn_Line_Par | |
| Local connectivity of line elements. | ||
| int * | Conn_Tria_Par | |
| Local connectivity of triangle elements. | ||
| int * | Conn_Quad_Par | |
| Local connectivity of quad elements. | ||
| int * | Conn_Tetr_Par | |
| Local connectivity of tetrahedral elements. | ||
| int * | Conn_Hexa_Par | |
| Local connectivity of hexahedral elements. | ||
| int * | Conn_Pris_Par | |
| Local connectivity of prism elements. | ||
| int * | Conn_Pyra_Par | |
| Local connectivity of pyramid elements. | ||
| array< unsigned long, N_ELEM_TYPES > | nElemPerTypeGlobal | |
| Global number of elements after sorting on this proc. | ||
| array< unsigned long, N_ELEM_TYPES > | nElemPerType | |
| Local number of elements after sorting on this proc. | ||
| struct { | ||
| } | TypeMap | |
| Map that stores the index for each GEO_TYPE type where to find information in the element arrays. | ||
| unsigned long | nPointsGlobal | |
| Global number of points without halos. | ||
| unsigned long | nElemGlobal | |
| Global number of elems without halos. | ||
| unsigned long | nConnGlobal | |
| Global size of the connectivity array. | ||
| unsigned long | nPoints | |
| Local number of points. | ||
| unsigned long | nElem | |
| Local number of elements. | ||
| unsigned long | nConn | |
| Local size of the connectivity array. | ||
| CLinearPartitioner | linearPartitioner | |
| Linear partitioner based on the global number of points. | ||
| unsigned short | GlobalField_Counter | |
| Number of output fields. | ||
| bool | connectivitySorted | |
| Boolean to store information on whether the connectivity is sorted. | ||
| int * | nPoint_Send | |
| Number of points this processor has to send to other processors. | ||
| int * | nPoint_Recv | |
| Number of points this processor receives from other processors. | ||
| int * | nElem_Send | |
| Number of elements this processor has to send to other processors. | ||
| int * | nElem_Cum | |
| Cumulative number of elements. | ||
| unsigned long * | nElemConn_Send | |
| Number of element connectivity this processor has to send to other processors. | ||
| unsigned long * | nElemConn_Cum | |
| Cumulative number of element connectivity entries. | ||
| unsigned long * | Index | |
| Index each point has in the send buffer. | ||
| passivedouble * | connSend | |
| Send buffer holding the data that will be send to other processors. | ||
| passivedouble * | dataBuffer | |
| Buffer holding the sorted, partitioned data as passivedouble types. | ||
| unsigned long * | idSend | |
| Send buffer holding global indices that will be send to other processors. | ||
| int | nSends | |
| Number of sends. | ||
| int | nRecvs | |
| Number of receives. | ||
| vector< string > | fieldNames | |
| Vector with names of all the output fields. | ||
| vector< string > | requiredFieldNames | |
| Vector with names of the required output fields that we write to file. | ||
| unsigned short | nDim | |
| Spatial dimension of the data. | ||
| CParallelDataSorter::CParallelDataSorter | ( | CConfig * | config, |
| const vector< string > & | valFieldNames | ||
| ) |
Constructor.
| [in] | config | - Pointer to the current config structure |
| [in] | valFieldNames | - Vector containing the field names |
|
virtual |
Destructor.
|
inlinevirtual |
Get the Processor ID a Point belongs to.
| [in] | iPoint | - global renumbered ID of the point |
Reimplemented in CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
inline |
Check whether the current connectivity is sorted (i.e. if SortConnectivity has been called)
|
inline |
Get the pointer to the sorted linear partitioned data.
|
inline |
Get the value of the linear partitioned data. \input iField - the output field ID. \input iPoint - the point ID.
| unsigned long CParallelDataSorter::GetElemConnectivity | ( | GEO_TYPE | type, |
| unsigned long | iElem, | ||
| unsigned long | iNode | ||
| ) | const |
Get the connectivity of specific element. \input type - The type of element, ref GEO_TYPE \input iElem - The element ID \input iNode - The node ID.
|
inline |
Get the vector containing the names of the output fields.
|
inlinevirtual |
Get the global index of a point. \input iPoint - the point ID.
Reimplemented in CFEMDataSorter, CFVMDataSorter, CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
inline |
Get the local number entries of the connectivity array.
|
inline |
Get the global number entries of the connectivity array.
|
inline |
Get the spatial dimension.
|
inline |
Get the global of elements (accumulated from all ranks and element types)
|
inline |
Get the local number of elements of a specific type that the current rank owns \input type - The type of element, ref GEO_TYPE.
|
inline |
Get the cumulated number of entries of the connectivity array \input rank - the processor rank.
|
inline |
Get the cumulated number of elements \input rank - the processor rank.
|
inline |
Get the global number of elements.
|
inline |
Get the global number of elements of a specific type \input type - The type of element, ref GEO_TYPE.
|
inline |
Get the number of points to sort.
|
inlinevirtual |
Beginning node ID of the linear partition owned by a specific processor. \input rank - the processor rank.
Reimplemented in CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
inline |
Ending node ID of the linear partition owned by a specific processor.
| rank | - the processor rank. |
|
inlinevirtual |
Get the cumulated number of points \input rank - the processor rank.
Reimplemented in CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
inline |
Get the linear number of points \input rank - the processor rank.
|
inline |
Get the number of points the local rank owns.
|
inline |
Get the global number of points (accumulated from all ranks)
|
inline |
Get the vector containing the names of the required output fields.
|
inline |
|
protected |
Prepare the send buffers by filling them with the global indices. After calling this function, the data buffer for sending can be filled with the ::SetUnsorted_Data() routine.
| [in] | globalID | - Vector containing the global indices of the points |
|
inline |
Set the vector of required output fields.
| void CParallelDataSorter::SetTotalElements | ( | ) |
Set the total number of elements after sorting individual element types.
|
inline |
Set the value of a specific field at a point. PrepareSendBuffers must be called before using this function.
| [in] | iPoint | - ID of the point |
| [in] | iField | - Index of the field |
| [in] | data | - Value of the field |
|
inlinevirtual |
Sort the connectivities (volume and surface) into data structures.
| [in] | config | - Definition of the particular problem. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | val_sort | - boolean controlling whether the elements are sorted or simply loaded by their owning rank. |
Reimplemented in CFEMDataSorter, CFVMDataSorter, CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
inlinevirtual |
Sort the connectivities into data structures (only for surface data sorters).
| [in] | config | - Definition of the particular problem. |
| [in] | geometry | - Geometrical definition of the problem. |
| [in] | markerList | - A list of marker names that should be sorted. |
Reimplemented in CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
virtual |
Sort the output data for each grid node into a linear partitioning across all processors.
Reimplemented in CSurfaceFEMDataSorter, and CSurfaceFVMDataSorter.
|
protected |
Local connectivity of hexahedral elements.
|
protected |
Local connectivity of line elements.
|
protected |
Local connectivity of prism elements.
|
protected |
Local connectivity of pyramid elements.
|
protected |
Local connectivity of quad elements.
|
protected |
Local connectivity of tetrahedral elements.
|
protected |
Local connectivity of triangle elements.
|
protected |
Boolean to store information on whether the connectivity is sorted.
|
protected |
Send buffer holding the data that will be send to other processors.
|
protected |
Buffer holding the sorted, partitioned data as passivedouble types.
|
protected |
Vector with names of all the output fields.
|
protected |
Number of output fields.
|
protected |
Send buffer holding global indices that will be send to other processors.
|
protected |
Index each point has in the send buffer.
|
protected |
Linear partitioner based on the global number of points.
|
protected |
Local size of the connectivity array.
|
protected |
Global size of the connectivity array.
|
protected |
Spatial dimension of the data.
|
protected |
Local number of elements.
|
protected |
Cumulative number of elements.
|
protected |
Number of elements this processor has to send to other processors.
|
protected |
Cumulative number of element connectivity entries.
|
protected |
Number of element connectivity this processor has to send to other processors.
|
protected |
Global number of elems without halos.
|
protected |
Local number of elements after sorting on this proc.
|
protected |
Global number of elements after sorting on this proc.
|
protected |
Global number of points without halos before sorting.
|
protected |
Local number of points without halos before sorting on this proc.
|
protected |
Number of points this processor receives from other processors.
|
protected |
Number of points this processor has to send to other processors.
|
protected |
Local number of points.
|
protected |
Global number of points without halos.
|
protected |
Number of receives.
|
protected |
Number of sends.
|
protected |
The MPI rank.
|
protected |
Vector with names of the required output fields that we write to file.
|
protected |
The MPI size, aka the number of processors.
| struct { ... } CParallelDataSorter::TypeMap |
Map that stores the index for each GEO_TYPE type where to find information in the element arrays.