Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
c7350f3d
Commit
c7350f3d
authored
Jan 07, 2019
by
Mark Olesen
Browse files
Merge remote-tracking branch 'origin/master' into develop
parents
22b659d7
62a7582d
Changes
7
Hide whitespace changes
Inline
Side-by-side
etc/config.csh/mpi
View file @
c7350f3d
...
...
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2017-201
8
OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2017-201
9
OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
...
...
@@ -300,8 +300,14 @@ case INTELMPI:
echo
" Currently using '
$MPI_ARCH_PATH
'"
endif
_foamAddPath
$MPI_ARCH_PATH
/bin64
_foamAddLib
$MPI_ARCH_PATH
/lib64
# Newer versions (5.0.3 or earlier?) with intel64/bin ...
if
(
-d
"
$MPI_ARCH_PATH
/intel64/bin"
)
then
_foamAddPath
"
$MPI_ARCH_PATH
/intel64/bin"
_foamAddLib
"
$MPI_ARCH_PATH
/intel64/lib"
else
_foamAddPath
"
$MPI_ARCH_PATH
/bin64"
_foamAddLib
"
$MPI_ARCH_PATH
/lib64"
endif
breaksw
endsw
...
...
etc/config.csh/paraview
View file @
c7350f3d
...
...
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-201
8
OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2016-201
9
OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
...
...
@@ -29,7 +29,7 @@
# ParaView_DIR
# PV_PLUGIN_PATH
# The OpenFOAM plugin must be the first in PV_PLUGIN_PATH and have
# paraview-major.minor
version
encoded in its name.
# paraview-major.minor encoded in its name.
#
# For central installations not located under ThirdParty, the environment
# values must be set manually. For example,
...
...
@@ -66,16 +66,10 @@ set archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER"
eval
`
$WM_PROJECT_DIR
/bin/foamCleanPath
-csh-env
=
PATH
"
$ParaView_DIR
$archDir
/ParaView-
$archDir
/qt-
$archDir
/cmake-"
`
eval
`
$WM_PROJECT_DIR
/bin/foamCleanPath
-csh-env
=
LD_LIBRARY_PATH
"
$ParaView_DIR
$archDir
/ParaView-
$archDir
/qt-"
`
# ThirdParty cmake
set
cmake
=
"
$archDir
/
$cmake_version
"
if
(
-r
"
$cmake
/bin/cmake"
)
then
# _foamAddPath not available when foamPV alias is used
setenv PATH
"
$cmake
/bin:
${
PATH
}
"
endif
# Evaluate command-line parameters for ParaView
# Evaluate command-line parameters for ParaView and cmake
while
(
$#argv
>
0
)
switch
(
$argv
[
1]
)
case
cmake
*
=
*
:
case
ParaView
*
=
*
:
# name=value -> set name=value
eval
"set
$argv
[1]"
...
...
@@ -84,6 +78,13 @@ while ( $#argv > 0 )
shift
end
# ThirdParty cmake
set
cmake
=
"
$archDir
/
$cmake_version
"
if
(
-r
"
$cmake
/bin/cmake"
)
then
# _foamAddPath not available when foamPV alias is used
setenv PATH
"
$cmake
/bin:
${
PATH
}
"
endif
if
(
$?
ParaView_VERSION
)
then
switch
(
"
$ParaView_VERSION
"
)
case
""
:
...
...
etc/config.sh/mpi
View file @
c7350f3d
...
...
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2017-201
8
OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2017-201
9
OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
...
...
@@ -303,8 +303,15 @@ INTELMPI)
export
FOAM_MPI MPI_ARCH_PATH
_foamAddPath
$MPI_ARCH_PATH
/bin64
_foamAddLib
$MPI_ARCH_PATH
/lib64
# Newer versions (5.0.3 or earlier?) with intel64/bin ...
if
[
-d
"
$MPI_ARCH_PATH
/intel64/bin"
]
then
_foamAddPath
"
$MPI_ARCH_PATH
/intel64/bin"
_foamAddLib
"
$MPI_ARCH_PATH
/intel64/lib"
else
_foamAddPath
"
$MPI_ARCH_PATH
/bin64"
_foamAddLib
"
$MPI_ARCH_PATH
/lib64"
fi
;;
esac
...
...
etc/config.sh/paraview
View file @
c7350f3d
...
...
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-201
8
OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2016-201
9
OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
...
...
@@ -71,25 +71,25 @@ eval \
"
$(
$WM_PROJECT_DIR
/bin/foamCleanPath
-sh-env
=
LD_LIBRARY_PATH
\
$ParaView_DIR
$archDir
/ParaView-
$archDir
/qt-
)
"
# ThirdParty cmake
cmake
=
"
$archDir
/
$cmake_version
"
if
[
-r
"
$cmake
/bin/cmake"
]
then
# _foamAddPath not available when foamPV function is used
PATH
=
"
$cmake
/bin:
$PATH
"
fi
# Evaluate command-line parameters for ParaView
# Evaluate command-line parameters for ParaView and cmake
for
i
do
case
"
$i
"
in
(
ParaView
*
=
*
)
(
cmake
*
=
*
|
ParaView
*
=
*
)
# name=value -> export name=value
eval
"export
$i
"
;;
esac
done
# ThirdParty cmake
cmake
=
"
$archDir
/
$cmake_version
"
if
[
-r
"
$cmake
/bin/cmake"
]
then
# _foamAddPath not available when foamPV function is used
PATH
=
"
$cmake
/bin:
$PATH
"
fi
case
"
$ParaView_VERSION
"
in
(
''
)
# empty - do nothing
...
...
catalyst
@
22a67b4d
Compare
f0c9f44b
...
22a67b4d
Subproject commit
f0c9f44bcb94a2bdb195fb60ccf32a9615f05ff1
Subproject commit
22a67b4d48436563896c5d7df1ba63c3f93ba07a
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
View file @
c7350f3d
...
...
@@ -224,7 +224,15 @@ Foam::vtk::Tools::zeroField
data
->
SetNumberOfComponents
(
static_cast
<
int
>
(
pTraits
<
Type
>::
nComponents
));
data
->
SetNumberOfTuples
(
size
);
// Fill() was not available before VTK-8
#if (VTK_MAJOR_VERSION < 8)
for
(
int
i
=
0
;
i
<
data
->
GetNumberOfComponents
();
++
i
)
{
data
->
FillComponent
(
i
,
0
);
}
#else
data
->
Fill
(
0
);
#endif
return
data
;
}
...
...
wmake/wmakeBuildInfo
View file @
c7350f3d
#!/bin/
ba
sh
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2018
-2019
OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
...
...
@@ -26,7 +26,7 @@
# wmakeBuildInfo
#
# Description
# Print the version
used w
he
n
buildin
g
the project
# Print the
api/
version
and ot
he
r
build
in
formation for
the project
.
#
# Environment
# - WM_PROJECT_DIR
...
...
@@ -51,7 +51,7 @@ usage() {
Usage:
${
0
##*/
}
[OPTION]
${
0
##*/
}
[-update] -filter FILE
options:
-c
heck
Compare make and meta information (exit 0 for no changes)
-c
mp, -check
Compare make and meta information (exit 0 for no changes)
-diff Display differences between make and meta information
(exit code 0 for no changes)
-dry-run In combination with -update
...
...
@@ -96,7 +96,7 @@ do
-h
|
-help
*
)
usage
;;
-check
)
-cmp
|
-check
)
optCheck
=
true
;;
-diff
)
...
...
@@ -156,12 +156,11 @@ fi
#------------------------------------------------------------------------------
# Variables
declare
-A
makeInfo
declare
-A
metaInfo
# Variables - for portability, avoiding bash associative arrays
unset
make_info meta_info
#
# Populate make
Info array
# Populate make
_* variables
#
# - api : from rules/General/general
# - patch : cached value from previous make
...
...
@@ -177,10 +176,9 @@ declare -A metaInfo
#
# - Working on detached head.
# -> branch has value "HEAD" instead of something more readable.
#
getMakeInfo
()
{
if
[
"
$
{#
make
I
nfo
[*]
}
"
-eq
4
]
if
[
-n
"
$make
_i
nfo
"
]
then
##echo "use cached value for make info" 1>&2
return
0
...
...
@@ -188,7 +186,7 @@ getMakeInfo()
##echo "get make info" 1>&2
local
api patch build branch
makeInfo
=()
unset
make_api make_patch make_branch make_build
# (api) from WM_DIR/rules/General/general
# - extract WM_VERSION = OPENFOAM=<digits>
...
...
@@ -211,15 +209,15 @@ getMakeInfo()
branch
=
"
$(
git
--git-dir
=
$WM_PROJECT_DIR
/.git rev-parse
--abbrev-ref
HEAD 2>/dev/null
)
"
fi
makeInfo[api]
=
"
$api
"
makeInfo[patch]
=
"
${
patch
:-
0
}
"
# default is 0
makeInfo[branch]
=
"
$branch
"
makeInfo[build]
=
"
$build
"
make_api
=
"
$api
"
make_patch
=
"
${
patch
:-
0
}
"
# Default is 0 (unpatched)
make_branch
=
"
$branch
"
make_build
=
"
$build
"
make_info
=
true
}
#
# Populate metaInfo array
# Populate meta_* variables
#
# - api : from META-INFO/api-info
# - patch : from META-INFO/api-info
...
...
@@ -229,10 +227,9 @@ getMakeInfo()
# Failure modes:
# - Directory, file or entry not found.
# -> corresponding entries are empty strings
#
getMetaInfo
()
{
if
[
"
$
{#
meta
I
nfo
[*]
}
"
-eq
4
]
if
[
-n
"
$meta
_i
nfo
"
]
then
##echo "use cached value for meta info" 1>&2
return
0
...
...
@@ -240,7 +237,7 @@ getMetaInfo()
##echo "get meta info" 1>&2
local
api patch build branch
metaInfo
=()
unset
meta_api meta_patch meta_branch meta_build
if
[
-d
"
$metaInfoDir
"
]
then
...
...
@@ -253,14 +250,14 @@ getMetaInfo()
build
=
"
$(
sed
-ne
's@^build *= *\([^ ]*\).*@\1@p'
$metaInfoDir
/build-info 2>/dev/null
)
"
fi
metaInfo[api]
=
"
$api
"
metaInfo[patch]
=
"
${
patch
:-
0
}
"
# default is 0
metaInfo[branch]
=
"
$branch
"
metaInfo[build]
=
"
$build
"
meta_api
=
"
$api
"
meta_patch
=
"
${
patch
:-
0
}
"
# Default is 0 (unpatched)
meta_branch
=
"
$branch
"
meta_build
=
"
$build
"
meta_info
=
true
}
#
# Get api from rules/General/general
#
# Failure modes:
...
...
@@ -268,18 +265,17 @@ getMetaInfo()
# -> Fatal for building, but could be OK for a stripped down version
#
# Fallback. Get from api-info
#
getApi
()
{
getMakeInfo
# Local copy
local
api
=
"
${
make
Info
[
api
]
}
"
local
api
=
"
${
make
_
api
}
"
if
[
-z
"
$api
"
]
then
getMetaInfo
api
=
"
${
meta
Info
[
api
]
}
"
api
=
"
${
meta
_
api
}
"
fi
if
[
-n
"
$api
"
]
...
...
@@ -295,53 +291,69 @@ getApi()
#
# Failure modes:
# - No patch information (can't find file etc).
#
getPatchLevel
()
{
getMetaInfo
# Local copy
local
value
=
"
${
meta
Info
[
patch
]
}
"
local
patch
=
"
${
meta
_
patch
}
"
if
[
-n
"
$
value
"
]
if
[
-n
"
$
patch
"
]
then
echo
"
$
value
"
echo
"
$
patch
"
else
return
1
fi
}
#
# Report make info
#
reportMakeInfo
()
{
getMakeInfo
getMetaInfo
local
patch
=
"
${
metaInfo
[patch]
}
"
# <- From meta-info only
makeInfo[patch]
=
"
${
patch
:
=0
}
"
# Extra safety
echo
"make"
for
key
in
api patch branch build
do
echo
"
$key
=
${
make
Info
[
$key
]
}
"
done
echo
" api =
${
make_api
}
"
echo
" patch =
${
meta_patch
:-
0
}
"
# <- From meta-info only
echo
"
branch
=
${
make
_branch
}
"
echo
" build =
${
make_build
}
"
}
#
# Report meta info
#
reportMetaInfo
()
{
getMetaInfo
local
patch
=
"
${
metaInfo
[patch]
}
"
# <- From meta-info only
metaInfo[patch]
=
"
${
patch
:
=0
}
"
# Extra safety
echo
"meta"
for
key
in
api patch branch build
do
echo
"
$key
=
${
metaInfo
[
$key
]
}
"
done
echo
" api =
${
meta_api
}
"
echo
" patch =
${
meta_patch
:-
0
}
"
# <- From meta-info only
echo
" branch =
${
meta_branch
}
"
echo
" build =
${
meta_build
}
"
}
# Report diff between make and meta info (single key).
# Set diff_header prior to the first call.
# $1 == key
# $2 == make value
# $3 == meta value
unset
diff_header
_reportDiff
()
{
if
[
-n
"
$diff_header
"
]
then
echo
"
$diff_header
"
unset
diff_header
fi
echo
"
$1
:"
echo
" make
$2
"
echo
" meta
$3
"
}
...
...
@@ -350,50 +362,68 @@ reportMetaInfo()
# $1 == verbose, print as diff. Silent otherwise
checkDiff
()
{
local
verbose
=
"
$1
"
local
key diff
local
diff verbose
if
[
"
$1
"
=
"verbose"
]
then
diff_header
=
"Differences"
verbose
=
true
fi
getMakeInfo
getMetaInfo
for
key
in
api patch branch build
do
if
[
"
${
makeInfo
[
$key
]
}
"
!=
"
${
metaInfo
[
$key
]
}
"
]
# api
if
[
"
${
make_api
}
"
!=
"
${
meta_api
}
"
]
then
diff
=
true
if
[
-n
"
$verbose
"
]
then
case
"
$key
"
in
(
branch
|
build
)
# Only trigger when make info (branch, build) are non-empty
if
[
-n
"
${
makeInfo
[
$key
]
}
"
]
then
diff
=
"
$diff
$key
"
fi
;;
(
*
)
diff
=
"
$diff
$key
"
;;
esac
_reportDiff
"api"
"
${
make_api
}
"
"
${
meta_api
}
"
fi
done
fi
if
[
"
$verbose
"
=
verbose
]
&&
[
-n
"
$diff
"
]
# patch
if
[
"
${
make_patch
}
"
!=
"
${
meta_patch
}
"
]
then
echo
"Differences"
for
key
in
$diff
do
echo
"
$key
:"
echo
" make
${
makeInfo
[
$key
]
}
"
echo
" meta
${
metaInfo
[
$key
]
}
"
done
diff
=
true
if
[
-n
"
$verbose
"
]
then
_reportDiff
"patch"
"
${
make_patch
}
"
"
${
meta_patch
}
"
fi
fi
# branch - only test when make info is non-empty
if
[
-n
"
${
make_branch
}
"
]
&&
[
"
${
make_branch
}
"
!=
"
${
meta_branch
}
"
]
then
diff
=
true
if
[
-n
"
$verbose
"
]
then
_reportDiff
"branch"
"
${
make_branch
}
"
"
${
meta_branch
}
"
fi
fi
# build - only test when make info is non-empty
if
[
-n
"
${
make_build
}
"
]
&&
[
"
${
make_build
}
"
!=
"
${
meta_build
}
"
]
then
diff
=
true
if
[
-n
"
$verbose
"
]
then
_reportDiff
"build"
"
${
make_build
}
"
"
${
meta_build
}
"
fi
fi
# No diffs, but never permit entirely empty values for build.
test
-z
"
$diff
"
||
test
-z
"
${
make
Info
[
build
]
}${
meta
Info
[
build
]
}
"
test
-z
"
$diff
"
||
test
-z
"
${
make
_
build
}${
meta
_
build
}
"
}
#
# Update meta
I
nfo (on disk) based on the make
I
nfo
# Update meta
i
nfo (on disk) based on the make
i
nfo
#
performUpdate
()
{
...
...
@@ -401,16 +431,16 @@ performUpdate()
getMetaInfo
# Local copies of the make info
local
api
=
"
${
make
Info
[
api
]
}
"
local
branch
=
"
${
make
Info
[
branch
]
}
"
local
build
=
"
${
make
Info
[
build
]
}
"
local
patch
=
"
${
make
Info
[
patch
]
}
"
local
api
=
"
${
make
_
api
}
"
local
branch
=
"
${
make
_
branch
}
"
local
build
=
"
${
make
_
build
}
"
local
patch
=
"
${
make
_
patch
}
"
# If any of the make-info are empty (bad),
# use the meta-info to avoid spurious changes
[
-n
"
$api
"
]
||
api
=
"
${
meta
Info
[
api
]
}
"
[
-n
"
$branch
"
]
||
branch
=
"
${
meta
Info
[
branch
]
}
"
[
-n
"
$build
"
]
||
build
=
"
${
meta
Info
[
build
]
}
"
[
-n
"
$api
"
]
||
api
=
"
${
meta
_
api
}
"
[
-n
"
$branch
"
]
||
branch
=
"
${
meta
_
branch
}
"
[
-n
"
$build
"
]
||
build
=
"
${
meta
_
build
}
"
# Fallback to WM_PROJECT_VERSION alone
[
-n
"
$build
"
]
||
build
=
"
${
WM_PROJECT_VERSION
:-
unknown
}
"
...
...
@@ -419,12 +449,11 @@ performUpdate()
# build-info
outputFile
=
"
$metaInfoDir
/build-info"
if
[
"
$branch
"
!=
"
${
meta
Info
[
branch
]
}
"
]
||
\
[
"
$build
"
!=
"
${
meta
Info
[
build
]
}
"
]
||
\
[
"
$patch
"
!=
"
${
meta
Info
[
patch
]
}
"
]
if
[
"
$branch
"
!=
"
${
meta
_
branch
}
"
]
||
\
[
"
$build
"
!=
"
${
meta
_
build
}
"
]
||
\
[
"
$patch
"
!=
"
${
meta
_
patch
}
"
]
then
patch
=
"
${
metaInfo
[patch]
}
"
# <- From meta-info only
:
"
${
patch
:
=0
}
"
# Extra safety
patch
=
"
${
meta_patch
:-
0
}
"
# <- From meta-info only
if
[
-n
"
$optDryRun
"
]
then
...
...
@@ -441,10 +470,9 @@ performUpdate()
# api-info
outputFile
=
"
$metaInfoDir
/api-info"
if
[
"
$api
"
!=
"
${
meta
Info
[
api
]
}
"
]
if
[
"
$api
"
!=
"
${
meta
_
api
}
"
]
then
patch
=
"
${
metaInfo
[patch]
}
"
# <- From meta-info only
:
"
${
patch
:
=0
}
"
# Extra safety
patch
=
"
${
meta_patch
:-
0
}
"
# <- From meta-info only
if
[
-n
"
$optDryRun
"
]
then
...
...
@@ -461,8 +489,7 @@ performUpdate()
#
# Update metaInfo (on disk) based on the makeInfo
# This is the
# Update meta info (on disk) based on the make info
#
performFiltering
()
{
...
...
@@ -477,11 +504,10 @@ performFiltering()
getMetaInfo
# Local copies of the make info
local
api
=
"
${
makeInfo
[api]
}
"
local
branch
=
"
${
makeInfo
[branch]
}
"
local
build
=
"
${
makeInfo
[build]
}
"
local
patch
=
"
${
metaInfo
[patch]
}
"
# <- From meta-info only
:
"
${
patch
:
=0
}
"
# Extra safety
local
api
=
"
${
make_api
}
"
local
branch
=
"
${
make_branch
}
"
local
build
=
"
${
make_build
}
"
local
patch
=
"
${
meta_patch
:-
0
}
"
# <- From meta-info only
# If any of the make-info are empty (bad),
...
...
@@ -492,19 +518,20 @@ performFiltering()
if
[
-z
"
$api
"
]
then
api
=
"
${
meta
Info
[
api
]
}
"
api
=
"
${
meta
_
api
}
"
api
=
"
${
api
:-
0
}
"
# integer value
fi
# branch/build could be missing for non-git
if
[
-z
"
$branch
"
]
then
branch
=
"
${
meta
Info
[
branch
]
}
"
branch
=
"
${
meta
_
branch
}
"
branch
=
"
${
branch
:-
unknown
}
"
fi
if
[
-z
"
$build
"
]
then
build
=
"
${
meta
Info
[
build
]
}
"
build
=
"
${
meta
_
build
}
"
# Fallback to WM_PROJECT_VERSION
build
=
"
${
build
:-${
WM_PROJECT_VERSION
:-
unknown
}}
"
fi
...
...
@@ -523,7 +550,7 @@ performFiltering()
#------------------------------------------------------------------------------
# Dispatch
ing
# Dispatch
if
[
-n
"
$optCheck
"
]
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment