ENH: hexRef8: test more

This commit is contained in:
mattijs
2013-12-20 16:01:18 +00:00
parent 198a9a6adf
commit 80ef6e2392
2 changed files with 98 additions and 71 deletions

View File

@ -41,6 +41,7 @@ Description
#include "Random.H"
#include "zeroGradientFvPatchFields.H"
#include "calculatedPointPatchFields.H"
#include "pointConstraints.H"
#include "fvcDiv.H"
using namespace Foam;
@ -63,6 +64,8 @@ int main(int argc, char *argv[])
# include "createMesh.H"
const pointConstraints& pc = pointConstraints::New(pointMesh::New(mesh));
const Switch inflate(args.args()[1]);
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.
polyTopoChange meshMod(mesh);
if (rndGen.bit())
if (action == 1)
{
// Refine
label nRefine = mesh.nCells()/20;
@ -229,10 +245,8 @@ int main(int argc, char *argv[])
for (label i=0; i<nUnrefine; i++)
{
candidates.insert
(
allSplitPoints[rndGen.integer(0, allSplitPoints.size()-1)]
);
label index = rndGen.integer(0, allSplitPoints.size()-1);
candidates.insert(allSplitPoints[index]);
}
labelList splitPoints = meshCutter.consistentUnrefinement
@ -271,6 +285,13 @@ int main(int argc, char *argv[])
// Update numbering of cells/vertices.
Info<< nl << "-- mapping hexRef8 data" << endl;
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;
}
Info<< "pc:" << pc.patchPatchPointConstraintPoints().size() << endl;
Info<< "End\n" << endl;
return 0;

View File

@ -20,6 +20,9 @@ DebugSwitches
primitiveMesh 1;
polyMesh 1;
fvMesh 1;
polyTopoChange 1;
pointMesh 1;
pointConstraints 1;
}
application icoFoam;