@@ -326,54 +326,50 @@ namespace {
326326
327327 if (interFace .map_flag != MapType ::FILE_ORDER && !node_map .empty ()) {
328328 for (size_t e = 0 ; is_same && e < num_element ; ++ e ) {
329- for (size_t n = 0 ; is_same && n < nnpe ; ++ n ) {
330- if (node_map [conn1 [e * nnpe + n ] - 1 ] + 1 != conn2 [e * nnpe + n ]) {
331- bool permuted = false;
332- if (interFace .allowPermutation ) {
333- // Mismatch in ordered connectivity for this element... See if a permutation
334- // matches...
335- std ::vector < INT > e1_conn (nnpe );
336- for (size_t i = 0 ; i < nnpe ; i ++ ) {
337- e1_conn [i ] = node_map [conn1 [e * nnpe + i ] - 1 ] + 1 ;
338- }
339- permuted = std ::is_permutation (e1_conn .begin (), e1_conn .end (), & conn2 [e ],
340- & conn2 [e + nnpe ]);
341- }
342- if (!permuted ) {
343- std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
344- Warning (fmt ::format (
345- ".. Connectivities in block id {} are not the same{}.\n"
346- " First difference is node {} of local element {}\n" ,
347- block1 -> Id (), permit_permute , n + 1 , e + 1 ));
348- is_same = false;
349- break ;
350- }
351- }
352- }
329+ for (size_t n = 0 ; is_same && n < nnpe ; ++ n ) {
330+ if (node_map [conn1 [e * nnpe + n ] - 1 ] + 1 != conn2 [e * nnpe + n ]) {
331+ bool permuted = false;
332+ if (interFace .allowPermutation ) {
333+ // Mismatch in ordered connectivity for this element... See if a permutation matches...
334+ std ::vector < INT > e1_conn (nnpe );
335+ for (size_t i = 0 ; i < nnpe ; i ++ ) {
336+ e1_conn [i ] = node_map [conn1 [e * nnpe + i ] - 1 ] + 1 ;
337+ }
338+ permuted = std ::is_permutation (e1_conn .begin (), e1_conn .end (), & conn2 [e ], & conn2 [e + nnpe ]);
339+ }
340+ if (!permuted ) {
341+ const std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
342+ Warning (
343+ fmt ::format (fmt ::runtime (".. Connectivities in block id {} are not the same{}.\n"
344+ " First difference is node {} of local element {}\n" ),
345+ block1 -> Id (), permit_permute , n + 1 , e + 1 ));
346+ is_same = false;
347+ break ;
348+ }
349+ }
350+ }
353351 }
354352 }
355353 else {
356354 for (size_t e = 0 ; is_same && e < num_element ; ++ e ) {
357- for (size_t n = 0 ; is_same && n < nnpe ; ++ n ) {
358- if (conn1 [e * nnpe + n ] != conn2 [e * nnpe + n ]) {
359- bool permuted = false;
360- if (interFace .allowPermutation ) {
361- // Mismatch in ordered connectivity for this element... See if a permutation
362- // matches...
363- permuted = std ::is_permutation (& conn1 [e * nnpe ], & conn1 [e * nnpe + nnpe ],
364- & conn2 [e * nnpe ], & conn2 [e * nnpe + nnpe ]);
365- }
366- if (!permuted ) {
367- std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
368- Warning (fmt ::format (
369- ".. Connectivities in block id {} are not the same{}.\n"
370- " First difference is node {} of local element {}\n" ,
371- block1 -> Id (), permit_permute , n + 1 , e + 1 ));
372- is_same = false;
373- break ;
374- }
375- }
376- }
355+ for (size_t n = 0 ; is_same && n < nnpe ; ++ n ) {
356+ if (conn1 [e * nnpe + n ] != conn2 [e * nnpe + n ]) {
357+ bool permuted = false;
358+ if (interFace .allowPermutation ) {
359+ // Mismatch in ordered connectivity for this element... See if a permutation matches...
360+ permuted = std ::is_permutation (& conn1 [e * nnpe ], & conn1 [e * nnpe + nnpe ], & conn2 [e * nnpe ], & conn2 [e * nnpe + nnpe ]);
361+ }
362+ if (!permuted ) {
363+ const std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
364+ Warning (
365+ fmt ::format (fmt ::runtime (".. Connectivities in block id {} are not the same{}.\n"
366+ " First difference is node {} of local element {}\n" ),
367+ block1 -> Id (), permit_permute , n + 1 , e + 1 ));
368+ is_same = false;
369+ break ;
370+ }
371+ }
372+ }
377373 }
378374 }
379375 }
@@ -392,30 +388,28 @@ namespace {
392388 auto n1 = conn1 [off1 ];
393389 auto map_n1 = node_map .empty () ? n1 : node_map [n1 - 1 ] + 1 ;
394390 if (map_n1 != conn2 [off2 ]) {
395- bool permuted = false;
396- if (interFace .allowPermutation ) {
397- // Mismatch in ordered connectivity for this element... See if a permutation
398- // matches...
399- std ::vector < INT > e1_conn (nnpe );
400- for (size_t i = 0 ; i < nnpe ; i ++ ) {
401- n1 = conn1 [off1 ];
402- map_n1 = node_map .empty () ? n1 : node_map [n1 - 1 ] + 1 ;
403- e1_conn [i ] = map_n1 ;
404- }
405- permuted = std ::is_permutation (e1_conn .begin (), e1_conn .end (), & conn2 [e2 * nnpe ],
406- & conn2 [e2 * nnpe + nnpe ]);
407- }
408- if (!permuted ) {
409- std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
410- Warning (fmt ::format (
411- ".. Connectivities in block id {} are not the same{}.\n"
412- " First difference is node {} of local element {} "
413- "(file1) {} (file2)\n" ,
414- block1 -> Id (), n + 1 , e1 + 1 , e2 + 1 ));
415- is_same = false;
416- break ;
417- }
418- }
391+ bool permuted = false;
392+ if (interFace .allowPermutation ) {
393+ // Mismatch in ordered connectivity for this element... See if a permutation matches...
394+ std ::vector < INT > e1_conn (nnpe );
395+ for (size_t i = 0 ; i < nnpe ; i ++ ) {
396+ n1 = conn1 [off1 ];
397+ map_n1 = node_map .empty () ? n1 : node_map [n1 - 1 ] + 1 ;
398+ e1_conn [i ] = map_n1 ;
399+ }
400+ permuted = std ::is_permutation (e1_conn .begin (), e1_conn .end (), & conn2 [e2 * nnpe ], & conn2 [e2 * nnpe + nnpe ]);
401+ }
402+ if (!permuted ) {
403+ const std ::string permit_permute = interFace .allowPermutation ? " (or permuted)" : "" ;
404+ Warning (
405+ fmt ::format (fmt ::runtime (".. Connectivities in block id {} are not the same{}.\n"
406+ " First difference is node {} of local element {} "
407+ "(file1) {} (file2)\n" ),
408+ block1 -> Id (), n + 1 , e1 + 1 , e2 + 1 ));
409+ is_same = false;
410+ break ;
411+ }
412+ }
419413 }
420414 }
421415 }
0 commit comments