Commit Graph

352 Commits

Author SHA1 Message Date
Mark Olesen
b4bf26ea4f Merge remote-tracking branch 'origin/master' into develop 2020-05-06 10:13:56 +02:00
Mark Olesen
aafe674f5f ENH: improve cmake/ParaView config handling
- improve handling of changes in ParaView/VTK or cmake parameters (#1693)

  * adjust internals to support recording of an unlimited number of
    configuration parameters and use file `cmp` instead of trying
    to check strings ourselves.

ENH: new wmake/scripts/wmake.cmake-args handler

- additional handling of -prefix=... as CMAKE_INSTALL_PREFIX export.

- in some contexts, can use instead of AllwmakeParseArguments
2020-05-05 18:06:09 +02:00
Mark Olesen
9cfa5fe454 Merge remote-tracking branch 'origin/master' into develop 2020-04-21 15:07:35 +02:00
Mark Olesen
aa2f932b75 CONFIG: additional packaging helpers, tutorial test helper
- bin/tools/create-mpi-config to query/write values for system openmpi.
  In some cases this can be used to avoid an mpicc requirement at runtime.

- adjust openfoam session to include -test-tutorial forwarding to the
  tutorials/AutoTest. This helps with writing installation tests.

- adjust foamConfigurePaths to latest version

- removal of gperftools default config, as per develop
2020-04-21 14:59:07 +02:00
Mark Olesen
c99d074247 CONFIG: additional options for foamPackRelease 2020-04-21 13:32:27 +02:00
Mark Olesen
6152940ba2 CONFIG: support compiler query in bin/tools/query-versions
- Query the etc/config.sh/compiler for Gcc/Clang versions
2020-04-16 00:47:05 +02:00
Mark Olesen
3fd91c9084 ENH: improve foamConfigurePaths, remove some antiquated tools
- add edit of llvm/mesa/vtk paths. Reduce some verbosity

- include Darwin in foamInstallationTest, foamSystemCheck to avoid
  a false negative.
2020-04-08 11:38:18 +02:00
Mark Olesen
e26568f2de CONFIG: add foamPackRelease -gitbase option 2020-04-06 12:29:50 +02:00
Mark Olesen
fe17c8ad5f CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch
  paths like /usr/lib/x86_64-linux-gnu

CONFIG: improve handling of group/user config files (#928)

- changed bashrc handling of FOAM_CONFIG_NOUSER to use
  FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
  a stickier control.

  This change allows better control, but also enables cluster
  installations to define their own value within the OpenFOAM prefs.sh
  file to prevent users accidentally mis-configuring things if
  necessary.

- remove undocumented handling of an (a)ll mode in foamEtcFile to
  avoid potential pitfalls.

- add support for FOAM_CONFIG_ETC handling.
  This allows injection of an extra search layer when finding
  project etc files

ENH: improvements to foamConfigurePaths (#928)

- handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
  -etc option.

STYLE: more explicit wording in foamConfigurePaths usage (#1602)

- document that an absolute path (eg, -scotch-path) overrides/ignores
  the equivalent ThirdParty setting (eg, -scotch)

- longer options -system-compiler and -third-compiler for -system
  and -third, respectively. Clearer as to their purpose.

- adjust the location sanity check to look for META-INFO directory.
2020-03-16 12:03:58 +01:00
Mark Olesen
ba3a31af95 ENH: openfoam shell session - improved and relocated
- '-c' option (as per shell), '-Dkey[=value]' option to provide
  preferences via the command-line. For example,

      etc/openfoam -DWM_COMPILER=Clang -int64  ./Allwmake -j -s -l

  These can also be combined with other options. Eg,

      etc/openfoam -DWM_COMPILER=Clang \
          -c 'wmake -show-path-cxx -show-cxxflags'

- relocated from bin/tools/ => etc/ for easier access

- bin/tools/openfoam.in : for autoconfig-style installation

- Auto-detect if the shell script was executed with openfoam and
  interpret accordingly.

  Simple example,

      --------------
      #!/usr/bin/openfoam
      cd "${0%/*}" || exit   # Run -*-sh-*- from this dir

      blockMesh
      simpleFoam
      --------------

   Note it is NOT currently possible to provide any other parameters
   this way. Eg,

      `#!/usr/bin/openfoam -sp` (NOT)

   This will either fail to run, or result in infinite recursion.
2020-03-16 12:03:57 +01:00
Mark Olesen
c35e7a7bf1 ENH: support packing of modules-only tar files (#907)
- make tar-file generation more flexible
2020-03-16 11:33:37 +01:00
Mark Olesen
5ba2cbc54f CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch
  paths like /usr/lib/x86_64-linux-gnu

CONFIG: improve handling of group/user config files (#928)

- changed bashrc handling of FOAM_CONFIG_NOUSER to use
  FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
  a stickier control.

  This change allows better control, but also enables cluster
  installations to define their own value within the OpenFOAM prefs.sh
  file to prevent users accidentally mis-configuring things if
  necessary.

- remove undocumented handling of an (a)ll mode in foamEtcFile to
  avoid potential pitfalls.

- add support for FOAM_CONFIG_ETC handling.
  This allows injection of an extra search layer when finding
  project etc files

ENH: improvements to foamConfigurePaths (#928)

- handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
  -etc option.

STYLE: more explicit wording in foamConfigurePaths usage (#1602)

- document that an absolute path (eg, -scotch-path) overrides/ignores
  the equivalent ThirdParty setting (eg, -scotch)

- longer options -system-compiler and -third-compiler for -system
  and -third, respectively. Clearer as to their purpose.

- adjust the location sanity check to look for META-INFO directory.
2020-02-24 16:00:16 +01:00
Mark Olesen
92214eb4af CONFIG: misedit of csh mpi settings with foamConfigurePaths 2020-02-12 21:28:30 +01:00
Mark Olesen
f90de02159 ENH: openfoam shell session - improved and relocated
- '-c' option (as per shell), '-Dkey[=value]' option to provide
  preferences via the command-line. For example,

      etc/openfoam -DWM_COMPILER=Clang -int64  ./Allwmake -j -s -l

  These can also be combined with other options. Eg,

      etc/openfoam -DWM_COMPILER=Clang \
          -c 'wmake -show-path-cxx -show-cxxflags'

- relocated from bin/tools/ => etc/ for easier access

- bin/tools/openfoam.in : for autoconfig-style installation

- Auto-detect if the shell script was executed with openfoam and
  interpret accordingly.

  Simple example,

      --------------
      #!/usr/bin/openfoam
      cd "${0%/*}" || exit   # Run -*-sh-*- from this dir

      blockMesh
      simpleFoam
      --------------

   Note it is NOT currently possible to provide any other parameters
   this way. Eg,

      `#!/usr/bin/openfoam -sp` (NOT)

   This will either fail to run, or result in infinite recursion.
2020-02-12 17:48:09 +01:00
Mark Olesen
553c01d52e CONFIG: bin/tools/query-versions
- Query the etc/config.sh values for ThirdParty software.
  Usable without an active OpenFOAM environment.
2020-02-07 17:11:49 +01:00
Mark Olesen
92a148e9e5 CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-06 12:36:26 +00:00
Mark Olesen
81015889f2 CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-03 11:05:04 +01:00
Andrew Heather
ae2ab06312 REL: Release preparations 2019-12-23 09:49:23 +00:00
Mark Olesen
f30b0895e8 CONFIG: prevent bash completions from examining the description notes 2019-11-25 18:38:39 +01:00
Mark Olesen
bc8343f702 STYLE: align foamUpdateCaseFileHeader with Foam::IOobject::writeBanner()
- handle quoted format statement (m4)
2019-11-18 12:37:01 +01:00
Mark Olesen
297adc8764 CONFIG: add build-info to archives
- save in META-INFO/build-info for later re-compilation without git.
  This improves tracking beyond simply referring to the the patch level.

  The information is tagged with an underscore to distinguish from
  "real" build information when git is available.

STYLE: improved shell syntax, pushd/popd guards etc.
2019-11-13 10:23:30 +01:00
Mark Olesen
47e1d13655 CONFIG: allow configurable package, version separator (foamPackRelease) 2019-11-12 17:15:38 +01:00
Mark Olesen
e6dfb39c66 STYLE: remove unnecessary stdout, stderr /dev/null redirects
- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
2019-11-06 10:44:36 +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
96d260713e CONFIG: openfoam session must use /bin/bash, not /bin/sh (fixes #1461) 2019-10-17 09:29:42 +02:00
Mark Olesen
aaa27eaeec CONFIG: openfoam session must use /bin/bash, not /bin/sh (fixes #1461) 2019-10-17 09:29:42 +02:00
Kutalmis Bercin
d13df0e4da CONFIG: ensure cleanCase removes postProcessing-dry-run (#1475) 2019-11-01 17:43:01 +00:00
Mark Olesen
a753f0ac0b STYLE: alignment and capitalization of website address 2019-11-01 19:28:57 +01:00
Mark Olesen
da33222970 ENH: add flexible command options for setting Debug and Info switches #1467
For example,

   $ someSolver -info-switch writeOptionalEntries

- note that values changed via the command-line are changed after the
  etc/controlDict entries, but *before* any case-local
  system/controlDict entries.

  However, in many testing cases the command-line options eliminate
  the need for such local file modifications.

ENH: cleanup handling of local debug switches in Time

- add as methods directly on simpleObjectRegistry to avoid code
  duplication

STYLE: adjust internal naming of ITstream parameters
2019-10-25 15:03:11 +02:00
Mark Olesen
518fb0858d CONFIG: support -prefix for openfoam wrapper 2019-10-01 13:42:58 +02:00
Mark Olesen
b0cc93ecc8 BACKPORT: openfoam shell wrapper (interactive or 'one-shot' use) 2019-09-25 17:36:10 +02:00
Mark Olesen
fb0057ea72 STYLE: accept lowercase -sp/-dp/-spdp for foamConfigurePaths 2019-09-25 18:20:32 +02:00
Mark Olesen
043d55e382 ENH: add wrapper for starting OpenFOAM as an interactive bash session
- call also be used non-interactively for simple 'one-shot' use of
  OpenFOAM utilities or solvers

STYLE: use dash instead of brackets for '- see www.OpenFOAM.com'

- less cluttered in combination with API information
2019-09-25 17:36:10 +02:00
Mark Olesen
b6eeaf5155 BUG: missing foamExec causes foamJob failure (#1309, #1411)
- foamExec was removed as part of commit 6c68c34e1a but
  overlooked the fact that it is partly still needed by foamJob.
  When running in parallel, it is used to source the etc/bashrc env.

  Reinstated a stripped down form, which has been relocated to
  bin/tools directory (it should not be directly called by the user).

  The previous version switching functionality has nonetheless be
  dropped since it only worked only when a rigid naming convention for
  OpenFOAM installations was followed.

ENH: add foamJob log=, -log-app, -no-log options, improved coding quality
2019-08-28 17:19:11 +02:00
Mark Olesen
c072000dca ENH: add edit for ADIOS2 settings in foamConfigurePaths
CONFIG: remove adios1 config files
2019-08-16 09:17:18 +02:00
Mark Olesen
1c1b1874ea CONFIG: accept 'system' for foamConfigurePaths -paraview 2019-08-07 18:36:08 +02:00
Mark Olesen
b0eb74c142 SUBMODULE: added adios submodule (ADIOS2) and control files 2019-08-07 16:50:47 +02:00
Mark Olesen
1ffda6facb STYLE: set owner as root/root for manifest.txt in tarfile (for consistency) 2019-07-12 14:19:23 +02:00
Mark Olesen
b7d3607716 STYLE: remove uncompressed tar file after -tgz output 2019-07-10 20:34:40 +02:00
Mark Olesen
f7a707e00e STYLE: allow '=' option separators in some bin/tools scripts 2019-06-26 11:27:53 +02:00
Mark Olesen
ff81ec8cf3 CONFIG: add -no-patch option for foamPackRelease
- if desired to create a tar-file without a _patch value in its name.
2019-06-26 00:57:49 +02:00
Mark Olesen
3a65840993 CONFIG: set umask 0022 when packing tar files for release 2019-06-25 17:24:39 +02:00
Mark Olesen
47f375887e CONFIG: adjust bin/tools/foamConfigurePaths
- add a '-SPDP' option

- remove the '-archOption' for forcing a '-m32' build on 64-bit
  architecture, which is now considered too obscure.
  Must edit files manually if this option is really required.
2019-06-25 07:48:33 +02:00
Vaggelis Papoutsis
ecc1fb5efb CONTRIB: New adjoint optimisation and tools
A set of libraries and executables creating a workflow for performing
gradient-based optimisation loops. The main executable (adjointOptimisationFoam)
solves the flow (primal) equations, followed by the adjoint equations and,
eventually, the computation of sensitivity derivatives.

Current functionality supports the solution of the adjoint equations for
incompressible turbulent flows, including the adjoint to the Spalart-Allmaras
turbulence model and the adjoint to the nutUSpaldingWallFunction, [1], [2].

Sensitivity derivatives are computed with respect to the normal displacement of
boundary wall nodes/faces (the so-called sensitivity maps) following the
Enhanced Surface Integrals (E-SI) formulation, [3].

The software was developed by PCOpt/NTUA and FOSS GP, with contributions from

Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather

and contributions in earlier version from

Dr. Ioannis Kavvadias,
Dr. Alexandros Zymaris,
Dr. Dimitrios Papadimitriou

[1] A.S. Zymaris, D.I. Papadimitriou, K.C. Giannakoglou, and C. Othmer.
Continuous adjoint approach to the Spalart-Allmaras turbulence model for
incompressible flows. Computers & Fluids, 38(8):1528–1538, 2009.

[2] E.M. Papoutsis-Kiachagias and K.C. Giannakoglou. Continuous adjoint methods
for turbulent flows, applied to shape and topology optimization: Industrial
applications. 23(2):255–299, 2016.

[3] I.S. Kavvadias, E.M. Papoutsis-Kiachagias, and K.C. Giannakoglou. On the
proper treatment of grid sensitivities in continuous adjoint methods for shape
optimization. Journal of Computational Physics, 301:1–18, 2015.

Integration into the official OpenFOAM release by OpenCFD
2019-06-17 12:59:11 +01:00
Mark Olesen
0628bfb017 CONFIG: remove legacy tools, update foamPackRelease/foamUpdateCaseFileHeader 2019-06-06 16:45:57 +02:00
Mark Olesen
c320892aa2 COMP: use '-n' instead of '-np' for runParallel (#1238)
- options '-n' and '-np' are synonymous, but some mpiexec versions may
  only recognize '-n' and not '-np'
2019-06-04 17:51:20 +02:00
Mark Olesen
ca724b2e1a TUT: cleanup postProcessing in planeTransport finiteArea tutorial 2019-06-04 15:11:05 +02:00
Mark Olesen
52df9a2fee TUT: use mpiexec instead of mpirun for msmpi in RunFunctions (#1238) 2019-06-04 11:22:21 +02:00
Mark Olesen
f0f4af16d2 Merge remote-tracking branch 'origin/master' into develop 2019-04-08 12:05:24 +02:00