Commit Graph

990 Commits

Author SHA1 Message Date
d598afbd90 Adding faceCollapseMode enum to control mode. Fixing logic error,
returning validCollapse as the status of the faceCollapse was wrong,
it didn't necessarily mean the face was collapsed.

Adding mpre filtering controls to cvContol and using them in the
filtering functions.

Removing minimumEdgeLength(const point& pt) - not needed, always using
the stored vertex size.
2010-01-08 16:40:04 +00:00
7800ceac99 Adding comment to collapse exis determined by eigenvector and
reordering.
2010-01-08 11:42:20 +00:00
67d2158c2f Removing commented out test for the last eigenvalue corresponding to
the face normal.  This commit is available for reference in future.
2010-01-08 11:41:27 +00:00
66619e2525 Removing commented out old 'consume face from longest edge based'
collapse mechanism.  This commit is available for reference in future.
2010-01-08 11:39:33 +00:00
b384b14bac Removing commented out old edge based filtering mechanism. This
commit is available for reference in future.
2010-01-08 11:36:00 +00:00
8902161d8b Adding visualisation output and return false for zero mag inertia
tensors

Fixing comment.
2010-01-08 11:34:30 +00:00
1ca0932b9b Stabilising use of detJ for negative or zero values.
Moving removeUnusedPoints to calcDualMesh from
createFacesOwnerNeighbourAndPatches to allow the latter to be used to
build an intermediate mesh.

Adding the use of motionSmoother::checkMesh (as per snappyHexMesh) to
a new function: checkPolyMeshQuality.  Will be the analysis component
of a filtering back-tracking scheme.
2010-01-07 17:13:13 +00:00
77f8683108 Changing guardFraction from 0.5 to 0.3. 2010-01-06 18:19:13 +00:00
6717b95011 Using the determinant to identify very thin faces and using their
longest edge as the collapse direction.  Discovered that, for long
thin faces, det(J)*aspectRatio^2 ~= 0.35.  Could probably analyse this
to see what the actual value is, but it gives a good empirical measure
for the moment.

Using the middle of the line of all the projected vertices as the
split and applying the guardFraction- gives better handling of
triangles.

Making collapseFace use the cvMeshControls minimumEdgeLengthCoeff
value.
2010-01-06 18:02:14 +00:00
0a0992b9ed Adding size control arguments to collapseFaceToEdge and tweaking.
Adding collapseFaces function to filter faces in the whole mesh using
collapseFaceToEdge.
2010-01-05 18:02:16 +00:00
2c52371be1 Adding counter to prevent infinite recursion in displacement limiting
function.
2010-01-05 17:59:25 +00:00
c32af2b732 Adding surface smoothing. 2010-01-04 18:27:44 +00:00
58406da0a8 Merge branch 'master' into cvm
Conflicts:
	src/parallel/decompositionMethods/Make/options
2010-01-04 16:45:54 +00:00
8187a4ffaa Solving the complex eigenvalue problem by making point merging more
aggressive to take out line-like faces. Normalising the inertia tensor
is essential for small faces to avoid the calculation of eigenvectors
from falling off the bottom of SMALL.  Normalsing by mag(J) instead of
cmptMax(J).

Moving face point merge, surface smoothing and face filtering
do-while loops to seprate functions.

Implementing point grouping and collapsing for collapseFaceToEdge.
2010-01-04 16:35:13 +00:00
0e0ffa4082 Moved metis into its own library.
Scotch is now built using its own build system which builds
an additional metis.h which conflicts with the metis one so
to have separate include directory settings we also need separate
Make/ structures.
2010-01-04 12:55:58 +00:00
174cd8e3d7 Adding intertia based collapse axis determination. WIP - some
problems with the tensor::eigenValues calculation:

    "complex eigenvalues detected for tensor:"

for very high aspect ratio faces.
2009-12-22 19:35:03 +00:00
ff671ff1bb Merge branch 'master' into cvm
Conflicts:
	applications/utilities/surface/surfaceFeatureConvert/surfaceFeatureConvert.C
	applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
	src/Allwmake
	src/edgeMesh/Make/files
	src/edgeMesh/edgeMesh.C
	src/edgeMesh/edgeMesh.H
	src/edgeMesh/edgeMeshI.H
	src/edgeMesh/edgeMeshIO.C
	src/edgeMesh/featureEdgeMesh.C
	src/edgeMesh/featureEdgeMesh.H
	src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C
	src/edgeMesh/featureEdgeMesh/featureEdgeMesh.H
	src/meshTools/searchableSurface/closedTriSurfaceMesh.C
	src/meshTools/searchableSurface/closedTriSurfaceMesh.H

