Commit Graph

21771 Commits

Author SHA1 Message Date
edf5cf4588 ENH: MeshObject: objectRegistry lookup only once. Fixes #1071. 2018-11-14 12:41:26 +00:00
a072d18380 ENH: add sync() for faceBitSet, faceBoolSet, pointBitSet (#1060)
- fix range checks
2018-11-14 11:55:38 +01:00
c599810533 ENH: code reduction in MeshObject (#1071)
- use forwarding templates for the factory method

- avoid double use of dynamic_cast.
  Don't need implicit use in isA<>, can use result directly

STYLE: updated iteration over HashTable of mesh objects
2018-11-15 13:06:12 +01:00
f269371dbc ENH: support cylindrical coordinates in fieldCoordinateSystemTransform (#1076) 2018-11-16 15:12:19 +01:00
4a53835f4b BUG: incorrect transform for fieldCoordinateSystemTransform (fixes #1076)
- was using coordinate-system and transform() which is the
  local-to-global mapping, whereas it should be invTransform() which
  is the global-to-local mapping
2018-11-16 12:23:41 +01:00
7996e9af8b ENH: add invTransform for fields (#1076) 2018-11-16 12:22:24 +01:00
f2de61f82c STYLE: add geometric constraint to decomposeParDict example (issue #921) 2018-11-15 11:45:18 +01:00
5c993cf009 STYLE: remove redundant return statement 2018-11-14 12:54:58 +01:00
5029d29ff6 ENH: support -gcc option for foamConfigurePaths
- simplifies things for legacyCompile
2018-11-15 13:55:21 +01:00
4bf4b89af4 ENH: support scalar predicates and lists of scalar predicates (#1056) 2018-11-13 14:12:53 +01:00
1883a872a1 STYLE: adds comments in empty Make/options files
- easier when making modifications

STYLE: spelling in topoSetSource comments
2018-11-13 15:21:13 +01:00
8752120ad5 COMP: use hard-coded values for fieldTypes (issue #1068)
- this seems to be the only reliable means of obtaining the values.

  Using typeName_() yields the wrong value.

  Using the typeName causes initialization issues
  (segfault when executing on some systems).
2018-11-12 16:39:55 +01:00
90dd4b30cd TUT: syntax typo (#1059) 2018-11-12 13:59:38 +01:00
2ac5df6f93 BUG: inconsistent field ordering in PDRMesh (fixes #1069) 2018-11-12 12:59:03 +01:00
b016b1664e COMP: use typeName_() accessors for building fieldTypes
- resolves better on some compilers.
2018-11-12 12:43:33 +01:00
9c993c8ebd Merge branch 'feature-ioobjectlist-registry' into 'develop'
Feature ioobjectlist registry

See merge request Development/OpenFOAM-plus!218
2018-11-12 11:39:01 +00:00
a89fedb2ec Merge branch 'feature-uniformFixedValue' into 'develop'
uniformFixedValue: avoid re-evaluation on reading or mapping

See merge request Development/OpenFOAM-plus!219
2018-11-12 10:49:28 +00:00
e9af742819 BUG: uniformFixedValue: do not evaluate upon reading. Fixes #1058. 2018-11-12 09:15:09 +00:00
9bc61e5f41 ENH: improve IOobjectList name filtering
- support name filtering by class based on <Type> or predicates.
  Eg,

      objects.sortedNames<volScalarField>(namePattern);
  vs  objects.sortedNames(volScalarField::typeName, namePattern);

  These can also be used directly for untyped name matching.
  Eg,
      objects.sortedNames<void>(namePattern);

  Can also use a predicate:

      objects.sortedNames(wordRe("vol.*Field"), namePattern);
      objects.sortedNames
      (
          [](const word& clsName){ return clsName.startsWith("vol"); },
          namePattern
      );
2018-11-12 08:55:45 +01:00
256042158f ENH: IOobjectList improvements
- add IOobjectList::count() methods

- lookupClass<Type>() to use types instead of class variables.

- additional helpers for parallel: allNames(), checkNames()

- provide filterClasses() and filterObjects(), prune_0() method
  forwarding to HashTable methods for easier access.
2018-11-12 01:01:58 +01:00
f94d724a93 ENH: add objectRegistry::count() methods
- can be useful for obtaining information about number of fields.
  Eg,

       nScalar = mesh.count<volScalarField>(wordre);
2018-11-11 19:00:54 +01:00
4965ea4988 ENH: simplify/extend objectRegistry code with templated predicates
- replace explicit use of wordRe, wordRes, wordHashSet as filters
  with a MatchPredicate.

- support filtering by class based on <Type> or predicates
2018-11-10 17:20:32 +01:00
f44e59fb55 ENH: add IOobject::isHeaderClassName() method
- in parameter form, check if it headerClassName() corresponds to the
  specified class name

- in templated form, check if headerClassName() corresponds to the
  Type:typeName value.
  Specialization for <void> always returns true (ie, no checks)
2018-11-10 16:54:19 +01:00
8562e5278f ENH: simplify/extend IOobjectList code with templated predicates
- replace explicit use of word, wordRe, wordRes, wordHashSet as filters
  with a MatchPredicate, since they all satisfy the requirements for
  use a predicate. This change reduces code duplication, allows other
  matcher types (eg, keyType) as well as lambda functions.

- add special treatment for a 'const char*' parameter
  for lookupClass() and the now-deprecated single item lookup() method
  to promote these parameters to 'word'.
2018-11-10 12:12:06 +01:00
faaa93fdb5 ENH: add IOobjectList::findObject() method
- naming similar to objectRegistry, with unambiguous resolution.
  The lookup() methods have different return types depending on the
  calling parameter.

STYLE: use IOobjectListTemplates.C for implementations

- previously included as local definition within IOobjectList.C,
  but will be adding more templated methods soon.

- adjust parameters (eg, matchName instead of matcher) to show their
  function

ENH: handle objectRegistry::names<void>(...)

- this is equivalent to no Type restriction, and can be used when
  filtering names. Eg,

     obr.names<void>(wordRe..);
2018-11-09 21:57:55 +01:00
ffec4c6fa7 STYLE: more consistent formatting for deprecated items
- Start brief descriptions with 'Deprecated(YYYY-MM)' so that it is
  readily visible in the short method description. Consistent date
  format (YYYY-MM), placed immediately after the \deprecated tag.
2018-11-11 17:17:33 +01:00
91cfe4c271 ENH: add wordRes::matching() method
- returns indices of matching entries.
2018-11-09 21:21:15 +01:00
dff2569c7f GIT: commit text missed in squashed merge
commit 3f9c7bf411
    commit 3cf177e759

====

ENH: add geometric decomposition constraint (issue #921)

- geometric decomposition constraints may be used to prevent the
  decomposition of regions of the mesh.

  The geometric constraint is applied according to the face centres,
  which define the connectivity between cells.

  Specified in decomposeParDict

    constraints
    {
        geometric
        {
            type    geometric;

            geometry
            {
                box1
                {
                    type    box;
                    min     (-10 -10 -10);
                    max     (1 1 1);
                }

                ball1
                {
                    type    sphere;
                    origin  (-2 -2 1);
                    radius  1;
                }
            }
        }
    }

ENH: add 'grow' option for geometric decomposition constraint (issue #921)

- the 'grow' option includes an additional check to include cell faces
  for any cell that already has two or more of its faces "unblocked".
  This could indicate a connection over a corner, but does not distinguish
  between connectivity introduced by the constraint and the connectivity
  defined by other constraints.

ENH: geometric decomposition constraint using topoSetFaceSource (issue #921)

- replaced use of searchableSurface with a more general and
  more efficient topoSetFaceSource instead.
  Since searchableSurface is also available as a topoSetFaceSource,
  there is no loss in functionality, but using topoSetFaceSource allow
  directly looping over the faces without creating of an additional
  List of volumeTypes.
2018-11-08 21:55:39 +01:00
3f9c7bf411 Merge branch 'wp09-geometric-constraint' into 'develop'
Work-package-09 geometric constraint

See merge request Development/OpenFOAM-plus!217
2018-11-08 20:50:47 +00:00
3cf177e759 Work-package-09 geometric constraint 2018-11-08 20:50:47 +00:00
69c3a6fb3b COMP: fix conditional for VTK legacy rendering.
- was deprecated for removal with VTK 8.1.0
  definitely removed in VTK 8.2.0
2018-11-08 21:28:26 +01:00
ab11a330e0 ENH: accept movable autoPtr for storage in regIOobject 2018-11-08 17:46:52 +01:00
6d906e52d3 COMP: fieldTypes: add to link line after the static symbols it uses
This fixes the static-initialisation order problem - fieldTypes.C
referes to labelIOField etc. which are after it in Make/files and
hence the link order.
2018-11-08 13:28:46 +00:00
258dd6eeea STYLE: polyMesh: corrected spelling 2018-11-08 10:46:25 +00:00
6f3471d5fb STYLE: protect and comment test of illegal access (#1066) 2018-11-08 14:46:35 +01:00
d7fc5f6f66 ENH: construct cylindrical from origin, axis (issue #863) 2018-11-08 13:12:23 +01:00
f426c510dd CONFIG: update for ParaView-5.6.0 2018-11-08 09:17:02 +01:00
9ebccb2e39 ENH: adjustments for ListOps subset, subsetList
- now takes a const UList<T> as input and returns a List<T>
  instead of trying to use the same ListType for both.

  This avoids previously encountered issues when a UList was passed in.

- add specialized bitSet handling within subset(), where we can benefit
  from faster traversal of sparse selections and have a better estimate
  of the final output size.
2018-11-08 08:47:31 +01:00
2c44ac299d ENH: add bitSet::operator() for predicate use (as per HashSet) 2018-11-08 11:34:02 +01:00
2fb382bf8a ENH: multiple zone selection for fvMeshSubsetProxy (#973)
- handle tmp fields in interpolate methods

- special method interpolateInternal() for creating a volume field
  with zero-gradient treatment for patches from an internal field.

  This method was previously also called interpolate(), but that
  masked the ability to subset the internal field only.

  Ensight output needs the volume field:
      uses interpolateInternal().

  VTK output has separate handling of internal and patch fields:
      uses interpolate().

ENH: added fvMeshSubset mesh() method for baseMesh or subMesh.

- simplies coding when the fvMeshSubset may or may not be in active use.

ENH: update foamToEnsight to use newer methods in wrapped form

- static interpolate functions with renaming for manual use with
  fvMeshSubset (when fvMeshSubsetProxy may be too limiting in
  functionality)
2018-10-02 17:06:44 +02:00
94951939d8 Merge remote-tracking branch 'origin/develop' into develop 2018-11-07 18:27:37 +01:00
b053c36a7b COMP: missing files 2018-11-07 18:27:13 +01:00
816674e9d6 ENH: More general approach to momentum source direction for
the actuation disk FO
2018-11-07 09:09:17 -08:00
1ea7aa45f5 STYLE: make dictionary error more descriptive (#1065) 2018-11-07 15:16:14 +01:00
5f556ffb4a ENH: make sourceInfo sub-dictionary optional for topoSet (#1060)
- helps reduce clutter in the topoSetDict files.

  Caveats when using this.

  The older specification styles using "name" will conflict with the
  set name. Eg,

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        sourceInfo
        {
            name   inlet;
        }
    }

    would flattened to the following
    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        name   inlet;
    }
    which overwrites the "name" used for the faceSet.

    The solution is to use the updated syntax:

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        patch   inlet;
    }
2018-11-07 10:33:36 +01:00
6090faedef ENH: additional topoSources, and consistency changes (#1060)
- faceBitSet, pointBitSet and faceBoolSet (similar to cellBitSet)
  * allows topo sources in a wider variety of places.
  * With copy or move constructors.

- cylinderToPoint, searchableSurfaceToFace, searchableSurfaceToPoint,
  sphereToFace, sphereToPoint sources

- optional innerRadius for sphere and cylinder sources to treat as hollow.

- support "sets" as well as "set" for cellToCell, faceToFace... sources.

  * convenience and avoids writing the set during processing.
2018-11-06 18:25:05 +01:00
644c0f4a86 ENH: make dictionary of topoSet box sources consistent with searchableBox 2018-11-06 13:25:56 +01:00
72ae121558 STYLE: make dictionary error more descriptive (#1065) 2018-11-07 15:16:14 +01:00
537e8bf9e0 ENH: consolidate OpenFOAM field names (#926)
- Standard known field types in Foam::fieldTypes namespace
2018-11-06 16:52:39 +01:00
414d78a32c STYLE: include gcc/clang version in top-level Allwmake 2018-11-06 17:13:49 +01:00