Commit Graph

45 Commits

Author SHA1 Message Date
Mark Olesen
b060378dca ENH: improve consistency of fileName handling windows/non-windows (#2057)
- wrap command-line retrieval of fileName with an implicit validate.

  Instead of this:
      fileName input(args[1]);
      fileName other(args["someopt"]);

  Now use this:
      auto input = args.get<fileName>(1);
      auto other = args.get<fileName>("someopt");

  which adds a fileName::validate on the inputs

  Because of how it is implemented, it will automatically also apply
  to argList getOrDefault<fileName>, readIfPresent<fileName> etc.

- adjust fileName::validate and clean to handle backslash conversion.
  This makes it easier to ensure that path names arising from MS-Windows
  are consistently handled internally.

- dictionarySearch: now check for initial '/' directly instead of
  relying on fileName isAbsolute(), which now does more things

BREAKING: remove fileName::clean() const method

- relying on const/non-const to control the behaviour (inplace change
  or return a copy) is too fragile and the const version was
  almost never used.

  Replace:
      fileName sanitized = constPath.clean();

  With:
      fileName sanitized(constPath);
      sanitized.clean());

STYLE: test empty() instead of comparing with fileName::null
2021-04-19 16:33:42 +00:00
Mark Olesen
e3d4443871 ENH: improve surfaceSplitByPatch controls (#1600)
- uses MeshedSurface instead of triSurface to prevent automatic
  triangulation.

- supports '-patches' and '-excludePatches' controls as per foamToVTK.
  For example,

    surfaceSplitByPatch -patches '( ".*rider.*" )'  motorBike.obj

ENH: use MeshedSurface for surfaceSubset
2020-03-12 16:20:57 +01:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
f1a48a3c2f ENH: accept bitSet for MeshedSurface::subsetMesh
- add triSurface::subsetMesh single-parameter variant
2019-07-12 08:54:34 +02:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
f38190213c ENH: support usage descriptions for command arguments 2018-12-12 11:58:56 +01:00
Mark Olesen
68ec561df8 STYLE: add usage notes to more utilities and solvers 2018-12-11 15:25:27 +01:00
Mark Olesen
d58c142404 ENH: use restricted dictionary lookup for utilities (issue #762)
- get<label>, get<scalar> instead of readLabel, readScalar, etc.
2018-07-24 08:08:30 +02:00
Mark Olesen
84b109219a STYLE: reduced usage of Switch
- Since 'bool' and 'Switch' use the _identical_ input mechanism
  (ie, both accept true/false, on/off, yes/no, none, 1/0), the main
  reason to prefer one or the other is the output.

  The output for Switch is as text (eg, "true"), whereas for bool
  it is label (0 or 1). If the output is required for a dictionary,
  Switch may be appropriate. If the output is not required, or is only
  used for Pstream exchange, bool can be more appropriate.
2018-06-01 20:51:48 +02:00
Mark Olesen
f2ba618c19 STYLE: consistency in using argList::addArgument, argList::addOption 2017-11-22 12:54:28 +01:00
Mark Olesen
610854af03 STYLE: minor cleanup after merge 2017-09-22 16:25:17 +02:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
67de20df25 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
Henry Weller
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
Andrew Heather
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
Andrew Heather
3f55f752fc GIT: Resolve conflict with upstream merge from Foundation 2015-12-07 17:07:20 +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
c6a3d4f3c5 ENH: surface: various updates to the surface utilities
surfaceBooleanFeatures: use CGAL for intersection
surfaceCheck: write surface zoning as vtk file
surfaceInflate: new utility to offset surface
surfacePatch: replacement for surfaceAutoPatch. Also does cutting of surfaces.
2015-11-10 15:04:32 +00:00
mattijs
6c319ce47b ENH: surfaceSubset: add select-by-plane 2013-07-11 17:12:49 +01:00
laurence
c2d3bab08e ENH: Merge searchableSurface and indexedOctree volumeType 2013-04-11 19:52:03 +01:00
andy
951c8436aa ENH: Applying Gijs' patch: Update header documentation for utilities 2013-02-21 10:54:34 +00:00
Henry
5682987dc7 Updated headers 2012-04-17 16:49:03 +01:00
Henry
cd51a5eea3 Consistency: Changed exponent FORTRAN style 'E' to C style 'e' 2012-04-17 16:48:27 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
mattijs
7902377c02 ENH: treeDataTrisurface: expose tolerance 2011-06-02 12:14:53 +01: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
Mark Olesen
0d662c74c6 STYLE: use triSurface::FaceType where triangle or region information
not required
2010-11-26 20:39:46 +01:00
graham
ebb9a9e1ac ENH: tet decomposed particle tracking.
Squashed merge of particleInteractions up to
commit e7cb5bcf0315c359539ef1e715e1d51991343391
2010-09-17 16:59:17 +01:00
Mark Olesen
ff30e6b61a STYLE: can use bool instead of Switch version of dictionary::lookupOrDefault
- both versions handle the same input words.
  Only need the <Switch> version when the destination variable is
  also a Switch and we need to output the word later.
2010-05-20 14:17:18 +02:00
Mark Olesen
35afeb9b18 STYLE: remove superfluous uses of argList::validArgs.clear()
- a holdover from the old <root> <case> days
2010-05-03 08:38:39 +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
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
d857d671ac STYLE: use new argList argRead() method and operator[] for cleaner code.
- deprecate argList::additionalArgs() method and remove uses of it
2010-02-16 17:57:49 +01:00
Mark Olesen
0d49e4711c Begin code refactoring of third-party file formats. 2010-01-15 14:35:50 +01:00
Mark Olesen
c091d856ae pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
2009-12-03 14:12:08 +01:00
Mark Olesen
fa93ce8cd7 coding style adherence
- markup codingStyleGuide.org examples so they actually indent correctly

- use 'Info<<' as per codingStyleGuide instead of 'Info <<'
2009-11-27 15:39:14 +01:00
Mark Olesen
95dcb6ded7 Simplify checking of container (List/HashTable, strings) sizes
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or
  'XX.size() <= 0' or for simpler coding.
  It also has the same number of characters as '!XX.size()' and /might/ be
  more readable

- many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1'
  when a simple 'XX.size()' suffices
2009-01-10 20:28:06 +01:00
Mark Olesen
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
mattijs
0f579e4073 wildcards in dictionaries 2008-10-02 17:28:33 +01:00
mattijs
b53fba494a smaller extents 2008-09-09 17:09:54 +01:00
Mark Olesen
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
OpenFOAM-admin
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00