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

Function addPatch

src/dynamicMesh/boundaryMesh/boundaryMesh.C:1570–1604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1568
1569
1570void Foam::boundaryMesh::addPatch(const word& patchName)
1571{
1572 patches_.setSize(patches_.size() + 1);
1573
1574 // Add empty patch at end of patch list.
1575
1576 label patchi = patches_.size()-1;
1577
1578 boundaryPatch* bpPtr = new boundaryPatch
1579 (
1580 patchName,
1581 patchi,
1582 0,
1583 mesh().size(),
1584 "empty"
1585 );
1586
1587 patches_.set(patchi, bpPtr);
1588
1589 if (debug)
1590 {
1591 Pout<< "addPatch : patches now:" << endl;
1592
1593 forAll(patches_, patchi)
1594 {
1595 const boundaryPatch& bp = patches_[patchi];
1596
1597 Pout<< " name : " << bp.name() << endl
1598 << " size : " << bp.size() << endl
1599 << " start : " << bp.start() << endl
1600 << " type : " << bp.physicalType() << endl
1601 << endl;
1602 }
1603 }
1604}
1605
1606
1607void Foam::boundaryMesh::deletePatch(const word& patchName)

Callers 2

meshRefinement.CFile · 0.50
fvMeshTools.CFile · 0.50

Calls 8

boundaryPatchClass · 0.85
meshFunction · 0.85
forAllFunction · 0.50
setSizeMethod · 0.45
sizeMethod · 0.45
setMethod · 0.45
nameMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected