Commit Graph

76 Commits

Author SHA1 Message Date
6297f7b0fd ENH: use cellPoint interpolation directly for surfaceFieldValue (#1212)
- prior to sampledSurface supporting different interpolation schemes a
  workaround means was used to simulate cellPoint -> face
  interpolation, with averaging of vertex interpolation.

  We instead now use cellPoint interpolation directly for the face
  values when 'interpolate=true'.
2019-02-25 18:40:35 +01:00
4f18978f02 STYLE: pass points, faces instead of meshedSurfRef in surfaceFieldValue
- removes a layer of opacity and may help with future restructuring
2019-02-22 11:08:07 +01:00
4eb35f7ba5 ENH: replace surfMesh/fields support with polySurface/fields support (#1206)
- fits better into the general sampling framework, improves flexibilty
  and allows code reduction.

ENH: include surface fields on sampledSurfaces that support it
2019-02-12 13:54:02 +01:00
005f2e8918 ENH: improved sample surfaces and surface writers (#1206)
- The writers have changed from being a generic state-less set of
  routines to more properly conforming to the normal notion of a writer.
  These changes allow us to combine output fields (eg, in a single
  VTK/vtp file for each timestep).

  Parallel data reduction and any associated bookkeeping is now part
  of the surface writers.
  This improves their re-usability and avoids unnecessary
  and premature data reduction at the sampling stage.

  It is now possible to have different output formats on a per-surface
  basis.

- A new feature of the surface sampling is the ability to "store" the
  sampled surfaces and fields onto a registry for reuse by other
  function objects.

  Additionally, the "store" can be triggered at the execution phase
  as well
2019-02-07 18:11:34 +01:00
63389af16f ENH: delay evaluation of surfaces for surfaceFieldValue (issue #1202)
- complete any pending initialisation on write().
  Allows lazier evaluation until when the surfaces are actually needed.
2019-02-12 12:39:49 +01:00
b29c5c1cc9 STYLE: consolidate 'clear' when initialising surfaceFieldValue 2019-02-11 15:59:14 +01:00
988e4cad7f BOT: Added OpenCFD copyright prior to transfer - moved files 2019-02-06 14:22:42 +00:00
b921ae298e BOT: Cleaned up header files 2019-02-06 12:28:23 +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
3b74512231 ENH: cleanup of Enum class
- more dictionary-like methods, enforce keyType::LITERAL for all
  lookups to avoid any spurious keyword matching.

- new readEntry, readIfPresent methods

- The get() method replaces the now deprecate lookup() method.

- Deprecate lookupOrFailsafe()
  Failsafe behaviour is now an optional parameter for lookupOrDefault,
  which makes it easier to tailor behaviour at runtime.

- output of the names is now always flatted without line-breaks.
  Thus,

     os << flatOutput(someEnumNames.names()) << nl;
     os << someEnumNames << nl;

  both generate the same output.

- Constructor now uses C-string (const char*) directly instead of
  Foam::word in its initializer_list.

- Remove special enum + initializer_list constructor form since
  it can create unbounded lookup indices.

- Removd old hasEnum, hasName forms that were provided during initial
  transition from NamedEnum.

- Added static_assert on Enum contents to restrict to enum or
  integral values.  Should not likely be using this class to enumerate
  other things since it internally uses an 'int' for its values.

  Changed volumeType accordingly to enumerate on its type (enum),
  not the class itself.
2018-10-18 12:57:32 +02:00
1036cf9612 ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
853ec2bf64 STYLE: doxygen fixes for surfaceFieldValue 2018-06-14 16:14:31 +02:00
54ebae39de STYLE: mention uniformity index in doxygen 2018-06-13 16:54:28 +02:00
b0648f2ba0 ENH: improvements in the surface sampling infrastructure
- improvement documentation for surface sampling.

- can now specify alternative sampling scheme for obtaining the
  face values instead of just using the "cell" value. For example,

      sampleScheme    cellPoint;

  This can be useful for cases when the surface is close to a boundary
  cell and there are large gradients in the sampled field.

- distanceSurface now handles non-closed surfaces more robustly.
  Unknown regions (not inside or outside) are marked internally and
  excluded from consideration. This allows use of 'signed' surfaces
  where not previously possible.
2018-05-07 11:29:00 +02:00
e53384362c ENH: added surfaceFieldValue uniformity operation 2018-03-22 22:38:34 +01:00
57291e8692 STYLE: use autoPtr::New and tmp::New for simple return types 2018-02-26 14:00:30 +01:00
74b557d5f2 STYLE: indentation: trailing whitespace 2017-12-08 12:26:16 +00:00
7d7b0bfe84 STYLE: use list methods find/found instead of findIndex function 2017-10-24 19:07:34 +02:00
56bfc75949 Rationalize the "pos" function
"pos" now returns 1 if the argument is greater than 0, otherwise it returns 0.
This is consistent with the common mathematical definition of the "pos" function:

https://en.wikipedia.org/wiki/Sign_(mathematics)

However the previous implementation in which 1 was also returned for a 0
argument is useful in many situations so the "pos0" has been added which returns
1 if the argument is greater or equal to 0.  Additionally the "neg0" has been
added which returns 1 if if the argument is less than or equal to 0.
2017-06-22 14:32:18 +01:00
6ec186bada ENH: a weighted operation without a weightField is an error (issue #583)
- affects surfaceFieldValue, volFieldValue.

  Use 'none' (if desired) to explicitly suppress the weightField, but
  generally better to use a different operation.
2017-09-11 18:10:41 +02:00
4588182352 ENH: add absolute weighting for surfaceFieldValue (issue #567)
- can be useful either for flow-rate weighting where backflow
  is to be ignored in the average, or for flow-rate weighting
  on surfaces with inconsistent orientation.

  Reworked to code to make better use of Enum (the NamedEnum
  replacement). Enum doesn't require contiguous enumeration values,
  which lets us use bitmasking of similar operations to reduce
  duplicate code.
2017-08-11 14:53:24 +02:00
a09125c3f9 STYLE: extraneous orientedWeightField in documentation (closes #565) 2017-08-10 10:15:55 +02:00
bc1f2fa97e STYLE: use auto and cfind to simplify selector usage (issue #512) 2017-07-03 10:36:03 +02:00
f55c568f13 ENH: upgrade from NamedEnum to Enum (issue #515) 2017-07-03 21:43:33 +02:00
b80f24948d Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-06-01 17:28:21 +01:00
f431a328d2 ENH: volRegion and volFieldValue - updated output name if operating on all cells 2017-06-01 17:26:12 +01:00
fb4971644f ENH: cleanup of NamedEnum
- Remove the unused enums() method since it delivers wholly unreliable
  results. It is not guaranteed to cover the full enumeration range,
  but only the listed names.

- Remove the unused strings() method.
  Duplicated functionality of the words(), but was never used.

- Change access of words() method from static to object.
  Better code isolation. Permits the constructor to take over
  as the single point of failure for bad input.

- Add values() method

- do not expose internal (HashTable) lookup since it makes it more
  difficult to enforce constness and the implementation detail should
  not be exposed. However leave toc() and sortedToc() for the interface.

STYLE: relocated NamedEnum under primitives (was containers)

- internal typedef as 'value_type' for some consistency with STL conventions
2017-05-29 10:30:55 +02:00
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +01:00
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
99f31a75f0 COMP: Removed override directives to remove compiler warnings 2017-05-18 12:40:48 +01:00
db5348880e MRG: resolved merge conflicts from merge from develop branch 2017-05-19 16:29:54 +01:00
d71a7857bf Merge remote-tracking branch 'origin/develop' into integration-foundation 2017-05-18 12:43:15 +01:00
f71e4ff5cb ENH: surfaceFieldValue - simplified by making use of new field.oriented() functionality 2017-04-24 11:43:13 +01:00
b708c23cfc ENH: Clean-up after latest Foundation integrations 2017-03-27 14:34:01 +01:00
65a4a357b5 COMP: Corrected ambiguous construction from tmp errors 2017-03-24 15:50:27 +00:00
dcb1a95e35 MRG: Integrated Foundation code to commit 7d6845d 2017-03-23 14:33:33 +00:00
2853678a60 ENH: support operations on surfFields in surfaceFieldValue
- this makes it possible to perform additional operations
  on surface values that have been previously sampled.

- support vectorField for weighting operations.

- reduce overhead by avoiding creation of weight fields, Sf fields
  and combined surface geometries unless they are actually required.

- extend some similar concepts and operations to volFieldValue
2017-03-02 14:50:36 +01:00
cbf793fca2 ENH: Updated header file documentation 2017-03-21 09:40:35 +00:00
e9355df198 ENH: [surface|vol]FieldValue - added name of weight field to output file header if used 2017-03-21 09:38:36 +00:00
2049c5c2a4 BUG: using tmp() instead of tmp.ref() in combineFields (closes #400)
- templated code that is not actually be used yet.

ENH: avoid combineFields for serial case

Note: a 'master-only' variant with combineList only on the master and
without scatter can be pursued later.
2017-02-09 15:19:47 +01:00
ddf1268e73 functionObjects:surfaceFieldValue, volFieldValue: Added weightedSum and weighted[Area|Vol]Integrate
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=2452
2017-02-06 15:48:11 +00:00
83a874cdba functionObjects::volRegion: Improved parallel efficiency
Based on patch contributed by Kevin Nordin-Bates
Resolves bug-report https://bugs.openfoam.org/view.php?id=2401
2016-12-19 19:20:09 +00:00
b073c0a104 ENH: postOperation for surfaceFieldValue
- currently only 'none' or 'sqrt', which can be useful in combination
  with integrate or averaging functions.
2016-12-15 09:46:00 +01:00
422993f9a5 ENH: add weightedAreaIntegrate operation for surfaceFieldValue 2016-12-08 11:00:18 +00:00
989883d62b GIT: Resolved merge conflict 2016-12-12 12:23:45 +00:00
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
b6d79ed4ce BUG: scaleFactor for fieldValue function-objects is 'sticky' (issue #331)
- if set in a dictionary and later removed, the intermediate value is
  retained rather than reverting to a normal default value.

- same applies for a few other function objects and their variables
2016-12-08 11:33:39 +00:00
8b219feda2 Updated member type comments
See http://bugs.openfoam.org/view.php?id=2356
2016-11-28 09:22:56 +00:00
8a9618be52 functionObjects::fieldValueDelta: Corrected documentation 2016-11-18 14:30:42 +00:00
e476f80e7a functionObjects: Improved handling of multi-file indexing and code style
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2216
2016-08-24 19:34:00 +01:00