STYLE: Code cleanup and add some comments

This commit is contained in:
laurence
2013-01-10 10:50:05 +00:00
parent 51db019bee
commit ff3654956a
9 changed files with 96 additions and 92 deletions

View File

@ -17,7 +17,7 @@ FoamFile
collapseEdgesCoeffs
{
// Edges shorter than this absolute value will be merged
minimumEdgeLength 1e-8;
minimumEdgeLength 1e-6;
// The maximum angle between two edges that share a point attached to
// no other edges
@ -25,7 +25,7 @@ collapseEdgesCoeffs
// The amount that minimumEdgeLength will be reduced by for each
// edge if that edge's collapse generates a poor quality face
reductionFactor 0.5;
reductionFactor 0.5;
}
@ -67,14 +67,17 @@ meshQualityCoeffs
{
// Name of the dictionary that has the mesh quality coefficients used
// by motionSmoother::checkMesh
meshQualityCoeffDict meshQualityDict;
#include "meshQualityDict";
// Maximum number of smoothing iterations for the reductionFactors
maximumSmoothingIterations 2;
// Maximum number of outer iterations is mesh quality checking is enabled
maximumIterations 10;
maximumIterations 10;
// Maximum number of iterations deletion of a point can cause a bad face
// to be constructed before it is forced to not be deleted
maxPointErrorCount 5;
maxPointErrorCount 5;
}

View File

@ -1,5 +1,4 @@
EXE_INC = \
/* -DFULLDEBUG -g -O0 */ \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \

View File

@ -26,12 +26,6 @@ License
#include "patchToPoly2DMesh.H"
#include "PatchTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::patchToPoly2DMesh::flipFaceOrder()
@ -275,12 +269,9 @@ void Foam::patchToPoly2DMesh::createPolyMeshComponents()
addPatchFacesToOwner();
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct from a primitivePatch
Foam::patchToPoly2DMesh::patchToPoly2DMesh
(
const MeshedSurface<face>& patch,
@ -321,13 +312,5 @@ void Foam::patchToPoly2DMesh::createMesh()
}
}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -51,6 +51,7 @@ class patchToPoly2DMesh
{
// Private data
// Reference to the meshed surface
const MeshedSurface<face>& patch_;
const wordList& patchNames_;
@ -62,11 +63,16 @@ class patchToPoly2DMesh
const EdgeMap<label>& mapEdgesRegion_;
pointField points_;
faceList faces_;
labelList owner_;
labelList neighbour_;
//- Description of data_
// Private Member Functions
void flipFaceOrder();
void createNeighbours();
@ -79,9 +85,6 @@ class patchToPoly2DMesh
void createPolyMeshComponents();
// Private Member Functions
//- Disallow default bitwise copy construct
patchToPoly2DMesh(const patchToPoly2DMesh&);
@ -110,47 +113,47 @@ public:
// Member Functions
// Access
pointField& points()
{
return points_;
}
faceList& faces()
{
return faces_;
}
pointField& points()
{
return points_;
}
labelList& owner()
{
return owner_;
}
faceList& faces()
{
return faces_;
}
labelList& neighbour()
{
return neighbour_;
}
labelList& owner()
{
return owner_;
}
const wordList& patchNames() const
{
return patchNames_;
}
labelList& neighbour()
{
return neighbour_;
}
const labelList& patchSizes() const
{
return patchSizes_;
}
const wordList& patchNames() const
{
return patchNames_;
}
const labelList& patchSizes() const
{
return patchSizes_;
}
const labelList& patchStarts() const
{
return patchStarts_;
}
const labelList& patchStarts() const
{
return patchStarts_;
}
// Check
// Edit
void createMesh();
// Write
//- Create the mesh
void createMesh();
};

View File

@ -317,12 +317,12 @@ int main(int argc, char *argv[])
}
// Take over refinement levels and write to new time directory.
Pout<< "\nWriting extruded mesh to time = " << runTimeExtruded.timeName()
Info<< "\nWriting extruded mesh to time = " << runTimeExtruded.timeName()
<< nl << endl;
mesh().write();
Pout<< "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}