30#include "../../../../Common/include/parallelization/mpi_structure.hpp"
31#include "../../../../Common/include/option_structure.hpp"
32#include "../../../../Common/include/toolboxes/CLinearPartitioner.hpp"
71 static unsigned short at(
unsigned short type) {
80 default: assert(
false);
return 0;
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Helper class that provides the counts for each rank in a linear partitioning given the global count a...
Definition CLinearPartitioner.hpp:43
unsigned long GetCumulativeSizeBeforeRank(int rank) const
Get the cumulative size of all linear partitions before the current rank.
Definition CLinearPartitioner.hpp:107
unsigned long GetRankContainingIndex(unsigned long index) const
Get the rank that owns the index based on the linear partitioning.
Definition CLinearPartitioner.cpp:73
unsigned long GetLastIndexOnRank(int rank) const
Get the last index of the current rank's linear partition.
Definition CLinearPartitioner.hpp:93
unsigned long GetFirstIndexOnRank(int rank) const
Get the first index of the current rank's linear partition.
Definition CLinearPartitioner.hpp:86
unsigned long GetSizeOnRank(int rank) const
Get the total size of the current rank's linear partition.
Definition CLinearPartitioner.hpp:100
Definition CParallelDataSorter.hpp:39
CLinearPartitioner linearPartitioner
Linear partitioner based on the global number of points.
Definition CParallelDataSorter.hpp:92
int * Conn_Tria_Par
Local connectivity of triangle elements.
Definition CParallelDataSorter.hpp:56
virtual void SortConnectivity(CConfig *config, CGeometry *geometry, bool val_sort=true)
Sort the connectivities (volume and surface) into data structures.
Definition CParallelDataSorter.hpp:149
unsigned long * idSend
Send buffer holding global indices that will be send to other processors.
Definition CParallelDataSorter.hpp:107
vector< string > requiredFieldNames
Vector with names of the required output fields that we write to file.
Definition CParallelDataSorter.hpp:112
unsigned short GlobalField_Counter
Number of output fields.
Definition CParallelDataSorter.hpp:94
virtual ~CParallelDataSorter()
Destructor.
Definition CParallelDataSorter.cpp:70
unsigned long GetnLocalPointsBeforeSort() const
Get the number of points to sort.
Definition CParallelDataSorter.hpp:169
unsigned long nConnGlobal
Global size of the connectivity array.
Definition CParallelDataSorter.hpp:87
const passivedouble * GetData() const
Get the pointer to the sorted linear partitioned data.
Definition CParallelDataSorter.hpp:282
array< unsigned long, N_ELEM_TYPES > nElemPerType
Local number of elements after sorting on this proc.
Definition CParallelDataSorter.hpp:64
unsigned long GetnElemGlobal(GEO_TYPE type) const
Get the global number of elements of a specific type \input type - The type of element,...
Definition CParallelDataSorter.hpp:197
unsigned short nDim
Spatial dimension of the data.
Definition CParallelDataSorter.hpp:114
void SetTotalElements()
Set the total number of elements after sorting individual element types.
Definition CParallelDataSorter.cpp:373
virtual unsigned long GetNodeBegin(unsigned short rank) const
Beginning node ID of the linear partition owned by a specific processor. \input rank - the processor ...
Definition CParallelDataSorter.hpp:257
unsigned long GetnConnGlobal() const
Get the global number entries of the connectivity array.
Definition CParallelDataSorter.hpp:213
const vector< string > & GetRequiredFieldNames() const
Get the vector containing the names of the required output fields.
Definition CParallelDataSorter.hpp:348
virtual void SortOutputData()
Sort the output data for each grid node into a linear partitioning across all processors.
Definition CParallelDataSorter.cpp:96
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 iEle...
Definition CParallelDataSorter.cpp:340
unsigned long nGlobalPointBeforeSort
Global number of points without halos before sorting.
Definition CParallelDataSorter.hpp:52
unsigned long nPointsGlobal
Global number of points without halos.
Definition CParallelDataSorter.hpp:85
unsigned long nElemGlobal
Global number of elems without halos.
Definition CParallelDataSorter.hpp:86
unsigned long GetnElemCumulative(unsigned short rank) const
Get the cumulated number of elements \input rank - the processor rank.
Definition CParallelDataSorter.hpp:230
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 fun...
Definition CParallelDataSorter.hpp:319
struct CParallelDataSorter::@88 TypeMap
Map that stores the index for each GEO_TYPE type where to find information in the element arrays.
int * nElem_Send
Number of elements this processor has to send to other processors.
Definition CParallelDataSorter.hpp:100
passivedouble GetData(unsigned short iField, unsigned long iPoint) const
Get the value of the linear partitioned data. \input iField - the output field ID....
Definition CParallelDataSorter.hpp:276
unsigned short GetnDim() const
Get the spatial dimension.
Definition CParallelDataSorter.hpp:364
unsigned long * Index
Index each point has in the send buffer.
Definition CParallelDataSorter.hpp:104
virtual unsigned short FindProcessor(unsigned long iPoint) const
Get the Processor ID a Point belongs to.
Definition CParallelDataSorter.hpp:332
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...
Definition CParallelDataSorter.hpp:188
unsigned long nConn
Local size of the connectivity array.
Definition CParallelDataSorter.hpp:90
const int size
The MPI size, aka the number of processors.
Definition CParallelDataSorter.hpp:50
void SetRequiredFieldNames(const vector< string > &req_field_names)
Set the vector of required output fields.
Definition CParallelDataSorter.hpp:356
unsigned long nLocalPointsBeforeSort
Local number of points without halos before sorting on this proc.
Definition CParallelDataSorter.hpp:53
int * Conn_Pyra_Par
Local connectivity of pyramid elements.
Definition CParallelDataSorter.hpp:61
virtual unsigned long GetnPointCumulative(unsigned short rank) const
Get the cumulated number of points \input rank - the processor rank.
Definition CParallelDataSorter.hpp:296
unsigned long * nElemConn_Send
Number of element connectivity this processor has to send to other processors.
Definition CParallelDataSorter.hpp:102
array< unsigned long, N_ELEM_TYPES > nElemPerTypeGlobal
Global number of elements after sorting on this proc.
Definition CParallelDataSorter.hpp:63
int nSends
Number of sends.
Definition CParallelDataSorter.hpp:108
bool connectivitySorted
Boolean to store information on whether the connectivity is sorted.
Definition CParallelDataSorter.hpp:96
unsigned long * nElemConn_Cum
Cumulative number of element connectivity entries.
Definition CParallelDataSorter.hpp:103
const vector< string > & GetFieldNames() const
Get the vector containing the names of the output fields.
Definition CParallelDataSorter.hpp:340
int nRecvs
Number of receives.
Definition CParallelDataSorter.hpp:109
const int rank
The MPI rank.
Definition CParallelDataSorter.hpp:45
passivedouble GetUnsortedData(unsigned long iPoint, unsigned short iField) const
Definition CParallelDataSorter.hpp:323
unsigned long GetnPointsGlobal() const
Get the global number of points (accumulated from all ranks)
Definition CParallelDataSorter.hpp:175
unsigned long GetnElem() const
Get the global of elements (accumulated from all ranks and element types)
Definition CParallelDataSorter.hpp:181
int * nPoint_Recv
Number of points this processor receives from other processors.
Definition CParallelDataSorter.hpp:99
int * Conn_Quad_Par
Local connectivity of quad elements.
Definition CParallelDataSorter.hpp:57
int * Conn_Line_Par
Local connectivity of line elements.
Definition CParallelDataSorter.hpp:55
bool GetConnectivitySorted() const
Check whether the current connectivity is sorted (i.e. if SortConnectivity has been called)
Definition CParallelDataSorter.hpp:309
passivedouble * dataBuffer
Buffer holding the sorted, partitioned data as passivedouble types.
Definition CParallelDataSorter.hpp:106
passivedouble * connSend
Send buffer holding the data that will be send to other processors.
Definition CParallelDataSorter.hpp:105
int * Conn_Tetr_Par
Local connectivity of tetrahedral elements.
Definition CParallelDataSorter.hpp:58
vector< string > fieldNames
Vector with names of all the output fields.
Definition CParallelDataSorter.hpp:111
virtual unsigned long GetGlobalIndex(unsigned long iPoint) const
Get the global index of a point. \input iPoint - the point ID.
Definition CParallelDataSorter.hpp:289
int * nPoint_Send
Number of points this processor has to send to other processors.
Definition CParallelDataSorter.hpp:98
void PrepareSendBuffers(std::vector< unsigned long > &globalID)
Prepare the send buffers by filling them with the global indices. After calling this function,...
Definition CParallelDataSorter.cpp:242
unsigned long GetnPoints() const
Get the number of points the local rank owns.
Definition CParallelDataSorter.hpp:163
int * Conn_Hexa_Par
Local connectivity of hexahedral elements.
Definition CParallelDataSorter.hpp:59
unsigned long nPoints
Local number of points.
Definition CParallelDataSorter.hpp:88
int * nElem_Cum
Cumulative number of elements.
Definition CParallelDataSorter.hpp:101
unsigned long GetNodeEnd(unsigned short rank) const
Ending node ID of the linear partition owned by a specific processor.
Definition CParallelDataSorter.hpp:266
unsigned long GetnElemConnCumulative(unsigned short rank) const
Get the cumulated number of entries of the connectivity array \input rank - the processor rank.
Definition CParallelDataSorter.hpp:239
unsigned long GetnConn() const
Get the local number entries of the connectivity array.
Definition CParallelDataSorter.hpp:221
unsigned long GetnElemGlobal() const
Get the global number of elements.
Definition CParallelDataSorter.hpp:205
int * Conn_Pris_Par
Local connectivity of prism elements.
Definition CParallelDataSorter.hpp:60
unsigned long GetnPointLinear(unsigned short rank) const
Get the linear number of points \input rank - the processor rank.
Definition CParallelDataSorter.hpp:303
unsigned long nElem
Local number of elements.
Definition CParallelDataSorter.hpp:89
virtual void SortConnectivity(CConfig *config, CGeometry *geometry, const vector< string > &markerList)
Sort the connectivities into data structures (only for surface data sorters).
Definition CParallelDataSorter.hpp:157
double passivedouble
Definition code_config.hpp:129
passivedouble su2double
Definition code_config.hpp:181
passivedouble GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be specialized for active types).
Definition datatype_structure.hpp:113
GEO_TYPE
Types of geometric entities based on VTK nomenclature.
Definition option_structure.hpp:131
@ TRIANGLE
VTK nomenclature for defining a triangle element.
Definition option_structure.hpp:134
@ PYRAMID
VTK nomenclature for defining a pyramid element.
Definition option_structure.hpp:139
@ PRISM
VTK nomenclature for defining a prism element.
Definition option_structure.hpp:138
@ QUADRILATERAL
VTK nomenclature for defining a quadrilateral element.
Definition option_structure.hpp:135
@ HEXAHEDRON
VTK nomenclature for defining a hexahedron element.
Definition option_structure.hpp:137
@ LINE
VTK nomenclature for defining a line element.
Definition option_structure.hpp:133
@ TETRAHEDRON
VTK nomenclature for defining a tetrahedron element.
Definition option_structure.hpp:136