| 1554 | |
| 1555 | |
| 1556 | void Foam::faceCoupleInfo::subDivisionMatch |
| 1557 | ( |
| 1558 | const polyMesh& slaveMesh, |
| 1559 | const bool patchDivision, |
| 1560 | const scalar absTol |
| 1561 | ) |
| 1562 | { |
| 1563 | if (debug) |
| 1564 | { |
| 1565 | Pout<< "subDivisionMatch :" |
| 1566 | << " Matching master and slave to cut." |
| 1567 | << " Slave can be subdivision of master but all master edges" |
| 1568 | << " have to be covered by slave edges." << endl; |
| 1569 | } |
| 1570 | |
| 1571 | // Assume slave patch is subdivision of the master patch so cutFaces is a |
| 1572 | // copy of the slave (but reversed since orientation has to be like master). |
| 1573 | cutPoints_ = slavePatch().localPoints(); |
| 1574 | { |
| 1575 | faceList cutFaces(slavePatch().size()); |
| 1576 | |
| 1577 | forAll(cutFaces, i) |
| 1578 | { |
| 1579 | cutFaces[i] = slavePatch().localFaces()[i].reverseFace(); |
| 1580 | } |
| 1581 | cutFacesPtr_.reset(new primitiveFacePatch(cutFaces, cutPoints_)); |
| 1582 | } |
| 1583 | |
| 1584 | // Cut is copy of slave so addressing to slave is trivial. |
| 1585 | cutToSlaveFaces_ = identity(cutFaces().size()); |
| 1586 | slaveToCutPoints_ = identity(slavePatch().nPoints()); |
| 1587 | |
| 1588 | // Cut edges to slave patch |
| 1589 | labelList cutToSlaveEdges |
| 1590 | ( |
| 1591 | findMappedEdges |
| 1592 | ( |
| 1593 | cutFaces().edges(), |
| 1594 | slaveToCutPoints_, //note:should be cutToSlavePoints but since iden |
| 1595 | slavePatch() |
| 1596 | ) |
| 1597 | ); |
| 1598 | |
| 1599 | |
| 1600 | if (debug) |
| 1601 | { |
| 1602 | OFstream str("regionEdges.obj"); |
| 1603 | |
| 1604 | Pout<< "subDivisionMatch :" |
| 1605 | << " addressing for slave patch fully done." |
| 1606 | << " Dumping region edges to " << str.name() << endl; |
| 1607 | |
| 1608 | label vertI = 0; |
| 1609 | |
| 1610 | forAll(slavePatch().edges(), slaveEdgeI) |
| 1611 | { |
| 1612 | if (regionEdge(slaveMesh, slaveEdgeI)) |
| 1613 | { |
no test coverage detected