Compare commits
19 Commits
OpenFOAM-v
...
OpenFOAM-v
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c68f1be4b | |||
| ff16d27f63 | |||
| 54f23b9577 | |||
| 4dd1433133 | |||
| c1cbfe5780 | |||
| be420e7a71 | |||
| c278b93d7a | |||
| fce7948915 | |||
| e91dbcf834 | |||
| 00552eff17 | |||
| 3e76ef7b5b | |||
| f654b7fac6 | |||
| 1b017938c3 | |||
| 29faf6da89 | |||
| efebc5db3f | |||
| 3003356898 | |||
| 4ae61e621f | |||
| 27956330ac | |||
| b40d1d8e4f |
@ -1,2 +1,2 @@
|
||||
api=1906
|
||||
patch=191111
|
||||
patch=200312
|
||||
|
||||
33
README.md
33
README.md
@ -1,13 +1,14 @@
|
||||
# About OpenFOAM
|
||||
OpenFOAM is a free, open source CFD software [released and developed primarily by OpenCFD Ltd](http://www.openfoam.com) since 2004. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
|
||||
|
||||
OpenFOAM is a free, open source CFD software [released and developed by OpenCFD Ltd since 2004](http://www.openfoam.com/history/).
|
||||
It has a large user base across most areas of engineering and science, from both commercial and academic organisations.
|
||||
OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics.
|
||||
[See documentation](http://www.openfoam.com/documentation)
|
||||
|
||||
OpenFOAM is professionally released every six months to include
|
||||
customer sponsored developments and contributions from the community -
|
||||
individual and group contributors, re-integrations (including from
|
||||
FOAM-extend and OpenFOAM Foundation Ltd) - in this Official Release
|
||||
sanctioned by the OpenFOAM Worldwide Trademark Owner aiming towards
|
||||
one OpenFOAM.
|
||||
individual and group contributors, integrations
|
||||
(eg, from FOAM-extend and OpenFOAM Foundation Ltd) as well as
|
||||
[governance guided activities](https://www.openfoam.com/governance/).
|
||||
|
||||
|
||||
# Copyright
|
||||
@ -168,17 +169,17 @@ ThirdParty directory will contain either an `Allwmake` file or a
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/OpenFOAM-plus/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-plus/
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
|
||||
# Useful Links
|
||||
|
||||
@ -143,6 +143,13 @@ public:
|
||||
typedef indexedVertex<Gt,Vb2> Other;
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
indexedVertex(const indexedVertex&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
inline indexedVertex();
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# foamConfigurePaths
|
||||
@ -39,8 +38,8 @@ Basic
|
||||
Compiler
|
||||
-system NAME specify 'system' compiler to use (eg, Gcc, Icc,...)
|
||||
-third NAME specify 'ThirdParty' compiler to use (eg, Clang40,...)
|
||||
-gcc VER specify 'gcc_version' for ThirdParty Gcc
|
||||
-clang VER specify 'clang_version' for ThirdParty Clang
|
||||
-gcc VER specify 'default_gcc_version' for ThirdParty Gcc
|
||||
-clang VER specify 'default_clang_version' for ThirdParty Clang
|
||||
gmp-VERSION for ThirdParty gcc (gmp-system for system library)
|
||||
mpfr-VERSION for ThirdParty gcc (mpfr-system for system library)
|
||||
mpc-VERSION for ThirdParty gcc (mpc-system for system library)
|
||||
@ -344,19 +343,19 @@ do
|
||||
## Compiler ##
|
||||
|
||||
-clang)
|
||||
# Replace clang_version=...
|
||||
# Replace default_clang_version=...
|
||||
optionValue=$(getOptionValue "$@")
|
||||
replace etc/config.sh/compiler clang_version "$optionValue"
|
||||
replace etc/config.csh/compiler clang_version "$optionValue"
|
||||
replace etc/config.sh/compiler default_clang_version "$optionValue"
|
||||
replace etc/config.csh/compiler default_clang_version "$optionValue"
|
||||
adjusted=true
|
||||
shift
|
||||
;;
|
||||
|
||||
-gcc)
|
||||
# Replace gcc_version=...
|
||||
# Replace default_gcc_version=...
|
||||
optionValue=$(getOptionValue "$@")
|
||||
replace etc/config.sh/compiler gcc_version "$optionValue"
|
||||
replace etc/config.csh/compiler gcc_version "$optionValue"
|
||||
replace etc/config.sh/compiler default_gcc_version "$optionValue"
|
||||
replace etc/config.csh/compiler default_gcc_version "$optionValue"
|
||||
adjusted=true
|
||||
shift
|
||||
;;
|
||||
@ -389,22 +388,22 @@ do
|
||||
|
||||
gmp-[4-9]* | gmp-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler gmp_version "$1"
|
||||
replace etc/config.csh/compiler gmp_version "$1"
|
||||
replace etc/config.sh/compiler default_gmp_version "$1"
|
||||
replace etc/config.csh/compiler default_gmp_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
mpfr-[2-9]* | mpfr-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler mpfr_version "$1"
|
||||
replace etc/config.csh/compiler mpfr_version "$1"
|
||||
replace etc/config.sh/compiler default_mpfr_version "$1"
|
||||
replace etc/config.csh/compiler default_mpfr_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
mpc-[0-9]* | mpc-system)
|
||||
# gcc-related package
|
||||
replace etc/config.sh/compiler mpc_version "$1"
|
||||
replace etc/config.csh/compiler mpc_version "$1"
|
||||
replace etc/config.sh/compiler default_mpc_version "$1"
|
||||
replace etc/config.csh/compiler default_mpc_version "$1"
|
||||
adjusted=true
|
||||
;;
|
||||
|
||||
|
||||
22
doc/Build.md
22
doc/Build.md
@ -122,18 +122,18 @@ More details in the [ThirdParty build guide][link third-build].
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/OpenFOAM-plus/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-plus/
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-cross]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Cross-Compile-mingw.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-cross]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Cross-Compile-mingw.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019 OpenCFD Ltd
|
||||
|
||||
@ -110,17 +110,17 @@ and attempt to install a `paraview~qt` version instead.
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/OpenFOAM-plus/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-plus/
|
||||
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
|
||||
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019 OpenCFD Ltd
|
||||
|
||||
@ -30,8 +30,7 @@ USAGE
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
defineURL() {
|
||||
WEB_PATH="https://develop.openfoam.com"
|
||||
FOAM_REPO_VERSION="$WM_PROJECT-plus"
|
||||
export FOAM_BASE_REPO="https://develop.openfoam.com/Development/openfoam"
|
||||
|
||||
case "$WM_PROJECT_VERSION" in
|
||||
v[1-9][.0-9]*)
|
||||
@ -42,7 +41,6 @@ defineURL() {
|
||||
;;
|
||||
esac
|
||||
|
||||
export FOAM_BASE_REPO="$WEB_PATH/Development/$FOAM_REPO_VERSION"
|
||||
export FOAM_ONLINE_REPO="$FOAM_BASE_REPO/blob/${FOAM_REPO_TAG}"
|
||||
}
|
||||
|
||||
|
||||
@ -161,13 +161,13 @@ A partial list is given in the [ThirdParty requirements][link third-require].
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019 OpenCFD Ltd
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/config.csh/compiler
|
||||
@ -24,14 +23,19 @@
|
||||
|
||||
switch ("$WM_COMPILER_TYPE")
|
||||
case ThirdParty:
|
||||
# Default versions of GMP, MPFR, MPC - override as necessary
|
||||
# Default versions (CLANG, GCC, GMP, MPFR, MPC) - override as necessary
|
||||
|
||||
set gmp_version=gmp-system
|
||||
set mpfr_version=mpfr-system
|
||||
set mpc_version=mpc-system
|
||||
set default_clang_version=llvm-3.7.1
|
||||
set default_gcc_version=gcc-4.8.5
|
||||
|
||||
set default_gmp_version=gmp-system
|
||||
set default_mpfr_version=mpfr-system
|
||||
set default_mpc_version=mpc-system
|
||||
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
set gcc_version="$default_gcc_version"
|
||||
breaksw
|
||||
case Gcc48*:
|
||||
set gcc_version=gcc-4.8.5
|
||||
breaksw
|
||||
@ -86,7 +90,19 @@ case ThirdParty:
|
||||
case Gcc82*:
|
||||
set gcc_version=gcc-8.2.0
|
||||
breaksw
|
||||
case Gcc83*:
|
||||
set gcc_version=gcc-8.3.0
|
||||
breaksw
|
||||
case Gcc91*:
|
||||
set gcc_version=gcc-9.1.0
|
||||
breaksw
|
||||
case Gcc92*:
|
||||
set gcc_version=gcc-9.2.0
|
||||
breaksw
|
||||
|
||||
case Clang:
|
||||
set clang_version="$default_clang_version"
|
||||
breaksw
|
||||
case Clang37*:
|
||||
set clang_version=llvm-3.7.1
|
||||
breaksw
|
||||
@ -108,6 +124,13 @@ case ThirdParty:
|
||||
case Clang70*:
|
||||
set clang_version=llvm-7.0.1
|
||||
breaksw
|
||||
case Clang80*:
|
||||
set clang_version=llvm-8.0.1
|
||||
breaksw
|
||||
case Clang90*:
|
||||
set clang_version=llvm-9.0.0
|
||||
breaksw
|
||||
|
||||
default:
|
||||
/bin/cat << UNKNOWN_COMPILER
|
||||
===============================================================================
|
||||
@ -125,4 +148,7 @@ UNKNOWN_COMPILER
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
unset default_gcc_version default_clang_version
|
||||
unset default_gmp_version default_mpfr_version default_mpc_version
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,15 +9,17 @@
|
||||
# Copyright (C) 2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.csh/example/compiler
|
||||
# - sourced by OpenFOAM-*/etc/config.csh/settings
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||
# Older example of fine tuning compiler settings for OpenFOAM
|
||||
#
|
||||
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
|
||||
# in one of the etc/ directories.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -26,7 +28,7 @@ eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh -config -mode=o compiler`
|
||||
|
||||
# Modify/override compiler settings
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc70:
|
||||
case Gcc70*:
|
||||
set gcc_version=gcc-7.0.0
|
||||
set gmp_version=gmp-6.1.2
|
||||
set mpfr_version=mpfr-3.1.5
|
||||
|
||||
28
etc/config.csh/example/compiler-Gcc92
Normal file
28
etc/config.csh/example/compiler-Gcc92
Normal file
@ -0,0 +1,28 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.csh/example/compiler-Gcc92
|
||||
# - sourced by OpenFOAM-*/etc/config.csh/compiler
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler settings with a hook
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Modify/override compiler settings
|
||||
set gcc_version=gcc-9.2.0
|
||||
set gmp_version=gmp-6.2.0
|
||||
set mpfr_version=mpfr-4.0.2
|
||||
set mpc_version=mpc-1.1.0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -6,11 +6,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/config.sh/compiler
|
||||
@ -24,90 +23,56 @@
|
||||
|
||||
case "$WM_COMPILER_TYPE" in
|
||||
ThirdParty)
|
||||
# Default versions of GMP, MPFR, MPC - override as necessary
|
||||
gmp_version=gmp-system
|
||||
mpfr_version=mpfr-system
|
||||
mpc_version=mpc-system
|
||||
# Default versions (CLANG, GCC, GMP, MPFR, MPC) - override as necessary
|
||||
|
||||
default_clang_version=llvm-3.7.1
|
||||
default_gcc_version=gcc-4.8.5
|
||||
|
||||
default_gmp_version=gmp-system
|
||||
default_mpfr_version=mpfr-system
|
||||
default_mpc_version=mpc-system
|
||||
|
||||
gmp_version="$default_gmp_version"
|
||||
mpfr_version="$default_mpfr_version"
|
||||
mpc_version="$default_mpc_version"
|
||||
|
||||
case "$WM_COMPILER" in
|
||||
Gcc | Gcc48*)
|
||||
gcc_version=gcc-4.8.5
|
||||
;;
|
||||
Gcc49*)
|
||||
gcc_version=gcc-4.9.4
|
||||
;;
|
||||
Gcc51*)
|
||||
gcc_version=gcc-5.1.0
|
||||
;;
|
||||
Gcc52*)
|
||||
gcc_version=gcc-5.2.0
|
||||
;;
|
||||
Gcc53*)
|
||||
gcc_version=gcc-5.3.0
|
||||
;;
|
||||
Gcc54*)
|
||||
gcc_version=gcc-5.4.0
|
||||
;;
|
||||
Gcc55*)
|
||||
gcc_version=gcc-5.5.0
|
||||
;;
|
||||
Gcc61*)
|
||||
gcc_version=gcc-6.1.0
|
||||
;;
|
||||
Gcc62*)
|
||||
gcc_version=gcc-6.2.0
|
||||
;;
|
||||
Gcc63*)
|
||||
gcc_version=gcc-6.3.0
|
||||
;;
|
||||
Gcc64*)
|
||||
gcc_version=gcc-6.4.0
|
||||
;;
|
||||
Gcc65*)
|
||||
gcc_version=gcc-6.5.0
|
||||
;;
|
||||
Gcc71*)
|
||||
gcc_version=gcc-7.1.0
|
||||
;;
|
||||
Gcc72*)
|
||||
gcc_version=gcc-7.2.0
|
||||
;;
|
||||
Gcc73*)
|
||||
gcc_version=gcc-7.3.0
|
||||
;;
|
||||
Gcc74*)
|
||||
gcc_version=gcc-7.4.0
|
||||
;;
|
||||
Gcc81*)
|
||||
gcc_version=gcc-8.1.0
|
||||
;;
|
||||
Gcc82*)
|
||||
gcc_version=gcc-8.2.0
|
||||
;;
|
||||
Clang | Clang37*)
|
||||
clang_version=llvm-3.7.1
|
||||
;;
|
||||
Clang38*)
|
||||
clang_version=llvm-3.8.1
|
||||
;;
|
||||
Clang39*)
|
||||
clang_version=llvm-3.9.1
|
||||
;;
|
||||
Clang40*)
|
||||
clang_version=llvm-4.0.1
|
||||
;;
|
||||
Clang50*)
|
||||
clang_version=llvm-5.0.2
|
||||
;;
|
||||
Clang60*)
|
||||
clang_version=llvm-6.0.1
|
||||
;;
|
||||
Clang70*)
|
||||
clang_version=llvm-7.0.1
|
||||
;;
|
||||
Clang80*)
|
||||
clang_version=llvm-8.0.0
|
||||
;;
|
||||
Gcc) gcc_version="$default_gcc_version" ;;
|
||||
Gcc48*) gcc_version=gcc-4.8.5 ;;
|
||||
Gcc49*) gcc_version=gcc-4.9.4 ;;
|
||||
Gcc51*) gcc_version=gcc-5.1.0 ;;
|
||||
Gcc52*) gcc_version=gcc-5.2.0 ;;
|
||||
Gcc53*) gcc_version=gcc-5.3.0 ;;
|
||||
Gcc54*) gcc_version=gcc-5.4.0 ;;
|
||||
Gcc55*) gcc_version=gcc-5.5.0 ;;
|
||||
Gcc61*) gcc_version=gcc-6.1.0 ;;
|
||||
Gcc62*) gcc_version=gcc-6.2.0 ;;
|
||||
Gcc63*) gcc_version=gcc-6.3.0 ;;
|
||||
Gcc64*) gcc_version=gcc-6.4.0 ;;
|
||||
Gcc65*) gcc_version=gcc-6.5.0 ;;
|
||||
Gcc71*) gcc_version=gcc-7.1.0 ;;
|
||||
Gcc72*) gcc_version=gcc-7.2.0 ;;
|
||||
Gcc73*) gcc_version=gcc-7.3.0 ;;
|
||||
Gcc74*) gcc_version=gcc-7.4.0 ;;
|
||||
Gcc75*) gcc_version=gcc-7.5.0 ;;
|
||||
Gcc81*) gcc_version=gcc-8.1.0 ;;
|
||||
Gcc82*) gcc_version=gcc-8.2.0 ;;
|
||||
Gcc83*) gcc_version=gcc-8.3.0 ;;
|
||||
Gcc91*) gcc_version=gcc-9.1.0 ;;
|
||||
Gcc92*) gcc_version=gcc-9.2.0 ;;
|
||||
|
||||
Clang) clang_version="$default_clang_version" ;;
|
||||
Clang37*) clang_version=llvm-3.7.1 ;;
|
||||
Clang38*) clang_version=llvm-3.8.1 ;;
|
||||
Clang39*) clang_version=llvm-3.9.1 ;;
|
||||
Clang40*) clang_version=llvm-4.0.1 ;;
|
||||
Clang50*) clang_version=llvm-5.0.2 ;;
|
||||
Clang60*) clang_version=llvm-6.0.1 ;;
|
||||
Clang70*) clang_version=llvm-7.0.1 ;;
|
||||
Clang71*) clang_version=llvm-7.1.0 ;;
|
||||
Clang80*) clang_version=llvm-8.0.1 ;;
|
||||
Clang90*) clang_version=llvm-9.0.0 ;;
|
||||
|
||||
*)
|
||||
/bin/cat << UNKNOWN_COMPILER 1>&2
|
||||
===============================================================================
|
||||
@ -125,4 +90,7 @@ UNKNOWN_COMPILER
|
||||
;;
|
||||
esac
|
||||
|
||||
unset default_gcc_version default_clang_version
|
||||
unset default_gmp_version default_mpfr_version default_mpc_version
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,15 +9,17 @@
|
||||
# Copyright (C) 2017 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.sh/example/compiler
|
||||
# - sourced by OpenFOAM-*/etc/config.sh/settings
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler versions and settings for OpenFOAM
|
||||
# Older example of fine tuning compiler settings for OpenFOAM.
|
||||
#
|
||||
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
|
||||
# in one of the etc/ directories.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -26,18 +28,12 @@ eval $($WM_PROJECT_DIR/bin/foamEtcFile -sh -config -mode=o compiler)
|
||||
|
||||
# Modify/override compiler settings
|
||||
case "$WM_COMPILER" in
|
||||
Gcc70)
|
||||
Gcc70*)
|
||||
gcc_version=gcc-7.0.0
|
||||
gmp_version=gmp-6.1.2
|
||||
mpfr_version=mpfr-3.1.5
|
||||
mpc_version=mpc-1.0.3
|
||||
;;
|
||||
Gcc48u)
|
||||
# Example of using the system GCC 4.8 in Ubuntu 15.10. Keep in mind you
|
||||
# will also need to create the respective directory in "wmake/rules"
|
||||
export CC='gcc-4.8'
|
||||
export CXX='g++-4.8'
|
||||
;;
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
28
etc/config.sh/example/compiler-Gcc92
Normal file
28
etc/config.sh/example/compiler-Gcc92
Normal file
@ -0,0 +1,28 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# config.sh/example/compiler-Gcc92
|
||||
# - sourced by OpenFOAM-*/etc/config.sh/compiler
|
||||
#
|
||||
# Description
|
||||
# Example of fine tuning compiler settings with a hook
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Modify/override compiler settings
|
||||
gcc_version=gcc-9.2.0
|
||||
gmp_version=gmp-6.2.0
|
||||
mpfr_version=mpfr-4.0.2
|
||||
mpc_version=mpc-1.1.0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1428,7 +1428,7 @@ bool Foam::ping
|
||||
}
|
||||
|
||||
// Fill sockaddr_in structure with dest address and port
|
||||
memset(reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
||||
std::memset(reinterpret_cast<char *>(&destAddr), '\0', sizeof(destAddr));
|
||||
destAddr.sin_family = AF_INET;
|
||||
destAddr.sin_port = htons(ushort(destPort));
|
||||
destAddr.sin_addr.s_addr = addr;
|
||||
|
||||
@ -472,6 +472,12 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
reference(const reference&) = default;
|
||||
|
||||
//- Move construct
|
||||
reference(reference&&) = default;
|
||||
|
||||
//- Value assignment
|
||||
inline void operator=(const reference& other);
|
||||
|
||||
|
||||
@ -447,6 +447,12 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
reference(const reference&) = default;
|
||||
|
||||
//- Move construct
|
||||
reference(reference&&) = default;
|
||||
|
||||
//- Flip the bit at the position, no range-checking
|
||||
inline void flip();
|
||||
|
||||
|
||||
@ -766,8 +766,11 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null (end iterator)
|
||||
inline const_iterator() = default;
|
||||
//- Default construct (end iterator)
|
||||
const_iterator() = default;
|
||||
|
||||
//- Copy construct
|
||||
const_iterator(const const_iterator&) = default;
|
||||
|
||||
//- Copy construct from similar access type
|
||||
inline explicit const_iterator(const Iterator<true>& iter)
|
||||
|
||||
@ -233,6 +233,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
iterator(const iterator&) = default;
|
||||
|
||||
//- Construct for a node on a list
|
||||
inline iterator(DLListBase* list, link* item);
|
||||
|
||||
|
||||
@ -209,6 +209,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
//- Copy construct
|
||||
iterator(const iterator&) = default;
|
||||
|
||||
//- Construct for a node on the list
|
||||
inline iterator(SLListBase* list, link* item);
|
||||
|
||||
|
||||
@ -59,7 +59,10 @@ void Foam::List<T>::doResize(const label newSize)
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(nv, this->v_, overlap*sizeof(T));
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(nv), this->v_, overlap*sizeof(T)
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -185,21 +188,26 @@ Foam::List<T>::List(const UList<T>& a)
|
||||
:
|
||||
UList<T>(nullptr, a.size_)
|
||||
{
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
doAlloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -213,21 +221,26 @@ Foam::List<T>::List(const List<T>& a)
|
||||
:
|
||||
UList<T>(nullptr, a.size_)
|
||||
{
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
doAlloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -247,22 +260,29 @@ Foam::List<T>::List(List<T>& a, bool reuse)
|
||||
this->v_ = a.v_;
|
||||
a.v_ = nullptr;
|
||||
a.size_ = 0;
|
||||
return;
|
||||
}
|
||||
else if (this->size_)
|
||||
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
doAlloc();
|
||||
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -454,19 +474,24 @@ void Foam::List<T>::operator=(const UList<T>& a)
|
||||
{
|
||||
reAlloc(a.size_);
|
||||
|
||||
if (this->size_)
|
||||
const label len = this->size_;
|
||||
|
||||
if (len)
|
||||
{
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, a.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), a.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
List_CONST_ACCESS(T, a, ap);
|
||||
List_FOR_ALL((*this), i)
|
||||
for (label i = 0; i < len; ++i)
|
||||
{
|
||||
vp[i] = ap[i];
|
||||
}
|
||||
@ -522,7 +547,7 @@ void Foam::List<T>::operator=(const IndirectListBase<T, Addr>& list)
|
||||
{
|
||||
List_ACCESS(T, (*this), vp);
|
||||
|
||||
for (label i=0; i<len; ++i)
|
||||
for (label i=0; i < len; ++i)
|
||||
{
|
||||
vp[i] = list[i];
|
||||
}
|
||||
|
||||
@ -76,6 +76,12 @@ public:
|
||||
inline static const SubList<T>& null();
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
SubList(const SubList&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from UList and sub-list size, start at 0
|
||||
|
||||
@ -118,7 +118,10 @@ void Foam::UList<T>::deepCopy(const UList<T>& list)
|
||||
#ifdef USEMEMCPY
|
||||
if (contiguous<T>())
|
||||
{
|
||||
memcpy(this->v_, list.v_, this->byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(this->v_), list.v_, this->byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@ -213,6 +213,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
UList(const UList<T>&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
|
||||
@ -259,6 +259,15 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOobject(const IOobject&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOobject() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from name, instance, registry, io options
|
||||
@ -328,10 +337,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOobject() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// General access
|
||||
|
||||
@ -77,12 +77,6 @@ Foam::baseIOdictionary::baseIOdictionary
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::baseIOdictionary::~baseIOdictionary()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::word& Foam::baseIOdictionary::name() const
|
||||
|
||||
@ -68,6 +68,18 @@ public:
|
||||
TypeName("dictionary");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
baseIOdictionary(const baseIOdictionary&) = default;
|
||||
|
||||
//- Move construct
|
||||
baseIOdictionary(baseIOdictionary&&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~baseIOdictionary() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given an IOobject
|
||||
@ -80,11 +92,7 @@ public:
|
||||
baseIOdictionary(const IOobject&, Istream&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~baseIOdictionary();
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
//- Return complete path + object name if the file exists
|
||||
// either in the case/processor or case otherwise null
|
||||
|
||||
@ -140,6 +140,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOstream(const IOstream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct with specified stream option
|
||||
@ -165,10 +174,6 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
@ -72,6 +72,15 @@ class Istream
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Istream(const Istream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -87,11 +96,7 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
// Read functions
|
||||
|
||||
|
||||
@ -75,6 +75,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Ostream(const Ostream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -90,11 +99,7 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
// Write functions
|
||||
|
||||
|
||||
@ -62,14 +62,17 @@ class OSstream
|
||||
std::ostream& os_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
OSstream(const OSstream&) = default;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const OSstream&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct as wrapper around std::ostream and set stream status
|
||||
|
||||
@ -301,4 +301,32 @@ void Foam::ITstream::rewind()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::ITstream::operator=(const ITstream& is)
|
||||
{
|
||||
Istream::operator=(is);
|
||||
tokenList::operator=(is);
|
||||
name_ = is.name_;
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
void Foam::ITstream::operator=(const tokenList& toks)
|
||||
{
|
||||
tokenList::operator=(toks);
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
void Foam::ITstream::operator=(tokenList&& toks)
|
||||
{
|
||||
tokenList::operator=(std::move(toks));
|
||||
|
||||
rewind();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -273,10 +273,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Print
|
||||
// Output
|
||||
|
||||
//- Print description of stream to Ostream
|
||||
void print(Ostream& os) const;
|
||||
//- Print stream description to Ostream
|
||||
void print(Ostream& os) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment, with rewind()
|
||||
void operator=(const ITstream& is);
|
||||
|
||||
//- Copy assignment of tokens, with rewind()
|
||||
void operator=(const tokenList& toks);
|
||||
|
||||
//- Move assignment of tokens, with rewind()
|
||||
void operator=(tokenList&& toks);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ Foam::IOerror::IOerror(const dictionary& errDict)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOerror::~IOerror() throw()
|
||||
Foam::IOerror::~IOerror() noexcept
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ Foam::error::error(const error& err)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::error::~error() throw()
|
||||
Foam::error::~error() noexcept
|
||||
{
|
||||
delete messageStreamPtr_;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~error() throw();
|
||||
virtual ~error() noexcept;
|
||||
|
||||
|
||||
// Static Member Functions
|
||||
@ -239,7 +239,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOerror() throw();
|
||||
virtual ~IOerror() noexcept;
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -65,6 +65,12 @@ public:
|
||||
TypeName("value");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
valuePointPatchField(const valuePointPatchField&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
|
||||
@ -427,6 +427,21 @@ public:
|
||||
inline bool readListIfPresent(const word& optName, List<T>& list) const;
|
||||
|
||||
|
||||
//- Alternative name for option opt(const word& optName)
|
||||
template<class T=string>
|
||||
T get(const word& optName) const
|
||||
{
|
||||
return this->opt<T>(optName);
|
||||
}
|
||||
|
||||
//- Alternative name for option opt(const word& optName, ...)
|
||||
template<class T>
|
||||
T get(const word& optName, const T& deflt) const
|
||||
{
|
||||
return this->opt<T>(optName, deflt);
|
||||
}
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Append a (mandatory) argument to validArgs
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,7 +56,7 @@ void Foam::interpolation2DTable<Type>::readTable()
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable()
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::normalBounding::WARN),
|
||||
fileName_("fileNameIsUndefined"),
|
||||
reader_(nullptr)
|
||||
@ -71,7 +71,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
const fileName& fName
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(values),
|
||||
List<value_type>(values),
|
||||
bounding_(bounding),
|
||||
fileName_(fName),
|
||||
reader_(nullptr)
|
||||
@ -81,7 +81,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::normalBounding::WARN),
|
||||
fileName_(fName),
|
||||
reader_(new openFoamTableReader<Type>(dictionary()))
|
||||
@ -93,7 +93,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||
List<value_type>(),
|
||||
bounding_
|
||||
(
|
||||
bounds::normalBoundingNames.lookupOrDefault
|
||||
@ -114,13 +114,13 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
|
||||
template<class Type>
|
||||
Foam::interpolation2DTable<Type>::interpolation2DTable
|
||||
(
|
||||
const interpolation2DTable& interpTable
|
||||
const interpolation2DTable& tbl
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(interpTable),
|
||||
bounding_(interpTable.bounding_),
|
||||
fileName_(interpTable.fileName_),
|
||||
reader_(interpTable.reader_) // note: steals reader. Used in write().
|
||||
List<value_type>(tbl),
|
||||
bounding_(tbl.bounding_),
|
||||
fileName_(tbl.fileName_),
|
||||
reader_(tbl.reader_.clone())
|
||||
{}
|
||||
|
||||
|
||||
@ -312,6 +312,24 @@ Foam::label Foam::interpolation2DTable<Type>::Xi
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::interpolation2DTable<Type>::operator=
|
||||
(
|
||||
const interpolation2DTable<Type>& rhs
|
||||
)
|
||||
{
|
||||
if (this == &rhs)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static_cast<List<value_type>&>(*this) = rhs;
|
||||
bounding_ = rhs.bounding_;
|
||||
fileName_ = rhs.fileName_;
|
||||
reader_.reset(rhs.reader_.clone());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Type Foam::interpolation2DTable<Type>::operator()
|
||||
(
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,17 +58,7 @@ class interpolation2DTable
|
||||
:
|
||||
public List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>
|
||||
{
|
||||
public:
|
||||
|
||||
// Public data types
|
||||
|
||||
//- Convenience typedef
|
||||
typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
//- Handling for out-of-bound values
|
||||
bounds::normalBounding bounding_;
|
||||
@ -103,6 +94,15 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
// Public Data Types
|
||||
|
||||
//- The element data type
|
||||
typedef Tuple2<scalar, List<Tuple2<scalar, Type>>> value_type;
|
||||
|
||||
//- Convenience typedef
|
||||
typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -122,8 +122,8 @@ public:
|
||||
//- Construct by reading file name and outOfBounds from dictionary
|
||||
interpolation2DTable(const dictionary& dict);
|
||||
|
||||
//- Construct copy
|
||||
interpolation2DTable(const interpolation2DTable& interpTable);
|
||||
//- Copy construct
|
||||
interpolation2DTable(const interpolation2DTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -141,6 +141,9 @@ public:
|
||||
//- Return an element of constant List<Tuple2<scalar, Type>>
|
||||
const List<Tuple2<scalar, Type>>& operator[](const label) const;
|
||||
|
||||
//- Copy assignment
|
||||
void operator=(const interpolation2DTable<Type>& rhs);
|
||||
|
||||
//- Return an interpolated value
|
||||
Type operator()(const scalar valueX, const scalar valueY) const;
|
||||
};
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,7 +60,7 @@ void Foam::interpolationTable<Type>::readTable()
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable()
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::repeatableBounding::WARN),
|
||||
fileName_("fileNameIsUndefined"),
|
||||
reader_(nullptr)
|
||||
@ -74,7 +75,7 @@ Foam::interpolationTable<Type>::interpolationTable
|
||||
const fileName& fName
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(values),
|
||||
List<value_type>(values),
|
||||
bounding_(bounding),
|
||||
fileName_(fName),
|
||||
reader_(nullptr)
|
||||
@ -84,7 +85,7 @@ Foam::interpolationTable<Type>::interpolationTable
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_(bounds::repeatableBounding::WARN),
|
||||
fileName_(fName),
|
||||
reader_(new openFoamTableReader<Type>(dictionary()))
|
||||
@ -96,7 +97,7 @@ Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(),
|
||||
List<value_type>(),
|
||||
bounding_
|
||||
(
|
||||
bounds::repeatableBoundingNames.lookupOrDefault
|
||||
@ -117,17 +118,16 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable
|
||||
(
|
||||
const interpolationTable& interpTable
|
||||
const interpolationTable& tbl
|
||||
)
|
||||
:
|
||||
List<Tuple2<scalar, Type>>(interpTable),
|
||||
bounding_(interpTable.bounding_),
|
||||
fileName_(interpTable.fileName_),
|
||||
reader_(interpTable.reader_) // note: steals reader. Used in write().
|
||||
List<value_type>(tbl),
|
||||
bounding_(tbl.bounding_),
|
||||
fileName_(tbl.fileName_),
|
||||
reader_(tbl.reader_.clone())
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
@ -318,6 +318,24 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::interpolationTable<Type>::operator=
|
||||
(
|
||||
const interpolationTable<Type>& rhs
|
||||
)
|
||||
{
|
||||
if (this == &rhs)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static_cast<List<value_type>&>(*this) = rhs;
|
||||
bounding_ = rhs.bounding_;
|
||||
fileName_ = rhs.fileName_;
|
||||
reader_.reset(rhs.reader_.clone());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
const Foam::Tuple2<Foam::scalar, Type>&
|
||||
Foam::interpolationTable<Type>::operator[](const label i) const
|
||||
|
||||
@ -104,6 +104,15 @@ class interpolationTable
|
||||
|
||||
public:
|
||||
|
||||
// Public Data Types
|
||||
|
||||
//- The element data type
|
||||
typedef Tuple2<scalar, Type> value_type;
|
||||
|
||||
//- The mapped data type
|
||||
typedef Type mapped_type;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -125,8 +134,8 @@ public:
|
||||
// This is a specialised constructor used by patchFields
|
||||
interpolationTable(const dictionary& dict);
|
||||
|
||||
//- Construct copy
|
||||
interpolationTable(const interpolationTable& interpTable);
|
||||
//- Copy construct
|
||||
interpolationTable(const interpolationTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -145,6 +154,9 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment
|
||||
void operator=(const interpolationTable<Type>& rhs);
|
||||
|
||||
//- Return an element of constant Tuple2<scalar, Type>
|
||||
const Tuple2<scalar, Type>& operator[](const label) const;
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ void Foam::processorLduInterface::send
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
reinterpret_cast<const char*>(f.begin()),
|
||||
reinterpret_cast<const char*>(f.cdata()),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -64,20 +64,23 @@ void Foam::processorLduInterface::send
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
);
|
||||
|
||||
resizeBuf(sendBuf_, nBytes);
|
||||
memcpy(sendBuf_.begin(), f.begin(), nBytes);
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(sendBuf_.data()), f.cdata(), nBytes
|
||||
);
|
||||
|
||||
OPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -109,7 +112,7 @@ void Foam::processorLduInterface::receive
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
reinterpret_cast<char*>(f.begin()),
|
||||
reinterpret_cast<char*>(f.data()),
|
||||
f.byteSize(),
|
||||
tag(),
|
||||
comm()
|
||||
@ -117,7 +120,10 @@ void Foam::processorLduInterface::receive
|
||||
}
|
||||
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||
{
|
||||
memcpy(f.begin(), receiveBuf_.begin(), f.byteSize());
|
||||
std::memcpy
|
||||
(
|
||||
static_cast<void*>(f.data()), receiveBuf_.cdata(), f.byteSize()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -156,10 +162,10 @@ void Foam::processorLduInterface::compressedSend
|
||||
label nFloats = nm1 + nlast;
|
||||
label nBytes = nFloats*sizeof(float);
|
||||
|
||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.begin());
|
||||
const scalar *sArray = reinterpret_cast<const scalar*>(f.cdata());
|
||||
const scalar *slast = &sArray[nm1];
|
||||
resizeBuf(sendBuf_, nBytes);
|
||||
float *fArray = reinterpret_cast<float*>(sendBuf_.begin());
|
||||
float *fArray = reinterpret_cast<float*>(sendBuf_.data());
|
||||
|
||||
for (label i=0; i<nm1; i++)
|
||||
{
|
||||
@ -178,7 +184,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -192,7 +198,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -202,7 +208,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
sendBuf_.begin(),
|
||||
sendBuf_.cdata(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -248,7 +254,7 @@ void Foam::processorLduInterface::compressedReceive
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
receiveBuf_.begin(),
|
||||
receiveBuf_.data(),
|
||||
nBytes,
|
||||
tag(),
|
||||
comm()
|
||||
@ -262,9 +268,9 @@ void Foam::processorLduInterface::compressedReceive
|
||||
}
|
||||
|
||||
const float *fArray =
|
||||
reinterpret_cast<const float*>(receiveBuf_.begin());
|
||||
reinterpret_cast<const float*>(receiveBuf_.cdata());
|
||||
f.last() = reinterpret_cast<const Type&>(fArray[nm1]);
|
||||
scalar *sArray = reinterpret_cast<scalar*>(f.begin());
|
||||
scalar *sArray = reinterpret_cast<scalar*>(f.data());
|
||||
const scalar *slast = &sArray[nm1];
|
||||
|
||||
for (label i=0; i<nm1; i++)
|
||||
|
||||
@ -73,6 +73,18 @@ class patchIdentifier
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
patchIdentifier(const patchIdentifier&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
patchIdentifier& operator=(const patchIdentifier&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~patchIdentifier() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
@ -100,10 +112,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~patchIdentifier() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the patch name
|
||||
|
||||
@ -83,6 +83,15 @@ public:
|
||||
static const word emptyType;
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
surfZoneIdentifier(const surfZoneIdentifier&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
surfZoneIdentifier& operator=(const surfZoneIdentifier&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -79,10 +79,19 @@ public:
|
||||
enum components { XX, XY, XZ, YY, YZ, ZZ };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline SymmTensor();
|
||||
//- Default construct
|
||||
SymmTensor() = default;
|
||||
|
||||
//- Copy construct
|
||||
SymmTensor(const SymmTensor&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
SymmTensor& operator=(const SymmTensor&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline SymmTensor(const Foam::zero);
|
||||
|
||||
@ -30,11 +30,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor<Cmpt>::SymmTensor()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor<Cmpt>::SymmTensor(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -79,10 +79,19 @@ public:
|
||||
enum components { XX, XY, YY };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline SymmTensor2D();
|
||||
//- Default construct
|
||||
SymmTensor2D() = default;
|
||||
|
||||
//- Copy construct
|
||||
SymmTensor2D(const SymmTensor2D&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
SymmTensor2D& operator=(const SymmTensor2D&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline SymmTensor2D(const Foam::zero);
|
||||
|
||||
@ -30,11 +30,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -89,10 +89,19 @@ public:
|
||||
enum components { XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline Tensor();
|
||||
//- Default construct
|
||||
Tensor() = default;
|
||||
|
||||
//- Copy construct
|
||||
Tensor(const Tensor&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
Tensor& operator=(const Tensor&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline Tensor(const Foam::zero);
|
||||
|
||||
@ -30,11 +30,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Tensor<Cmpt>::Tensor()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Tensor<Cmpt>::Tensor(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -83,10 +83,19 @@ public:
|
||||
enum components { XX, XY, YX, YY };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline Tensor2D();
|
||||
//- Default construct
|
||||
Tensor2D() = default;
|
||||
|
||||
//- Copy construct
|
||||
Tensor2D(const Tensor2D&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
Tensor2D& operator=(const Tensor2D&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline Tensor2D(const Foam::zero);
|
||||
|
||||
@ -28,11 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Tensor2D<Cmpt>::Tensor2D()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Tensor2D<Cmpt>::Tensor2D(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -80,10 +80,19 @@ public:
|
||||
enum components { X, Y, Z };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline Vector();
|
||||
//- Default construct
|
||||
Vector() = default;
|
||||
|
||||
//- Copy construct
|
||||
Vector(const Vector&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
Vector& operator=(const Vector&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline Vector(const Foam::zero);
|
||||
|
||||
@ -28,11 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Vector<Cmpt>::Vector()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Vector<Cmpt>::Vector(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -73,10 +73,19 @@ public:
|
||||
enum components { X, Y };
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline Vector2D();
|
||||
//- Default construct
|
||||
Vector2D() = default;
|
||||
|
||||
//- Copy construct
|
||||
Vector2D(const Vector2D&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
Vector2D& operator=(const Vector2D&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct initialized to zero
|
||||
inline Vector2D(const Foam::zero);
|
||||
|
||||
@ -28,11 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Vector2D<Cmpt>::Vector2D()
|
||||
{}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline Foam::Vector2D<Cmpt>::Vector2D(const Foam::zero)
|
||||
:
|
||||
|
||||
@ -90,14 +90,26 @@ class complex
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
complex(const complex&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
complex& operator=(const complex&) = default;
|
||||
|
||||
//- Move construct
|
||||
complex(complex&&) = default;
|
||||
|
||||
//- Move assignment
|
||||
complex& operator=(complex&&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null as zero-initialized
|
||||
//- Default construct, as zero-initialized
|
||||
inline constexpr complex() noexcept;
|
||||
|
||||
//- Default copy constructor
|
||||
complex(const complex&) = default;
|
||||
|
||||
//- Construct zero-initialized from zero class
|
||||
inline constexpr complex(const Foam::zero) noexcept;
|
||||
|
||||
@ -173,9 +185,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//- Copy assignment
|
||||
inline void operator=(const complex& c);
|
||||
|
||||
//- Assign zero
|
||||
inline void operator=(const Foam::zero);
|
||||
|
||||
|
||||
@ -116,13 +116,6 @@ inline Foam::complex Foam::complex::conjugate() const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::complex::operator=(const complex& c)
|
||||
{
|
||||
re = c.re;
|
||||
im = c.im;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::complex::operator=(const Foam::zero)
|
||||
{
|
||||
re = 0;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,7 +28,6 @@ License
|
||||
|
||||
#include "CSV.H"
|
||||
#include "DynamicList.H"
|
||||
//#include "IFstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -36,7 +35,7 @@ template<>
|
||||
Foam::label Foam::Function1Types::CSV<Foam::label>::readValue
|
||||
(
|
||||
const List<string>& splitted
|
||||
)
|
||||
) const
|
||||
{
|
||||
if (componentColumns_[0] >= splitted.size())
|
||||
{
|
||||
@ -54,7 +53,7 @@ template<>
|
||||
Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue
|
||||
(
|
||||
const List<string>& splitted
|
||||
)
|
||||
) const
|
||||
{
|
||||
if (componentColumns_[0] >= splitted.size())
|
||||
{
|
||||
@ -69,7 +68,10 @@ Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue
|
||||
|
||||
|
||||
template<class Type>
|
||||
Type Foam::Function1Types::CSV<Type>::readValue(const List<string>& splitted)
|
||||
Type Foam::Function1Types::CSV<Type>::readValue
|
||||
(
|
||||
const List<string>& splitted
|
||||
) const
|
||||
{
|
||||
Type result;
|
||||
|
||||
@ -94,7 +96,6 @@ template<class Type>
|
||||
void Foam::Function1Types::CSV<Type>::read()
|
||||
{
|
||||
fileName expandedFile(fName_);
|
||||
//IFstream is(expandedFile.expand());
|
||||
autoPtr<ISstream> isPtr(fileHandler().NewIFstream(expandedFile.expand()));
|
||||
ISstream& is = isPtr();
|
||||
|
||||
@ -214,17 +215,24 @@ Foam::Function1Types::CSV<Type>::CSV
|
||||
TableBase<Type>(entryName, dict),
|
||||
nHeaderLine_(dict.get<label>("nHeaderLine")),
|
||||
refColumn_(dict.get<label>("refColumn")),
|
||||
componentColumns_(dict.lookup("componentColumns")),
|
||||
separator_(dict.lookupOrDefault<string>("separator", ",")[0]),
|
||||
componentColumns_(),
|
||||
separator_(dict.getOrDefault<string>("separator", ",")[0]),
|
||||
mergeSeparators_(dict.get<bool>("mergeSeparators")),
|
||||
fName_(fName.empty() ? dict.get<fileName>("file") : fName)
|
||||
{
|
||||
// Writing of "componentColumns" was forced to be ASCII,
|
||||
// do the same when reading
|
||||
ITstream& is = dict.lookup("componentColumns");
|
||||
is.format(IOstream::ASCII);
|
||||
is >> componentColumns_;
|
||||
dict.checkITstream(is, "componentColumns");
|
||||
|
||||
if (componentColumns_.size() != pTraits<Type>::nComponents)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< componentColumns_ << " does not have the expected length of "
|
||||
<< pTraits<Type>::nComponents << endl
|
||||
<< exit(FatalError);
|
||||
<< pTraits<Type>::nComponents << nl
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
read();
|
||||
@ -246,13 +254,6 @@ Foam::Function1Types::CSV<Type>::CSV(const CSV<Type>& csv)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::Function1Types::CSV<Type>::~CSV()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,7 +105,7 @@ class CSV
|
||||
void read();
|
||||
|
||||
//- Read the next value from the splitted string
|
||||
Type readValue(const List<string>&);
|
||||
Type readValue(const List<string>& splitted) const;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const CSV<Type>&) = delete;
|
||||
@ -138,7 +138,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~CSV();
|
||||
virtual ~CSV() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -151,11 +151,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Template specialisations
|
||||
template<>
|
||||
label CSV<label>::readValue(const List<string>& splitted);
|
||||
label CSV<label>::readValue(const List<string>& splitted) const;
|
||||
|
||||
template<>
|
||||
Foam::scalar CSV<scalar>::readValue(const List<string>& splitted);
|
||||
Foam::scalar CSV<scalar>::readValue(const List<string>& splitted) const;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,18 +63,21 @@ class Uniform
|
||||
:
|
||||
public Constant<Type>
|
||||
{
|
||||
// Private Member Functions
|
||||
public:
|
||||
|
||||
//- Declare type-name, virtual type (with debug switch)
|
||||
TypeName("uniform");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Uniform<Type>(const Uniform&) = default;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const Uniform<Type>&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("uniform");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
|
||||
@ -43,18 +43,6 @@ Foam::Polynomial<PolySize>::Polynomial()
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial
|
||||
(
|
||||
const Polynomial<PolySize>& poly
|
||||
)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
|
||||
logActive_(poly.logActive_),
|
||||
logCoeff_(poly.logCoeff_)
|
||||
{}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial(const scalar coeffs[PolySize])
|
||||
:
|
||||
|
||||
@ -108,9 +108,6 @@ public:
|
||||
//- Construct null, with all coefficients = 0.0
|
||||
Polynomial();
|
||||
|
||||
//- Copy constructor
|
||||
Polynomial(const Polynomial&);
|
||||
|
||||
//- Construct from C-array of coefficients
|
||||
explicit Polynomial(const scalar coeffs[PolySize]);
|
||||
|
||||
|
||||
@ -88,6 +88,16 @@ public:
|
||||
static const vectorTensorTransform I;
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
vectorTensorTransform(const vectorTensorTransform&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
vectorTensorTransform&
|
||||
operator=(const vectorTensorTransform&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -151,11 +161,11 @@ public:
|
||||
tmp<Field<Type>> transform(const Field<Type>&) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
// Member Operators
|
||||
|
||||
inline void operator=(const vectorTensorTransform&);
|
||||
inline void operator&=(const vectorTensorTransform&);
|
||||
|
||||
//- Assign translation
|
||||
inline void operator=(const vector&);
|
||||
inline void operator+=(const vector&);
|
||||
inline void operator-=(const vector&);
|
||||
|
||||
@ -173,17 +173,6 @@ inline Foam::pointField Foam::vectorTensorTransform::invTransformPosition
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator=
|
||||
(
|
||||
const vectorTensorTransform& tr
|
||||
)
|
||||
{
|
||||
t_ = tr.t_;
|
||||
R_ = tr.R_;
|
||||
hasR_ = tr.hasR_;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator&=
|
||||
(
|
||||
const vectorTensorTransform& tr
|
||||
|
||||
@ -68,7 +68,7 @@ static inline uint32_t swapBytes(uint32_t n)
|
||||
// *(uint32_t *) cp = val
|
||||
static inline void set_uint32(unsigned char *dst, uint32_t v)
|
||||
{
|
||||
memcpy(dst, &v, sizeof(uint32_t));
|
||||
std::memcpy(dst, &v, sizeof(uint32_t));
|
||||
}
|
||||
//! \endcond
|
||||
|
||||
@ -96,7 +96,7 @@ void Foam::SHA1::processBytes(const void *data, size_t len)
|
||||
|
||||
unsigned char* bufp = reinterpret_cast<unsigned char*>(buffer_);
|
||||
|
||||
memcpy(&bufp[remaining], data, add);
|
||||
std::memcpy(&bufp[remaining], data, add);
|
||||
bufLen_ += add;
|
||||
|
||||
if (bufLen_ > 64)
|
||||
@ -106,7 +106,7 @@ void Foam::SHA1::processBytes(const void *data, size_t len)
|
||||
bufLen_ &= 63;
|
||||
// The regions in the following copy operation do not
|
||||
// (cannot) overlap
|
||||
memcpy(buffer_, &bufp[(remaining + add) & ~63], bufLen_);
|
||||
std::memcpy(buffer_, &bufp[(remaining + add) & ~63], bufLen_);
|
||||
}
|
||||
|
||||
data = reinterpret_cast<const unsigned char*>(data) + add;
|
||||
@ -116,7 +116,7 @@ void Foam::SHA1::processBytes(const void *data, size_t len)
|
||||
// Process available complete blocks
|
||||
while (len >= 64)
|
||||
{
|
||||
processBlock(memcpy(buffer_, data, 64), 64);
|
||||
processBlock(std::memcpy(buffer_, data, 64), 64);
|
||||
data = reinterpret_cast<const unsigned char*>(data) + 64;
|
||||
len -= 64;
|
||||
}
|
||||
@ -127,13 +127,13 @@ void Foam::SHA1::processBytes(const void *data, size_t len)
|
||||
unsigned char* bufp = reinterpret_cast<unsigned char*>(buffer_);
|
||||
size_t remaining = bufLen_;
|
||||
|
||||
memcpy(&bufp[remaining], data, len);
|
||||
std::memcpy(&bufp[remaining], data, len);
|
||||
remaining += len;
|
||||
if (remaining >= 64)
|
||||
{
|
||||
processBlock(buffer_, 64);
|
||||
remaining -= 64;
|
||||
memcpy(buffer_, &buffer_[16], remaining);
|
||||
std::memcpy(buffer_, &buffer_[16], remaining);
|
||||
}
|
||||
bufLen_ = remaining;
|
||||
}
|
||||
@ -356,7 +356,7 @@ bool Foam::SHA1::finalize()
|
||||
|
||||
unsigned char* bufp = reinterpret_cast<unsigned char *>(buffer_);
|
||||
|
||||
memcpy(&bufp[bytes], fillbuf, (size-2) * sizeof(uint32_t) - bytes);
|
||||
std::memcpy(&bufp[bytes], fillbuf, (size-2) * sizeof(uint32_t) - bytes);
|
||||
|
||||
// Process remaining bytes
|
||||
processBlock(buffer_, size * sizeof(uint32_t));
|
||||
|
||||
@ -128,10 +128,19 @@ public:
|
||||
static const quaternion I;
|
||||
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
inline quaternion();
|
||||
//- Default construct
|
||||
quaternion() = default;
|
||||
|
||||
//- Copy construct
|
||||
quaternion(const quaternion&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
quaternion& operator=(const quaternion&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct zero initialized
|
||||
inline quaternion(const Foam::zero);
|
||||
@ -223,7 +232,6 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
inline void operator=(const quaternion& q);
|
||||
inline void operator+=(const quaternion& q);
|
||||
inline void operator-=(const quaternion& q);
|
||||
inline void operator*=(const quaternion& q);
|
||||
|
||||
@ -28,10 +28,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::quaternion::quaternion()
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::quaternion::quaternion(const Foam::zero)
|
||||
:
|
||||
w_(Zero),
|
||||
@ -585,12 +581,6 @@ inline Foam::vector Foam::quaternion::eulerAngles
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::quaternion::operator=(const quaternion& q)
|
||||
{
|
||||
w_ = q.w_;
|
||||
v_ = q.v_;
|
||||
}
|
||||
|
||||
inline void Foam::quaternion::operator+=(const quaternion& q)
|
||||
{
|
||||
w_ += q.w_;
|
||||
|
||||
@ -40,13 +40,9 @@ Foam::Random::Random(const label seedValue)
|
||||
{}
|
||||
|
||||
|
||||
Foam::Random::Random(const Random& r, const bool reset)
|
||||
Foam::Random::Random(const Random& rnd, const bool reset)
|
||||
:
|
||||
seed_(r.seed_),
|
||||
generator_(r.generator_),
|
||||
uniform01_(),
|
||||
hasGaussSample_(r.hasGaussSample_),
|
||||
gaussSample_(r.gaussSample_)
|
||||
Random(rnd)
|
||||
{
|
||||
if (reset)
|
||||
{
|
||||
|
||||
@ -90,12 +90,8 @@ public:
|
||||
//- Construct with seed value
|
||||
Random(const label seedValue = 123456);
|
||||
|
||||
//- Copy construct with optional reset of seed
|
||||
Random(const Random& r, const bool reset = false);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~Random() = default;
|
||||
//- Copy construct with possible reset of seed
|
||||
Random(const Random& rnd, const bool reset);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -86,10 +86,22 @@ public:
|
||||
static const septernion I;
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Default construct
|
||||
septernion() = default;
|
||||
|
||||
//- Copy construct
|
||||
septernion(const septernion&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
septernion& operator=(const septernion&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
inline septernion();
|
||||
//- Construct zero initialized
|
||||
inline septernion(const Foam::zero);
|
||||
|
||||
//- Construct given a translation vector and rotation quaternion
|
||||
inline septernion(const vector& t, const quaternion& r);
|
||||
@ -130,9 +142,8 @@ public:
|
||||
inline vector invTransformPoint(const vector& v) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
// Member Operators
|
||||
|
||||
inline void operator=(const septernion&);
|
||||
inline void operator*=(const septernion&);
|
||||
|
||||
inline void operator=(const vector&);
|
||||
|
||||
@ -27,7 +27,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::septernion::septernion()
|
||||
inline Foam::septernion::septernion(const Foam::zero)
|
||||
:
|
||||
t_(Zero),
|
||||
r_(Zero)
|
||||
{}
|
||||
|
||||
inline Foam::septernion::septernion(const vector& t, const quaternion& r)
|
||||
@ -95,12 +98,6 @@ inline Foam::vector Foam::septernion::invTransformPoint(const vector& v) const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::septernion::operator=(const septernion& tr)
|
||||
{
|
||||
t_ = tr.t_;
|
||||
r_ = tr.r_;
|
||||
}
|
||||
|
||||
inline void Foam::septernion::operator*=(const septernion& tr)
|
||||
{
|
||||
t_ = tr.t() + tr.r().invTransform(t_);
|
||||
|
||||
@ -574,7 +574,7 @@ void Foam::UPstream::allToAll
|
||||
<< " does not equal bytes to receive " << recvSizes[0]
|
||||
<< Foam::abort(FatalError);
|
||||
}
|
||||
memmove(recvData, &sendData[sendOffsets[0]], recvSizes[0]);
|
||||
std::memmove(recvData, &sendData[sendOffsets[0]], recvSizes[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -640,7 +640,7 @@ void Foam::UPstream::gather
|
||||
|
||||
if (!UPstream::parRun())
|
||||
{
|
||||
memmove(recvData, sendData, sendSize);
|
||||
std::memmove(recvData, sendData, sendSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -703,7 +703,7 @@ void Foam::UPstream::scatter
|
||||
|
||||
if (!UPstream::parRun())
|
||||
{
|
||||
memmove(recvData, sendData, recvSize);
|
||||
std::memmove(recvData, sendData, recvSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -59,34 +59,14 @@ Foam::boundaryPatch::boundaryPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p)
|
||||
:
|
||||
patchIdentifier(p.name(), p.index(), p.physicalType()),
|
||||
size_(p.size()),
|
||||
start_(p.start())
|
||||
{}
|
||||
|
||||
|
||||
Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index)
|
||||
:
|
||||
patchIdentifier(p.name(), index, p.physicalType()),
|
||||
size_(p.size()),
|
||||
start_(p.start())
|
||||
{}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const
|
||||
boundaryPatch(p)
|
||||
{
|
||||
return autoPtr<boundaryPatch>::New(*this);
|
||||
patchIdentifier::index() = index;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::boundaryPatch::~boundaryPatch()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::boundaryPatch::write(Ostream& os) const
|
||||
|
||||
@ -88,18 +88,15 @@ public:
|
||||
const label index
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
boundaryPatch(const boundaryPatch&);
|
||||
//- Copy construct, resetting the index
|
||||
boundaryPatch(const boundaryPatch& p, const label index);
|
||||
|
||||
//- Construct as copy, resetting the index
|
||||
boundaryPatch(const boundaryPatch&, const label index);
|
||||
|
||||
//- Clone
|
||||
autoPtr<boundaryPatch> clone() const;
|
||||
|
||||
|
||||
//- Destructor
|
||||
~boundaryPatch();
|
||||
autoPtr<boundaryPatch> clone() const
|
||||
{
|
||||
return autoPtr<boundaryPatch>::New(*this);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -141,9 +141,6 @@ public:
|
||||
const vector& n
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
inline directionInfo(const directionInfo&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -51,14 +51,6 @@ inline Foam::directionInfo::directionInfo
|
||||
{}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
inline Foam::directionInfo::directionInfo(const directionInfo& w2)
|
||||
:
|
||||
index_(w2.index()),
|
||||
n_(w2.n())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class TrackingData>
|
||||
|
||||
@ -89,8 +89,7 @@ public:
|
||||
//- Construct from normal
|
||||
inline wallNormalInfo(const vector& normal);
|
||||
|
||||
//- Construct as copy
|
||||
inline wallNormalInfo(const wallNormalInfo&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -74,13 +74,6 @@ inline Foam::wallNormalInfo::wallNormalInfo(const vector& normal)
|
||||
{}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
inline Foam::wallNormalInfo::wallNormalInfo(const wallNormalInfo& wpt)
|
||||
:
|
||||
normal_(wpt.normal())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::vector& Foam::wallNormalInfo::normal() const
|
||||
|
||||
@ -124,9 +124,6 @@ public:
|
||||
//- Construct from origin, distance
|
||||
inline externalPointEdgePoint(const point&, const scalar);
|
||||
|
||||
//- Construct as copy
|
||||
inline externalPointEdgePoint(const externalPointEdgePoint&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -135,16 +135,6 @@ inline Foam::externalPointEdgePoint::externalPointEdgePoint
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::externalPointEdgePoint::externalPointEdgePoint
|
||||
(
|
||||
const externalPointEdgePoint& wpt
|
||||
)
|
||||
:
|
||||
origin_(wpt.origin()),
|
||||
distSqr_(wpt.distSqr())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::point& Foam::externalPointEdgePoint::origin() const
|
||||
|
||||
@ -112,6 +112,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
ignitionSite(const ignitionSite&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from Istream and database
|
||||
|
||||
@ -166,19 +166,15 @@ Foam::Ostream& Foam::ensightFile::write
|
||||
|
||||
Foam::Ostream& Foam::ensightFile::write(const char* value)
|
||||
{
|
||||
// Parentheses around strncpy to silence the GCC -Wstringop-truncation
|
||||
// warning, which is spurious here.
|
||||
// The max-size and buffer-size *are* identical, which means the buffer
|
||||
// may not have a nul terminator. However, this is properly handled in
|
||||
// the subsequent binary write and the ASCII write explicitly adds
|
||||
// a nul terminator.
|
||||
// Output 80 chars, but allocate for trailing nul character
|
||||
// to avoid -Wstringop-truncation warnings/errors.
|
||||
|
||||
char buf[80];
|
||||
(strncpy(buf, value, 80)); // max 80 chars or padded with nul if smaller
|
||||
char buf[80+1];
|
||||
strncpy(buf, value, 80); // max 80 chars or padded with nul if smaller
|
||||
|
||||
if (format() == IOstream::BINARY)
|
||||
{
|
||||
write(buf, sizeof(buf));
|
||||
write(buf, 80);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,25 +56,37 @@ Foam::Istream& Foam::ensightReadFile::read(string& value)
|
||||
{
|
||||
if (format() == IOstream::BINARY)
|
||||
{
|
||||
char buf[80];
|
||||
auto& iss = stdStream();
|
||||
|
||||
read(reinterpret_cast<char*>(buf), sizeof(buf));
|
||||
// Binary string is *exactly* 80 characters
|
||||
value.resize(80, '\0');
|
||||
iss.read(&value[0], 80);
|
||||
|
||||
string strBuf(value);
|
||||
|
||||
const size_t iEnd = strBuf.find('\0', 0);
|
||||
if (iEnd == string::npos)
|
||||
if (!iss)
|
||||
{
|
||||
value = buf;
|
||||
// Truncated - could also exit here, but no real advantage
|
||||
value.erase(iss.gcount());
|
||||
}
|
||||
else
|
||||
|
||||
// Truncate at the first embedded '\0'
|
||||
auto endp = value.find('\0');
|
||||
|
||||
if (endp != std::string::npos)
|
||||
{
|
||||
value = strBuf.substr(0, iEnd - 1);
|
||||
value.erase(endp);
|
||||
}
|
||||
|
||||
// May have been padded with trailing spaces - remove those
|
||||
endp = value.find_last_not_of(" \t\f\v\n\r");
|
||||
|
||||
if (endp != std::string::npos)
|
||||
{
|
||||
value.erase(endp + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
value = "";
|
||||
value.clear();
|
||||
while (value.empty() && !eof())
|
||||
{
|
||||
getLine(value);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -96,11 +96,11 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs()
|
||||
const vector nf(computePatchNormal());
|
||||
|
||||
// Find the second local coordinate direction
|
||||
direction minCmpt = -1;
|
||||
scalar minMag = VGREAT;
|
||||
for (direction cmpt = 0; cmpt < pTraits<vector>::nComponents; ++cmpt)
|
||||
direction minCmpt = 0;
|
||||
scalar minMag = mag(nf[minCmpt]);
|
||||
for (direction cmpt = 1; cmpt < pTraits<vector>::nComponents; ++cmpt)
|
||||
{
|
||||
scalar s = mag(nf[cmpt]);
|
||||
const scalar s = mag(nf[cmpt]);
|
||||
if (s < minMag)
|
||||
{
|
||||
minMag = s;
|
||||
@ -110,7 +110,7 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs()
|
||||
|
||||
// Create the second local coordinate direction
|
||||
vector e2(Zero);
|
||||
e2[minCmpt] = 1.0;
|
||||
e2[minCmpt] = 1;
|
||||
|
||||
// Remove normal component
|
||||
e2 -= (nf&e2)*nf;
|
||||
@ -147,17 +147,14 @@ Foam::turbulentDigitalFilterInletFvPatchVectorField::patchIndexPairs()
|
||||
// Compute virtual-actual patch index pairs
|
||||
List<Pair<label>> indexPairs(this->size(), Pair<label>(Zero, Zero));
|
||||
|
||||
// Virtual turbulence plane indices
|
||||
label j = 0;
|
||||
label k = 0;
|
||||
|
||||
forAll(*this, facei)
|
||||
{
|
||||
const scalar& centre0 = localPos[facei][0];
|
||||
const scalar& centre1 = localPos[facei][1];
|
||||
|
||||
j = label((centre0 - localMinPt[0])*invDelta_[0]);
|
||||
k = label((centre1 - localMinPt[1])*invDelta_[1]);
|
||||
// Virtual turbulence plane indices
|
||||
const label j = label((centre0 - localMinPt[0])*invDelta_[0]);
|
||||
const label k = label((centre1 - localMinPt[1])*invDelta_[1]);
|
||||
|
||||
indexPairs[facei] = Pair<label>(facei, k*n[0] + j);
|
||||
}
|
||||
|
||||
@ -83,6 +83,15 @@ private:
|
||||
public:
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
smoothData(const smoothData&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
smoothData& operator=(const smoothData&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -68,6 +68,15 @@ class sweepData
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
sweepData(const sweepData&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
sweepData& operator=(const sweepData&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -29,9 +29,9 @@ inline Foam::HashSet<Foam::wordRe>
|
||||
Foam::functionObjects::fieldSelection::filters() const
|
||||
{
|
||||
HashSet<wordRe> f;
|
||||
for (const auto fieldInfo : *this)
|
||||
for (const fieldInfo& fi : *this)
|
||||
{
|
||||
f.insert(fieldInfo.name());
|
||||
f.insert(fi.name());
|
||||
}
|
||||
|
||||
return f;
|
||||
|
||||
@ -29,14 +29,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::referredWallFace::referredWallFace()
|
||||
:
|
||||
face(),
|
||||
pts_(),
|
||||
patchi_()
|
||||
{}
|
||||
|
||||
|
||||
Foam::referredWallFace::referredWallFace
|
||||
(
|
||||
const face& f,
|
||||
@ -57,27 +49,6 @@ Foam::referredWallFace::referredWallFace
|
||||
}
|
||||
|
||||
|
||||
Foam::referredWallFace::referredWallFace(const referredWallFace& rWF)
|
||||
:
|
||||
face(rWF),
|
||||
pts_(rWF.pts_),
|
||||
patchi_(rWF.patchi_)
|
||||
{
|
||||
if (this->size() != pts_.size())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face and pointField are not the same size. " << nl << (*this)
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::referredWallFace::~referredWallFace()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::referredWallFace::operator==(const referredWallFace& rhs) const
|
||||
|
||||
@ -76,10 +76,13 @@ class referredWallFace
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
referredWallFace();
|
||||
//- Default construct
|
||||
referredWallFace() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
referredWallFace
|
||||
@ -89,13 +92,6 @@ public:
|
||||
label patchi
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
referredWallFace(const referredWallFace&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~referredWallFace();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ bool Foam::ensightOutput::writeCloudField
|
||||
IPstream fromSlave(comm, slave);
|
||||
Field<Type> recv(fromSlave);
|
||||
|
||||
for (Type val : field) // <-- working on a copy
|
||||
for (Type val : recv) // <-- working on a copy
|
||||
{
|
||||
if (mag(val) < 1e-90) // approximately root(ROOTVSMALL)
|
||||
{
|
||||
|
||||
@ -30,14 +30,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class PairType, class WallType>
|
||||
Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList()
|
||||
:
|
||||
pairRecords_(),
|
||||
wallRecords_()
|
||||
{}
|
||||
|
||||
|
||||
template<class PairType, class WallType>
|
||||
Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList(Istream& is)
|
||||
:
|
||||
@ -122,13 +114,6 @@ Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * /
|
||||
|
||||
template<class PairType, class WallType>
|
||||
Foam::CollisionRecordList<PairType, WallType>::~CollisionRecordList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class PairType, class WallType>
|
||||
@ -385,27 +370,6 @@ void Foam::CollisionRecordList<PairType, WallType>::update()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
template<class PairType, class WallType>
|
||||
void Foam::CollisionRecordList<PairType, WallType>::operator=
|
||||
(
|
||||
const CollisionRecordList<PairType, WallType>& rhs
|
||||
)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
pairRecords_ = rhs.pairRecords_;
|
||||
wallRecords_ = rhs.wallRecords_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
template<class PairType, class WallType>
|
||||
|
||||
@ -90,10 +90,13 @@ class CollisionRecordList
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
CollisionRecordList();
|
||||
//- Default construct
|
||||
CollisionRecordList() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from Istream
|
||||
CollisionRecordList(Istream&);
|
||||
@ -110,9 +113,6 @@ public:
|
||||
const Field<WallType>& wallData
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
~CollisionRecordList();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -196,11 +196,6 @@ public:
|
||||
void update();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
void operator=(const CollisionRecordList&);
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator== <PairType, WallType>
|
||||
|
||||
@ -188,16 +188,6 @@ Foam::phaseProperties::phaseProperties()
|
||||
{}
|
||||
|
||||
|
||||
Foam::phaseProperties::phaseProperties(const phaseProperties& pp)
|
||||
:
|
||||
phase_(pp.phase_),
|
||||
stateLabel_(pp.stateLabel_),
|
||||
names_(pp.names_),
|
||||
Y_(pp.Y_),
|
||||
carrierIds_(pp.carrierIds_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::phaseProperties::reorder
|
||||
|
||||
@ -124,13 +124,6 @@ public:
|
||||
//- Construct from Istream
|
||||
phaseProperties(Istream& is);
|
||||
|
||||
//- Construct as copy
|
||||
phaseProperties(const phaseProperties& pp);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~phaseProperties() = default;
|
||||
|
||||
|
||||
// Public Member Functions
|
||||
|
||||
|
||||
@ -32,11 +32,7 @@ License
|
||||
|
||||
Foam::phaseProperties::phaseProperties(Istream& is)
|
||||
:
|
||||
phase_(UNKNOWN),
|
||||
stateLabel_("(unknown)"),
|
||||
names_(),
|
||||
Y_(),
|
||||
carrierIds_()
|
||||
phaseProperties()
|
||||
{
|
||||
is >> *this;
|
||||
}
|
||||
|
||||
@ -65,13 +65,12 @@ class forceSuSp
|
||||
:
|
||||
public Tuple2<vector, scalar>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
inline forceSuSp();
|
||||
//- Default construct
|
||||
forceSuSp() = default;
|
||||
|
||||
//- Construct zero-initialized content
|
||||
inline forceSuSp(const zero);
|
||||
@ -108,9 +107,6 @@ public:
|
||||
|
||||
// Operators
|
||||
|
||||
//- Assignment
|
||||
inline void operator=(const forceSuSp& susp);
|
||||
|
||||
//- Addition
|
||||
inline void operator+=(const forceSuSp& susp);
|
||||
|
||||
|
||||
@ -27,10 +27,6 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::forceSuSp::forceSuSp()
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::forceSuSp::forceSuSp(const zero)
|
||||
:
|
||||
Tuple2<vector, scalar>(vector::zero, 0.0)
|
||||
@ -87,13 +83,6 @@ inline Foam::scalar& Foam::forceSuSp::Sp()
|
||||
|
||||
// * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::forceSuSp::operator=(const forceSuSp& susp)
|
||||
{
|
||||
first() = susp.first();
|
||||
second() = susp.second();
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::forceSuSp::operator+=(const forceSuSp& susp)
|
||||
{
|
||||
first() += susp.first();
|
||||
|
||||
@ -71,29 +71,6 @@ SingleKineticRateDevolatilisation
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::SingleKineticRateDevolatilisation<CloudType>::
|
||||
SingleKineticRateDevolatilisation
|
||||
(
|
||||
const SingleKineticRateDevolatilisation<CloudType>& dm
|
||||
)
|
||||
:
|
||||
DevolatilisationModel<CloudType>(dm),
|
||||
volatileData_(dm.volatileData_),
|
||||
YVolatile0_(dm.YVolatile0_),
|
||||
volatileToGasMap_(dm.volatileToGasMap_),
|
||||
residualCoeff_(dm.residualCoeff_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::SingleKineticRateDevolatilisation<CloudType>::
|
||||
~SingleKineticRateDevolatilisation()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user