Merged Mark's work on edgeMesh with my featureEdgeMesh.
2009-12-21 15:52:03 +00:00
e8b1f746dd Disabled moving internal points since not proven to be benificial 2009-12-17 15:54:41 +00:00
5ca567d7cb Changed indentation 2009-12-14 11:20:57 +00:00
35eeedeaa5 Added allowFreeStandingZoneFaces flag
This determines when faceZones and cellZones are being meshed any zone faces
can only be on the boundary of the cellZone or also 'free standing'. The
latter option can be used to e.g. create free-standing baffles
(that do not separate two regions)
2009-12-10 15:31:04 +00:00
41fc71458b Use the PackedList unset() method in a few places
- also PackedBoolList.get(x) == 1 can be written without the ==
  comparison since the unsigned -> bool conversion is fast
2009-12-08 11:16:43 +01:00
c183d0875d blockMesh splineEdge - drop old names 'simpleSpline' and 'polySpline' 2009-12-07 13:48:22 +01:00
0b1a73673d cosmetic changes to arcEdge 2009-12-07 09:43:05 +01:00
73f9f7f780 Remove legacy splines code and use CatmullRomSpline as 'spline'
- compatibility:
  * 'polySpline' and 'simpleSpline' accepted
  * detect and discard end tangent specifications

