Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
f0375fc3
Commit
f0375fc3
authored
Jun 28, 2016
by
Andrew Heather
Browse files
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
parents
0f6f3e3c
8752f77a
Changes
162
Hide whitespace changes
Inline
Side-by-side
bin/tools/RunFunctions
View file @
f0375fc3
...
...
@@ -41,7 +41,7 @@ isTest()
getNumberOfProcessors
()
{
if
[
-f
$1
]
if
[
-f
"
$1
"
]
then
expandDictionary
$1
|
sed
-ne
's/^numberOfSubdomains\s*\(.*\);/\1/p'
fi
...
...
@@ -166,7 +166,7 @@ compileApplication()
cloneCase
()
{
if
[
-d
$2
]
if
[
-d
"
$2
"
]
then
echo
"Case already cloned: remove case directory
$2
to clone"
else
...
...
@@ -175,9 +175,22 @@ cloneCase()
cpfiles
=
"0 system constant"
for
f
in
$cpfiles
do
cp
-r
$1
/
$f
$2
\
c
p
-r
$1
/
$f
$2
done
fi
}
# Overwrite 0/ with the contents of 0.org/ if it exists
restore0Dir
()
{
echo
"Restore 0/ from 0.org/"
if
[
-d
0.org
]
then
\r
m
-rf
0
\c
p
-r
0.org 0
>
/dev/null 2>&1
else
echo
" Warning: no 0.org/ found"
fi
}
#------------------------------------------------------------------------------
etc/bashrc
View file @
f0375fc3
...
...
@@ -180,6 +180,7 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.sh/gperftools
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.sh/CGAL
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.sh/scotch
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.sh/FFTW
`
# Clean environment paths again. Only remove duplicates
...
...
etc/config.csh/FFTW
0 → 100644
View file @
f0375fc3
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/config.sh/FFTW
#
# Description
# Setup file for FFTW include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
#
# If using system-wide installations, use the following settings:
#
# fftw_version=fftw-system
#
# If the system fftw is unusable (eg, too old) and you don't
# have or want a ThirdParty installation:
#
# fftw_version=fftw-none
#
# If using a central installation, but not located under ThirdParty:
# - specify fftw-system
# - provide full paths for FFTW_ARCH_PATH
#
# Note
# When building OpenFOAM, any changes made here MUST be made in the
# equivalent config.sh version too, since that is the one which will
# be used during the build process.
#
#------------------------------------------------------------------------------
set
fftw_version
=
fftw-system
setenv FFTW_ARCH_PATH
$WM_THIRD_PARTY_DIR
/platforms/
$WM_ARCH$WM_COMPILER
/
$fftw_version
#------------------------------------------------------------------------------
if
(
$?
FOAM_VERBOSE
&&
$?
prompt
)
then
echo
"Using fftw (
$fftw_version
) ->
$FFTW_ARCH_PATH
"
endif
# If FFTW_ARCH_PATH does not end with '-system' or '-none',
# it is either located within ThirdParty, or a central installation
# outside of ThirdParty and must be added to the lib-path.
set
ending
=
"
${
FFTW_ARCH_PATH
:t
}
"
if
(
"
$ending
"
!=
"fftw-none"
&&
"
$ending
"
!=
"fftw-system"
)
then
_foamAddLib
$FFTW_ARCH_PATH
/lib
$WM_COMPILER_LIB_ARCH
endif
unset
fftw_version ending
#------------------------------------------------------------------------------
etc/config.sh/FFTW
0 → 100644
View file @
f0375fc3
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/config.sh/FFTW
#
# Description
# Setup file for FFTW include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
#
# If using system-wide installations, use the following settings:
#
# fftw_version=fftw-system
#
# If the system fftw is unusable (eg, too old) and you don't
# have or want a ThirdParty installation:
#
# fftw_version=fftw-none
#
# If using a central installation, but not located under ThirdParty:
# - specify fftw-system
# - provide full paths for FFTW_ARCH_PATH
#
# Note
# When _foamAddLib is unset (eg, called from makeFFTW):
# - fftw_version variable is retained.
# - the LD_LIBRARY_PATH is not adjusted.
#------------------------------------------------------------------------------
fftw_version
=
fftw-system
export
FFTW_ARCH_PATH
=
$WM_THIRD_PARTY_DIR
/platforms/
$WM_ARCH$WM_COMPILER
/
$fftw_version
#------------------------------------------------------------------------------
if
[
"
$FOAM_VERBOSE
"
-a
"
$PS1
"
]
then
echo
"Using fftw (
$fftw_version
) ->
$FFTW_ARCH_PATH
"
1>&2
fi
if
type
_foamAddLib
>
/dev/null 2>&1
# normal sourcing
then
# If FFTW_ARCH_PATH does not end with '-system' or '-none',
# it is either located within ThirdParty, or a central installation
# outside of ThirdParty and must be added to the lib-path.
ending
=
"
${
FFTW_ARCH_PATH_PATH
##*-
}
"
if
[
"
$ending
"
!=
none
-a
"
$ending
"
!=
system
]
then
_foamAddLib
$FFTW_ARCH_PATH
/lib
$WM_COMPILER_LIB_ARCH
fi
unset
fftw_version ending
fi
#------------------------------------------------------------------------------
etc/cshrc
View file @
f0375fc3
...
...
@@ -211,6 +211,7 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/mpi`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.csh/paraview
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.csh/ensight
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.csh/CGAL
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile config.csh/FFTW
`
# Clean environment paths again. Only remove duplicates
...
...
src/OpenFOAM/global/profiling/profiling.C
View file @
f0375fc3
...
...
@@ -369,8 +369,10 @@ void Foam::profiling::Information::update(const scalar& elapsed)
bool
Foam
::
profiling
::
writeData
(
Ostream
&
os
)
const
{
os
<<
indent
<<
"profiling"
<<
nl
<<
indent
<<
token
::
BEGIN_LIST
<<
incrIndent
<<
nl
;
os
.
beginBlock
(
"profiling"
)
<<
nl
;
// FUTURE: without nl
// Add extra new line between entries
label
nTrigger
=
0
;
// write on-stack items
// newest is first on the stack, top-level is at the end
...
...
@@ -382,6 +384,10 @@ bool Foam::profiling::writeData(Ostream& os) const
const
Information
*
info
=
*
iter
;
scalar
elapsed
=
timers_
[
info
->
id
()]
->
elapsedTime
();
if
(
nTrigger
++
)
{
os
<<
nl
;
}
info
->
write
(
os
,
true
,
elapsed
,
oldElapsed
);
oldElapsed
=
elapsed
;
}
...
...
@@ -406,13 +412,15 @@ bool Foam::profiling::writeData(Ostream& os) const
forAllConstIter
(
LookupContainer
,
lookup
,
iter
)
{
if
(
nTrigger
++
)
{
os
<<
nl
;
}
iter
()
->
write
(
os
);
}
}
os
<<
decrIndent
<<
indent
<<
token
::
END_LIST
<<
token
::
END_STATEMENT
<<
nl
;
os
.
endBlock
()
<<
nl
;
// FUTURE: without nl
if
(
sysInfo_
)
{
...
...
@@ -528,8 +536,7 @@ Foam::Ostream& Foam::profiling::Information::write
{
// write in dictionary format
// os.beginBlock("_" + Foam::name(id_)) << nl;
os
.
beginBlock
()
<<
nl
;
// FUTURE: without nl
os
.
beginBlock
(
"trigger"
+
Foam
::
name
(
id_
))
<<
nl
;
// FUTURE: without nl
// FUTURE: os.writeEntry(key, value);
...
...
tutorials/DNS/dnsFoam/boxTurb16/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Get application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication blockMesh
runApplication boxTurb
...
...
tutorials/basic/laplacianFoam/flange/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Get application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runAnsysToFoam
()
{
...
...
tutorials/basic/potentialFoam/cylinder/Allrun
View file @
f0375fc3
...
...
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
application
=
`
getApplication
`
application
=
$(
getApplication
)
cp
-r
0.org 0
>
/dev/null 2>&1
restore0Dir
runApplication blockMesh
runApplication
$application
-withFunctionObjects
-writePhi
-writep
runApplication streamFunction
...
...
tutorials/basic/potentialFoam/pitzDaily/Allrun
View file @
f0375fc3
...
...
@@ -4,9 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
application
=
`
getApplication
`
application
=
$(
getApplication
)
cp
-r
0.org 0
>
/dev/null 2>&1
restore0Dir
runApplication blockMesh
runApplication
$application
-writePhi
-writep
runApplication streamFunction
...
...
tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
View file @
f0375fc3
...
...
@@ -5,8 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
rm
-rf
0
cp
-r
0.org 0
restore0Dir
runApplication blockMesh
runApplication changeDictionary
runApplication topoSet
...
...
@@ -14,6 +13,6 @@ runApplication topoSet
runApplication PDRMesh
-overwrite
# Run
runApplication
`
getApplication
`
runApplication
$(
getApplication
)
#------------------------------------------------------------------------------
tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
View file @
f0375fc3
...
...
@@ -6,12 +6,12 @@ cd ${0%/*} || exit 1
./Allrun.mesh
r
m
-rf
0
&&
cp
-r
0.org 0
r
estore0Dir
runApplication decomposePar
-force
runParallel potentialFoam
-pName
pPotential
-initialiseUBCs
rm
-f
processor
*
/0/phi
\
r
m
-f
processor
*
/0/phi
runParallel XiDyMFoam
tutorials/combustion/XiFoam/ras/Allrun
View file @
f0375fc3
...
...
@@ -33,7 +33,7 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
cp
-r
../moriyoshiHomogeneous/0.005
.
setControlDict
runApplication
`
getApplication
`
runApplication
$(
getApplication
)
)
# Clone case for hydrogen
...
...
@@ -48,7 +48,7 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
constant/thermophysicalProperties.propane
mv
constant/thermophysicalProperties.hydrogen
\
constant/thermophysicalProperties
runApplication
`
getApplication
`
runApplication
$(
getApplication
)
)
#------------------------------------------------------------------------------
tutorials/combustion/chemFoam/gri/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Set application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication
$application
...
...
tutorials/combustion/chemFoam/h2/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Set application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication
$application
...
...
tutorials/combustion/chemFoam/ic8h18/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Set application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication
$application
...
...
tutorials/combustion/chemFoam/nc7h16/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Set application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication
$application
...
...
tutorials/combustion/engineFoam/kivaTest/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Get application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication kivaToFoam
-file
otape17
...
...
tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allrun
View file @
f0375fc3
...
...
@@ -34,7 +34,7 @@ rm log.createPatch
runApplication createPatch
-region
filmRegion
-overwrite
# Run
runApplication
`
getApplication
`
runApplication
$(
getApplication
)
paraFoam
-touchAll
...
...
tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun
View file @
f0375fc3
...
...
@@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Set application name
application
=
`
getApplication
`
application
=
$(
getApplication
)
runApplication blockMesh
...
...
@@ -34,7 +34,7 @@ runApplication -s panelRegion \
runApplication
-s
fields
\
decomposePar
-fields
runParallel
`
getApplication
`
runParallel
$(
getApplication
)
paraFoam
-touch
paraFoam
-touch
-region
panelRegion
...
...
Prev
1
2
3
4
5
…
9
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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