Commit Graph

51 Commits

Author SHA1 Message Date
Mark Olesen
dec8bd46c3 BUG: _foamAddPath not available when foamPV alias/function is used
STYLE: only use paraview settings when actually available

- this means executing makeParaView prior to building OpenFOAM itself,
  but is consistent with the instructions given by makeParaView,
  and elminates anticipating the source location from the paraview
  config file, which increases the build flexibilty for ThirdParty
2016-11-28 15:35:27 +01:00
Mark Olesen
00c3c6f9a7 ENH: improve configuration of gperftools (now at version 2.5)
- support gperftools-none, gperftools-system configurations
  as per other third-party packages.

STYLE: clean up more environment variables

CONFIG: testing adios rule
2016-11-27 16:24:40 +01:00
Mark Olesen
e9e9760329 CONFIG: bump versions of various third-party sources
* boost 1_62_0 (Sept 2016)

* CGAL 4.9 (Sept 2016)
  - now has headers-only mode that could be interesting

* FFTW 3.3.5 (Jul 2016)

* openmpi 1.10.4 (Sept 2016)
  - the first openmpi 2.x release is also available, but too early to switch

* paraview 5.2.0 (Nov 2016)
  - builds without additional patching

STYLE: removed unneeded CMake environment variables
2016-11-23 14:14:06 +01:00
Mark Olesen
06f638b09d STYLE: provide WM_CC, WM_CXX values for Icc.
- since Icc is actually mentioned in bashrc/cshrc it is consistent to
  set these values accordingly.
2016-11-11 19:25:52 +01:00
Mark Olesen
1752bdc4b9 CONFIG: bump paraview version to 5.1.2 (July 2016) release 2016-11-11 19:25:25 +01:00
Mark Olesen
8e30111b44 DEFEATURE: drop reader module support for paraview 3.x (issue #295)
- Cannot test if these older reader modules actually build,
  owning largely to build issues since with paraview 3.14 (Feb 2012)
  and paraview 3.98 (Dec 2012) themselves.
2016-11-11 13:30:30 +01:00
Mark Olesen
e8f6099a1f COMP: Newer CGAL versions break current CGAL wmake rules (issue #288)
On 64-bit systems, the system installations of boost, cgal are under
lib64/. The behaviour for a ThirdParty build is mostly lib/ but this
can also be changing.

    Boost 1_62_0 and older build into 'lib/'.
    CGAL-4.9 builds into 'lib64/', older versions into 'lib/'.

Future-proof things by using lib$WM_COMPILER_LIB_ARCH for boost and
cgal build rules, and forcing these as build targets in the ThirdParty
makeCGAL as well.

--
STYLE: check for boost/version.hpp, CGAL/version.h instead their directories
2016-11-04 12:05:35 +01:00
Mark Olesen
a05493db41 CONFIG: csh not unsetting old paraview/cmake environment (related to #281)
- On the first call, ParaView_DIR is unset and thus the clean-path
  fails with the warning "ParaView_DIR: Undefined variable."

  This looks messy, but is of no _major_ consequence since paraview
  doesn't need to be removed anyhow. The only slight risk is that the
  path to a third-party cmake might not be cleaned.

- Patch as per Bruno's suggestion.
2016-10-31 07:00:57 +01:00
Andrew Heather
af81184ecf MRG: Resolve conflict with latest foundation merge 2016-10-26 15:37:15 +01:00
Henry Weller
2997bfbdfd etc/config.*/unset: unset FOAM_ETC
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2285
2016-10-09 15:15:29 +01:00
Mark Olesen
84683b5f90 CONFIG: remove foundation use of FOAMY_HEX_MESH control.
- instead we use the CGAL settings directly since they have the
  same option of (version | system | none)

- may wish to review this again in the future.
2016-09-29 12:36:27 +02:00
Henry Weller
7996a9138f C++11: Update compilation rules to specify C++11 support and conformance
The change from C++0x to C++11 allows all of C++11 functionality to be
used in OpenFOAM, in particular constructor delegation which avoids code
duplication or constructor helper functions.  However, this also means a
change to the minimum gcc version supported which is now 4.7 rather than
4.5.

Note that gcc-4.7 does not support the entire C++11 standard but does
support all of the functionality currently needed for further OpenFOAM
development.  The minimum gcc-version which supports the entire C++11
standard is 4.8 which is now the recommended minimum gcc version.
2016-08-05 16:28:19 +01:00
Mark Olesen
9e2259c19c STYLE: clean out clutter in paraview config files (issue #176)
Now reduced to 3 environment variables:
    ParaView_DIR         - paraview installation directory
    ParaView_INCLUDE_DIR - paraview include directory
    PV_PLUGIN_PATH       - paraview plugin directory for OpenFOAM modules

Previously also had (ParaView_MAJOR, ParaView_VERSION).

ThirdParty makeParaView adjusted accordingly.

ENH: improved configuration possibility for non-ThirdParty paraview
installation.

BUG: csh foamPV alias was completely incorrect.
2016-07-13 09:57:58 +02:00
Mark Olesen
787b19c4e4 STYLE: cleanup compiler settings (issue #176)
- export/setenv WM_COMPILER_TYPE as suggested by Mattijs.

- for overall consistency, don't carp about an unset WM_COMPILER_TYPE,
  since this would only be on the first instance (prior to the
  export/setenv) and would be confusing about why/when this message
  may occur.

- reduce clutter: only use (system|ThirdParty) for WM_COMPILER_TYPE.
  Drop the old 'OpenFOAM' setting for WM_COMPILER_TYPE, which was
  transitional in early 2011.

- make the error messages more meaningful
2016-07-12 17:19:06 +02:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
mattijs
813a1d69fb Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-07-13 11:40:15 +01:00
mattijs
dc5c42701c BUG: config.csh: wrong variable. Fixes #176 2016-07-06 09:23:55 +01:00
Mark Olesen
1e82e1a1dd CONFIG: use ThirdParty boost, FFTW instead of system versions
- many systems may not have boost or FFTW installed, or in an older
  version. Using ThirdParty for them should lead to a more robust
  build process.
2016-07-05 16:15:03 +02:00
Mark Olesen
b2234f19e5 BUG: could not set system clang (issue #166)
- gcc/g++ always being used

STYLE: spurious unsetenv WM_COMPILER_TYPE (csh only)

- more stringent cleanup of ThirdParty settings for wmUNSET
2016-06-29 16:06:48 +02:00
Mark Olesen
b9bb92b65d ENH: provide configuration settings for FFTW 2016-06-28 15:27:11 +02:00
Henry Weller
bd64b4059f CGAL: Set to use the system CGAL installation by default 2016-06-23 16:05:44 +01:00
Henry Weller
ab0b5545b4 etc/config.[c]sh: update wmRefresh to call wmUnset before updating the environment 2016-06-21 19:48:19 +01:00
Henry Weller
6a53ed41ba Doxygen documentation: Standardized the 'See also' heading 2016-06-17 17:31:34 +01:00
Henry Weller
680b4e1f11 etc/config.[c]sh/unset: unalias wmRefresh
Resolves bug-report http://bugs.openfoam.org/view.php?id=2112
2016-06-10 22:19:21 +01:00
Henry Weller
6fe3812698 etc/config.*/aliases: Updated, removed duplicates and added foamVersion
foamVersion: prints the current OpenFOAM version
foamVersion <version>: changes to the specified version
2016-06-07 16:15:46 +01:00
Henry Weller
b625d2ba8e etc/config.*/unset: Added CGAL-related environment variables 2016-06-05 18:22:28 +01:00
Henry Weller
c4eedd4762 etc/config.*/paraview: Upgraded to ParaView-5.0.1 2016-05-30 21:27:11 +01:00
Henry Weller
227811bb2e etc/config.*: Added support for gcc-6.1 2016-05-29 22:28:07 +01:00
Henry Weller
482869eea4 CGAL: Upgraded to 4.8 2016-05-29 22:27:46 +01:00
Henry Weller
e4dc50dcb0 postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities
with the more general and flexible 'postProcess' utility and '-postProcess' solver option

Rationale
---------

Both the 'postProcess' utility and '-postProcess' solver option use the
same extensive set of functionObjects available for data-processing
during the run avoiding the substantial code duplication necessary for
the 'foamCalc' and 'postCalc' utilities and simplifying maintenance.
Additionally consistency is guaranteed between solver data processing
and post-processing.

The functionObjects have been substantially re-written and generalized
to simplify development and encourage contribution.

Configuration
-------------

An extensive set of simple functionObject configuration files are
provided in

OpenFOAM-dev/etc/caseDicts/postProcessing

and more will be added in the future.  These can either be copied into
'<case>/system' directory and included into the 'controlDict.functions'
sub-dictionary or included directly from 'etc/caseDicts/postProcessing'
using the '#includeEtc' directive or the new and more convenient
'#includeFunc' directive which searches the
'<etc>/caseDicts/postProcessing' directories for the selected
functionObject, e.g.

functions
{
    #includeFunc Q
    #includeFunc Lambda2
}

'#includeFunc' first searches the '<case>/system' directory in case
there is a local configuration.

Description of #includeFunc
---------------------------

    Specify a functionObject dictionary file to include, expects the
    functionObject name to follow (without quotes).

    Search for functionObject dictionary file in
    user/group/shipped directories.
    The search scheme allows for version-specific and
    version-independent files using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/postProcessing
      - ~/.OpenFOAM/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_SITE/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/postProcessing

    An example of the \c \#includeFunc directive:
    \verbatim
        #includeFunc <funcName>
    \endverbatim

postProcess
-----------

The 'postProcess' utility and '-postProcess' solver option provide the
same set of controls to execute functionObjects after the run either by
reading a specified set of fields to process in the case of
'postProcess' or by reading all fields and models required to start the
run in the case of '-postProcess' for each selected time:

postProcess -help

Usage: postProcess [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

 pimpleFoam -postProcess -help

Usage: pimpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -postProcess      Execute functionObjects only
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

The functionObjects to execute may be specified on the command-line
using the '-func' option for a single functionObject or '-funcs' for a
list, e.g.

postProcess -func Q
postProcess -funcs '(div(U) div(phi))'

In the case of 'Q' the default field to process is 'U' which is
specified in and read from the configuration file but this may be
overridden thus:

postProcess -func 'Q(Ua)'

as is done in the example above to calculate the two forms of the divergence of
the velocity field.  Additional fields which the functionObjects may depend on
can be specified using the '-field' or '-fields' options.

The 'postProcess' utility can only be used to execute functionObjects which
process fields present in the time directories.  However, functionObjects which
depend on fields obtained from models, e.g. properties derived from turbulence
models can be executed using the '-postProcess' of the appropriate solver, e.g.

pisoFoam -postProcess -func PecletNo

or

sonicFoam -postProcess -func MachNo

In this case all required fields will have already been read so the '-field' or
'-fields' options are not be needed.

Henry G. Weller
CFD Direct Ltd.
2016-05-28 18:58:48 +01:00
Henry Weller
be2ceff465 etc/config.*/aliases: Renamed aliases to be less SHOUTY and confusing 2016-05-23 18:47:28 +01:00
Henry Weller
248ab45998 Updates to script documentation
Patch contributed by Bruno Santos
Resolves text report http://bugs.openfoam.org/view.php?id=2089
2016-05-15 18:12:26 +01:00
Henry Weller
7389969e94 etc/config.*/settings: Remove unnecessary $WM_COMPILE_OPTION from $FOAM_EXT_LIBBIN
Simplified the directory structure in ThirdParty-dev/platforms
2016-05-11 14:37:07 +01:00
Henry Weller
f779557d38 etc/config.*/unset: Updated for changes in foamOldDirs
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2031
2016-05-05 23:37:33 +01:00
Henry Weller
ca3efa5776 etc/config.csh: Capitalized comments 2016-05-05 15:52:05 +01:00
Henry Weller
ce81c49d2e etc/bashrc, etc/cshrc: Filter $WM_PROJECT_DIR from paths rather than $FOAM_INST_DIR
Additionally filter $ParaView_DIR from paths in config.sh/paraview and config.csh/paraview

Resolves bug-report http://bugs.openfoam.org/view.php?id=2031
2016-05-05 15:37:00 +01:00
Henry Weller
1c35f1a505 Updated handling of the ParaView installation path
Patch contributed by Bruno Santos
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2034
2016-03-30 19:26:01 +01:00
Henry Weller
c28a0c0d94 etc/cshrc, etc/config.csh: foamCompiler -> WM_COMPILER_TYPE
for consistency with etc/bashrc and etc/config.sh

See commit 4409a0ea5a
2016-03-09 09:05:35 +00:00
Mark Olesen
b4997ae091 CONFIG: only need one library variant for third-party openmpi
- in 3rd-party we always build into lib$WM_COMPILER_LIB_ARCH and
  thus only need this one in LD_LIBRARY_PATH.
2016-06-21 12:23:44 +02:00
Mark Olesen
b2b4123164 STYLE: minor config file details
- move unset mpi buffer size from config.csh/settings -> config.csh/mpi

- wmUNSET now also unalias wmREFRESH

Note: unsetenv WM_COMPILER_TYPE in csh variant?

- drop reference to paraview-3 in config files.
  Cannot say anything definite about support for versions
  this old (2012)
2016-06-17 19:56:19 +02:00
Mark Olesen
c740656eb4 ENH: replace SOURCE_CGAL_VERSIONS_ONLY workaround (fixes #148)
- replace with an alternative workaround.

  Unset the _foamAddLib function prior to sourcing config.sh/CGAL:

  - LD_LIBRARY_PATH will not be adjusted.
  - cgal_version/boost_version variables will be retained.

Note: for ThirdParty builds, it is important that the boost and CGAL
paths are added into LD_LIBRARY_PATH even if before they are created.
This ensures that the OpenFOAM environment is functional after the
build.

The '*-none' and '*-system' specifications can still be used to avoid
setting them at all.
2016-06-17 16:53:14 +02:00
Mark Olesen
97943ed819 COMP: improve robustness and warning messages when building paraview plugins 2016-06-17 09:31:41 +02:00
Mark Olesen
5ac7a846ed CONFIG: adjust csh compiler settings to be closer to sh version
- makes it easier to ensure consistent setups
2016-06-16 17:22:30 +02:00
Mark Olesen
bbf20318e0 ENH: support use of system gmp/mpfr/mpc with ThirdParty gcc
- not previously possible to configure a third-party gcc
  with system gmp/mpfr/mpc.
  This makes it easier to switch between compilers for testing.

- use system libraries by default
2016-06-16 16:49:28 +02:00
Mark Olesen
62f634c014 BUG: missing library arch on 3rd party gmp/mpfr/mpc paths issue #148
STYLE: drop conditional check on mpc.

- was for older gcc, but is a requisite for gcc >= 4.5
2016-06-16 15:54:06 +02:00
Mark Olesen
d5d0174b01 CONFIG: adjust for updated ThirdParty
- also update settings to include newer compiler versions
2016-06-14 10:46:20 +02:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
0326cbbd57 etc/config.*/paraview: Set ParaView-5.0.0 as the default for OpenFOAM-dev
to encourage testing and feedback
2016-02-12 14:28:12 +00:00
Henry Weller
9a7c6287a8 etc/config.*: Separate MPI settings into separate files and upgrade OpenMPI to 10.0.2 2016-02-10 20:46:24 +00:00