From fbf0020910ed6c50aa02994744bc6ebdbb6d4eee Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 7 Feb 2018 15:32:46 +0000 Subject: [PATCH] interpolationCellPointWallModified: Removed This class did not fulfill its basic purpose and cannot be simply corrected. Resolves bug-report https://bugs.openfoam.org/view.php?id=2826 --- src/finiteVolume/Make/files | 2 - .../cellPointWeightWallModified.C | 62 ---------- .../cellPointWeightWallModified.H | 81 ------------- .../interpolationCellPointWallModified.C | 41 ------- .../interpolationCellPointWallModified.H | 110 ----------------- .../interpolationCellPointWallModifiedI.H | 111 ------------------ .../makeInterpolationCellPointWallModified.C | 35 ------ 7 files changed, 442 deletions(-) delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H delete mode 100644 src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index f2e55dab15..4a2fe81a19 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -249,8 +249,6 @@ $(interpolation)/interpolationCellPatchConstrained/makeInterpolationCellPatchCon $(interpolation)/interpolationCellPoint/cellPointWeight/cellPointWeight.C $(interpolation)/interpolationCellPoint/makeInterpolationCellPoint.C $(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C -$(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C -$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C $(interpolation)/interpolationPointMVC/pointMVCWeight.C $(interpolation)/interpolationPointMVC/makeInterpolationPointMVC.C diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C deleted file mode 100644 index eef9a8f988..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "cellPointWeightWallModified.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::cellPointWeightWallModified::cellPointWeightWallModified -( - const polyMesh& mesh, - const vector& position, - const label celli, - const label facei -) -: - cellPointWeight(mesh, position, celli, facei) -{ - // findTetrahedron or findTriangle will already have been called - // by the cellPointWeight constructor - - if (facei >= 0) - { - const polyBoundaryMesh& bm = mesh.boundaryMesh(); - label patchi = bm.whichPatch(facei); - if (patchi != -1) - { - if (isA(bm[patchi])) - { - // Apply cell centre value wall faces - weights_[0] = 1.0; - weights_[1] = 0.0; - weights_[2] = 0.0; - weights_[3] = 0.0; - } - } - } -} - - -// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H deleted file mode 100644 index 052377d5a2..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H +++ /dev/null @@ -1,81 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::cellPointWeightWallModified - -Description - Foam::cellPointWeightWallModified - -SourceFiles - cellPointWeightWallModified.C - -\*---------------------------------------------------------------------------*/ - -#ifndef cellPointWeightWallModified_H -#define cellPointWeightWallModified_H - -#include "cellPointWeight.H" -#include "wallPolyPatch.H" -#include "polyMesh.H" -#include "polyBoundaryMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class polyMesh; - -/*---------------------------------------------------------------------------*\ - Class cellPointWeightWallModified Declaration -\*---------------------------------------------------------------------------*/ - -class cellPointWeightWallModified -: - public cellPointWeight -{ -public: - - // Constructors - - //- Construct from components - cellPointWeightWallModified - ( - const polyMesh& mesh, - const vector& position, - const label celli, - const label facei = -1 - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C deleted file mode 100644 index aac556d735..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "interpolationCellPointWallModified.H" - -// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // - -template -Foam::interpolationCellPointWallModified:: -interpolationCellPointWallModified -( - const GeometricField& psi -) -: - interpolationCellPoint(psi) -{} - - -// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H deleted file mode 100644 index 2cfa869fc3..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H +++ /dev/null @@ -1,110 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::interpolationCellPointWallModified - -Description - Same as interpolationCellPoint, but if interpolating a wall face, uses - cell centre value instead - -\*---------------------------------------------------------------------------*/ - -#ifndef interpolationCellPointWallModified_H -#define interpolationCellPointWallModified_H - -#include "interpolationCellPoint.H" -#include "cellPointWeightWallModified.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class interpolationCellPoint Declaration -\*---------------------------------------------------------------------------*/ - -template -class interpolationCellPointWallModified -: - public interpolationCellPoint -{ -public: - - //- Runtime type information - TypeName("cellPointWallModified"); - - - // Constructors - - //- Construct from components - interpolationCellPointWallModified - ( - const GeometricField& psi - ); - - - // Member Functions - - //- Interpolate field for the given cellPointWeight - inline Type interpolate(const cellPointWeightWallModified& cpw) const; - - //- Interpolate field to the given point in the given cell - inline Type interpolate - ( - const vector& position, - const label celli, - const label facei = -1 - ) const; - - //- Interpolate field to the given coordinates in the tetrahedron - // defined by the given indices. - inline Type interpolate - ( - const barycentric& coordinates, - const tetIndices& tetIs, - const label facei = -1 - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "interpolationCellPointWallModifiedI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "interpolationCellPointWallModified.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H deleted file mode 100644 index e55a68f4ce..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -inline Type Foam::interpolationCellPointWallModified::interpolate -( - const cellPointWeightWallModified& cpw -) const -{ - const barycentric& weights = cpw.weights(); - const triFace& faceVertices = cpw.faceVertices(); - - Type t = this->psi_[cpw.cell()]*weights[0]; - t += this->psip_[faceVertices[0]]*weights[1]; - t += this->psip_[faceVertices[1]]*weights[2]; - t += this->psip_[faceVertices[2]]*weights[3]; - - return t; -} - - -template -inline Type Foam::interpolationCellPointWallModified::interpolate -( - const vector& position, - const label celli, - const label facei -) const -{ - return interpolate - ( - cellPointWeightWallModified - ( - this->pMesh_, - position, - celli, - facei - ) - ); -} - - -template -inline Type Foam::interpolationCellPointWallModified::interpolate -( - const barycentric& coordinates, - const tetIndices& tetIs, - const label facei -) const -{ - if (facei >= 0) - { - if (facei != tetIs.face()) - { - FatalErrorInFunction - << "specified face " << facei << " inconsistent with the face " - << "stored by tetIndices: " << tetIs.face() - << exit(FatalError); - } - - const polyBoundaryMesh& bm = this->pMesh_.boundaryMesh(); - label patchi = bm.whichPatch(facei); - - if (patchi != -1) - { - if (isA(bm[patchi])) - { - Type t = this->psi_[tetIs.cell()]; - - return t; - } - } - } - - // If the wall face selection did not return, then use the normal - // interpolate method - - return interpolationCellPoint::interpolate - ( - coordinates, - tetIs, - facei - ); -} - - -// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C deleted file mode 100644 index 1224f7ac89..0000000000 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C +++ /dev/null @@ -1,35 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "interpolationCellPointWallModified.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeInterpolation(interpolationCellPointWallModified); -} - -// ************************************************************************* //