| 1423 | |
| 1424 | |
| 1425 | void Foam::faceCoupleInfo::perfectPointMatch |
| 1426 | ( |
| 1427 | const scalar absTol, |
| 1428 | const bool slaveFacesOrdered |
| 1429 | ) |
| 1430 | { |
| 1431 | // Calculate the set of cut faces inbetween master and slave patch assuming |
| 1432 | // perfect match (and optional face ordering on slave) |
| 1433 | |
| 1434 | if (debug) |
| 1435 | { |
| 1436 | Pout<< "perfectPointMatch :" |
| 1437 | << " Matching master and slave to cut." |
| 1438 | << " Master and slave faces are identical" << nl; |
| 1439 | |
| 1440 | if (slaveFacesOrdered) |
| 1441 | { |
| 1442 | Pout<< "and master and slave faces are ordered" |
| 1443 | << " (on coupled patches)" << endl; |
| 1444 | } |
| 1445 | else |
| 1446 | { |
| 1447 | Pout<< "and master and slave faces are not ordered" |
| 1448 | << " (on coupled patches)" << endl; |
| 1449 | } |
| 1450 | } |
| 1451 | |
| 1452 | cutToMasterFaces_ = identity(masterPatch().size()); |
| 1453 | cutPoints_ = masterPatch().localPoints(); |
| 1454 | cutFacesPtr_.reset |
| 1455 | ( |
| 1456 | new primitiveFacePatch |
| 1457 | ( |
| 1458 | masterPatch().localFaces(), |
| 1459 | cutPoints_ |
| 1460 | ) |
| 1461 | ); |
| 1462 | masterToCutPoints_ = identity(cutPoints_.size()); |
| 1463 | |
| 1464 | |
| 1465 | // Cut faces to slave patch. |
| 1466 | bool matchedAllFaces = false; |
| 1467 | |
| 1468 | if (slaveFacesOrdered) |
| 1469 | { |
| 1470 | cutToSlaveFaces_ = identity(cutFaces().size()); |
| 1471 | matchedAllFaces = (cutFaces().size() == slavePatch().size()); |
| 1472 | } |
| 1473 | else |
| 1474 | { |
| 1475 | // Faces do not have to be ordered (but all have |
| 1476 | // to match). Note: Faces will be already ordered if we enter here from |
| 1477 | // construct from meshes. |
| 1478 | matchedAllFaces = matchPoints |
| 1479 | ( |
| 1480 | calcFaceCentres<List> |
| 1481 | ( |
| 1482 | cutFaces(), |
no test coverage detected