- a BSpline is also included (eg, for future support of NURBS), but is
  not selectable from blockMesh since it really isn't as nice as the
  Catmull-Rom (ie, doesn't *exactly* go through each point).
2009-12-07 06:54:06 +01:00
241f6a07d4 Added to smooth surface faces function to only operate on
perpendicular faces.

Added code to attempt to determine the collapse direction of a face by
detemining the shorted distance across each triangle.  Not working,
commited for reference.

Made some functions const.
2009-12-06 12:07:39 +00:00
066b3158e7 quickly implemented BSpline2 as an alternative B-Spline implementation
- also looks reasonable and doesn't deviate much from Catmull-Rom
2009-12-04 15:34:42 +01:00
37c4f2f375 remove empty 'Description' from various .C files 2009-12-04 14:11:33 +01:00
5e972c772f remove trailing space from some files 2009-12-04 13:39:35 +01:00
14cc397a33 Adding BCC and FCC intial position methods to produce truncated
octahedron and rhombic dodecahedron cells when dualised.
2009-12-03 20:05:23 +00:00
51fd6327a6 use PackedBoolList typedef instead of PackedList<1>
Note:

PackedList constructor initializes to zero, faster not to do it
ourselves.
ie,
    PackedList foo(nPoints);
vs.
    PackedList foo(nPoints, 0);

saves an extra nPoints operations with shifts/masks etc.

If speed is important, change this type of code

    PackedList isMaster(nPoints, 1u);
    for (loop)
    {
        if (condition)
        {
            isMaster.set(i, 0u);   // unset bit
        }
    }
    return isMaster;

into this:

    PackedList notMaster(nPoints);
    for (loop)
    {
        if (!condition)
        {
            notMaster.set(i, 1u);
        }
    }
    notMaster.flip();
    return notMaster;

or this:

    PackedList isMaster(nPoints);
    isMaster.flip();

    for (loop)
    {
        if (condition)
        {
            isMaster.set(i, 0u);
        }
    }
    return isMaster;
2009-12-02 17:04:31 +01:00
be1b1ceefc Merge branch 'master' into splitCyclic
Conflicts:
	applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
	applications/utilities/parallelProcessing/decomposePar/decomposeMesh.C
	etc/bashrc
	etc/cshrc
	src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
	src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
	src/decompositionMethods/parMetisDecomp/parMetisDecomp.C
	src/dynamicMesh/Make/files
	src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
	src/dynamicMesh/perfectInterface/perfectInterface.C
	src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
	src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
	src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H
	src/finiteVolume/Make/files
	src/mesh/blockMesh/blockMesh/blockMesh.C
	src/mesh/blockMesh/blockMesh/blockMeshTopology.C
	src/meshTools/Make/files
	src/meshTools/sets/topoSets/faceSet.C
2009-11-30 15:20:52 +00:00
ad669ae3d8 Merge branch 'master' into cvm
Conflicts:
	doc/codingStyleGuide.org
2009-11-30 14:55:39 +00:00
4db98cd236 Adding a simple surface smoothing function. Needs functionality added to properly collapse small boundary normal faces.
Also adding a function to determine if a Delaunay edge corresponds to
a boundary dual face.
2009-11-30 14:38:39 +00:00
909e6b27e4 Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
2009-11-30 08:55:03 +01:00
6bdb7fb7b5 fixup copyright dates on new code 2009-11-30 08:21:44 +01:00
a51f8d3534 Merge commit 'bundle/home' into olesenm 2009-11-30 08:12:04 +01:00
5648be03f0 Added Catmull-Rom splines to blockMesh.
- the blockMesh interface is splineEdge.H, selectable as "spline"

The first tests look fine - it works as expected for the case with
buggy polySpline reported on the forum. Should of course do some more
extensive testing.

The advantages compared to the current B-Spline implementation:

- Doesn't need a matrix solver.
- The coding resembles something that can be found in the literature.
- In contrast to the B-Spline implementation, it is fairly clear what
  is actually going on. I don't even know if the B-Spline are actually
  B-Spline, Beta-Splines or something else.
- Catmull-Rom splines seem to be what all the graphics people have as
  their stable workhorse.

We now have 3 different names for splines in blockMesh:
- "spline" - *new* Catmull-Rom for arbitrary segments.
- "simpleSpline" - B-Spline for a single segment
- "polySpline" - B-Spline for a multiple segments

Assuming the Catmull-Rom splines continue to behave nicely, there is
no reason to keep the other (broken) B-Splines. This would help clean
up the blockMesh interface too.

Placed the older ones under legacy/ for easier identification in the
future.

TODO:
- currently no handling of non-zero end tangents
- could be extended to handle closed loops, which might be useful
  for feature edges from CAD (eg, for the cvm mesher)
2009-11-29 17:00:48 +01:00
d17d015f88 Use new last() method for List-type classes
- use first() method in some places as well where it helps clarity

- there are a few remaining cases: git grep 'size()-1]'
2009-11-26 13:35:57 +01:00
af311aad0e Rearrangement to be stable when lowerAreaFraction = 0. 2009-11-25 17:35:00 +00:00
9157364a4b Merge commit 'OpenCFD/master' into olesenm 2009-11-25 12:29:31 +01:00
3a985883eb Moving creation of faces, owner, neighbour and patches to separate
function.
2009-11-24 16:49:10 +00:00
55c04d307e finally commited pending (cosmetic) code cleanup for blockMesh/curvedEdges
- slightly better code isolation, dropped unneed variables, changed
  vector -> point in the appropriate places

- the spline stuff is still horribly broken.
  Needs a complete rewrite or needs to get chucked.
2009-11-24 00:34:37 +01:00
81891675ea Commit Paraview enhancements - quit working on sets/zones frills
- Include Sets/Zones now scans immediately to refresh the list of available
  mesh parts. Unfortunately, this also causes the object panel to be
  modified, even although the selection doesn't acutally need to change.
  This seems to be due to how the pqNamedWidgets are getting the information
  from the proxy properties. I can't figure if it's possible to acheive what
  I want, but we can probably live with the current implementation.

  After IncludeZones, simply us 'Reset' to undo the spurious GUI changes.
  Works fine - just looks a bit silly.

- Added 'Refresh' button to rescan for new times/fields.  Good for
  post-processing ongoing calculations without exiting the reader.

- Added 'Skip Zero Time' checkbox: many (some) calculations have
  data missing at time=0 (eg, rho, lagrangian, etc). This provides
  a convenient way to skip over this time.

- Future?:
  We could probably pick up favourite default values for these switches from
  ~OpenFOAM/controlDict, from a case system/paraview, or simply by making
  the casename.OpenFOAM also be an OpenFOAM dictionary with the settings.
2009-11-24 00:09:07 +01:00
a700e27f79 Merge branch 'master' into cvm 2009-11-23 19:53:45 +00:00
d0e866f2ca synchronise flipping on coupled boundaries 2009-11-21 10:53:36 +00:00
2ad1a75e2a Moving cvControls back to be initialised after the geometry and moving
the writeFeatureObj call out to the conformalVoronoiMesh constructor.
2009-11-20 17:48:37 +00:00
2c52705cf7 move reconstructPar 'guts' to src/parallel/reconstruct
- in preparation for adding an optional '-reconstruct' to a few utilities
  re-use as -lreconstruct library

- move related stuff there too
      src/decompositionMethods/decompositionMethods
      -> src/parallel/decompositionMethods

- added missing namespace qualifiers
2009-11-20 14:37:56 +01:00
ff5a07a5a4 Moving the declaration and construction of the cvMeshControls_ object
before any other members are constructed, as the geometry members can
use controls.

Removing unused null constructor declaration.
2009-11-20 12:21:30 +00:00
cb683add44 Fixed typo in WarningIn message, was outputing name of variable rather
than value.
2009-11-20 11:18:28 +00:00
fc8d208461 Cleaning out unnecessary functions and commented out code. 2009-11-19 18:09:33 +00:00