Go to the documentation of this file.
43 const bool removeProcFaces
46 Info <<
"Removing selected cells from the mesh" <<
endl;
56 Info <<
"Size of list for removal " << removeCell.
size() <<
endl;
59 "void polyMeshGenModifier::removeCells(const boolList& removeCell)"
60 ) <<
"Incorrect number of entries in removeCell list!"
66 const labelList& neighbour = mesh_.neighbour();
69 # pragma omp parallel for schedule(dynamic, 40)
73 if( neighbour[faceI] == -1 )
79 if( removeCell[owner[faceI]] && !removeCell[neighbour[faceI]] )
80 faces[faceI] = faces[faceI].reverseFace();
88 forAll(newCellLabel, cellI)
89 if( !removeCell[cellI] )
90 newCellLabel[cellI] = nCells++;
93 if( (newCellLabel[cellI] != -1) && (newCellLabel[cellI] < cellI) )
101 mesh_.updateCellSubsets(newCellLabel);
104 Info <<
"New cells size " << nCells <<
endl;
108 this->reorderBoundaryFaces();
115 # pragma omp parallel if( cells.size() > 1000 )
119 # pragma omp for schedule(dynamic, 40)
126 removeFace[
c[fI]] =
false;
132 mesh_.procBoundaries_;
137 for(
label fI=procBoundaries[0].patchStart();fI<faces.
size();++fI)
138 removeFace[fI] =
false;
146 Info <<
"Finished removing selected cells from the mesh" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
static bool & parRun()
Is this a parallel run?
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Given list of faces to remove insert all the topology changes. Contains helper function to get consis...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.
label size() const
return the number of used elements
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
A cell is defined as a list of faces with extra functionality.
void removeCells(const boolList &removeCell, const bool removeProcFaces=true)
remove cells