Commit Graph

156 Commits

Author SHA1 Message Date
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
9140984cf4 Added "= delete" to disabled bitwise copy constructors and assignment operators
Currently these deleted function declarations are still in the private section
of the class declarations but will be moved by hand to the public section over
time as this is too complex to automate reliably.
2019-05-28 15:26:45 +01:00
47d2e03ae3 cuttingPlane: Corrected handling of intersection between a plane and a cellZone in parallel
Patch contributed by Federico Piscaglia
Resolves bug-report https://bugs.openfoam.org/view.php?id=3283
2019-05-26 12:01:41 +01:00
30bea84fac C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
Replaced all uses of complex Xfer class with C++11 "move" constructors and
assignment operators.  Removed the now redundant Xfer class.

This substantial changes improves consistency between OpenFOAM and the C++11 STL
containers and algorithms, reduces memory allocation and copy overhead when
returning containers from functions and simplifies maintenance of the core
libraries significantly.
2019-05-25 17:40:39 +01:00
0889ff91c7 graphField: Moved graphs directory into postProcessing 2019-05-20 10:43:36 +01:00
4f7f488f22 directFieldMapper, setSizeFieldMapper: new specialised field mappers for decomposition and reconstruction
Using the new field mapper framework it is now possible to create specialised
mappers rather than creating a fatter and fatter interface in the base mapper.
This approach is far more extensible, comprehensible and maintainable.
2019-05-09 22:12:44 +01:00
69eccc7742 fieldMapper: Moved distributed functionality to distributedWeightedFvPatchFieldMapper 2019-05-07 15:58:23 +01:00
c81abfef05 isoSurface: Fix for isoSurface 'eroding' surfaces down to nothing
The occurrence is from cells with vertices that are shared between two faces
only (these vertices can originate from hex refinement). Decomposing both faces
can occasionally produce triangles with identical vertices and this results in a
non-manifold edge which triggers the erosion procedure.

Avoided by detecting cells with these special vertices and making sure the tet-decomposition
never uses the same points on the faces using them.

Patch contributed by Mattijs Janssens
2019-02-08 14:45:54 +00:00
57a7e718b9 sampling: lineFace: Filtering of duplicate segments
Sometimes the initial point and boundary intersection searches can
generate duplicate information which can lead to line-type sampled sets
having duplicated points. This change explicitly filters these
additional points out, so that the resulting set is optimal.

Resolves bug report https://bugs.openfoam.org/view.php?id=3161
2019-02-07 11:34:41 +00:00
457c02e63f sampledSurface::writers:noSurfaceWriter: new rational and consistent class to disable surface writing
Selected by

    surfaceFormat none;

rather than the previous inconsistent

    surfaceFormat null;
2019-01-22 11:10:24 +00:00
8baec3bc5d sampledSurface: Created a sampledSurfaces namespace for the sampledSurface classes
to rationalise the structure and class names to avoid the need for the confusing
addNamedToRunTimeSelectionTable and use instead use the standard
addToRunTimeSelectionTable to populate the run-time selection table.
2019-01-21 19:58:18 +00:00
cd8aee2d76 PrimitivePatch: Simplified templating 2019-01-21 09:08:03 +00:00
146a59e46c GeometricField: Temporary fields are no longer registered on the database by default
Registration occurs when the temporary field is transferred to a non-temporary
field via a constructor or if explicitly transferred to the database via the
regIOobject "store" methods.
2018-12-20 11:00:37 +00:00
11eaf751d3 distanceSurface, sampledCuttingPlane, foamyHexMeshBackgroundMesh: Updated for new isoSurface implementation 2018-11-13 14:50:08 +00:00
c4dc7f0f8e isoSurface: Improved iso-surface algorithm
Includes topological point generation and optional removal of all points (and
triangles) that do not originate from mesh edges.  This generates
polygons rather than triangles providing smoother surfaces and significantly
small files (~ factor of 3-4 smaller).

Contributed by Mattijs Janssens
2018-11-13 14:47:19 +00:00
0b99b5af1a sampling: Removed deprecated isoSurfaceCell 2018-11-13 12:14:13 +00:00
39ad49bc34 meshSearch: Prevent hang in calculation of line-boundary intersections
This fix changes how the intersections loop ignores previously
intersected faces. It now marks them by their index so that subsequent
iterations ignore them.

Before this change, after an intersection was found the start point was
advanced by a small amount to move the past the intersection. The
problem with this was if multiple boundary faces or the end point were
in close proximity to the intersection then the move forward might span
them. This could lead to intersections being missed or counted multiple
times, in some cases indefinitely.

Based on a patch contributed by Mattijs Janssens
Resolves bug report https://bugs.openfoam.org/view.php?id=1147
2018-10-03 08:48:21 +01:00
e750f2555c src/OpenFOAM: Rationalised use of enumerations by using the C++11 scoped form
for Time, treeBoundBox, indexedOctree, dynamicIndexedOctree, CirculatorBase
2018-08-31 16:11:16 +01:00
8662f99ac1 Corrected typos in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=3017
2018-07-31 17:11:21 +01:00
aea61ccdbf AMI: Un-templated the interpolation and method classes
AMI interpolation is only ever constructed between sets of primitive
patches, so templating on the patch type is unnecessary. Templating in
this instance is undesirable; it makes type type/debug/selection system
more complex and increases the number and compilation times of files
which need recompiling when code is modified.
2018-07-18 14:49:11 +01:00
d75d045039 sampledSet/lineFace: Added error message 2018-07-12 11:00:03 +01:00
fdbf3c134f Rationalized dictionary and configuration file headers 2018-07-09 15:40:05 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
211ac3b04d sampledSet: Fix headers and interfaceHeight for new namespace 2018-06-21 12:34:21 +01:00