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

Function read

src/dynamicMesh/boundaryMesh/boundaryMesh.C:472–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
471
472void Foam::boundaryMesh::read(const polyMesh& mesh)
473{
474 patches_.clear();
475
476 patches_.setSize(mesh.boundaryMesh().size());
477
478 // Number of boundary faces
479 label nBFaces = mesh.nFaces() - mesh.nInternalFaces();
480
481 faceList bFaces(nBFaces);
482
483 meshFace_.setSize(nBFaces);
484
485 label bFacei = 0;
486
487 // Collect all boundary faces.
488 forAll(mesh.boundaryMesh(), patchi)
489 {
490 const polyPatch& pp = mesh.boundaryMesh()[patchi];
491
492 patches_.set
493 (
494 patchi,
495 new boundaryPatch
496 (
497 pp.name(),
498 patchi,
499 pp.size(),
500 bFacei,
501 pp.type()
502 )
503 );
504
505 // Collect all faces in global numbering.
506 forAll(pp, patchFacei)
507 {
508 meshFace_[bFacei] = pp.start() + patchFacei;
509
510 bFaces[bFacei] = pp[patchFacei];
511
512 bFacei++;
513 }
514 }
515
516
517 if (debug)
518 {
519 Pout<< "read : patches now:" << endl;
520
521 forAll(patches_, patchi)
522 {
523 const boundaryPatch& bp = patches_[patchi];
524
525 Pout<< " name : " << bp.name() << endl
526 << " size : " << bp.size() << endl
527 << " start : " << bp.start() << endl
528 << " type : " << bp.physicalType() << endl
529 << endl;

Callers

nothing calls this directly

Calls 15

boundaryPatchClass · 0.85
localPointsMethod · 0.80
clearOutFunction · 0.70
forAllFunction · 0.50
clearMethod · 0.45
setSizeMethod · 0.45
sizeMethod · 0.45
nFacesMethod · 0.45
nInternalFacesMethod · 0.45
setMethod · 0.45
nameMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected