Commit Graph

823 Commits

Author SHA1 Message Date
Mark Olesen
8a4e3526c3 ENH: improve parsing robustness for foamInstallationTest (#3263) 2024-12-16 12:37:18 +01:00
Mark Olesen
391f059335 CONFIG: update foamPackRelease packaging 2024-06-13 12:03:23 +02:00
Andrew Heather
5015883c01 CONFIG: Updated foamPackRelease for plugins directory support 2024-05-31 12:40:07 +01:00
Mark Olesen
8d649d1737 FIX: additional shell quoting for foamInstallationTest (fixes #3163)
- the PATH on WSL will usually contain spaces, so it needs quoting
2024-05-22 21:00:00 +02:00
Mark Olesen
b5435cc83e ENH: separate registry and revised file locations for finite-area
- The internal storage location of finite-area changes from being
  piggybacked on the polyMesh registry to a having its own dedicated
  registry:

  * allows a clearer separation of field types without name clashes.
  * prerequisite for supporting multiple finite-area regions (future)

Old Locations:
```
   0/Us
   constant/faMesh
   system/faMeshDefinition
   system/faSchemes
   system/faSolution
```

New Locations:
```
   0/finite-area/Us
   constant/finite-area/faMesh
   system/finite-area/faMeshDefinition  (or system/faMeshDefinition)
   system/finite-area/faSchemes
   system/finite-area/faSolution
```

NOTES:
    The new locations represent a hard change (breaking change) that
    is normally to be avoided, but seamless compatibility handling
    within the code was found to be unworkable.

    The `foamUpgradeFiniteArea` script provides assistance with migration.

    As a convenience, the system/faMeshDefinition location continues
    to be supported (may be deprecated in the future).
2024-04-19 17:20:09 +02:00
Mark Olesen
e099e98b8b STYLE: remove defunct restore0Dir expand of #include [collated]
- used defunct "processors/" directory naming, and includes are now
  addressed by the file-handler anyhow.

ENH: support 'tutorials/Alltest -init'

- for copying/creating test directory without running
2024-04-03 19:00:39 +02:00
Mark Olesen
61aaacd088 ENH: adjust renumbering methods, extend renumberMesh options
- renumberMesh now has -dry-run, -write-maps, -no-fields,
  -renumber-method, -renumber-coeffs options.

  * Use -dry-run with -write-maps to visualize the before/after
    effects of renumbering (creates a VTK file).

  * -no-fields to renumber the mesh only.
    This is useful and faster when the input fields are uniform
    and the -overwrite option is specified.

  * -renumber-method allows a quick means of specifying a different
    default renumber method (instead of Cuthill-McKee).

    The -renumber-coeffs option allows passing of dictionary content
    for the method.

    Examples,

       // Different ways to specify reverse Cuthill-McKee

       *  -renumber-method RCM
       *  -renumber-coeffs 'reverse true;'
       *  -renumber-method CuthillMcKee
       *  -renumber-coeffs 'reverse true;'
       *  -renumber-coeffs 'method CuthillMcKee; reverse true;'

       // Other (without dictionary coefficients)
       *  renumberMesh -renumber-method random

       // Other (with dictionary coefficients)
       renumberMesh \
           -renumber-method spring \
           -renumber-coeffs 'maxCo 0.1; maxIter 1000; freezeFraction 0.99;'

       // Other (with additional libraries)
       renumberMesh -renumber-method zoltan -lib zoltanRenumber

COMP: build zoltan renumbering to MPI-specific location

- zoltan and Sloan renumbering are now longer automatically linked to
  the renumberMesh utility but must be separately loaded by a
  command-line option or through a dictionary "libs" entry.

ENH: add output cellID for decomposePar -dry-run -cellDist
2024-03-06 17:58:47 +01:00
Kutalmis Bercin
88b3fb7c2d ENH: foamMonitor: modernise and refactor the script (fixes #2104)
- enhance POSIX compliance
- apply distinct colours and dash type for each line
- standardize the frame size to 1200x627
- dynamically replace the title with <function-object-name>/<file-name>
- address underscore character issues
- introduce legend components for tensors
- resolve a bug caused by parentheses in tensor files

BUG: particleTrackProperties: correct the typo (fixes #3050)
2023-12-15 22:20:27 +00:00
Mark Olesen
2045de8345 CONFIG: foamPackRelease handling of recursive submodules 2023-12-15 16:17:16 +01:00
Mark Olesen
79993bba43 CONFIG: support explicit selection of 'ld' linker
- for clang-based compilers the default linker may be lld or simply ld.
  Support '+link-ld' to explicitly select use of the ld linker.

- consolidate linker rules into single files

STYLE: adjust SPDX Identifier
2023-12-15 16:17:12 +01:00
Mark Olesen
2de1a26c7b STYLE: indentation, comments
ENH: additional faMesh cleanup in CleanFunctions
2023-12-07 17:42:24 +01:00
Mark Olesen
3458cea49e FIX: avoid bad copy (foamCloneCase) when time dir is missing (fixes #2975) 2023-10-08 17:58:53 +02:00
Mark Olesen
df6de6ed33 CONFIG: runParallel with --oversubscribe for openmpi
- not always required, but useful when running some tutorials locally
2023-09-04 14:24:13 +02:00
Mark Olesen
066a5a997a CONFIG: update compiler minimums (gcc-7.5.0) and standard (c++14) 2023-08-11 10:50:13 +02:00
Volker Weißmann
ae6de092d5 ENH: update vscode-settings (fixes #2935) 2023-07-06 16:23:53 +01:00
Mark Olesen
b264d2e913 CONFIG: reinstate FOAM_LD_LIBRARY_PATH adjustments (#2801)
- the special MacOS dlopen handling (commit f584ec97d0)
  did not fully solve the problem with SIP clearing.

  Eg, sourcing the RunFunctions (for runParallel) triggers SIP and
  clears DYLD_LIBRARY_PATH. With the cleared path it finds the dummy
  libraries: the dummy Pstream::init() fails.
2023-06-26 09:47:07 +02:00
Mark Olesen
c6741f5073 CONFIG: update completion cache (csh)
- drop the '-doc-source' from csh completion (rarely used option)
- includes the '-mpi-thread' and other newer options
2023-06-21 15:14:21 +02:00
Volker Weißmann
979b5a20cd ENH: update Visual Studio Code settings for new vscode versions (fixes #2805) 2023-06-19 10:01:49 +01:00
Alexey Matveichev
f584ec97d0 ENH: reimplement Foam::dlOpen() for macOS (#2801)
- The Apple SIP (System Integrity Protection) clears environment
  variables, which affects the behaviour of dynamic library loading
  (the DYLD_LIBRARY_PATH env variable).

  OpenFOAM shadows this variable as FOAM_LD_LIBRARY_PATH, which has
  been used to restore DYLD_LIBRARY_PATH (eg, in RunFunctions script).

  However, this solution is not quite complete, as it
    (a) requires sourcing of RunFunctions file,
    (b) additional errors appear depending on a user workflow.

  This changeset alleviates the problem by also iterating through
  paths stored in the shadow variable when loading dynamic libraries
  (if the DYLD_LIBRARY_PATH is empty).
2023-06-14 13:55:38 +02:00
Alexey Matveichev
57c50bda79 CONFIG: re-export FOAM_DYLD_LIBRARY_PATH in foamJob (#2793) 2023-06-12 14:15:47 +02:00
Mark Olesen
687a9528b0 DOC: include 'Environment' as filtered doxygen paragraph 2023-05-17 11:46:57 +02:00
Mark Olesen
139a8fc6ff STYLE: use SPDX-style for scripts 2023-05-10 18:23:13 +02:00
Mark Olesen
8434931c29 CONFIG: support call of 'openfoam' wrapper in other in-project locations
- directory discovery originally designed for a sub-dir location
  (eg, etc/openfoam) but failed if called from within the sub-dir
  itself.

  Now simply assume it is located in the project directory or the etc/
  sub-dir, so that it can also be relocated into the project directory
  in the future (pending changes to RPM and debian packaging)
2023-04-18 20:19:29 +02:00
Mark Olesen
4284d02c99 CONFIG: accept -decompose-dict=xyz for Run functions and mpirunDebug
- interpret as '-decomposeParDict xyz' for simpler scripting:
  A empty value ("") as well as "none" or "false" values are ignored.

  Eg,
      unset decompDict
      if some_condition; then decompDict=decomposeParDict-12; fi

      runParallel -decompose-dict=$decompDict ...

ENH: more generous when scanning decomposeParDict for numberOfSubdomains

- assume file is in system/ directory if not otherwise found
2023-03-02 20:50:52 +01:00
Mark Olesen
87cff55f9e CONFIG: improve handling of debian multi-arch
- no guarantee that dpkg-architecture command is actually available,
  so revert to a reasonable guess from 'uname -m' and 'uname -s'
2022-12-19 11:13:53 +01:00
Mark Olesen
c551ef3b01 CONFIG: update completion cache (csh) 2022-12-13 19:49:36 +01:00
Mark Olesen
db57c456f6 ENH: tutorials/Alltest -backup option
- for repeated tests (eg, during bisection) can be used to preserve
  the existing directory as tutorialsTest.bak01,
  tutorialsTest.bak02, ... (max of 10).

- preserve the commit information as tutorialsTest/commit-info
  to help document the current or backup test results.
2022-11-19 13:44:01 +01:00
Mark Olesen
24ffc5236d COMP: simplify openmp handling (#2617)
- remove old, unneeded -DUSE_OMP define.
- wmake -no-openmp option to add '~openmp' to WM_COMPILE_CONTROL

ENH: add bash completion handling for wmake
2022-10-26 18:04:56 +02:00
Alexey Matveichev
e827c117e3 CONFIG: fixes for MacOS (#2555)
- introduce a FOAM_LD_LIBRARY_PATH variable to shadow
  DYLD_LIBRARY_PATH on MacOS.

  The DYLD_LIBRARY_PATH and LD_LIBRARY_PATH cannot be modified via sub
  shells etc when SIP is active. This helps circumvent these
  restrictions, which is obviously a hack, but seems to be required.

COMP: disable -ftrapping-math in geompack for MacOS
2022-08-19 12:52:11 +02:00
Mark Olesen
8b1514c99b GIT: relocate rawIOField to src/OpenFOAM (closer to IOField classes)
STYLE: RunFunctions - missed message for failure to find nFaces
2022-07-13 19:23:27 +02:00
Mark Olesen
48a50fec51 BUG: foamJob does not detect collated format (#2514) 2022-06-21 14:15:00 +02:00
Mark Olesen
343854ab31 TUT: avoid redundant -finite-area option for foamToEnsight, foamToVTK
TUT: remove paraFoam hints from tutorials (mostly only need paraview now)

STYLE: remove reference to paraview _SM plugins (OpenFOAM-v1912 and earlier)
2022-06-15 12:52:20 +02:00
Mark Olesen
96ece1ef35 ENH: foamRunTutorials -dry-run option
- for tracing tutorials execution
2022-06-14 15:23:08 +02:00
Mark Olesen
7f748bd5fd ENH: CleanFunctions refinements
- include constant/faMesh cleanup (cleanFaMesh) as part of standard
  cleanCase

- simplify cleanPolyMesh function to now just warn about old
  constant/polyMesh/blockMeshDict but not try to remove anything

- cleanup cellDist.vtu (decomposePar -dry-run) as well

ENH: foamRunTutorials - fallback to Allrun-parallel, Allrun-serial

TUT: call m4 with file argument instead of redirected stdin

TUT: adjust suffixes on decomposeParDict variants
2022-06-09 15:34:17 +02:00
Mark Olesen
525f77f8bb TUT: add constraint types for finiteArea tutorials
STYLE: accept '-proc' as shortcut in restore0Dir function
2022-05-10 21:16:09 +02:00
mattijs
2ba2814c50 ENH: mpirunDebug: preserve ". Fixes #2459 2022-05-06 18:09:54 +01:00
Mark Olesen
83243cf01e COMP: non-group-local communicator for MS-MPI (mingw)
- partial revert for 13740de427 (#2158)

  MS-MPI does not currently have a MPI_Comm_create_group(),
  so keep using MPI_Comm_create() there.

  Only affects multi-world simulations.

CONFIG: retain dummy version of libPstream.dll

- retain as libPstream.dll-dummy so that it is available for
  manual replacement of the regular libPstream.dll (#2290)

  Keep extra copy of libPstream.dll as libPstream.dll-msmpi
  (for example) for manual replacement.
2021-12-16 14:44:28 +01:00
Mark Olesen
b25e1486de CONFIG: adjust paraview libs, intelmpi handling
- fix overly aggressive match in the API value

- allow `INTELMPI*` generic value, this can be used to specify something
  like INTELMPI_custom and populate the corresponding wmake rule
  manually

STYLE: mention FOAM_BUILDROOT in wmake -help-full output

STYLE: adjust openfoam shell session welcome information

- adjust internal variable names to reduce collision potential

- improve handling of openfoam -etc=...
2021-12-07 15:22:32 +01:00
Mark Olesen
f078643f8c ENH: add blockFaces.vtp output for blockMesh -write-vtk 2021-11-25 20:02:09 +01:00
Mark Olesen
bcf8a48c68 CONFIG: add build information into shell session
- more closely reflect what the binaries report
- report the installation path
- change PS1 case/separator to roughly correspond to package names

STYLE: adjust README to mention upcoming v2112
2021-11-25 17:36:37 +01:00
Mark Olesen
742a2c8a49 BUG: foamPackRelease detects wrong build information
- was taking from the current head instead from specified commit-ish

ENH: add -debian=NUM convenience option to foamPackRelease

STYLE: relocate compile begin/end messages

COMP: suppress more clang warnings (needed for boost)
2021-11-04 19:56:01 +01:00
Mark Olesen
fddf8a8832 ENH: add -help-full option for foamEtcFile 2021-11-02 21:14:41 +01:00
Mark Olesen
435be2e5ec CONFIG: improve flexibility of MPI specification
- it is now possible to include the selected mpi version in the
  top-level bashrc or prefs.sh file. For example,

      WM_MPLIB=OPENMPI-4.1.1  or  WM_MPLIB=openmpi-4.1.1

  after evaluation of the config.sh/mpi, this will define

      WM_MPLIB=OPENMPI-4.1.1  and  FOAM_MPI=openmpi-4.1.1

  During the wmake, the mpi-rules will first load the MPI 'family'
  rules (OPENMPI in this example) before trying to load
  version-specific rules if they exist.

  NOTE: the regular user-defined prefs system is unaffected by this
  change. This means it is still possible to use a file such as
  'prefs.openmpi' to define the preferred version instead or as well.
  However, it does mean inconsistent naming can be specified.
  For example, specify WM_MPLIB=OPENMPI-4.1.1 at the top-level but
  actually have FOAM_MPI=openmpi-4.0.6 in the prefs.openmpi file.
  This will make the value of WM_MPLIB misleading.

CONFIG: foamConfigurePaths support for sys-openmpi major version

CONFIG: cleanup any shadow env variables
2021-10-29 17:04:51 +02:00
Mark Olesen
c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00
Mark Olesen
4a0646451d CONFIG: accept '-lib' for foamCleanPath
- simplfies differences for OSX
2021-10-18 14:58:17 +02:00
mattijs
674a9a878f ENH: foamGetDict: sneak in topoSetSourcesDict. See #2232 2021-10-07 10:56:13 +01:00
Kutalmis Bercin
770df14bf6 ENH: foamMonitor: modernise and refactor for POSIX compliance (#2202)
ENH: add xrange option
2021-10-04 15:24:47 +01:00
Mark Olesen
fcd7423fa8 CONFIG: add date and paths information for tutorial Allrun script
STYLE: replace short-circuit Allrun script with Alltest
2021-09-22 17:42:21 +02:00
Mark Olesen
e2be2289a1 ENH: finer granularity for CleanFunctions
- separate handling of auxiliary files vs time directories

- restore0Dir: avoid removing 0/ if 0.orig/ does not exist
2021-07-28 10:02:27 +02:00
Mark Olesen
e2148b587e CONFIG: inline _foamEval within <etc/config.sh/setup>
- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
2021-06-18 17:14:22 +02:00