mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Code cleanup and add some comments
This commit is contained in:
@ -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
|
||||
@ -67,7 +67,10 @@ 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;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
EXE_INC = \
|
||||
/* -DFULLDEBUG -g -O0 */ \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
|
||||
@ -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 * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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,6 +113,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
pointField& points()
|
||||
{
|
||||
return points_;
|
||||
@ -144,13 +148,12 @@ public:
|
||||
{
|
||||
return patchStarts_;
|
||||
}
|
||||
// Check
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Create the mesh
|
||||
void createMesh();
|
||||
|
||||
// Write
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -2,31 +2,31 @@
|
||||
#define CGAL_PSURF_RINGS_H_
|
||||
|
||||
// This file adapted from
|
||||
// CGAL-3.7/examples/Jet_fitting_3//PolyhedralSurf_rings.h
|
||||
// Licensed under CGAL-3.7/LICENSE.FREE_USE
|
||||
// CGAL-4.0/examples/Jet_fitting_3/PolyhedralSurf_rings.h
|
||||
// Licensed under CGAL-4.0/LICENSE.FREE_USE
|
||||
|
||||
// Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007
|
||||
// Utrecht University (The Netherlands), ETH Zurich (Switzerland), Freie
|
||||
// Universitaet Berlin (Germany), INRIA Sophia-Antipolis (France),
|
||||
// Martin-Luther-University Halle-Wittenberg (Germany), Max-Planck-Institute
|
||||
// Saarbruecken (Germany), RISC Linz (Austria), and Tel-Aviv University
|
||||
// (Israel). All rights reserved.
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland),
|
||||
// INRIA Sophia-Antipolis (France),
|
||||
// Max-Planck-Institute Saarbruecken (Germany),
|
||||
// and Tel-Aviv University (Israel). All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@ Class
|
||||
Foam::dynamicIndexedOctree
|
||||
|
||||
Description
|
||||
Non-pointer based hierarchical recursive searching
|
||||
Non-pointer based hierarchical recursive searching.
|
||||
Storage is dynamic, so elements can be deleted.
|
||||
|
||||
SourceFiles
|
||||
dynamicIndexedOctree.C
|
||||
@ -451,6 +452,7 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
@ -656,6 +658,7 @@ public:
|
||||
|
||||
label removeIndex(const label nodIndex, const label index);
|
||||
|
||||
|
||||
// Write
|
||||
|
||||
//- Print tree. Either print all indices (printContent = true) or
|
||||
@ -671,6 +674,7 @@ public:
|
||||
|
||||
void writeTreeInfo() const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Ostream& operator<< <Type>
|
||||
|
||||
@ -25,6 +25,10 @@ Class
|
||||
Foam::polyMeshFilter
|
||||
|
||||
Description
|
||||
Filter the edges and faces of a polyMesh whilst satisfying the given mesh
|
||||
quality criteria.
|
||||
|
||||
Works on a copy of the mesh.
|
||||
|
||||
SourceFiles
|
||||
polyMeshFilter.C
|
||||
@ -102,10 +106,10 @@ class polyMeshFilter
|
||||
// faces
|
||||
const scalar faceReductionFactor_;
|
||||
|
||||
//-
|
||||
//- Maximum number of times a deleted point can be associated with the
|
||||
// creation of a bad face it is forced to be kept.
|
||||
const label maxPointErrorCount_;
|
||||
|
||||
|
||||
//- The minimum edge length for each edge
|
||||
scalarField minEdgeLen_;
|
||||
|
||||
@ -225,6 +229,7 @@ public:
|
||||
//- Filter edges only.
|
||||
label filterEdges(const label nOriginalBadFaces);
|
||||
|
||||
//- Filter all faces that are in the face zone indirectPatchFaces
|
||||
label filterIndirectPatchFaces();
|
||||
};
|
||||
|
||||
|
||||
@ -84,12 +84,18 @@ private:
|
||||
//- Reference to mesh
|
||||
const polyMesh& mesh_;
|
||||
|
||||
//- Controls collapse of a face to an edge
|
||||
const scalar guardFraction_;
|
||||
|
||||
//- Only collapse face to a point if high aspect ratio
|
||||
const scalar maxCollapseFaceToPointSideLengthCoeff_;
|
||||
|
||||
//- Allow a face to be collapsed to a point early, before the test
|
||||
// to collapse to an edge
|
||||
const Switch allowEarlyCollapseToPoint_;
|
||||
|
||||
//- Fraction of maxCollapseFaceToPointSideLengthCoeff_ to use when
|
||||
// allowEarlyCollapseToPoint_ is on
|
||||
const scalar allowEarlyCollapseCoeff_;
|
||||
|
||||
|
||||
@ -266,7 +272,7 @@ public:
|
||||
const dictionary& meshQualityDict
|
||||
);
|
||||
|
||||
// Check mesh and mark points on faces in error
|
||||
//- Check mesh and mark points on faces in error
|
||||
// Returns boolList with points in error set
|
||||
static label checkMeshQuality
|
||||
(
|
||||
@ -300,7 +306,7 @@ public:
|
||||
polyTopoChange& meshMod
|
||||
) const;
|
||||
|
||||
// Mark (in collapseEdge) any edges to collapse
|
||||
//- Mark (in collapseEdge) any edges to collapse
|
||||
label markSmallEdges
|
||||
(
|
||||
const scalarField& minEdgeLen,
|
||||
@ -309,7 +315,7 @@ public:
|
||||
Map<point>& collapsePointToLocation
|
||||
) const;
|
||||
|
||||
// Mark (in collapseEdge) any edges to merge
|
||||
//- Mark (in collapseEdge) any edges to merge
|
||||
label markMergeEdges
|
||||
(
|
||||
const scalar maxCos,
|
||||
@ -332,6 +338,7 @@ public:
|
||||
Map<point>& collapsePointToLocation
|
||||
) const;
|
||||
|
||||
//- Marks edges in the faceZone indirectPatchFaces for collapse
|
||||
void markIndirectPatchFaces
|
||||
(
|
||||
PackedBoolList& collapseEdge,
|
||||
|
||||
Reference in New Issue
Block a user