Commit Graph

74 Commits

Author SHA1 Message Date
Andrew Heather
2defba00a9 ENH: Lagrangian - provided backwards compatibility for cases using the
old "positions" file form

The change to barycentric-based tracking changed the contents of the
cloud "positions" file to a new format comprising the barycentric
co-ordinates and other cell position-based info.  This broke
backwards compatibility, providing no option to restart old cases
(v1706 and earlier), and caused difficulties for dependent code, e.g.
for post-processing utilities that could only infer the contents only
after reading.

The barycentric position info is now written to a file called
"coordinates" with provision to restart old cases for which only the
"positions" file is available. Related utilities, e.g. for parallel
running and data conversion have been updated to be able to support both
file types.

To write the "positions" file by default, use set the following option
in the InfoSwitches section of the controlDict:

    writeLagrangianPositions 1;
2017-09-13 13:13:36 +01:00
Mark Olesen
e62e34f0f0 ENH: add -cellZone option to foamToVTK 2017-07-04 14:16:18 +02:00
Mark Olesen
c5bd5393df ENH: lazier field loading in foamToVTK
- avoid loading surface fields if there are no faceZones

- avoid pointMesh if there are no appropriate point fields
2017-07-04 11:57:54 +02:00
Mark Olesen
6dd5a5f35f BUG: foamToVTK -cellSet produces rubbish or segfault (closes #516)
- erroneous double logic for subset meshes.

  The underlying vtk::vtuCells uses a cellMap to map into a global
  field, which also allows handling of decomposed polyhedral cells.

  If a mesh subset is involved (eg, cellSet, cellZone), then the
  set/zone cellMap can be used to ensure that the original number is
  properly adjusted. For foamToVTK, the meshSubsetHelper already
  does the subsetting and is used when loading fields.

  Does not affect ParaView reader module since there we work on the
  full field and do the subsetting manually (using the cellMap).
2017-07-04 13:19:16 +02:00
Mark Olesen
2d530401fd ENH: add foamToVTK -name option
- as per foamToEnsight, foamToEnsightParts.
  Allows the user to specify different output directories.
2017-06-14 08:14:24 +02:00
Mark Olesen
7ee1dba43a STYLE: adjust feedback comments in foamToVTK 2017-06-13 22:28:39 +02:00
Mark Olesen
cde12ad9e5 ENH: consolidate vtk classes into 'Foam::vtk' namespace
- elminate the foamVtkFormatter operator() in favour of xmlAttr.
  Improves readability and the purpose is clearer.
2017-06-13 14:10:07 +02:00
Mark Olesen
a2e978d43e ENH: add VTP, VTU output for most vtk writers (insitu only)
- with the xml append format it is possible to write raw binary
  (instead of base64), but the writer becomes more complicated.
  Either needs two passes to create, or need to allocate a block
  of space for the header information (like VTK itself does) and
  write later.

    * internalWriter
    * patchWriter
    * surfaceMeshWriter
    * lagrangianWriter

 Also these special purpose ones:
    * foamVtkWriteSurfFields
2017-06-01 18:28:40 +02:00
Mark Olesen
c4f1349496 ENH: construct VTK writers with the outputOptions and adjust internally
- this shifts responsibility away from caller to the individual writers
  for knowing which file formats are supported and which file ending is
  appropriate. When the writer receives the output format request,
  it can elect to downgrade or otherwise adjust it to what it can
  actually manage (eg, legacy vs xml vs xml-append).

  But currently still just with legacy format backends.
2017-05-31 22:08:54 +02:00
Mark Olesen
2495fcb42e ENH: replace foamToVTK routines with library-level equivalents 2017-05-22 16:13:53 +02:00
Mark Olesen
667b885116 STYLE: remove ununsed foamToVTK template functions 2017-05-17 18:59:51 +02:00
Mark Olesen
a8d2ebf298 ENH: cleanup wordRe interfaces etc.
- ensure that the string-related classes have consistently similar
  matching methods. Use operator()(const std::string) as an entry
  point for the match() method, which makes it easier to use for
  filters and predicates. In some cases this will also permit using
  a HashSet as a match predicate.

regExp
====
- the set method now returns a bool to signal that the requested
  pattern was compiled.

wordRe
====
- have separate constructors with the compilation option (was previously
  a default parameter). This leaves the single parameter constructor
  explicit, but the two parameter version is now non-explicit, which
  makes it easier to use when building lists.

- renamed compile-option from REGEX (to REGEXP) for consistency with
  with the <regex.h>, <regex> header names etc.

wordRes
====
- renamed from wordReListMatcher -> wordRes. For reduced typing and
  since it behaves as an entity only slightly related to its underlying
  list nature.

- Provide old name as typedef and include for code transition.

- pass through some list methods into wordRes

hashedWordList
====
- hashedWordList[const word& name] now returns a -1 if the name is is
  not found in the list of indices. That has been a pending change
  ever since hashedWordList was generalized out of speciesTable
  (Oct-2010).

- add operator()(const word& name) for easy use as a predicate

STYLE: adjust parameter names in stringListOps

- reflect if the parameter is being used as a primary matcher, or the
  matcher will be derived from the parameter.
  For example,
      (const char* re), which first creates a regExp
      versus (const regExp& matcher) which is used directly.
2017-05-16 23:54:43 +02:00
Mark Olesen
e5d9fd13c2 ENH: relocate meshSubsetHelper into dynamicMesh for re-use
- reuse for foamToTecplot360 and foamToVTK.
- remove dependency on vtkMesh where possible.
2016-11-09 23:33:24 +01:00
Mark Olesen
3e0e4532fd STYLE: minor adjustments to doxygen comments 2016-10-04 09:16:08 +02:00
Andrew Heather
47eb24bed5 GIT: Resolved conflicts arising from merge with develop branch 2016-09-26 10:57:34 +01:00
Mark Olesen
cff8efb98b ENH: reduce startup time for foamToVTK conversion
- Similar to ensight converters (issue #240),
  improve speed for detection of lagrangian clouds.

- provide a -noLagrangian option for symmetry
2016-09-23 18:45:06 +02:00
Andrew Heather
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Mark Olesen
8bb78dda60 ENH: provide a vfork/exec version of system (issue #185)
The normal library system() command uses 'fork', which causes
problems on IB+OPENMPI.

STYLE: add Foam:: qualifier to system calls to make them easier to spot.
2016-07-18 13:37:39 +02:00
Henry Weller
1319df48d9 Rationalized Doxygen documentation of command-line options 2016-06-17 09:11:58 +01:00
Henry Weller
1ab0875293 writeVTK: New functionObject to write fields is VTK format
Description
    This functionObject writes objects registered to the database in VTK format
    using the foamToVTK library.

    Currently only the writing of the cell-values of volFields is supported but
    support for other field types, patch fields, Lagrangian data etc. will be
    added.

    Example of function object specification:
    \verbatim
        writeVTK1
        {
            type        writeVTK;
            functionObjectLibs ("libIOFunctionObjects.so");
            ...
            objectNames (obj1 obj2);
        }
    \endverbatim

    \heading Function object usage
    \table
        Property     | Description             | Required    | Default value
        type         | type name: writeVTK     | yes         |
        objectNames  | objects to write        | yes         |
    \endtable
2016-05-10 10:06:19 +01:00
Henry Weller
a50015a423 foamToVTK: Use UPtrList rather than PtrList 2016-05-06 14:11:38 +01:00
Henry Weller
f6c670dcac functionObjects: Updated docs 2016-05-04 08:51:39 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Andrew Heather
c35bcc05f4 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-06-27 23:22:54 +01:00
Andrew Heather
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
Mark Olesen
704cfa1e0a ENH: add timing/memory info to foamToEnsight, foamToEnsightParts, foamToVTK
- useful for performance comparisons
2016-06-26 15:39:43 +02:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
Henry Weller
9de3a4280e foamToVTK: Default to ASCII format when WM_LABEL_SIZE=64
Based on patch provided by Alexey Matveichev
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1975
2016-01-19 16:28:23 +00:00
Andrew Heather
8f1d043364 GIT: Resolved conflict 2015-12-09 09:32:38 +00:00
Andrew Heather
73dac8c7ee ENH: Updating utilities based on internal development line 2015-12-02 10:17:28 +00:00
Henry Weller
e2ef006b91 applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 17:53:31 +00:00
mattijs
c8add907aa ENH: foamToVTK: leave VTK directory intact with faceSet, pointSet 2013-11-27 15:23:26 +00:00
andy
92dcc69fa8 ENH: Code clean-up 2013-05-03 17:57:43 +01:00
andy
34ac08a931 ENH: Code updates following changed to IOobjectList 2013-04-08 15:33:02 +01:00
andy
951c8436aa ENH: Applying Gijs' patch: Update header documentation for utilities 2013-02-21 10:54:34 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
mattijs
172ff9edeb ENH: foamToVTK: disable field reading with empty -fields (). 2011-07-28 22:30:12 +01:00
Henry
c3cb632c24 Documentation: converted javadoc @ to LaTeX style \ in Doxygen code docs 2011-02-08 18:22:00 +00:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
mattijs
97dff2650e ENH: foamToVTK : have surface fields on faceZones 2010-09-06 17:02:35 +01:00
mattijs
aa7fe837f5 COMP: ignore return value 2010-08-19 15:42:29 +01:00
graham
28345247a7 STYLE: Fixing code style requirements for more files - those not
picked up by a copyright change.
2010-07-29 11:28:44 +01:00
Mark Olesen
1b4450890a ENH: write patches as vtkPolyData instead of vtkUnstructuredGrid
- slightly better memory efficiency and file sizes
- consistent with library reader
2010-05-07 09:35:40 +02:00
Mark Olesen
64ac5cbc78 ENH: allow direct writing of polyhedra from foamToVTK 2010-05-07 09:06:48 +02:00
Mark Olesen
9b24f6c51b ENH: add first provisioning for foamToVTK without polyhedral decomposition 2010-05-03 10:42:45 +02:00
Mark Olesen
147fa2a75d STYLE: add notes to some (most) command-line options
- mapFields and splitMeshRegions need more clarification
2010-04-27 10:50:15 +02:00
Mark Olesen
42807ddd7e STYLE: fix worst spacing violations for 'os <<' constructions
- accept some violations of the coding guidelines though
- perhaps adding a style exception would be simpler.
2010-04-13 17:45:49 +02:00