Commit Graph

2017 Commits

Author SHA1 Message Date
mattijs
77ecc4c6e0 BUG: sortedToc: reference to copy. Fixes #2554 2022-08-03 15:05:25 +01:00
Mark Olesen
c4d18e97a3 ENH: additional methods for OBJstream
- write point fields
- writeLine (takes two points)
- writeFace (takes list of face loop points)
2022-07-19 11:17:51 +02:00
Mark Olesen
3d892ace29 STYLE: set readOpt(..), writeOpt(..) by parameter, not by assignment
STYLE: qualify format/version/compression with IOstreamOption not IOstream

STYLE: reduce number of lookups when scanning {fa,fv}Solution

STYLE: call IOobject::writeEndDivider as static
2022-07-19 11:17:47 +02:00
Mark Olesen
d222cb1cee ENH: moveMesh -endTime option to restrict duration of motion testing 2022-07-13 19:09:44 +02:00
Mark Olesen
b4a482751b ENH: simplify tetrahedron and triangle handling
- combine header definitions, more pass-through methods

- face/triFace: support += operator (vertex offset)
2022-07-08 11:13:00 +02:00
Mark Olesen
8e017fa63c STYLE: specify "U[IO]Pstream" instead of "[IO]Pstream" for (read|write)
- consistency. Replace some instances of 'slave' with proc
2022-07-08 11:13:00 +02:00
sergio
9a80d0d5ef ENH: thermoTools: new library for thermophysics tools
thermoTools is a relocation of various existing tools:

- src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/
- src/semiPermeableBaffle/derivedFvPatchFields/
- src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/

ENH: Allwmake: reordering various compilation steps

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-21 09:29:13 +01:00
Mark Olesen
a465e4db85 ENH: support Euler rotation rollPitchYaw/yawPitchRoll ordering
- can be more intuitive to specify for some cases:

      rotation
      {
          type    euler;
          order   rollPitchYaw;
          angles  (0 20 45);
      }

- refactor starcd rotation to reuse Euler ZXY ordering
  (code reduction)

ENH: add -rotate-x, -rotate-y, -rotate-z for transformPoints etc

- easier to specify for simple rotations
2022-06-02 16:47:40 +02:00
Mark Olesen
8081fc7234 ENH: refactor cell selections into cellBitSet
- ensightWrite, vtkWrite, fv::cellSetOption

ENH: additional topoSet "ignore" action

- this no-op can be used to skip an action step, instead of removing
  the entire entry
2022-05-31 13:04:43 +02:00
Mark Olesen
ba10afea77 ENH: add 'filtered' polyMesh regionName() method
- in various situations with mesh regions it is also useful to
  filter out or remove the defaultRegion name (ie, "region0").

  Can now do that conveniently from the polyMesh itself or as a static
  function. Simply use this

      const word& regionDir = polyMesh::regionName(regionName);

  OR  mesh.regionName()

  instead of

      const word& regionDir =
      (
           regionName != polyMesh::defaultRegion
         ? regionName
         : word::null
      );

  Additionally, since the string '/' join operator filters out empty
  strings, the following will work correctly:

      (polyMesh::regionName(regionName)/polyMesh::meshSubDir)

      (mesh.regionName()/polyMesh::meshSubDir)
2022-05-27 14:10:31 +02:00
Mark Olesen
b712e7289e ENH: use typed lookup versions instead of xyz::typeName literals 2022-05-17 17:35:51 +02:00
Mark Olesen
42de624344 ENH: consolidate processorTopology handling for volume and area meshes
- relocate templating to factory method 'New'.
  Adds provisions for more general re-use.

- expose processor topology in globalMesh as topology()

- wrap proc->patch lookup as processorTopology::procPatchLookup method
  (failsafe). May consider using Map<label> for its storage in the
  future.
2022-05-10 10:47:01 +02:00
Mark Olesen
dea2f23afd COMP: combine uindirectPrimitivePatch.H into indirectPrimitivePatch.H
- similarly combine typedef headers for primitiveFacePatch,
  foamVtkUIndPatchWriter, foamVtkUIndPatchGeoFieldsWriter etc
  (reduce file clutter)
