Commit Graph

32 Commits

Author SHA1 Message Date
12c91b9472 STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr

  Now
      if (ptr)
      if (!ptr)

  instead
      if (ptr.valid())
      if (!ptr.valid())
2020-07-16 11:39:24 +02:00
9af3f85cf9 STYLE: simplify short-circuit involving autoPtr (#1775)
- with '&&' conditions, often better to check for non-null autoPtr
  first (it is cheap)

- check as bool instead of valid() method for cleaner code, especially
  when the wrapped item itself has a valid/empty or good.
  Also when handling multiple checks.

  Now
      if (ptr && ptr->valid())
      if (ptr1 || ptr2)

  instead
      if (ptr.valid() && ptr->valid())
      if (ptr1.valid() || ptr2.valid())
2020-07-16 10:17:25 +02:00
89c21888a9 ENH: 'mag' postOperation returns scalar (#1622) 2020-03-23 11:14:57 +01:00
2c4b639e1f ENH: 'mag' postOperation for surfaceFieldValue (#1622)
- support postOperation for volFieldValue as well
2020-03-11 11:59:04 +01:00
52d2643994 BUG: surfaceFieldValue interpolate on sampled surface fails (fixes #1488) 2019-11-11 08:54:05 +01:00
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
d6d95c33bc ENH: return scalar for surface uniformity (#1363) 2019-07-08 19:21:40 +02:00
71e6e10458 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
e322894476 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
03e6aa1a6d 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
181c974b11 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
bfb0693bbe 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
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00: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
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
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
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +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
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
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
7b788f0922 functionObjects::volRegion: General base-class to handle vol (cell) region processing
Renamed the original volRegion -> volFieldValue to clarify the purpose
of this class to process vol fields on a volRegion.
2016-08-11 15:11:19 +01:00
1fc2a73213 ENH: use meshedSurf API for surface writers (issue #104)
- Allows passing of additional information (per-face zone ids) or possibly
  other things, while reducing the number of arguments to pass.

- In sampledTriSurfaceMesh, preserve the region information that was
  read in, passing it onwards via the UnsortedMeshSurface content.

  The Nastran surface writer is currently the only writer making use
  of this per-face zone information.
  Passing it through as a PSHELL attribute, which should retain the
  distinction for parts. (issue #204)
2016-08-10 15:41:24 +02:00
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00