mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial state after latest Foundation merge
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -138,41 +138,41 @@ void cutBySurface
|
||||
// Is a bit of a hack but allows us to reuse all the functionality
|
||||
// in cellClassification.
|
||||
|
||||
forAll(cellType, cellI)
|
||||
forAll(cellType, celli)
|
||||
{
|
||||
label cType = cellType[cellI];
|
||||
label cType = cellType[celli];
|
||||
|
||||
if (cType == cellClassification::CUT)
|
||||
{
|
||||
if (selectCut)
|
||||
{
|
||||
cellType[cellI] = MESH;
|
||||
cellType[celli] = MESH;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellType[cellI] = NONMESH;
|
||||
cellType[celli] = NONMESH;
|
||||
}
|
||||
}
|
||||
else if (cType == cellClassification::INSIDE)
|
||||
{
|
||||
if (selectInside)
|
||||
{
|
||||
cellType[cellI] = MESH;
|
||||
cellType[celli] = MESH;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellType[cellI] = NONMESH;
|
||||
cellType[celli] = NONMESH;
|
||||
}
|
||||
}
|
||||
else if (cType == cellClassification::OUTSIDE)
|
||||
{
|
||||
if (selectOutside)
|
||||
{
|
||||
cellType[cellI] = MESH;
|
||||
cellType[celli] = MESH;
|
||||
}
|
||||
else
|
||||
{
|
||||
cellType[cellI] = NONMESH;
|
||||
cellType[celli] = NONMESH;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -195,15 +195,15 @@ void cutBySurface
|
||||
|
||||
label nRemoved = 0;
|
||||
|
||||
forAll(pts, pointI)
|
||||
forAll(pts, pointi)
|
||||
{
|
||||
const point& pt = pts[pointI];
|
||||
const point& pt = pts[pointi];
|
||||
|
||||
pointIndexHit hitInfo = tree.findNearest(pt, sqr(nearDist));
|
||||
|
||||
if (hitInfo.hit())
|
||||
{
|
||||
const labelList& pCells = mesh.pointCells()[pointI];
|
||||
const labelList& pCells = mesh.pointCells()[pointi];
|
||||
|
||||
forAll(pCells, i)
|
||||
{
|
||||
@ -221,11 +221,11 @@ void cutBySurface
|
||||
//
|
||||
// label nRemoved = 0;
|
||||
//
|
||||
// forAll(nearest, pointI)
|
||||
// forAll(nearest, pointi)
|
||||
// {
|
||||
// if (mag(nearest[pointI] - pts[pointI]) < nearDist)
|
||||
// if (mag(nearest[pointi] - pts[pointi]) < nearDist)
|
||||
// {
|
||||
// const labelList& pCells = mesh.pointCells()[pointI];
|
||||
// const labelList& pCells = mesh.pointCells()[pointi];
|
||||
//
|
||||
// forAll(pCells, i)
|
||||
// {
|
||||
@ -272,27 +272,27 @@ label selectOutsideCells
|
||||
forAll(outsidePts, outsidePtI)
|
||||
{
|
||||
// Find cell containing point. Linear search.
|
||||
label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
|
||||
label celli = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
|
||||
|
||||
if (cellI != -1 && cellType[cellI] == MESH)
|
||||
if (celli != -1 && cellType[celli] == MESH)
|
||||
{
|
||||
Info<< "Marking cell " << cellI << " containing outside point "
|
||||
<< outsidePts[outsidePtI] << " with type " << cellType[cellI]
|
||||
Info<< "Marking cell " << celli << " containing outside point "
|
||||
<< outsidePts[outsidePtI] << " with type " << cellType[celli]
|
||||
<< " ..." << endl;
|
||||
|
||||
//
|
||||
// Mark this cell and its faces to start walking from
|
||||
//
|
||||
|
||||
// Mark faces of cellI
|
||||
const labelList& cFaces = mesh.cells()[cellI];
|
||||
// Mark faces of celli
|
||||
const labelList& cFaces = mesh.cells()[celli];
|
||||
forAll(cFaces, i)
|
||||
{
|
||||
label faceI = cFaces[i];
|
||||
label facei = cFaces[i];
|
||||
|
||||
if (outsideFacesMap.insert(faceI))
|
||||
if (outsideFacesMap.insert(facei))
|
||||
{
|
||||
outsideFaces.append(faceI);
|
||||
outsideFaces.append(facei);
|
||||
outsideFacesInfo.append(meshInfo);
|
||||
}
|
||||
}
|
||||
@ -314,15 +314,15 @@ label selectOutsideCells
|
||||
|
||||
label nChanged = 0;
|
||||
|
||||
forAll(allCellInfo, cellI)
|
||||
forAll(allCellInfo, celli)
|
||||
{
|
||||
if (cellType[cellI] == MESH)
|
||||
if (cellType[celli] == MESH)
|
||||
{
|
||||
// Original cell was selected for meshing. Check if cell was
|
||||
// reached from outsidePoints
|
||||
if (allCellInfo[cellI].type() != MESH)
|
||||
if (allCellInfo[celli].type() != MESH)
|
||||
{
|
||||
cellType[cellI] = NONMESH;
|
||||
cellType[celli] = NONMESH;
|
||||
nChanged++;
|
||||
}
|
||||
}
|
||||
@ -393,8 +393,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const point& outsidePoint = outsidePts[outsideI];
|
||||
|
||||
label cellI = queryMesh.findCell(outsidePoint, -1, false);
|
||||
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||
label celli = queryMesh.findCell(outsidePoint, -1, false);
|
||||
if (returnReduce(celli, maxOp<label>()) == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "outsidePoint " << outsidePoint
|
||||
@ -417,9 +417,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Surface
|
||||
autoPtr<triSurface> surf(NULL);
|
||||
autoPtr<triSurface> surf(nullptr);
|
||||
// Search engine on surface.
|
||||
autoPtr<triSurfaceSearch> querySurf(NULL);
|
||||
autoPtr<triSurfaceSearch> querySurf(nullptr);
|
||||
|
||||
if (useSurface)
|
||||
{
|
||||
@ -431,7 +431,7 @@ int main(int argc, char *argv[])
|
||||
// Search engine on surface.
|
||||
querySurf.reset(new triSurfaceSearch(surf));
|
||||
|
||||
// Set cellType[cellI] according to relation to surface
|
||||
// Set cellType[celli] according to relation to surface
|
||||
cutBySurface
|
||||
(
|
||||
mesh,
|
||||
|
||||
Reference in New Issue
Block a user