Commit Graph

179 Commits

Author SHA1 Message Date
dae463dbd8 TimePaths: Rationalised path methods 2021-06-24 14:20:00 +01:00
02b97a714a polygonTriangulate: Added robust polygon triangulation algorithm
The new algorithm provides robust quality triangulations of non-convex
polygons. It also produces a best attempt for polygons that are badly
warped or self intersecting by minimising the area in which the local
normal is in the opposite direction to the overal polygon normal. It is
memory efficient when applied to multiple polygons as it maintains and
reuses its workspace.

This algorithm replaces implementations in the face and
faceTriangulation classes, which have been removed.

Faces can no longer be decomposed into mixtures of tris and
quadrilaterals. Polygonal faces with more than 4 sides are now
decomposed into triangles in foamToVTK and in paraFoam.
2021-06-24 10:08:38 +01:00
01494463d0 FoamFile: 'version' entry is now optional, defaulting to 2.0
The FOAM file format has not changed from version 2.0 in many years and so there
is no longer a need for the 'version' entry in the FoamFile header to be
required and to reduce unnecessary clutter it is now optional, defaulting to the
current file format 2.0.
2021-06-23 20:50:10 +01:00
a913639957 Field.C: Removed unnecessary #includes 2021-06-21 16:21:04 +01:00
f4a65fbada sampling: Renamed and moved classes from fileFormats
The writer class has been renamed setWriter in order to clarify its
usage. The coordSet and setWriter classes have been moved into the
sampling library, as this fits their usage.
2021-06-18 13:57:11 +01:00
0ba5f5b8a9 fileFormats: Added generic write functions for VTK poly data
The new write functions are currently being utilised by setSet and the
vtkSurfaceWriter, but it should eventually be possible for more examples
of VTK poly data writing to be converted to use these functions.
2021-06-18 13:54:56 +01:00
5204403f3e fvMeshSubset: Added new constraint patch type 'internal' into which exposed internal faces are added
This new constraint type is preferable to the 'empty' type used previously as it
support patch field values for post-processing and other purposes.

The internalFvPatchField operates as a 'zeroGradient' type so that the adjacent
cell values are displayed on the faces exposed by the sub-setting.

The internalFvsPatchField operates as a 'calculated' type so that the internal
face values are displayed on the faces exposed by the sub-setting.

The immediate benefit of this change can be seen when using 'subsetMesh' without
the '-noFields' option to create and write a sub-set of an 'fvMesh' with field
values, now the face values of the 'exposed' internal faces can be visualised.
2021-06-16 19:05:58 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
55f751641e Standardise on British spelling: initialize -> initialise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 14:51:48 +01:00
cb8be0abbb isoSurface: Improvements to filtering robustness
The "full" filtering option in isoSurface now no longer attempts to
remove non-manifold faces. As a result, this filtering level is now
robust, but it may leave small imperfections in the surface. This has
been reinstated as the default filtering level as it has advantageous
properties over "partial" filtering in both smoothness of visualisation
and in the size of the files it generates.

A new "clean" level has been added, which does try and remove
imperfections. This is equivalent to the previous operation of the
"full" option. This is not guaranteed to be robust. In certain
configurations the removal process can propagate and delete an entire
section of the surface.
2021-02-18 08:49:38 +00:00
0d24c90b29 sampling: updated pointAndNormal plane parameters in header documentation 2021-02-17 19:21:24 +00:00
a221c29a19 isoSurface: Changed default filtering to "partial"
The "full" filtering option has been found not to be sufficiently
robust. It erroneously removes entire contiguous sections of the
iso-surface in a number of situations. Full filtering can still be
enabled by specifying "filtering full;" in the relevant dictionary.
2021-02-16 12:19:05 +00:00
66c62e9296 searchableSurface: Renamed geometry directory triSurface -> geometry
Originally the only supported geometry specification were triangulated surfaces,
hence the name of the directory: constant/triSurface, however now that other
surface specifications are supported and provided it is much more logical that
the directory is named accordingly: constant/geometry.  All tutorial and
template cases have been updated.

Note that backward compatibility is provided such that if the constant/geometry
directory does not exist but constant/triSurface does then the geometry files
are read from there.
2021-02-04 13:51:48 +00:00
5e16ae0d11 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-11-25 15:12:42 +00:00
0d42b151f0 ZoneMesh: Changed zone selection from keyType to wordRe
It is more logical to use wordRe rather than keyType for name-based selection
including regular expression support as keyType now support other forms of
dictionary keyword including function and variable names which are not
relevant for selecting zones by name.
2020-11-25 15:10:22 +00:00
9a4ed9ce2f sampledSet/boundaryRandom: Simplified and moved points inside mesh
The patch triangulation done as part of this set construction is now
done using polyMeshTetDecomposition. This has simplified the
implementation and permitted the addition of a small tolerance to move
the points within the mesh bounds, resulting in the removal of a number
of warning messages.
2020-11-25 13:17:02 +00:00
45bfe725c9 sampledSet/boundaryRandom: Corrected patch indexing 2020-11-25 11:19:40 +00:00
6dc65790c0 sampledSurface::sampledCuttingPlane: Added isoSurfPtr_.clear() 2020-11-24 17:00:35 +00:00
a008316870 sampledSurface::distanceSurface: Added zone support using zoneKey
combining functionality from sampledCuttingPlane and sampledPlane.
Updated sampledCuttingPlane to use zoneKey.
2020-11-24 16:25:47 +00:00
e8c5163f82 coordinateSystems: Initial work to simplify and rationalise
There is much more to be done, a complete rewrite of coordinateSystems would be
best.
2020-09-28 20:47:33 +01:00
def4772281 Documentation: Centred the Class Declaration comment
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-28 13:28:58 +01:00
d82d47c74b regIOobject.H: Rationalised includes 2020-08-21 08:40:47 +01:00
1a7f10a986 sampledSurfaces: Put inside functionObjects namespace 2020-07-24 14:11:36 +01:00
bf7ade04d8 sampledSurfaces: Added documentation 2020-07-24 12:12:19 +01:00
4be01b4e70 meshToMesh0::cellAddressing slight speed up for some geometries
Based on patch contributed by Kevin Nordin-Bates
Resolves patch request https://bugs.openfoam.org/view.php?id=3458
2020-03-24 16:45:48 +00:00
1dc0b8fc88 sampledSurface::foamSurfaceWriter: Added support for writing sampled surfaces in binary OpenFOAM format 2020-01-29 17:37:00 +00:00
b55bc28698 sampledSurface::writers: Added writeFormat option to select ascii or binary
e.g. in tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/cuttingPlane

    surfaceFormat   vtk;
    writeFormat     binary;
    fields          (p U);

