From 75a529a8e628237dd94c8f9e7c511abd328694f7 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 5 Jan 2016 14:20:34 +0000 Subject: [PATCH] Formatting --- .../interpolation/interpolation.H | 28 +++++++------- .../interpolationCell/interpolationCell.H | 2 +- .../interpolationCellPointFace.C | 37 ++++++++++++------- .../interpolationCellPointFace.H | 2 +- 4 files changed, 39 insertions(+), 30 deletions(-) diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H index 5e46de2ad..3d641fae5 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H +++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H @@ -47,7 +47,7 @@ namespace Foam class polyMesh; /*---------------------------------------------------------------------------*\ - Class interpolation Declaration + Class interpolation Declaration \*---------------------------------------------------------------------------*/ template @@ -143,22 +143,22 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeInterpolationType(SS, Type) \ - \ -defineNamedTemplateTypeNameAndDebug(SS, 0); \ - \ -interpolation::adddictionaryConstructorToTable > \ +#define makeInterpolationType(SS, Type) \ + \ +defineNamedTemplateTypeNameAndDebug(SS, 0); \ + \ +interpolation::adddictionaryConstructorToTable > \ add##SS##Type##ConstructorToTable_; -#define makeInterpolation(SS) \ - \ -makeInterpolationType(SS, scalar) \ -makeInterpolationType(SS, vector) \ -makeInterpolationType(SS, sphericalTensor) \ -makeInterpolationType(SS, symmTensor) \ -makeInterpolationType(SS, symmTensor4thOrder) \ -makeInterpolationType(SS, diagTensor) \ +#define makeInterpolation(SS) \ + \ +makeInterpolationType(SS, scalar) \ +makeInterpolationType(SS, vector) \ +makeInterpolationType(SS, sphericalTensor) \ +makeInterpolationType(SS, symmTensor) \ +makeInterpolationType(SS, symmTensor4thOrder) \ +makeInterpolationType(SS, diagTensor) \ makeInterpolationType(SS, tensor) diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H index ab731efcf..59ac37201 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H @@ -42,7 +42,7 @@ namespace Foam class fvMesh; /*---------------------------------------------------------------------------*\ - Class interpolationCell Declaration + Class interpolationCell Declaration \*---------------------------------------------------------------------------*/ template diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C index 8d1936dd0..6b22be865 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C @@ -78,10 +78,10 @@ Type interpolationCellPointFace::interpolate vector projection = position - cellCentre; tetPoints[3] = cellCentre; - // ********************************************************************* + // ******************************************************************** // project the cell-center through the point onto the face // and get the closest face, ... - // ********************************************************************* + // ******************************************************************** bool foundTet = false; label closestFace = -1; @@ -99,7 +99,8 @@ Type interpolationCellPointFace::interpolate scalar multiplierNumerator = (faceCentreTmp - cellCentre) & normal; scalar multiplierDenominator = projection & normal; - // if normal and projection are not orthogonal this could be the one... + // if normal and projection are not orthogonal this could be + // the one... if (mag(multiplierDenominator) > SMALL) { scalar multiplier = multiplierNumerator/multiplierDenominator; @@ -114,11 +115,11 @@ Type interpolationCellPointFace::interpolate } } - // ********************************************************************* + // ******************************************************************** // find the tetrahedron containing 'position' // from the cell center, face center and // two other points on the face - // ********************************************************************* + // ******************************************************************** minDistance = GREAT; if (closestFace != -1) @@ -153,9 +154,9 @@ Type interpolationCellPointFace::interpolate } } - // ********************************************************************* + // ******************************************************************** // if the search failed check all the cell-faces - // ********************************************************************* + // ******************************************************************** if (!foundTet) { @@ -200,10 +201,10 @@ Type interpolationCellPointFace::interpolate } } - // ********************************************************************* + // ******************************************************************** // if the tet was found do the interpolation, // otherwise use the closest face value - // ********************************************************************* + // ******************************************************************** if (foundTet) { @@ -218,14 +219,18 @@ Type interpolationCellPointFace::interpolate } else { - label patchi = this->pMesh_.boundaryMesh().whichPatch(closestFace); + label patchi = + this->pMesh_.boundaryMesh().whichPatch(closestFace); // If the boundary patch is not empty use the face value // else use the cell value if (this->psi_.boundaryField()[patchi].size()) { ts[2] = this->psi_.boundaryField()[patchi] - [this->pMesh_.boundaryMesh()[patchi].whichFace(closestFace)]; + [ + this->pMesh_.boundaryMesh()[patchi]. + whichFace(closestFace) + ]; } else { @@ -235,7 +240,7 @@ Type interpolationCellPointFace::interpolate ts[3] = this->psi_[nCell]; - for (label n=0; n<4; n++) + for (label n = 0; n<4; n++) { phi[n] = min(1.0, phi[n]); phi[n] = max(0.0, phi[n]); @@ -257,14 +262,18 @@ Type interpolationCellPointFace::interpolate } else { - label patchi = this->pMesh_.boundaryMesh().whichPatch(closestFace); + label patchi = + this->pMesh_.boundaryMesh().whichPatch(closestFace); // If the boundary patch is not empty use the face value // else use the cell value if (this->psi_.boundaryField()[patchi].size()) { t = this->psi_.boundaryField()[patchi] - [this->pMesh_.boundaryMesh()[patchi].whichFace(closestFace)]; + [ + this->pMesh_.boundaryMesh()[patchi]. + whichFace(closestFace) + ]; } else { diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H index be9aa609b..7a456e068 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H @@ -40,7 +40,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class interpolationCellPointFace Declaration + Class interpolationCellPointFace Declaration \*---------------------------------------------------------------------------*/ template