diff --git a/src/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index bb04e8ac64..b8432c07c9 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -5,7 +5,6 @@ dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C dynamicMultiMotionSolverFvMesh/dynamicMultiMotionSolverFvMesh.C dynamicInkJetFvMesh/dynamicInkJetFvMesh.C dynamicRefineFvMesh/dynamicRefineFvMesh.C -dynamicRefineBalancedFvMesh/dynamicRefineBalancedFvMesh.C dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C diff --git a/src/dynamicFvMesh/dynamicRefineBalancedFvMesh/dynamicRefineBalancedFvMesh.C b/src/dynamicFvMesh/dynamicRefineBalancedFvMesh/dynamicRefineBalancedFvMesh.C deleted file mode 100644 index d5098ffe68..0000000000 --- a/src/dynamicFvMesh/dynamicRefineBalancedFvMesh/dynamicRefineBalancedFvMesh.C +++ /dev/null @@ -1,843 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2014 Tyler Voskuilen - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is a derivative work 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 "dynamicRefineBalancedFvMesh.H" -#include "addToRunTimeSelectionTable.H" -#include "surfaceInterpolate.H" -#include "volFields.H" -#include "polyTopoChange.H" -#include "surfaceFields.H" -#include "syncTools.H" -#include "pointFields.H" -#include "fvCFD.H" -#include "volPointInterpolation.H" -#include "pointMesh.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(dynamicRefineBalancedFvMesh, 0); - addToRunTimeSelectionTable(dynamicFvMesh, dynamicRefineBalancedFvMesh, IOobject); -} - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::label Foam::dynamicRefineBalancedFvMesh::topParentID(label p) -{ - label nextP = meshCutter().history().splitCells()[p].parent_; - if( nextP < 0 ) - { - return p; - } - else - { - return topParentID(nextP); - } -} - -Foam::List Foam::dynamicRefineBalancedFvMesh::readRefinementPoints() -{ - dictionary refineDict - ( - IOdictionary - ( - IOobject - ( - "dynamicMeshDict", - time().constant(), - *this, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).subDict("dynamicRefineFvMeshCoeffs") - ); - - List refData(4, scalar(0)); - - refData[0] = readScalar(refineDict.lookup("unrefineLevel")); - refData[1] = readScalar(refineDict.lookup("lowerRefineLevel")); - refData[2] = readScalar(refineDict.lookup("refineInterval")); - refData[3] = readScalar(refineDict.lookup("maxRefinement")); - - return refData; -} - -void Foam::dynamicRefineBalancedFvMesh::updateRefinementField() -{ - Info<< "Calculating internal refinement field" << endl; - - volScalarField& intRefFld = *internalRefinementFieldPtr_; - volScalarField& targetFld = *targetLevelPtr_; - volScalarField& currFld = *isLevelPtr_; - - // Set the internal refinement field to zero to start with - intRefFld = dimensionedScalar("zero",dimless,0.0); - - // Get the cell level field from dynamicRefineFvMesh - const labelList& cellLevel = meshCutter().cellLevel(); - - // Read the points at which refinement and unrefinement occur from the - // dynamicMeshDict entries - List refinePoints = readRefinementPoints(); - - // init list for refine/unrefine field (-1=unrefine, 1=refine, 0=do nothing) - labelList markRefineCells (this->nCells(), 0); - - // init list for target refinement level per cell - labelList targetLevel (this->nCells(), 0); - - // First fields - List fieldNames = fields_.toc(); - Field refFld(nCells(),0.0); - - forAll(fieldNames, i) - { - word fldName = fieldNames[i]; - scalar minValue = fields_[fldName][0]; - scalar maxValue = fields_[fldName][1]; - label refineLevel = static_cast