/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | cfMesh: A library for mesh generation
\\ / O peration |
\\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
\\/ M anipulation | Copyright (C) Creative Fields, Ltd.
-------------------------------------------------------------------------------
License
This file is part of cfMesh.
cfMesh is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
cfMesh is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with cfMesh. If not, see .
Description
\*---------------------------------------------------------------------------*/
#include "checkNonMappableCellConnections.H"
#include "polyMeshGenModifier.H"
#include "helperFunctions.H"
#include "meshSurfaceEngine.H"
# ifdef USE_OMP
#include
# endif
//#define DEBUGCheck
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * Private member functions * * * * * * * * * * * * * * * //
void checkNonMappableCellConnections::findCellTypes()
{
const faceListPMG& faces = mesh_.faces();
const cellListPMG& cells = mesh_.cells();
const labelList& owner = mesh_.owner();
cellType_.setSize(cells.size());
cellType_ = INTERNALCELL;
//- find boundary cells
const PtrList& boundaries = mesh_.boundaries();
forAll(boundaries, patchI)
{
const label start = boundaries[patchI].patchStart();
const label end = start + boundaries[patchI].patchSize();
for(label faceI=start;faceI=0;--cellI)
{
if( cellType_[cellI] & INTERNALCELL )
continue;
const cell& c = cells[cellI];
//- mark boundary cells with all vertices at the boundary
const labelList cellPoints = c.labels(faces);
bool allBoundary(true);
forAll(cellPoints, cpI)
{
if( bp[cellPoints[cpI]] < 0 )
{
allBoundary = false;
break;
}
}
if( allBoundary )
{
cellType_[cellI] |= ALLBNDVERTEXCELL;
}
else
{
continue;
}
//- check if the internal faces are connected into a single group
//- over their edges
DynList