mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: trackingInverseDistance: fix trackingInverseDistance. Fixes #736.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,6 +48,7 @@ Description
|
||||
#include "MeshedSurfaces.H"
|
||||
#include "globalIndex.H"
|
||||
#include "cellSet.H"
|
||||
#include "fvMeshTools.H"
|
||||
|
||||
#include "extrudedMesh.H"
|
||||
#include "extrudeModel.H"
|
||||
@ -78,59 +79,6 @@ static const Enum<ExtrudeMode> ExtrudeModeNames
|
||||
};
|
||||
|
||||
|
||||
void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
|
||||
{
|
||||
// Create dummy system/fv*
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSchemes",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
Info<< "Testing:" << io.objectPath() << endl;
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(false))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
dictionary divDict;
|
||||
dummyDict.add("divSchemes", divDict);
|
||||
dictionary gradDict;
|
||||
dummyDict.add("gradSchemes", gradDict);
|
||||
dictionary laplDict;
|
||||
dummyDict.add("laplacianSchemes", laplDict);
|
||||
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSolution",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(false))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
label findPatchID(const polyBoundaryMesh& patches, const word& name)
|
||||
{
|
||||
const label patchID = patches.findPatchID(name);
|
||||
@ -738,7 +686,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Create dummy fvSchemes, fvSolution
|
||||
createDummyFvMeshFiles(mesh, regionDir);
|
||||
fvMeshTools::createDummyFvMeshFiles(mesh, regionDir, true);
|
||||
|
||||
// Create actual mesh from polyTopoChange container
|
||||
autoPtr<mapPolyMesh> map = meshMod().makeMesh
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -353,59 +353,6 @@ void deleteEmptyPatches(fvMesh& mesh)
|
||||
}
|
||||
|
||||
|
||||
void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
|
||||
{
|
||||
// Create dummy system/fv*
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSchemes",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
Info<< "Testing:" << io.objectPath() << endl;
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(true))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
dictionary divDict;
|
||||
dummyDict.add("divSchemes", divDict);
|
||||
dictionary gradDict;
|
||||
dummyDict.add("gradSchemes", gradDict);
|
||||
dictionary laplDict;
|
||||
dummyDict.add("laplacianSchemes", laplDict);
|
||||
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSolution",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(true))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check zone either all internal or all external faces
|
||||
void checkZoneInside
|
||||
(
|
||||
@ -1642,7 +1589,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Create dummy fv* files
|
||||
createDummyFvMeshFiles(mesh, shellRegionName);
|
||||
fvMeshTools::createDummyFvMeshFiles(mesh, shellRegionName, true);
|
||||
|
||||
|
||||
word meshInstance;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -584,56 +584,7 @@ autoPtr<mapPolyMesh> createRegionMesh
|
||||
)
|
||||
{
|
||||
// Create dummy system/fv*
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSchemes",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
Info<< "Testing:" << io.objectPath() << endl;
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(true))
|
||||
// if (!exists(io.objectPath()))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
dictionary divDict;
|
||||
dummyDict.add("divSchemes", divDict);
|
||||
dictionary gradDict;
|
||||
dummyDict.add("gradSchemes", gradDict);
|
||||
dictionary laplDict;
|
||||
dummyDict.add("laplacianSchemes", laplDict);
|
||||
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
{
|
||||
IOobject io
|
||||
(
|
||||
"fvSolution",
|
||||
mesh.time().system(),
|
||||
regionName,
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (!io.typeHeaderOk<IOdictionary>(true))
|
||||
//if (!exists(io.objectPath()))
|
||||
{
|
||||
Info<< "Writing dummy " << regionName/io.name() << endl;
|
||||
dictionary dummyDict;
|
||||
IOdictionary(io, dummyDict).regIOobject::write();
|
||||
}
|
||||
}
|
||||
|
||||
fvMeshTools::createDummyFvMeshFiles(mesh, regionName, true);
|
||||
|
||||
// Neighbour cellRegion.
|
||||
labelList coupledRegion(mesh.nBoundaryFaces());
|
||||
|
||||
Reference in New Issue
Block a user