ENH: extrudeMesh: make edge collape optional

This commit is contained in:
mattijs
2012-05-22 17:34:03 +01:00
parent f669dfe8a9
commit 0136deb88e
3 changed files with 34 additions and 4 deletions

View File

@ -238,6 +238,25 @@ int main(int argc, char *argv[])
dict.lookup("constructFrom")
);
// Any merging of small edges
const scalar mergeTol(dict.lookupOrDefault<scalar>("mergeTol", 1e-4));
Info<< "Extruding from " << ExtrudeModeNames[mode]
<< " using model " << model().type() << endl;
if (flipNormals)
{
Info<< "Flipping normals before extruding" << endl;
}
if (mergeTol > 0)
{
Info<< "Collapsing edges < " << mergeTol << " of bounding box" << endl;
}
else
{
Info<< "Not collapsing any edges after extrusion" << endl;
}
Info<< endl;
// Generated mesh (one of either)
autoPtr<fvMesh> meshFromMesh;
@ -715,7 +734,7 @@ int main(int argc, char *argv[])
const boundBox& bb = mesh.bounds();
const vector span = bb.span();
const scalar mergeDim = 1e-4 * bb.minDim();
const scalar mergeDim = mergeTol * bb.minDim();
Info<< "Mesh bounding box : " << bb << nl
<< " with span : " << span << nl
@ -726,6 +745,7 @@ int main(int argc, char *argv[])
// Collapse edges
// ~~~~~~~~~~~~~~
if (mergeDim > 0)
{
Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;

View File

@ -88,4 +88,8 @@ sigmaRadialCoeffs
// degree wedges.
mergeFaces false; //true;
// Merge small edges. Fraction of bounding box.
mergeTol 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //