MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / perfectPointMatch

Function perfectPointMatch

src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C:1425–1553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423
1424
1425void 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(),

Callers 1

faceCoupleInfo.CFile · 0.85

Calls 10

matchPointsFunction · 0.85
matchPointsThroughFacesFunction · 0.85
localPointsMethod · 0.80
abortFunction · 0.50
reorderFunction · 0.50
forAllFunction · 0.50
renumberFunction · 0.50
sizeMethod · 0.45
resetMethod · 0.45
pointsMethod · 0.45

Tested by

no test coverage detected