@@ -267,14 +267,14 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
267267 map<int , int > rankToIndCommBuf;
268268 for (int i = 0 ; i < size; ++i) {
269269 if (sendToRank[i]) {
270- int ind = ( int ) rankToIndCommBuf.size ();
270+ int ind = static_cast < int >( rankToIndCommBuf.size () );
271271 rankToIndCommBuf[i] = ind;
272272 }
273273 }
274274
275275 /* --- Definition of the communication buffers, used to send the element data
276276 to the correct ranks. ---*/
277- int nRankSend = ( int ) rankToIndCommBuf.size ();
277+ int nRankSend = static_cast < int >( rankToIndCommBuf.size () );
278278 vector<vector<short > > shortSendBuf (nRankSend, vector<short >(0 ));
279279 vector<vector<long > > longSendBuf (nRankSend, vector<long >(0 ));
280280 vector<vector<su2double> > doubleSendBuf (nRankSend, vector<su2double>(0 ));
@@ -294,7 +294,7 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
294294
295295 /* --- Loop over the local elements to fill the communication buffers with element data. ---*/
296296 for (unsigned long i = 0 ; i < geometry->GetnElem (); ++i) {
297- int ind = ( int ) geometry->elem [i]->GetColor ();
297+ int ind = static_cast < int >( geometry->elem [i]->GetColor () );
298298 map<int , int >::const_iterator MI = rankToIndCommBuf.find (ind);
299299 ind = MI->second ;
300300
@@ -385,7 +385,7 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
385385 /* Determine to which rank this boundary element must be sent.
386386 That is the same as its corresponding domain element.
387387 Update the corresponding index in longSendBuf. */
388- int ind = ( int ) geometry->elem [elemID]->GetColor ();
388+ int ind = static_cast < int >( geometry->elem [elemID]->GetColor () );
389389 const auto MI = rankToIndCommBuf.find (ind);
390390 ind = MI->second ;
391391
@@ -566,8 +566,8 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
566566 the elements with constant and non-constant Jacobians are
567567 considered the same. */
568568 if (JacConstant) {
569- const auto orderExactStraight = ( unsigned short ) ceil (nPolySol * config->GetQuadrature_Factor_Straight ());
570- const auto orderExactCurved = ( unsigned short ) ceil (nPolySol * config->GetQuadrature_Factor_Curved ());
569+ const auto orderExactStraight = static_cast < unsigned short >( ceil (nPolySol * config->GetQuadrature_Factor_Straight () ));
570+ const auto orderExactCurved = static_cast < unsigned short >( ceil (nPolySol * config->GetQuadrature_Factor_Curved () ));
571571 if (orderExactStraight == orderExactCurved) JacConstant = false ;
572572 }
573573
@@ -691,14 +691,14 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
691691 rankToIndCommBuf.clear ();
692692 for (int i = 0 ; i < size; ++i) {
693693 if (sendToRank[i]) {
694- int ind = ( int ) rankToIndCommBuf.size ();
694+ int ind = static_cast < int >( rankToIndCommBuf.size () );
695695 rankToIndCommBuf[i] = ind;
696696 }
697697 }
698698
699699 /* Resize the first index of the long send buffers for the communication of
700700 the halo data. */
701- nRankSend = ( int ) rankToIndCommBuf.size ();
701+ nRankSend = static_cast < int >( rankToIndCommBuf.size () );
702702 longSendBuf.resize (nRankSend);
703703
704704 /* Determine the number of ranks, from which this rank will receive elements. */
@@ -717,7 +717,7 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
717717 if (*low > haloElements[i].long0 ) --ind;
718718
719719 /* Convert this rank to the index in the send buffer. */
720- MI = rankToIndCommBuf.find (( int ) ind);
720+ MI = rankToIndCommBuf.find (static_cast < int >( ind) );
721721 ind = MI->second ;
722722
723723 /* Store the global element ID and the periodic index in the long buffer.
@@ -911,12 +911,12 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
911911 for (int i = 0 ; i < size; ++i) {
912912 if (nHaloElemPerRank[i + 1 ] > nHaloElemPerRank[i]) {
913913 sendToRank[i] = 1 ;
914- int ind = ( int ) rankToIndCommBuf.size ();
914+ int ind = static_cast < int >( rankToIndCommBuf.size () );
915915 rankToIndCommBuf[i] = ind;
916916 }
917917 }
918918
919- nRankSend = ( int ) rankToIndCommBuf.size ();
919+ nRankSend = static_cast < int >( rankToIndCommBuf.size () );
920920
921921 /* Store the value of nRankSend for later use. */
922922 const int nRankSendHaloInfo = nRankSend;
@@ -1179,7 +1179,7 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
11791179 /* --- Create the graph of local elements. The halo elements are ignored. ---*/
11801180 vector<vector<unsigned long > > neighElem (nVolElemOwned, vector<unsigned long >(0 ));
11811181
1182- nRankRecv = ( int ) longRecvBuf.size ();
1182+ nRankRecv = static_cast < int >( longRecvBuf.size () );
11831183 for (int i = 0 ; i < nRankRecv; ++i) {
11841184 unsigned long indL = 1 , indS = 0 ;
11851185 for (long j = 0 ; j < longRecvBuf[i][0 ]; ++j) {
@@ -1452,7 +1452,7 @@ CMeshFEM::CMeshFEM(CGeometry* geometry, CConfig* config) {
14521452 /* --- Resize the first index of the send buffers to nRankRecv, because this
14531453 number of messages must be sent back to the sending ranks with halo
14541454 information. ---*/
1455- nRankRecv = ( int ) longSecondRecvBuf.size ();
1455+ nRankRecv = static_cast < int >( longSecondRecvBuf.size () );
14561456 shortSendBuf.resize (nRankRecv);
14571457 longSendBuf.resize (nRankRecv);
14581458 doubleSendBuf.resize (nRankRecv);
@@ -2455,12 +2455,12 @@ void CMeshFEM_DG::CreateFaces(CConfig* config) {
24552455 is set to false. Hence it is only needed to carry out this check for faces
24562456 with a constant Jacobian. This is done to reduce the number of standard elements. */
24572457 if (thisFace.JacFaceIsConsideredConstant ) {
2458- auto orderExactStraight = ( unsigned short ) ceil (thisFace.nPolyGrid0 * config->GetQuadrature_Factor_Straight ());
2459- auto orderExactCurved = ( unsigned short ) ceil (thisFace.nPolyGrid0 * config->GetQuadrature_Factor_Curved ());
2458+ auto orderExactStraight = static_cast < unsigned short >( ceil (thisFace.nPolyGrid0 * config->GetQuadrature_Factor_Straight () ));
2459+ auto orderExactCurved = static_cast < unsigned short >( ceil (thisFace.nPolyGrid0 * config->GetQuadrature_Factor_Curved () ));
24602460
24612461 if (orderExactStraight == orderExactCurved) {
2462- orderExactStraight = ( unsigned short ) ceil (thisFace.nPolySol0 * config->GetQuadrature_Factor_Straight ());
2463- orderExactCurved = ( unsigned short ) ceil (thisFace.nPolySol0 * config->GetQuadrature_Factor_Curved ());
2462+ orderExactStraight = static_cast < unsigned short >( ceil (thisFace.nPolySol0 * config->GetQuadrature_Factor_Straight () ));
2463+ orderExactCurved = static_cast < unsigned short >( ceil (thisFace.nPolySol0 * config->GetQuadrature_Factor_Curved () ));
24642464 if (orderExactStraight == orderExactCurved) thisFace.JacFaceIsConsideredConstant = false ;
24652465 }
24662466 }
@@ -3159,7 +3159,7 @@ void CMeshFEM_DG::SetSendReceive(const CConfig* config) {
31593159 map<int , int > rankToIndRecvBuf;
31603160 for (int i = 0 ; i < size; ++i) {
31613161 if (recvFromRank[i]) {
3162- int ind = ( int ) rankToIndRecvBuf.size ();
3162+ int ind = static_cast < int >( rankToIndRecvBuf.size () );
31633163 rankToIndRecvBuf[i] = ind;
31643164 }
31653165 }
0 commit comments