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

Function main

applications/utilities/mesh/advanced/splitCells/splitCells.C:520–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518
519
520int main(int argc, char *argv[])
521{
522 argList::addNote
523 (
524 "split cells with flat faces"
525 );
526 #include "addOverwriteOption.H"
527 argList::noParallel();
528 argList::validArgs.append("edgeAngle [0..360]");
529
530 argList::addOption
531 (
532 "set",
533 "name",
534 "split cells from specified cellSet only"
535 );
536 argList::addBoolOption
537 (
538 "geometry",
539 "use geometric cut for hexes as well"
540 );
541 argList::addOption
542 (
543 "tol",
544 "scalar", "edge snap tolerance (default 0.2)"
545 );
546
547 #include "setRootCase.H"
548 #include "createTime.H"
549 runTime.functionObjects().off();
550 #include "createPolyMesh.H"
551 const word oldInstance = mesh.pointsInstance();
552
553 const scalar featureAngle = args.argRead<scalar>(1);
554 const scalar minCos = Foam::cos(degToRad(featureAngle));
555 const scalar minSin = Foam::sin(degToRad(featureAngle));
556
557 const bool readSet = args.optionFound("set");
558 const bool geometry = args.optionFound("geometry");
559 const bool overwrite = args.optionFound("overwrite");
560
561 const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
562
563 Info<< "Trying to split cells with internal angles > feature angle\n" << nl
564 << "featureAngle : " << featureAngle << nl
565 << "edge snapping tol : " << edgeTol << nl;
566 if (readSet)
567 {
568 Info<< "candidate cells : cellSet " << args["set"] << nl;
569 }
570 else
571 {
572 Info<< "candidate cells : all cells" << nl;
573 }
574 if (geometry)
575 {
576 Info<< "hex cuts : geometric; using edge tolerance" << nl;
577 }

Callers

nothing calls this directly

Calls 15

addNoteFunction · 0.85
noParallelFunction · 0.85
addOptionFunction · 0.85
addBoolOptionFunction · 0.85
degToRadFunction · 0.85
collectCutsFunction · 0.85
optionFoundMethod · 0.80
optionLookupOrDefaultMethod · 0.80
nLoopsMethod · 0.80
eraseMethod · 0.80
setRefinementMethod · 0.80
hasMotionPointsMethod · 0.80

Tested by

no test coverage detected