Commit Graph

14334 Commits

Author SHA1 Message Date
de673f3bcf STYLE: consolidate 'clear' when initialising surfaceFieldValue 2019-02-11 15:59:14 +01:00
e6937f60de ENH: add Ensight output support for a labelField (treat like scalarField) 2019-02-11 16:03:10 +01:00
c137d3f823 ENH: derivedFields functionObject to create some predefined, calculated fields
- currently supports pTotal, rhoU.
2019-02-08 17:47:45 +01:00
e2754962cc ENH: add remove objects handling in timeFunctionObject and regionFunctionObject
- makes it easier to implement functionObject or field object removal
2019-02-08 17:47:45 +01:00
8f92fa016f ENH: write/clear on all components (issue #1199)
- use registry checkOut for removeRegisteredObject function object
2019-02-11 10:12:17 +01:00
f6d462a246 STYLE: make objectRegistry::cfindIOobject() protected instead of public 2019-02-11 10:58:18 +01:00
4e7ac82060 STYLE: derive surface sampling from fvMeshFunctionObject 2019-02-11 09:47:13 +01:00
75a691ecfa ENH: generic: add genericFvsPatchField 2019-02-11 17:02:14 +00:00
f2d735264f COMP: polyMeshTetDecomposition: vGreat vs VGREAT 2019-02-11 12:11:59 +00:00
12d9a159dc ENH: Function1: better error message. Fixes #1200. 2019-02-11 12:10:47 +00:00
9580a0e243 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
bb73eb63a3 STYLE: DFSEM inlet - updated messages when checking validity of the stress tensors 2019-02-11 10:23:45 +00:00
96b0bce80a ENH: forces function object - made user selection clearer when running 2019-02-11 09:22:26 +00:00
5610da9f95 STYLE: missing space in warning message 2019-02-08 18:53:27 +01:00
e5b3af9c05 ENH: add failsafe version of Enum::get() 2019-02-08 16:51:54 +01:00
27c58dde4c STYLE: provide boolList, boolUList typedefs directly in container
- move declaration of emptyLabelList (now deprecated) out of List.H
2019-02-08 16:35:53 +01:00
7904e4a73f COMP: resolved compiler warnings 2019-02-08 09:32:53 +00:00
e929a20921 STYLE: Header clean-up 2019-02-08 09:30:46 +00:00
e3008553e8 ENH: uniformFixedValue: adapt point bc. See #1046. 2019-02-07 14:08:03 +00:00
078e34746e ENH: code adjustments for updated NullObject
- can now safely use labelList::null() instead of emptyLabelList for
  return values. No special treatment required for lists.

  Possible replacements:

      if (notNull(list) && list.size())  ->  if (list.size())
      if (isNull(list) || list.empty())  ->  if (list.empty())

  The receiver may still wish to handle differently to distinguish
  between a null list and an empty list, but no additional special
  protection is required when obtaining sizes, traversing, outputting
  etc.
2019-02-07 13:04:24 +01:00
0800e021ad ENH: improved handling of zone allocation in surfMesh
- relocate zone IO from Detail::MeshedSurfaceIOAllocator into surfMesh
  directly to allow re-purposing of MeshedSurfaceIOAllocator

- provide meshedSurf::emptySurface zero-sized placeholder implementation

- add concrete implementation of meshedSurf::zoneIds() to simplify
  overloading
2019-01-22 09:44:18 +01:00
eaa3da72c5 ENH: extend size of NullObject for safer reinterpret cast
- previously had a single pointer/value zeros (8 bytes), this meant
  that the reinterpret cast to a List would yield a reference that
  could be unsafe under certain conditions.

  Eg,
     const labelList& myList = labelList::null();

     Info<< myList.size() << nl; // OK since size is the first parameter

     SubList<label>(myList, 0);  // Unsafe

  The SubList usage is unsafe since it passes in pointer and size into
  the underlying UList. However, the pointer from the labelList::null()
  will be whatever happens to be around in memory immediately after the
  NullObject singleton. This is mostly not a problem if the List size
  is always checked, but does mean that the data pointer is rather
  dubious.

- Increase the size of the nullObject singleton to 32 bytes of zeros
  to ensure that most reinterpret casting will not result in objects
  that reference arbitrary memory.

  The 32-byte data size is rather arbitrary, but covers most basic
  containers.
2019-02-07 11:13:13 +01:00
2016f88eba ENH: use vtk::surfaceWriter in shortestPathSet debugging 2019-02-07 09:45:13 +01:00
3a6e596a09 STYLE: indentation 2019-02-05 09:06:24 +01:00
7d023d035c ENH: PatchFunction1: work with points. See 1046. 2019-02-07 10:33:46 +00:00
ce7e921f21 ENH: restart: save/restore cumulative continuity error. See #1172. 2019-02-07 10:27:03 +00:00
6d6f43d72e ENH: refactored regIOobject searching in object registry
- The findObject() methods are template-typed and used to locate a
  particular Type/name combination.

  Eg,

      volScalarField* ptr = obr.findObject<volScalarField>("xyz");

- The findIOobject() methods are un-typed and use the name only.

  Eg,

      regIOobject* ptr = obr.findIOobject("xyz");

The typed versions will be most commonly used, but the un-typed lookup
can be useful in a templating.

- Simplified findObject* methods to use findIOobject* as the backend.
2019-02-06 12:01:29 +01:00
1b9576df0a ENH: support objectRegistry::checkOut(const word& name)
- similar to what erase() does, but as a mutable operation (#1180)

- replace basicThermo lookupAndCheckout (commit 880c98757d) with
  the new objectRegistry::checkOut() method.
2019-02-06 12:01:29 +01:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
4d82589841 ENH: exact restart. Fixes #1172. 2019-02-06 12:13:52 +00:00
8f572a5e71 ENH: improve volRegion handling of moving meshes (#1194)
- implemented as lazy evaluation with an additional update() method.
  This avoids unnecessary changes until the values are actually
  required.

- apply mesh motion changes for momentum, volFieldValue,
  specieReactionRates function objects
2019-02-06 10:25:47 +01:00
fb561daf7a ENH: avoid potential leaks with objectRegistry::erase (#1180)
- forwards to the underlying HashTable erase, but frees things owned
  by the registry as well (ie, performs a checkOut)
2019-02-06 09:09:31 +01:00
d0d83b0784 COMP: basicThermo: object instead of class name. See #1180. 2019-02-06 09:28:36 +00:00
b6c5fc0ada ENH: Added checks for input Reynolds stresses based on Lund coefficient constraints. Fixes #1124 2019-02-05 14:07:59 +00:00
edfd27f9e4 BUG: Corrected re-reading of time control function objects. Fixes #1192 2019-02-05 11:28:31 +00:00
427acc84b0 COMP: foamVtkTools: template specialization bug in gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
2019-02-04 16:39:01 +00:00
4db5c3657b COMP: Allwmake: also resolve link order: -lblockMesh needed when linking overset 2019-02-04 12:03:53 +00:00
cab94a5d0a Merge remote-tracking branch 'origin/master' into develop 2019-02-04 10:55:34 +00:00
4435819a7a Merge branch 'feature-fieldLimits' into 'develop'
Add minMax and clip field functions

See merge request Development/OpenFOAM-plus!230
2019-02-01 16:54:36 +00:00
932666c408 ENH: add vtk::Tools::Patch faceCentres() method 2019-02-01 10:37:15 +01:00
8473fd0b2a COMP: template specialization in incorrect namespace
STYLE: avoid local variable name masking
2019-02-01 10:20:29 +01:00
b7fb6116c3 ENH: restructuring of ensight output files
- changed ensightOutput from a class solely comprising static methods to
  a namespace and added in sub-namespaces Detail and Serial.

  This makes it easier to "mix-in" functions at different levels.
  Refactored and combined some serial/parallel code where possible.

  The general ensightOutput namespace has now shifted to be in the
  fileFormats lib, while leaving volField outputs in the conversion lib
  and cloud outputs in the lagrangian-intermediate lib.

  The ensightCloud namespace is now simply folded into the new
  ensightOutput namespace.

  These changes clean up some code, reduce fragmentation and
  duplication and removes the previous libconversion dependency for
  sampling.

- use int for ensight nTypes constexpr

Note: issue #1176 is unaffected except for the change in file name:

   ensightOutputTemplates.C -> ensightOutputVolFieldTemplates.C
2019-01-29 15:18:17 +01:00
1982f1df89 Merge branch 'feature-solver-info' into 'develop'
Function object updates

See merge request Development/OpenFOAM-plus!231
2019-01-31 17:00:01 +00:00
fe21c9c327 ENH: change vtk::Tools from a class to a namespace
- allows localized extension of functionality
2019-01-31 13:43:18 +01:00
acc66c217b ENH: add bitwise and/or ops 2019-01-31 12:35:34 +01:00
70f7b7f632 COMP: Allwmake: build order 2019-01-31 10:13:15 +00:00
d685727469 GIT: fix previous dirty commit 2019-01-30 17:44:44 +01:00
70845a8838 ENH: code cleanup and improvement of ensight parts
- improved the selection mechanism to include using a bitSet
  cell selection (more efficient and convenient).

  Use templated implementation internally to remove the previous
  reliance on a NullObject.
2019-01-30 08:06:01 +01:00
8d12e080f6 ENH: new continuityError function object
Example usage:

    continuityError1
    {
        type        continuityError;
        libs        ("libfieldFunctionObjects.so");
        ...
        writeToFile yes;
        log         yes;
        phi         phi;
    }
2019-01-29 13:53:56 +00:00
94070f5ee7 STYLE: Renamed residuals FO -> solverInfo to reflect capabilities 2019-01-29 13:52:37 +00:00