mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: hexRef8: test more
This commit is contained in:
@ -41,6 +41,7 @@ Description
|
|||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "calculatedPointPatchFields.H"
|
#include "calculatedPointPatchFields.H"
|
||||||
|
#include "pointConstraints.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -63,6 +64,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
|
|
||||||
|
const pointConstraints& pc = pointConstraints::New(pointMesh::New(mesh));
|
||||||
|
|
||||||
const Switch inflate(args.args()[1]);
|
const Switch inflate(args.args()[1]);
|
||||||
|
|
||||||
if (inflate)
|
if (inflate)
|
||||||
@ -188,11 +191,24 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mesh.moving(false);
|
||||||
|
mesh.topoChanging(false);
|
||||||
|
|
||||||
|
|
||||||
|
label action = rndGen.integer(0, 5);
|
||||||
|
|
||||||
|
|
||||||
|
if (action == 0)
|
||||||
|
{
|
||||||
|
Info<< nl << "-- moving only" << endl;
|
||||||
|
mesh.movePoints(pointField(mesh.points()));
|
||||||
|
}
|
||||||
|
else if (action == 1 || action == 2)
|
||||||
|
{
|
||||||
// Mesh changing engine.
|
// Mesh changing engine.
|
||||||
polyTopoChange meshMod(mesh);
|
polyTopoChange meshMod(mesh);
|
||||||
|
|
||||||
if (rndGen.bit())
|
if (action == 1)
|
||||||
{
|
{
|
||||||
// Refine
|
// Refine
|
||||||
label nRefine = mesh.nCells()/20;
|
label nRefine = mesh.nCells()/20;
|
||||||
@ -229,10 +245,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (label i=0; i<nUnrefine; i++)
|
for (label i=0; i<nUnrefine; i++)
|
||||||
{
|
{
|
||||||
candidates.insert
|
label index = rndGen.integer(0, allSplitPoints.size()-1);
|
||||||
(
|
candidates.insert(allSplitPoints[index]);
|
||||||
allSplitPoints[rndGen.integer(0, allSplitPoints.size()-1)]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
labelList splitPoints = meshCutter.consistentUnrefinement
|
labelList splitPoints = meshCutter.consistentUnrefinement
|
||||||
@ -271,6 +285,13 @@ int main(int argc, char *argv[])
|
|||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
Info<< nl << "-- mapping hexRef8 data" << endl;
|
Info<< nl << "-- mapping hexRef8 data" << endl;
|
||||||
meshCutter.updateMesh(map);
|
meshCutter.updateMesh(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Info<< nl<< "-- Mesh : moving:" << mesh.moving()
|
||||||
|
<< " topoChanging:" << mesh.topoChanging()
|
||||||
|
<< " changing:" << mesh.changing()
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -387,6 +408,9 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< "pc:" << pc.patchPatchPointConstraintPoints().size() << endl;
|
||||||
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -20,6 +20,9 @@ DebugSwitches
|
|||||||
primitiveMesh 1;
|
primitiveMesh 1;
|
||||||
polyMesh 1;
|
polyMesh 1;
|
||||||
fvMesh 1;
|
fvMesh 1;
|
||||||
|
polyTopoChange 1;
|
||||||
|
pointMesh 1;
|
||||||
|
pointConstraints 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
application icoFoam;
|
application icoFoam;
|
||||||
|
|||||||
Reference in New Issue
Block a user