2022-05-10 10:47:01 +02:00
Mark Olesen
bf0b3d8872 ENH: relocate sortedOrder from ListOps.H to List.H
- commonly used, only depends on routines defined in UList
  (don't need the rest of ListOps for it).

ENH: implement boolList::operator() const

- allows use as a predicate functor, as per bitSet and labelHashSet

GIT: combine SubList, UList into List directory (intertwined concepts)

STYLE: default initialize DynamicList instead of with size 0
2022-05-09 14:52:47 +02:00
Mark Olesen
a4ef891594 COMP: missing linkage, unneeded linkage
- dynamicMesh, finiteVolume, regionFaModels, thermophysicalProperties
2022-04-29 13:26:36 +02:00
Mark Olesen
cf7dbf4d42 ENH: relocate/refactor fvMeshSubset
- direct construct and reset method for creating a zero-sized (dummy)
  subMesh. Has no exposed faces and no parallel synchronization
  required.

- core mapping (interpolate) functionality with direct handling
  of subsetting in fvMeshSubset (src/finiteVolume).
  Does not use dynamicMesh topology changes

- two-step subsetting as fvMeshSubsetter (src/dynamicMesh).
  Does use dynamicMesh topology changes.
  This is apparently only needed by the subsetMesh application itself.

DEFEATURE: remove deprecated setLargeCellSubset() method

- was deprecated JUL-2018, now removed (see issue #951)
2022-04-29 11:44:29 +02:00
Mark Olesen
430281bced ENH: align fileOperations/masterUncollatedFileOperation findInstance()
- adds handling of negative start times for masterUncollatedFileOperation
  as well (#1112).

- handle failures *after* restoring non-parRun mode.
  This ensures exit(FatalError) will exit MPI properly as well.

STYLE: replace "polyMesh" with polyMesh::meshSubDir

STYLE: adjust IOobject read/write enumerated values

- provision for possible bitwise handling
2022-04-29 11:44:28 +02:00
Mark Olesen
18e0d7e4d6 ENH: bundle broadcasts (#2371)
- additional Pstream::broadcasts() method to serialize/deserialize
  multiple items.

- revoke the broadcast specialisations for std::string and List(s) and
  use a generic broadcasting template. In most cases, the previous
  specialisations would have required two broadcasts:
    (1) for the size
    (2) for the contiguous content.

  Now favour reduced communication over potential local (intermediate)
  storage that would have only benefited a few select cases.

ENH: refine PstreamBuffers access methods

- replace 'bool hasRecvData(label)' with 'label recvDataCount(label)'
  to recover the number of unconsumed receive bytes from specified
  processor.  Can use 'labelList recvDataCounts()' to recover the
  number of unconsumed receive bytes from all processor.

- additional peekRecvData() method (for transcribing contiguous data)

ENH: globalIndex whichProcID - check for isLocal first

- reasonable to assume that local items are searched for more
  frequently, so do preliminary check for isLocal before performing
  a more costly binary search of globalIndex offsets

ENH: masterUncollatedFileOperation - bundled scatter of status
2022-04-29 11:44:28 +02:00
Mark Olesen
d7c873902c COMP: Silence boost bind deprecation warnings (before CGAL-5.2.1) 2022-04-08 10:26:48 +02:00
Mark Olesen
ecf8d260c4 DOC: fixed documented use of expression functions
- `functions<scalar>` and `functions<vector>` were erroneously
   documented in header as `lookup<scalar>` etc.

INT: handle fluent square brackets (fixes #2429)

- patch applied from openfoam.org
2022-03-31 18:53:04 +02:00
Mark Olesen
d38de84d21 ENH: bundle Pstream:: AllGather methods
- bundles frequently used 'gather/scatter' patterns more consistently.

  - combineAllGather     -> combineGather + broadcast
  - listCombineAllGather -> listCombineGather + broadcast
  - mapCombineAllGather  -> mapCombineGather + broadcast
  - allGatherList        -> gatherList + scatterList
  - reduce               -> gather + broadcast (ie, allreduce)

- The allGatherList currently wraps gatherList/scatterList, but may be
  replaced with a different algorithm in the future.

STYLE: PstreamCombineReduceOps.H is mostly unneeded now
2022-03-31 15:56:04 +02:00
Mark Olesen
24c0b30d48 ENH: mergePoints and patch gatherAndMerge improvements (#2402)
- when writing surface formats (eg, vtk, ensight etc) the sampled
  surfaces merge the faces/points originating from different
  processors into a single surface (ie, patch gatherAndMerge).

  Previous versions of mergePoints simply merged all points possible,
  which proves to be rather slow for larger meshes. This has now been
  modified to only consider boundary points, which reduces the number
  of points to consider. As part of this change, the reference point
  is now always equivalent to the min of the bounding box, which
  reduces the number of search loops. The merged points retain their
  original order.

- inplaceMergePoints version to simplify use and improve code
  robustness and efficiency.

ENH: make PrimitivePatch::boundaryPoints() less costly

- if edge addressing does not already exist, it will now simply walk
  the local face edges directly to define the boundary points.

  This avoids a rather large overhead of the full faceFaces,
  edgeFaces, faceEdges addressing.

  This operation is now more important since it is used in the revised
  patch gatherAndMerge.

ENH: topological merge for mesh-based surfaces in surfaceFieldValue
2022-03-16 13:44:58 +01:00
Mark Olesen
327c43f3e8 ENH: identityOp as equivalent to std::identity (C++20)
- similar to how noOp was defined, but with perfect forwarding

STYLE: combine Swap into stdFoam

STYLE: capitalize FileOp, NegateOp template parameters
2022-03-13 22:35:18 +01:00
Mark Olesen
62fc3bbc33 STYLE: broadcast instead of combineScatter/listCombineScatter/mapCombineScatter
- these are the same thing now and 'broadcast' expresses the intention
  more directly/consistently
2022-03-12 21:16:30 +01:00
Mark Olesen
47cd988296 ENH: eliminate code duplication in Circulator/ConstCirculator 2022-03-12 21:16:29 +01:00
Mark Olesen
c3e14ffdd5 ENH: refactor coordSet writers (#2347)
- the very old 'writer' class was fully stateless and always templated
  on an particular output type.

  This is now replaced with a 'coordSetWriter' with similar concepts
  as previously introduced for surface writers (#1206).

  - writers change from being a generic state-less set of routines to
    more properly conforming to the normal notion of a writer.

  - Parallel data is done *outside* of the writers, since they are used
    in a wide variety of contexts and the caller is currently still in
    a better position for deciding how to combine parallel data.

ENH: update sampleSets to sample on per-field basis (#2347)

- sample/write a field in a single step.

- support for 'sampleOnExecute' to obtain values at execution
  intervals without writing.

- support 'sets' input as a dictionary entry (as well as a list),
  which is similar to the changes for sampled-surface and permits use
  of changeDictionary to modify content.

- globalIndex for gather to reduce parallel communication, less code

- qualify the sampleSet results (properties) with the name of the set.
  The sample results were previously without a qualifier, which meant
  that only the last property value was actually saved (previous ones
  overwritten).

  For example,
  ```
    sample1
    {
        scalar
        {
            average(line,T) 349.96521;
            min(line,T)     349.9544281;
            max(line,T)     350;
            average(cells,T) 349.9854619;
            min(cells,T)    349.6589286;
            max(cells,T)    350.4967271;
            average(line,epsilon) 0.04947733869;
            min(line,epsilon) 0.04449639927;
            max(line,epsilon) 0.06452856475;
        }
        label
        {
            size(line,T)    79;
            size(cells,T)   1720;
            size(line,epsilon) 79;
        }
    }
  ```

ENH: update particleTracks application

- use globalIndex to manage original parcel addressing and
  for gathering. Simplify code by introducing a helper class,
  storing intermediate fields in hash tables instead of
  separate lists.

ADDITIONAL NOTES:

- the regionSizeDistribution largely retains separate writers since
  the utility of placing sum/dev/count for all fields into a single file
  is questionable.

- the streamline writing remains a "soft" upgrade, which means that
  scalar and vector fields are still collected a priori and not
  on-the-fly.  This is due to how the streamline infrastructure is
  currently handled (should be upgraded in the future).
2022-03-10 19:41:22 +01:00
mattijs
5e2d8d6ed2 ENH: snappyHexMesh: multi-stage layer addition, automatic hole closure
Automatic hole closure:
- introduces 'holeToFace' topoSet source
- used when detecting a 'leak-path'
- creates additional baffles to close the leak

Multi-stage layer addition:
- Can add layers in multiple passes

See issues: #2403, #2404
2022-03-10 14:20:07 +00:00
Mark Olesen
a6d1f47943 ENH: use globalIndex gather for simpler code and less communication
- checkTools, PatchTools::gatherAndMerge, SprayCloud penetration
2022-03-04 17:49:23 +00:00
Mark Olesen
666e5f6dc4 GIT: remove stray file, fix server documentation path 2022-03-02 15:12:59 +01:00
mattijs
a74b9ca763 ENH: createPatch: handle multiple regions. Fixes #2386
Also #1361.
2022-03-02 13:14:30 +00:00
mattijs
58f76ccc5f ENH: checkMesh: correct AMI weight directory. See #2356. 2022-02-21 16:14:08 +00:00
mattijs
d5644058b2 ENH: checkMesh: output AMI weights on mapped. Fixes #2356.
Also output target weights
2022-02-17 09:31:20 +00:00
Mark Olesen
295822daa6 ENH: cleanup/reorganize surfaceWriter and fileFormats
- remove unused surfaceWriter constructors, noexcept on methods

- relocate/rename writerCaching from surfMesh -> fileFormats

- changed from surfaceWriters::writerCaching to
  ensightOutput::writerCaching to permit reuse elsewhere

- relocate static output helpers to ensightCase

- refactor NAS coordinate writing
2022-02-10 19:28:51 +01:00
mattijs
ad6d3a088e ENH: createPatch: update fields. Fixes #1361.
- adds 'patchFields' subdictionary to specify fvPatchFields
  similar to createBaffles
- implements automatic matching across multiple regions
2022-02-09 15:54:24 +00:00
mattijs
f14263e019 ENH: checkMesh: output AMI weights on mapped. Fixes #2356. 2022-02-07 16:21:08 +00:00
Mark Olesen
61aef196ed STYLE: use single-parameter SubList where applicable (reduces clutter) 2022-01-31 20:08:52 +01:00
Mark Olesen
97f452d53a COMP: isolate include for coordSet writer 2022-01-21 09:19:50 +01:00
Dario Canossi
de90b2b28e BUG: rotateMesh: prevent double rotations (Fixes #2186) 2021-12-09 18:49:02 +00:00
Mark Olesen
f078643f8c ENH: add blockFaces.vtp output for blockMesh -write-vtk 2021-11-25 20:02:09 +01:00
Mark Olesen
e8aa3aad25 ENH: simple detection for collapsed block descriptions
- switch from default topology merge to point merge if degenerate
  blocks are detected. This should alleviate the problems noted in
  #1862.

  NB: this detection only works for blocks with duplicate vertex
      indices, not ones with geometrically duplicate points.

ENH: add patch block/face summary in blockMesh generation

- add blockMesh -verbose option to override the static or dictionary
  settings.  The -verbose option can be used multiple times to increase
  the verbosity.

ENH: extend hexCell handling with more cellShape-type methods

- allows better reuse in blockMesh.
  Remove blockMesh-local hex edge definitions that shadowed the
  hexCell values.

ENH: simplify some of the block-edge internals
2021-11-09 15:44:54 +01:00
Mark Olesen
ba8d6bddcc ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
2021-11-05 17:21:27 +01:00
Mark Olesen
50995706a6 STYLE: remove unused private fields (foamyMesh)
- simplify handling of warnings for surfaceBooleanFeatures
2021-11-04 18:03:34 +01:00
Mark Olesen
b364a9e72c ENH: argList improvements
- argList::envExecutable() static method.
  This is identical to getEnv("FOAM_EXECUTABLE"), where the name of
  the executable has typically been set from the argList construction.

  Provides a singleton access to this value from locations that
  do not have knowledge of the originating command args (argList).
  This is a similar rationale as for the argList::envGlobalPath() static.

- additional argList::envRelativePath() static method.

- make -dry-run handling more central and easier to use by adding into
  argList itself.

STYLE: drop handling of -srcDoc (v1706 option)

- replaced with -doc-source for 1712 and never used much anyhow
2021-11-03 11:38:21 +01:00
Mark Olesen
a19f03a5cb STYLE: additional storage checks, noexcept, spelling
- prune unneeded demandDrivenData.H includes
2021-11-03 11:27:56 +01:00
Mark Olesen
851be8ea33 ENH: use consistent naming when toggling exception throwing on/off 2021-11-02 21:14:41 +01:00
Mark Olesen
a98d5ebf32 ENH: handle ';' for fluent input (fixes #2249) 2021-10-29 17:04:51 +02:00
Mark Olesen
96adf3ae80 ENH: add IOobject::objectRelPath() for compact output (#2195) 2021-09-07 16:35:34 +02:00
Mark Olesen
610711ac47 ENH: inGroups support for mesh zones
- provisions for alternative groupings of zones

- extend indices() for boundary meshes to handle wordRes as well
2021-09-07 16:35:10 +02:00
mattijs
d5fd97d991 ENH: createPatch: check for overlapping patches. Fixes #2193 2021-09-01 08:29:32 +01:00
mattijs
9678b1dc22 ENH: splitMeshRegions: combine cellZones. See #2046
addZones: specifies the name instead of synthesising
2021-08-11 16:14:23 +01:00