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)
|
||||
{
|
||||
|
||||
const polyPatch& toPatch = toMesh_.boundaryMesh()[patchi];
|
||||
|
||||
if (cuttingPatches_.found(toPatch.name()))
|
||||
|
@ -236,7 +235,7 @@ void meshToMesh::calcAddressing()
|
|||
|
||||
void meshToMesh::cellAddresses
|
||||
(
|
||||
labelList& cellAddressing_,
|
||||
labelList& cellAddr,
|
||||
const pointField& points,
|
||||
const fvMesh& fromMesh,
|
||||
const List<bool>& boundaryCell,
|
||||
|
@ -298,12 +297,12 @@ void meshToMesh::cellAddresses
|
|||
}
|
||||
} while (closer);
|
||||
|
||||
cellAddressing_[toI] = -1;
|
||||
cellAddr[toI] = -1;
|
||||
|
||||
// Check point is actually in the nearest cell
|
||||
if (fromMesh.pointInCell(p, curCell))
|
||||
{
|
||||
cellAddressing_[toI] = curCell;
|
||||
cellAddr[toI] = curCell;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -313,7 +312,7 @@ void meshToMesh::cellAddresses
|
|||
if (boundaryCell[curCell])
|
||||
{
|
||||
isBoundary = true;
|
||||
cellAddressing_[toI] = oc.find(p);
|
||||
cellAddr[toI] = oc.find(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -329,7 +328,7 @@ void meshToMesh::cellAddresses
|
|||
// If point is in neighbour reset current cell
|
||||
if (fromMesh.pointInCell(p, neighbours[nI]))
|
||||
{
|
||||
cellAddressing_[toI] = neighbours[nI];
|
||||
cellAddr[toI] = neighbours[nI];
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
@ -353,7 +352,7 @@ void meshToMesh::cellAddresses
|
|||
// If point is in neighbour reset current cell
|
||||
if (fromMesh.pointInCell(p, nn[nI]))
|
||||
{
|
||||
cellAddressing_[toI] = nn[nI];
|
||||
cellAddr[toI] = nn[nI];
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
@ -365,11 +364,11 @@ void meshToMesh::cellAddresses
|
|||
if (!found)
|
||||
{
|
||||
// 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++;
|
||||
|
||||
|
@ -406,7 +405,7 @@ void meshToMesh::cellAddresses
|
|||
if (mag(points[toI] - centre) < localTol)
|
||||
{
|
||||
localTol = mag(points[toI] - centre);
|
||||
cellAddressing_[toI] = celli;
|
||||
cellAddr[toI] = celli;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -422,7 +421,7 @@ void meshToMesh::cellAddresses
|
|||
{
|
||||
Info<< "Found " << nCellsOutsideAddressing
|
||||
<< " 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
|
||||
|
||||
// mesh references
|
||||
// Mesh references
|
||||
|
||||
//- Source mesh reference - containing data
|
||||
const fvMesh& fromMesh_;
|
||||
|
||||
//- Target mesh reference - mapping target
|
||||
const fvMesh& toMesh_;
|
||||
|
||||
//- fromMesh patch labels
|
||||
|
@ -91,21 +94,29 @@ class meshToMesh
|
|||
|
||||
// Private Member Functions
|
||||
|
||||
void calcAddressing();
|
||||
// Access
|
||||
|
||||
void cellAddresses
|
||||
(
|
||||
labelList& cells,
|
||||
const pointField& points,
|
||||
const fvMesh& fromMesh,
|
||||
const List<bool>& boundaryCell,
|
||||
const octree<octreeDataCell>& oc,
|
||||
bool forceFind = false
|
||||
) const;
|
||||
//- Return addressing
|
||||
void cellAddresses
|
||||
(
|
||||
labelList& cells,
|
||||
const pointField& points,
|
||||
const fvMesh& fromMesh,
|
||||
const List<bool>& boundaryCell,
|
||||
const octree<octreeDataCell>& oc,
|
||||
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
|
||||
|
@ -154,9 +165,8 @@ public:
|
|||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~meshToMesh();
|
||||
//- Destructor
|
||||
~meshToMesh();
|
||||
|
||||
|
||||
//- Patch-field interpolation class
|
||||
|
|
Reference in a new issue