Formatting
This commit is contained in:
parent
9e35f5c2c4
commit
1ed37f5e88
10 changed files with 25 additions and 21 deletions
|
@ -49,13 +49,12 @@ Foam::reflectionVectors::reflectionVectors(const Foam::fvMesh& mesh)
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
void Foam::reflectionVectors::correct()
|
||||
{
|
||||
const fvMesh& mesh = n_.mesh();
|
||||
const fvPatchList& patches = mesh.boundary();
|
||||
|
||||
forAll(patches, patchi)
|
||||
forAll (patches, patchi)
|
||||
{
|
||||
// find the nearest face for every cell
|
||||
if (patches[patchi].isWall())
|
||||
|
|
|
@ -69,7 +69,8 @@ void Foam::wallDist::correct()
|
|||
// AJ: make sure to pick up all patches that are specified as a wall
|
||||
const polyBoundaryMesh& bMesh = cellDistFuncs::mesh().boundaryMesh();
|
||||
labelHashSet wallPatchIDs(bMesh.size());
|
||||
forAll(bMesh, patchI)
|
||||
|
||||
forAll (bMesh, patchI)
|
||||
{
|
||||
if (bMesh[patchI].isWall())
|
||||
{
|
||||
|
@ -87,7 +88,7 @@ void Foam::wallDist::correct()
|
|||
transfer(wave.distance());
|
||||
|
||||
// Transfer values on patches into boundaryField of *this
|
||||
forAll(boundaryField(), patchI)
|
||||
forAll (boundaryField(), patchI)
|
||||
{
|
||||
if (!isA<emptyFvPatchScalarField>(boundaryField()[patchI]))
|
||||
{
|
||||
|
|
|
@ -72,7 +72,8 @@ Foam::wallDistData<TransferType>::~wallDistData()
|
|||
template<class TransferType>
|
||||
void Foam::wallDistData<TransferType>::correct()
|
||||
{
|
||||
Info<< "wallDistData.correct() called" << endl;
|
||||
Info<< "wallDistData.correct() called" << endl;
|
||||
|
||||
const polyMesh& mesh = cellDistFuncs::mesh();
|
||||
|
||||
//
|
||||
|
|
|
@ -80,10 +80,12 @@ class cellDistFuncs
|
|||
//- Disallow default bitwise assignment
|
||||
void operator=(const cellDistFuncs&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ClassName("cellDistFuncs");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
|
@ -101,7 +103,7 @@ public:
|
|||
//- Get patchIDs of named patches
|
||||
labelHashSet getPatchIDs(const wordList&) const;
|
||||
|
||||
//- Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
|
||||
//- Get patchIDs of/derived off certain type (e.g. processorPolyPatch)
|
||||
// Uses isA, not isType
|
||||
template<class Type>
|
||||
labelHashSet getPatchIDs() const;
|
||||
|
|
|
@ -126,6 +126,7 @@ Foam::label Foam::patchWave::getValues(const MeshWave<wallPoint>& waveInfo)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nIllegal;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ public:
|
|||
bool correctWalls = true
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~patchWave();
|
||||
|
@ -145,7 +146,6 @@ public:
|
|||
{
|
||||
return patchDistance_;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ class wallPoint
|
|||
//- normal distance (squared) from cellcenter to origin
|
||||
scalar distSqr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Evaluate distance to point. Update distSqr, origin from whomever
|
||||
|
@ -88,7 +89,7 @@ public:
|
|||
|
||||
// Static data members
|
||||
|
||||
//- initial point far away.
|
||||
//- Initial point far away
|
||||
static point greatPoint;
|
||||
|
||||
|
||||
|
@ -130,7 +131,8 @@ public:
|
|||
// still contains original (invalid) value.
|
||||
inline bool valid() const;
|
||||
|
||||
//- Check for identical geometrical data. Used for cyclics checking.
|
||||
//- Check for identical geometrical data
|
||||
// Used for cyclics checking
|
||||
inline bool sameGeometry
|
||||
(
|
||||
const polyMesh&,
|
||||
|
@ -138,7 +140,7 @@ public:
|
|||
const scalar
|
||||
) const;
|
||||
|
||||
//- Convert any absolute coordinates into relative to (patch)face
|
||||
//- Convert any absolute coordinates into relative to (patch) face
|
||||
// centre
|
||||
inline void leaveDomain
|
||||
(
|
||||
|
|
|
@ -65,7 +65,7 @@ class wallPointData
|
|||
{
|
||||
// Private data
|
||||
|
||||
//- data at nearest wall center
|
||||
//- Data at nearest wall center
|
||||
Type data_;
|
||||
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ class meshSearch
|
|||
) const;
|
||||
|
||||
//- Calculate offset vector in direction dir with as length a
|
||||
// fraction of the cell size (of the cell straddling boundary face)
|
||||
// fraction of the cell size of the cell straddling boundary face
|
||||
vector offset
|
||||
(
|
||||
const point& bPoint,
|
||||
|
@ -183,14 +183,14 @@ public:
|
|||
return mesh_;
|
||||
}
|
||||
|
||||
//- Get (demand driven) reference to octree holding all
|
||||
//- Get demand driven reference to octree holding all
|
||||
// boundary faces
|
||||
const indexedOctree<treeDataFace>& boundaryTree() const;
|
||||
|
||||
//- Get (demand driven) reference to octree holding all cells
|
||||
//- Get demand driven reference to octree holding all cells
|
||||
const indexedOctree<treeDataCell>& cellTree() const;
|
||||
|
||||
//- Get (demand driven) reference to octree holding all cell centres
|
||||
//- Get demand driven reference to octree holding all cell centres
|
||||
const indexedOctree<treeDataPoint>& cellCentreTree() const;
|
||||
|
||||
|
||||
|
|
|
@ -244,10 +244,9 @@ void meshToMesh::cellAddresses
|
|||
bool forceFind
|
||||
) const
|
||||
{
|
||||
|
||||
label nCellsOutsideAddressing = 0;
|
||||
|
||||
// the implemented search method is a simple neighbour array search.
|
||||
// The implemented search method is a simple neighbour array search.
|
||||
// It starts from a cell zero, searches its neighbours and finds one
|
||||
// which is nearer to the target point than the current position.
|
||||
// The location of the "current position" is reset to that cell and
|
||||
|
@ -264,7 +263,6 @@ void meshToMesh::cellAddresses
|
|||
|
||||
forAll (points, toI)
|
||||
{
|
||||
|
||||
scalar localTol = cellCentreDistanceTol;
|
||||
|
||||
bool isBoundary = false;
|
||||
|
@ -272,7 +270,7 @@ void meshToMesh::cellAddresses
|
|||
// pick up target position
|
||||
const vector& p = points[toI];
|
||||
|
||||
// set the sqr-distance
|
||||
// Set the sqr-distance
|
||||
scalar distSqr = magSqr(p - centresFrom[curCell]);
|
||||
|
||||
bool closer;
|
||||
|
@ -281,7 +279,7 @@ void meshToMesh::cellAddresses
|
|||
{
|
||||
closer = false;
|
||||
|
||||
// set the current list of neighbouring cells
|
||||
// Set the current list of neighbouring cells
|
||||
const labelList& neighbours = cc[curCell];
|
||||
|
||||
forAll (neighbours, nI)
|
||||
|
@ -289,7 +287,7 @@ void meshToMesh::cellAddresses
|
|||
scalar curDistSqr =
|
||||
magSqr(p - centresFrom[neighbours[nI]]);
|
||||
|
||||
// search through all the neighbours.
|
||||
// Search through all the neighbours.
|
||||
// If the cell is closer, reset current cell and distance
|
||||
if (curDistSqr < (1 - SMALL)*distSqr)
|
||||
{
|
||||
|
|
Reference in a new issue