Clean-up of code indentation and comments. Author: Hrvoje Jasak. Merge: Dominik Christ.
This commit is contained in:
commit
98ce366827
2 changed files with 36 additions and 27 deletions
|
@ -140,7 +140,6 @@ void meshToMesh::calcAddressing()
|
||||||
|
|
||||||
forAll (toMesh_.boundaryMesh(), patchi)
|
forAll (toMesh_.boundaryMesh(), patchi)
|
||||||
{
|
{
|
||||||
|
|
||||||
const polyPatch& toPatch = toMesh_.boundaryMesh()[patchi];
|
const polyPatch& toPatch = toMesh_.boundaryMesh()[patchi];
|
||||||
|
|
||||||
if (cuttingPatches_.found(toPatch.name()))
|
if (cuttingPatches_.found(toPatch.name()))
|
||||||
|
@ -236,7 +235,7 @@ void meshToMesh::calcAddressing()
|
||||||
|
|
||||||
void meshToMesh::cellAddresses
|
void meshToMesh::cellAddresses
|
||||||
(
|
(
|
||||||
labelList& cellAddressing_,
|
labelList& cellAddr,
|
||||||
const pointField& points,
|
const pointField& points,
|
||||||
const fvMesh& fromMesh,
|
const fvMesh& fromMesh,
|
||||||
const List<bool>& boundaryCell,
|
const List<bool>& boundaryCell,
|
||||||
|
@ -298,12 +297,12 @@ void meshToMesh::cellAddresses
|
||||||
}
|
}
|
||||||
} while (closer);
|
} while (closer);
|
||||||
|
|
||||||
cellAddressing_[toI] = -1;
|
cellAddr[toI] = -1;
|
||||||
|
|
||||||
// Check point is actually in the nearest cell
|
// Check point is actually in the nearest cell
|
||||||
if (fromMesh.pointInCell(p, curCell))
|
if (fromMesh.pointInCell(p, curCell))
|
||||||
{
|
{
|
||||||
cellAddressing_[toI] = curCell;
|
cellAddr[toI] = curCell;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -313,7 +312,7 @@ void meshToMesh::cellAddresses
|
||||||
if (boundaryCell[curCell])
|
if (boundaryCell[curCell])
|
||||||
{
|
{
|
||||||
isBoundary = true;
|
isBoundary = true;
|
||||||
cellAddressing_[toI] = oc.find(p);
|
cellAddr[toI] = oc.find(p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -329,7 +328,7 @@ void meshToMesh::cellAddresses
|
||||||
// If point is in neighbour reset current cell
|
// If point is in neighbour reset current cell
|
||||||
if (fromMesh.pointInCell(p, neighbours[nI]))
|
if (fromMesh.pointInCell(p, neighbours[nI]))
|
||||||
{
|
{
|
||||||
cellAddressing_[toI] = neighbours[nI];
|
cellAddr[toI] = neighbours[nI];
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +352,7 @@ void meshToMesh::cellAddresses
|
||||||
// If point is in neighbour reset current cell
|
// If point is in neighbour reset current cell
|
||||||
if (fromMesh.pointInCell(p, nn[nI]))
|
if (fromMesh.pointInCell(p, nn[nI]))
|
||||||
{
|
{
|
||||||
cellAddressing_[toI] = nn[nI];
|
cellAddr[toI] = nn[nI];
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -365,11 +364,11 @@ void meshToMesh::cellAddresses
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
// Still not found so use the octree
|
// Still not found so use the octree
|
||||||
cellAddressing_[toI] = oc.find(p);
|
cellAddr[toI] = oc.find(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cellAddressing_[toI] < 0)
|
if (cellAddr[toI] < 0)
|
||||||
{
|
{
|
||||||
nCellsOutsideAddressing++;
|
nCellsOutsideAddressing++;
|
||||||
|
|
||||||
|
@ -406,7 +405,7 @@ void meshToMesh::cellAddresses
|
||||||
if (mag(points[toI] - centre) < localTol)
|
if (mag(points[toI] - centre) < localTol)
|
||||||
{
|
{
|
||||||
localTol = mag(points[toI] - centre);
|
localTol = mag(points[toI] - centre);
|
||||||
cellAddressing_[toI] = celli;
|
cellAddr[toI] = celli;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -422,7 +421,7 @@ void meshToMesh::cellAddresses
|
||||||
{
|
{
|
||||||
Info<< "Found " << nCellsOutsideAddressing
|
Info<< "Found " << nCellsOutsideAddressing
|
||||||
<< " cells outside of the addressing" << nl
|
<< " cells outside of the addressing" << nl
|
||||||
<< "Cell addressing size = " << cellAddressing_.size() << endl;
|
<< "Cell addressing size = " << cellAddr.size() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,12 @@ class meshToMesh
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
// mesh references
|
// Mesh references
|
||||||
|
|
||||||
|
//- Source mesh reference - containing data
|
||||||
const fvMesh& fromMesh_;
|
const fvMesh& fromMesh_;
|
||||||
|
|
||||||
|
//- Target mesh reference - mapping target
|
||||||
const fvMesh& toMesh_;
|
const fvMesh& toMesh_;
|
||||||
|
|
||||||
//- fromMesh patch labels
|
//- fromMesh patch labels
|
||||||
|
@ -91,21 +94,29 @@ class meshToMesh
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
void calcAddressing();
|
// Access
|
||||||
|
|
||||||
void cellAddresses
|
//- Return addressing
|
||||||
(
|
void cellAddresses
|
||||||
labelList& cells,
|
(
|
||||||
const pointField& points,
|
labelList& cells,
|
||||||
const fvMesh& fromMesh,
|
const pointField& points,
|
||||||
const List<bool>& boundaryCell,
|
const fvMesh& fromMesh,
|
||||||
const octree<octreeDataCell>& oc,
|
const List<bool>& boundaryCell,
|
||||||
bool forceFind = false
|
const octree<octreeDataCell>& oc,
|
||||||
) const;
|
bool forceFind = false
|
||||||
|
) const;
|
||||||
|
|
||||||
void calculateInverseDistanceWeights() const;
|
//- Return inverse distance weights
|
||||||
|
const scalarListList& inverseDistanceWeights() const;
|
||||||
|
|
||||||
const scalarListList& inverseDistanceWeights() const;
|
// Data calculation functions
|
||||||
|
|
||||||
|
//- Calculate weights
|
||||||
|
void calculateInverseDistanceWeights() const;
|
||||||
|
|
||||||
|
//- Calculate addressing
|
||||||
|
void calcAddressing();
|
||||||
|
|
||||||
|
|
||||||
// Private static data members
|
// Private static data members
|
||||||
|
@ -154,9 +165,8 @@ public:
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~meshToMesh();
|
||||||
~meshToMesh();
|
|
||||||
|
|
||||||
|
|
||||||
//- Patch-field interpolation class
|
//- Patch-field interpolation class
|
||||||
|
|
Reference in a new issue