selects writing the VTK surface files in binary format which significantly
speeds-up reading of the files in paraview.

Currently binary writing is supported in VTK and EnSight formats.
2020-01-29 14:59:31 +00:00
50fab006c6 sampledSurface/writers: Resolved write function calling itself 2020-01-29 12:46:20 +00:00
84759ee0b8 sampledSurface: Added support for writing surfaces in binary format
by specifying

    writeFormat binary;

in the sampledSurface dictionary.
2020-01-29 12:42:05 +00:00
3631f13a98 sampledSurface/writers: Removed unnecessary "verbose" argument 2020-01-28 22:46:00 +00:00
ac22da9499 sampledSurface/writers: Rationally renamed writeTemplate -> write 2020-01-28 20:24:22 +00:00
622f472283 vtkSurfaceWriter: Rationalised writing to use vtkWriteOps
avoiding code duplication and providing support for writing binary.
2020-01-28 17:33:29 +00:00
8e6d792ff5 sampledPlane: Removed unused and broken constructor
Resolves bug report https://bugs.openfoam.org/view.php?id=3434
2020-01-24 11:55:41 +00:00
47ae10a310 sampledSet: Corrected header documentation 2020-01-06 14:25:19 +00:00
cfead3c2c0 sampledSet: Added cellSet and faceSet sampled sets
Added sets for sampling the cell-centres and face-centres of a cellSet
or faceSet. Example usage:

    sets
    (
        c0
        {
            type cellSet;
            set c0;
            axis xyz;
        }

        f0
        {
            type faceSet;
            set f0;
            axis xyz;
        }
    );
2020-01-06 14:22:33 +00:00
5eaf74c3a4 dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
2019-11-27 14:56:32 +00:00
d987648ef4 dictionary label lookup: simplified syntax using the type templated lookup function
Replaced
    readLabel(dict.lookup("name"))
with
    dict.lookup<label>("name)
2019-11-27 11:38:59 +00:00
19c03e4dd0 sampling::probes: Improved the output table format to be more consistent with logFiles
Columns are now fixed width, left justified and the column headings are on one
line.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3378#c10866
2019-11-05 15:19:03 +00:00
81fca4c43a Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
2019-10-18 11:46:20 +01:00
2b0c5028a4 Corrected typos in comments and in name of solidEquilibriumEnergySource fvOption
Patch contributed by Timo Niemi, VTT.
Resolves bug report https://bugs.openfoam.org/view.php?id=3369
2019-10-14 09:21:43 +01:00
6bde8bf544 meshToMesh::directMethod: Corrected formatting 2019-10-07 16:48:30 +01:00
0c66eb9f94 finiteVolume: Use the GeometricField::New method to construct temporary fields
Avoids database registration of temporary fields, simplifies the code and
improves maintainability.
2019-07-18 09:32:12 +01:00
6c7d08b262 isoSurface: Selection of filtering level
The filtering level for an iso-surface can now be selected. The keyword
is "filtering", and the options are "full", "partial" or "none". The
default is "full". The other options are only retained for debugging and
to provide a fallback if robustness of the full filtering algorithm is
an issue. As of commit 2ee8b7ac, "full" filtering has no known
disadvantages and is recommended in all usage cases.

This setting replaces the "regularise" entry, which switched between
what are now the "full" and "none" settings. "partial" was not
previously an option.
2019-07-15 08:34:07 +01:00
916d0a0624 isoSurface: Additional fixes for isoSurface 'eroding' surfaces down to nothing
This is a slight rework of commit c81abfef. Instead of adapting tet
base points cell-by-cell, the dangling points are pre-computed and then
the adaptations to the base points are made face-by-face. This correctly
adapts faces which have different dangling points relative to the owner
and neighbour cells.
2019-07-15 08:34:06 +01:00
5c188ddce7 Completed standardisation of the class declaration section comments to correspond to the foamNewSource template 2019-06-21 22:45:47 +01:00
96b69f6f88 Standardised and rationalised the way in which units are written in function documentation 2019-06-20 10:54:14 +01:00
213319ae30 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-19 15:01:35 +01:00
8e9f692aa4 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-13 21:26:33 +01:00
00ae415b71 Added copy constructors to classes with copy assignment operator defined
and copy assignment operator for classes with a copy constructor

This is often described as the rule of 3 (or rule of 5 in C++11 if move
constructors and assignment operators are also defined) and makes good sense in
ensuring consistency.  For classes in which the default bitwise copy constructor
or assignment operator are appropriate these are now specified explicitly using
the "= default" keyword if the other is explicitly defined fulfilling the rule
of 3 without the need to define the body of the function.
2019-06-05 23:32:22 +01:00
fc4d7b92c3 Corrected documentation comment for disabled copy constructors 2019-05-29 15:58:42 +01:00