Compare commits
33 Commits
OpenFOAM-v
...
OpenFOAM-v
| Author | SHA1 | Date | |
|---|---|---|---|
| 28d24fefbc | |||
| 161c66df17 | |||
| 418248709f | |||
| 6f230a8b67 | |||
| ca28377642 | |||
| 79cf72d573 | |||
| a65b9fdd7c | |||
| 92214eb4af | |||
| ff19bedbc3 | |||
| 49e63378f8 | |||
| a100b49606 | |||
| e53419c025 | |||
| 81015889f2 | |||
| d3bcc71b64 | |||
| 370d1a4589 | |||
| 9a4851268e | |||
| f62a86575b | |||
| e252ec46dc | |||
| 21de95bb81 | |||
| 3be7610710 | |||
| 835c392dd5 | |||
| c234acf1ed | |||
| f62d6d96aa | |||
| eb125303c0 | |||
| ed63d9b2c6 | |||
| 8e78a27822 | |||
| 0bbf94fb9b | |||
| 254d38d772 | |||
| 60efde8c09 | |||
| c413ec5009 | |||
| 227a0f5d43 | |||
| fed6a9efd4 | |||
| 122e496590 |
@ -1,2 +1,2 @@
|
||||
api=1912
|
||||
patch=0
|
||||
patch=200312
|
||||
|
||||
@ -144,6 +144,13 @@ public:
|
||||
typedef indexedVertex<Gt,Vb2> Other;
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
indexedVertex(const indexedVertex&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
inline indexedVertex();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ 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.
|
||||
@ -39,7 +39,7 @@ Usage
|
||||
|
||||
Options:
|
||||
- \par -processor
|
||||
List times from processor0/ directory
|
||||
Times from processor0/ directory
|
||||
|
||||
- \par -rm
|
||||
Remove selected time directories
|
||||
@ -58,9 +58,30 @@ Note
|
||||
#include "profiling.H"
|
||||
#include "timeSelector.H"
|
||||
#include "TimePaths.H"
|
||||
#include "ListOps.H"
|
||||
#include "stringOps.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// Many ways to name processor directories
|
||||
//
|
||||
// Uncollated | "processor0", "processor1" ...
|
||||
// Collated (old) | "processors"
|
||||
// Collated (new) | "processors<N>"
|
||||
// Host collated | "processors<N>_<low>-<high>"
|
||||
|
||||
const regExp matcher("processors?[0-9]+(_[0-9]+-[0-9]+)?");
|
||||
|
||||
bool isProcessorDir(const string& dir)
|
||||
{
|
||||
return
|
||||
(
|
||||
dir.starts_with("processor")
|
||||
&& (dir == "processors" || matcher.match(dir))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -95,7 +116,7 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
|
||||
const bool removeFiles(args.found("rm"));
|
||||
const bool verbose(args.found("verbose"));
|
||||
bool verbose(args.found("verbose"));
|
||||
|
||||
|
||||
// Get times list from the master processor and subset based on
|
||||
@ -116,6 +137,7 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// Obtain time directory names from "processor0/" only
|
||||
timePaths = autoPtr<TimePaths>::New
|
||||
(
|
||||
args.rootPath(),
|
||||
@ -140,10 +162,34 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (nProcs)
|
||||
{
|
||||
fileNameList procDirs
|
||||
(
|
||||
Foam::readDir
|
||||
(
|
||||
args.path(),
|
||||
fileName::DIRECTORY,
|
||||
false, // No gzip anyhow
|
||||
false // Do not follow linkts
|
||||
)
|
||||
);
|
||||
|
||||
inplaceSubsetList(procDirs, isProcessorDir);
|
||||
|
||||
// Perhaps not needed
|
||||
/// Foam::sort(procDirs, stringOps::natural_sort());
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
Info<< "Removing " << nTimes
|
||||
<< " processor time directories" << endl;
|
||||
InfoErr
|
||||
<< "Removing " << nTimes
|
||||
<< " times in " << procDirs.size()
|
||||
<< " processor directories" << endl;
|
||||
}
|
||||
|
||||
// No processor directories? - silence verbosity
|
||||
if (procDirs.empty())
|
||||
{
|
||||
verbose = false;
|
||||
}
|
||||
|
||||
forAllReverse(timeDirs, timei)
|
||||
@ -152,25 +198,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
Info<< " rm " << timeName
|
||||
InfoErr
|
||||
<< " rm " << timeName
|
||||
<< " [" << (nTimes - timei) << '/' << nTimes << ']'
|
||||
<< endl;
|
||||
}
|
||||
|
||||
fileName path(args.path()/"processors"/timeName);
|
||||
|
||||
rmDir(path, true);
|
||||
|
||||
for (label proci=0; proci<nProcs; ++proci)
|
||||
for (const fileName& procDir : procDirs)
|
||||
{
|
||||
path =
|
||||
(
|
||||
args.path()
|
||||
/ ("processor" + Foam::name(proci))
|
||||
/ timeName
|
||||
);
|
||||
|
||||
rmDir(path, true);
|
||||
rmDir(args.path()/procDir/timeName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,7 +214,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
Info<< "Removing " << nTimes
|
||||
InfoErr
|
||||
<< "Removing " << nTimes
|
||||
<< " time directories" << endl;
|
||||
}
|
||||
|
||||
@ -188,7 +225,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
Info<< " rm " << timeName
|
||||
InfoErr
|
||||
<< " rm " << timeName
|
||||
<< " [" << (nTimes - timei) << '/' << nTimes << ']'
|
||||
<< endl;
|
||||
}
|
||||
@ -199,6 +237,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
// List times: one per line
|
||||
for (const instant& t : timeDirs)
|
||||
{
|
||||
Info<< t.name() << nl;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -30,7 +30,7 @@ Group
|
||||
grpMiscUtilities
|
||||
|
||||
Description
|
||||
Restore field names by removing the ending.
|
||||
Adjust (restore) field names by removing the ending.
|
||||
The fields are selected automatically or can be specified as optional
|
||||
command arguments.
|
||||
|
||||
@ -63,9 +63,30 @@ Usage
|
||||
#include "timeSelector.H"
|
||||
#include "Enum.H"
|
||||
#include "TimePaths.H"
|
||||
#include "ListOps.H"
|
||||
#include "stringOps.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// Many ways to name processor directories
|
||||
//
|
||||
// Uncollated | "processor0", "processor1" ...
|
||||
// Collated (old) | "processors"
|
||||
// Collated (new) | "processors<N>"
|
||||
// Host collated | "processors<N>_<low>-<high>"
|
||||
|
||||
const regExp matcher("processors?[0-9]+(_[0-9]+-[0-9]+)?");
|
||||
|
||||
bool isProcessorDir(const string& dir)
|
||||
{
|
||||
return
|
||||
(
|
||||
dir.starts_with("processor")
|
||||
&& (dir == "processors" || matcher.match(dir))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- The known and support types of operations
|
||||
enum restoreMethod
|
||||
{
|
||||
@ -311,7 +332,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Obtain time directory names from "processor0/" only
|
||||
|
||||
timePaths = autoPtr<TimePaths>::New
|
||||
(
|
||||
args.rootPath(),
|
||||
@ -329,10 +349,77 @@ int main(int argc, char *argv[])
|
||||
|
||||
const instantList timeDirs(timeSelector::select(timePaths->times(), args));
|
||||
|
||||
fileNameList procDirs;
|
||||
label leadProcIdx = -1;
|
||||
|
||||
if (timeDirs.empty())
|
||||
{
|
||||
Info<< "no times selected" << nl;
|
||||
Info<< "No times selected" << nl;
|
||||
}
|
||||
else if (nProcs)
|
||||
{
|
||||
procDirs =
|
||||
Foam::readDir
|
||||
(
|
||||
args.path(),
|
||||
fileName::DIRECTORY,
|
||||
false, // No gzip anyhow
|
||||
false // Do not follow linkts
|
||||
);
|
||||
|
||||
inplaceSubsetList(procDirs, isProcessorDir);
|
||||
|
||||
// Perhaps not needed
|
||||
Foam::sort(procDirs, stringOps::natural_sort());
|
||||
|
||||
// Decide who will be the "leading" processor for obtaining names
|
||||
// - processor0
|
||||
// - processors<N>
|
||||
// - processors<N>_0-<high>
|
||||
|
||||
// Uncollated
|
||||
leadProcIdx = procDirs.find("processor0");
|
||||
|
||||
if (!procDirs.empty())
|
||||
{
|
||||
if (leadProcIdx < 0)
|
||||
{
|
||||
// Collated (old)
|
||||
leadProcIdx = procDirs.find("processors");
|
||||
}
|
||||
|
||||
if (leadProcIdx < 0)
|
||||
{
|
||||
// Collated (new)
|
||||
leadProcIdx = procDirs.find("processors" + Foam::name(nProcs));
|
||||
}
|
||||
|
||||
if (leadProcIdx < 0)
|
||||
{
|
||||
// Host-collated
|
||||
const std::string prefix
|
||||
(
|
||||
"processors" + Foam::name(nProcs) + "_0-"
|
||||
);
|
||||
|
||||
forAll(procDirs, idx)
|
||||
{
|
||||
if (procDirs[idx].starts_with(prefix))
|
||||
{
|
||||
leadProcIdx = idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Just default to anything (safety)
|
||||
if (leadProcIdx < 0)
|
||||
{
|
||||
leadProcIdx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (const instant& t : timeDirs)
|
||||
{
|
||||
@ -341,28 +428,28 @@ int main(int argc, char *argv[])
|
||||
Info<< "\nTime = " << timeName << nl;
|
||||
|
||||
label count = 0;
|
||||
wordList files;
|
||||
|
||||
if (nProcs)
|
||||
{
|
||||
const wordHashSet files
|
||||
(
|
||||
getFiles(args.path()/"processor0", timeName)
|
||||
);
|
||||
if (leadProcIdx >= 0)
|
||||
{
|
||||
files = getFiles(args.path()/procDirs[leadProcIdx], timeName);
|
||||
}
|
||||
|
||||
for (label proci=0; proci < nProcs; ++proci)
|
||||
for (const fileName& procDir : procDirs)
|
||||
{
|
||||
count += restoreFields
|
||||
(
|
||||
method,
|
||||
args.path()/("processor" + Foam::name(proci))/timeName,
|
||||
files,
|
||||
args.path()/procDir/timeName,
|
||||
wordHashSet(files),
|
||||
targetNames
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wordList files;
|
||||
if (Pstream::master())
|
||||
{
|
||||
files = getFiles(args.path(), timeName);
|
||||
|
||||
@ -45,33 +45,37 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
IOdictionary dict
|
||||
const dictionary NURBSdict
|
||||
(
|
||||
IOobject
|
||||
IOdictionary
|
||||
(
|
||||
"dynamicMeshDict",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
IOobject
|
||||
(
|
||||
"dynamicMeshDict",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
).subDict("volumetricBSplinesMotionSolverCoeffs")
|
||||
);
|
||||
// Read box names and allocate size
|
||||
wordList controlBoxes(NURBSdict.toc());
|
||||
|
||||
const dictionary& coeffDict =
|
||||
dict.subDict("volumetricBSplinesMotionSolverCoeffs");
|
||||
|
||||
wordList controlBoxes(coeffDict.get<wordList>("controlBoxes"));
|
||||
|
||||
forAll(controlBoxes, iNURB)
|
||||
for (const word& boxName : controlBoxes)
|
||||
{
|
||||
// Creating an object writes the control points in the
|
||||
// constructor
|
||||
NURBS3DVolume::New
|
||||
(
|
||||
coeffDict.subDict(controlBoxes[iNURB]),
|
||||
mesh,
|
||||
false // do not compute parametric coordinates
|
||||
);
|
||||
if (NURBSdict.isDict(boxName))
|
||||
{
|
||||
// Creating an object writes the control points in the
|
||||
// constructor
|
||||
NURBS3DVolume::New
|
||||
(
|
||||
NURBSdict.subDict(boxName),
|
||||
mesh,
|
||||
false // do not compute parametric coordinates
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -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)
|
||||
@ -346,19 +345,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
|
||||
;;
|
||||
@ -391,22 +390,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
|
||||
;;
|
||||
|
||||
@ -417,7 +416,7 @@ do
|
||||
# Explicitly set WM_MPLIB=...
|
||||
optionValue=$(getOptionValue "$@")
|
||||
replace etc/bashrc WM_MPLIB "$optionValue"
|
||||
replaceCsh etc/bashrc WM_MPLIB "$optionValue"
|
||||
replaceCsh etc/cshrc WM_MPLIB "$optionValue"
|
||||
optMpi=system
|
||||
adjusted=true
|
||||
shift
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 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.
|
||||
#
|
||||
# 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
|
||||
@ -95,7 +99,10 @@ case ThirdParty:
|
||||
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
|
||||
@ -126,6 +133,7 @@ case ThirdParty:
|
||||
case Clang90*:
|
||||
set clang_version=llvm-9.0.0
|
||||
breaksw
|
||||
|
||||
default:
|
||||
/bin/cat << UNKNOWN_COMPILER
|
||||
===============================================================================
|
||||
@ -143,4 +151,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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -5,11 +5,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-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/setup
|
||||
@ -89,7 +88,7 @@ endif
|
||||
|
||||
# Capture and evaluate any command-line parameters
|
||||
# These can be used to set/unset values, specify additional files etc.
|
||||
setenv FOAM_SETTINGS "${*}"
|
||||
setenv FOAM_SETTINGS "$argv[*]"
|
||||
|
||||
while ( $#argv > 0 )
|
||||
switch ($argv[1])
|
||||
|
||||
@ -6,11 +6,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.
|
||||
#
|
||||
# File
|
||||
# etc/config.sh/compiler
|
||||
@ -24,13 +23,21 @@
|
||||
|
||||
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 |\
|
||||
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 ;;
|
||||
@ -54,7 +61,7 @@ ThirdParty)
|
||||
Gcc91*) gcc_version=gcc-9.1.0 ;;
|
||||
Gcc92*) gcc_version=gcc-9.2.0 ;;
|
||||
|
||||
Clang |\
|
||||
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 ;;
|
||||
@ -83,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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -6,11 +6,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.
|
||||
#
|
||||
# File
|
||||
# etc/cshrc
|
||||
@ -176,7 +175,7 @@ endif
|
||||
# Finalize setup of OpenFOAM environment
|
||||
if ( -d "$WM_PROJECT_DIR" ) then
|
||||
if ($?FOAM_VERBOSE && $?prompt) echo "source $WM_PROJECT_DIR/etc/config.csh/setup"
|
||||
source "$WM_PROJECT_DIR/etc/config.csh/setup" "${*}"
|
||||
source "$WM_PROJECT_DIR/etc/config.csh/setup" $argv[*]
|
||||
else
|
||||
echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION"
|
||||
echo "No directory: $WM_PROJECT_DIR"
|
||||
|
||||
Submodule modules/adios updated: c4f53dc5e7...8cdeac3896
@ -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();
|
||||
|
||||
|
||||
@ -741,8 +741,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);
|
||||
|
||||
|
||||
@ -76,6 +76,12 @@ public:
|
||||
inline static const SubList<T>& null();
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
SubList(const SubList&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from UList, the entire size
|
||||
|
||||
@ -208,6 +208,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
UList(const UList<T>&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
|
||||
@ -267,6 +267,15 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOobject(const IOobject&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOobject() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from name, instance, registry, io options
|
||||
@ -336,10 +345,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
|
||||
|
||||
@ -147,6 +147,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
IOstream(const IOstream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct with specified stream option
|
||||
@ -174,10 +183,6 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~IOstream() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
@ -74,6 +74,15 @@ class Istream
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Istream(const Istream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -89,10 +98,6 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Istream() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Read Functions
|
||||
|
||||
@ -74,6 +74,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
Ostream(const Ostream&) = default;
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and set stream status
|
||||
@ -88,10 +97,6 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Ostream() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Write Functions
|
||||
|
||||
@ -200,6 +200,50 @@ void reduce
|
||||
);
|
||||
|
||||
|
||||
#if defined(WM_SPDP)
|
||||
void reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag = Pstream::msgType(),
|
||||
const label comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
void reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const minOp<solveScalar>& bop,
|
||||
const int tag = Pstream::msgType(),
|
||||
const label comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
void reduce
|
||||
(
|
||||
Vector2D<solveScalar>& Value,
|
||||
const sumOp<Vector2D<solveScalar>>& bop,
|
||||
const int tag = Pstream::msgType(),
|
||||
const label comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
void sumReduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
label& Count,
|
||||
const int tag = Pstream::msgType(),
|
||||
const label comm = UPstream::worldComm
|
||||
);
|
||||
|
||||
void reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label comm,
|
||||
label& request
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -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
|
||||
|
||||
@ -453,4 +453,32 @@ void Foam::ITstream::append(tokenList&& newTokens, const bool lazy)
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * 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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -328,14 +328,26 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// Output
|
||||
// Output
|
||||
|
||||
//- Print description of stream to Ostream
|
||||
void print(Ostream& os) const;
|
||||
//- Print stream description to Ostream
|
||||
void print(Ostream& os) const;
|
||||
|
||||
//- Concatenate tokens into a space-separated std::string.
|
||||
//- The resulting string may contain quote characters.
|
||||
std::string toString() const;
|
||||
//- Concatenate tokens into a space-separated std::string.
|
||||
//- The resulting string may contain quote characters.
|
||||
std::string toString() 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
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -129,7 +129,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
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2018 Bernhard Gschaider <bgschaid@hfd-research.com>
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -203,7 +203,7 @@ Foam::expressions::exprResultGlobals::get
|
||||
{
|
||||
WarningInFunction
|
||||
<< "No scope " << scopeName << " for " << name << nl
|
||||
<< "Known global scopes: " << variables_.sortToc() << nl;
|
||||
<< "Known global scopes: " << variables_.sortedToc() << nl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -60,6 +60,12 @@ public:
|
||||
TypeName("value");
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
valuePointPatchField(const valuePointPatchField&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -723,17 +723,15 @@ Foam::fileOperations::masterUncollatedFileOperation::read
|
||||
Pout<< "masterUncollatedFileOperation::readStream :"
|
||||
<< " Done reading " << buf.size() << " bytes" << endl;
|
||||
}
|
||||
const fileName& fName = filePaths[Pstream::myProcNo(comm)];
|
||||
isPtr.reset
|
||||
(
|
||||
new IListStream
|
||||
(
|
||||
std::move(buf),
|
||||
IOstream::BINARY,
|
||||
IOstream::currentVersion,
|
||||
fName
|
||||
)
|
||||
);
|
||||
|
||||
// A local character buffer copy of the Pstream contents.
|
||||
// Construct with same parameters (ASCII, current version)
|
||||
// as the IFstream so that it has the same characteristics.
|
||||
|
||||
isPtr.reset(new IListStream(std::move(buf)));
|
||||
|
||||
// With the proper file name
|
||||
isPtr->name() = filePaths[Pstream::myProcNo(comm)];
|
||||
|
||||
if (!io.readHeader(isPtr()))
|
||||
{
|
||||
@ -2415,6 +2413,8 @@ Foam::fileOperations::masterUncollatedFileOperation::NewIFstream
|
||||
const fileName& filePath
|
||||
) const
|
||||
{
|
||||
autoPtr<ISstream> isPtr;
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Insert logic of filePath. We assume that if a file is absolute
|
||||
@ -2497,10 +2497,7 @@ Foam::fileOperations::masterUncollatedFileOperation::NewIFstream
|
||||
if (Pstream::master(Pstream::worldComm))
|
||||
{
|
||||
// Read myself
|
||||
return autoPtr<ISstream>
|
||||
(
|
||||
new IFstream(filePaths[Pstream::masterNo()])
|
||||
);
|
||||
isPtr.reset(new IFstream(filePaths[Pstream::masterNo()]));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2522,26 +2519,23 @@ Foam::fileOperations::masterUncollatedFileOperation::NewIFstream
|
||||
<< " Done reading " << buf.size() << " bytes" << endl;
|
||||
}
|
||||
|
||||
// Note: IPstream is not an IStream so use a IStringStream to
|
||||
// convert the buffer. Note that we construct with a string
|
||||
// so it holds a copy of the buffer.
|
||||
return autoPtr<ISstream>
|
||||
(
|
||||
new IListStream
|
||||
(
|
||||
std::move(buf),
|
||||
IOstream::BINARY,
|
||||
IOstream::currentVersion,
|
||||
filePath
|
||||
)
|
||||
);
|
||||
// A local character buffer copy of the Pstream contents.
|
||||
// Construct with same parameters (ASCII, current version)
|
||||
// as the IFstream so that it has the same characteristics.
|
||||
|
||||
isPtr.reset(new IListStream(std::move(buf)));
|
||||
|
||||
// With the proper file name
|
||||
isPtr->name() = filePath;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read myself
|
||||
return autoPtr<ISstream>(new IFstream(filePath));
|
||||
isPtr.reset(new IFstream(filePath));
|
||||
}
|
||||
|
||||
return isPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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<value_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())
|
||||
{}
|
||||
|
||||
|
||||
@ -218,6 +218,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()
|
||||
(
|
||||
|
||||
@ -120,7 +120,7 @@ public:
|
||||
explicit interpolation2DTable(const dictionary& dict);
|
||||
|
||||
//- Copy construct
|
||||
interpolation2DTable(const interpolation2DTable& interpTable);
|
||||
interpolation2DTable(const interpolation2DTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -135,6 +135,9 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Copy assignment
|
||||
void operator=(const interpolation2DTable<Type>& rhs);
|
||||
|
||||
//- Return an interpolated value
|
||||
Type operator()(const scalar valueX, const scalar valueY) const;
|
||||
|
||||
|
||||
@ -118,17 +118,16 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
||||
template<class Type>
|
||||
Foam::interpolationTable<Type>::interpolationTable
|
||||
(
|
||||
const interpolationTable& interpTable
|
||||
const interpolationTable& tbl
|
||||
)
|
||||
:
|
||||
List<value_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>
|
||||
@ -491,6 +490,24 @@ Foam::interpolationTable<Type>::interpolateValues
|
||||
|
||||
// * * * * * * * * * * * * * * * 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[](label idx) const
|
||||
|
||||
@ -135,7 +135,7 @@ public:
|
||||
explicit interpolationTable(const dictionary& dict);
|
||||
|
||||
//- Copy construct
|
||||
interpolationTable(const interpolationTable& interpTable);
|
||||
interpolationTable(const interpolationTable& tbl);
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -172,6 +172,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[](label idx) const;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -78,6 +78,15 @@ public:
|
||||
static const word emptyType;
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
surfZoneIdentifier(const surfZoneIdentifier&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
surfZoneIdentifier& operator=(const surfZoneIdentifier&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null, with index zero
|
||||
|
||||
@ -82,15 +82,18 @@ void Foam::primitiveMesh::makeCellCentresAndVols
|
||||
{
|
||||
typedef Vector<solveScalar> solveVector;
|
||||
|
||||
// Clear the fields for accumulation. Note1: we're doing this before
|
||||
// any precision conversion since this might complain about illegal numbers.
|
||||
// Note2: zero is a special value which is perfectly converted into zero
|
||||
// in the new precision
|
||||
cellCtrs_s = Zero;
|
||||
cellVols_s = 0.0;
|
||||
|
||||
PrecisionAdaptor<solveVector, vector> tcellCtrs(cellCtrs_s);
|
||||
Field<solveVector>& cellCtrs = tcellCtrs.ref();
|
||||
PrecisionAdaptor<solveScalar, scalar> tcellVols(cellVols_s);
|
||||
Field<solveScalar>& cellVols = tcellVols.ref();
|
||||
|
||||
// Clear the fields for accumulation
|
||||
cellCtrs = Zero;
|
||||
cellVols = 0.0;
|
||||
|
||||
const labelList& own = faceOwner();
|
||||
const labelList& nei = faceNeighbour();
|
||||
|
||||
|
||||
@ -81,10 +81,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)
|
||||
:
|
||||
|
||||
@ -81,10 +81,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)
|
||||
:
|
||||
|
||||
@ -82,11 +82,18 @@ public:
|
||||
//- Component labeling enumeration
|
||||
enum components { XX, XY, YX, YY };
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Construct null
|
||||
//- Default construct
|
||||
Tensor2D() = default;
|
||||
|
||||
//- Copy construct
|
||||
Tensor2D(const Tensor2D&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
Tensor2D& operator=(const Tensor2D&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -81,10 +81,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)
|
||||
:
|
||||
|
||||
@ -74,10 +74,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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -127,10 +127,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);
|
||||
@ -222,7 +231,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)
|
||||
{
|
||||
|
||||
@ -101,12 +101,8 @@ public:
|
||||
//- Construct with seed value
|
||||
explicit Random(const label seedValue = defaultSeed);
|
||||
|
||||
//- 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
|
||||
|
||||
@ -85,10 +85,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);
|
||||
@ -129,9 +141,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_);
|
||||
|
||||
@ -96,6 +96,51 @@ void Foam::reduce(scalar&, const sumOp<scalar>&, const int, const label, label&)
|
||||
{}
|
||||
|
||||
|
||||
#if defined(WM_SPDP)
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label comm
|
||||
)
|
||||
{}
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const minOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label comm
|
||||
)
|
||||
{}
|
||||
void Foam::reduce
|
||||
(
|
||||
Vector2D<solveScalar>& Value,
|
||||
const sumOp<Vector2D<solveScalar>>& bop,
|
||||
const int tag,
|
||||
const label comm
|
||||
)
|
||||
{}
|
||||
void Foam::sumReduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
label& Count,
|
||||
const int tag,
|
||||
const label comm
|
||||
)
|
||||
{}
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label comm,
|
||||
label& request
|
||||
)
|
||||
{}
|
||||
#endif
|
||||
|
||||
|
||||
void Foam::UPstream::allToAll
|
||||
(
|
||||
const labelUList& sendData,
|
||||
|
||||
@ -40,10 +40,15 @@ License
|
||||
#include <cstdlib>
|
||||
#include <csignal>
|
||||
|
||||
#if defined(WM_SP) || defined(WM_SPDP)
|
||||
#if defined(WM_SP)
|
||||
#define MPI_SCALAR MPI_FLOAT
|
||||
#define MPI_SOLVESCALAR MPI_FLOAT
|
||||
#elif defined(WM_SPDP)
|
||||
#define MPI_SCALAR MPI_FLOAT
|
||||
#define MPI_SOLVESCALAR MPI_DOUBLE
|
||||
#elif defined(WM_DP)
|
||||
#define MPI_SCALAR MPI_DOUBLE
|
||||
#define MPI_SOLVESCALAR MPI_DOUBLE
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -478,6 +483,132 @@ void Foam::reduce
|
||||
}
|
||||
|
||||
|
||||
#if defined(WM_SPDP)
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label communicator
|
||||
)
|
||||
{
|
||||
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
|
||||
{
|
||||
Pout<< "** reducing:" << Value << " with comm:" << communicator
|
||||
<< " warnComm:" << UPstream::warnComm
|
||||
<< endl;
|
||||
error::printStack(Pout);
|
||||
}
|
||||
allReduce(Value, 1, MPI_SOLVESCALAR, MPI_SUM, bop, tag, communicator);
|
||||
}
|
||||
|
||||
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const minOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label communicator
|
||||
)
|
||||
{
|
||||
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
|
||||
{
|
||||
Pout<< "** reducing:" << Value << " with comm:" << communicator
|
||||
<< " warnComm:" << UPstream::warnComm
|
||||
<< endl;
|
||||
error::printStack(Pout);
|
||||
}
|
||||
allReduce(Value, 1, MPI_SOLVESCALAR, MPI_MIN, bop, tag, communicator);
|
||||
}
|
||||
|
||||
|
||||
void Foam::reduce
|
||||
(
|
||||
Vector2D<solveScalar>& Value,
|
||||
const sumOp<Vector2D<solveScalar>>& bop,
|
||||
const int tag,
|
||||
const label communicator
|
||||
)
|
||||
{
|
||||
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
|
||||
{
|
||||
Pout<< "** reducing:" << Value << " with comm:" << communicator
|
||||
<< " warnComm:" << UPstream::warnComm
|
||||
<< endl;
|
||||
error::printStack(Pout);
|
||||
}
|
||||
allReduce(Value, 2, MPI_SOLVESCALAR, MPI_SUM, bop, tag, communicator);
|
||||
}
|
||||
|
||||
|
||||
void Foam::sumReduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
label& Count,
|
||||
const int tag,
|
||||
const label communicator
|
||||
)
|
||||
{
|
||||
if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
|
||||
{
|
||||
Pout<< "** reducing:" << Value << " with comm:" << communicator
|
||||
<< " warnComm:" << UPstream::warnComm
|
||||
<< endl;
|
||||
error::printStack(Pout);
|
||||
}
|
||||
Vector2D<solveScalar> twoScalars(Value, solveScalar(Count));
|
||||
reduce(twoScalars, sumOp<Vector2D<solveScalar>>(), tag, communicator);
|
||||
|
||||
Value = twoScalars.x();
|
||||
Count = twoScalars.y();
|
||||
}
|
||||
|
||||
|
||||
void Foam::reduce
|
||||
(
|
||||
solveScalar& Value,
|
||||
const sumOp<solveScalar>& bop,
|
||||
const int tag,
|
||||
const label communicator,
|
||||
label& requestID
|
||||
)
|
||||
{
|
||||
#ifdef MPIX_COMM_TYPE_SHARED
|
||||
// Assume mpich2 with non-blocking collectives extensions. Once mpi3
|
||||
// is available this will change.
|
||||
MPI_Request request;
|
||||
solveScalar v = Value;
|
||||
MPIX_Ireduce
|
||||
(
|
||||
&v,
|
||||
&Value,
|
||||
1,
|
||||
MPI_SOLVESCALAR,
|
||||
MPI_SUM,
|
||||
0, //root
|
||||
PstreamGlobals::MPICommunicators_[communicator],
|
||||
&request
|
||||
);
|
||||
|
||||
requestID = PstreamGlobals::outstandingRequests_.size();
|
||||
PstreamGlobals::outstandingRequests_.append(request);
|
||||
|
||||
if (UPstream::debug)
|
||||
{
|
||||
Pout<< "UPstream::allocateRequest for non-blocking reduce"
|
||||
<< " : request:" << requestID
|
||||
<< endl;
|
||||
}
|
||||
#else
|
||||
// Non-blocking not yet implemented in mpi
|
||||
reduce(Value, bop, tag, communicator);
|
||||
requestID = -1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void Foam::UPstream::allToAll
|
||||
(
|
||||
const labelUList& sendData,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -210,22 +210,21 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
nbrPatch.lookupPatchField<volScalarField, scalar>(TnbrName_)
|
||||
);
|
||||
|
||||
// Swap to obtain full local values of neighbour internal field
|
||||
scalarField TcNbr(nbrField.patchInternalField());
|
||||
mpp.distribute(TcNbr);
|
||||
|
||||
|
||||
// Swap to obtain full local values of neighbour K*delta
|
||||
scalarField KDeltaNbr;
|
||||
tmp<scalarField> TcNbr(new scalarField(nbrField.size(), Zero));
|
||||
if (contactRes_ == 0.0)
|
||||
{
|
||||
TcNbr.ref() = nbrField.patchInternalField();
|
||||
KDeltaNbr = nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs();
|
||||
}
|
||||
else
|
||||
{
|
||||
TcNbr.ref() = nbrField;
|
||||
KDeltaNbr.setSize(nbrField.size(), contactRes_);
|
||||
}
|
||||
mpp.distribute(KDeltaNbr);
|
||||
mpp.distribute(TcNbr.ref());
|
||||
|
||||
scalarField KDelta(kappa(Tp)*patch().deltaCoeffs());
|
||||
|
||||
|
||||
@ -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.
|
||||
@ -121,9 +121,18 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
kEpsilonPhitFBase(),
|
||||
|
||||
includeNu_
|
||||
(
|
||||
Switch::getOrAddToDict
|
||||
(
|
||||
"includeNu",
|
||||
this->coeffDict_,
|
||||
true
|
||||
)
|
||||
),
|
||||
Cmu_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Cmu",
|
||||
this->coeffDict_,
|
||||
@ -132,7 +141,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Ceps1a_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Ceps1a",
|
||||
this->coeffDict_,
|
||||
@ -141,7 +150,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Ceps1b_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Ceps1b",
|
||||
this->coeffDict_,
|
||||
@ -150,7 +159,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Ceps1c_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Ceps1c",
|
||||
this->coeffDict_,
|
||||
@ -159,7 +168,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Ceps2_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Ceps2",
|
||||
this->coeffDict_,
|
||||
@ -168,7 +177,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Cf1_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Cf1",
|
||||
this->coeffDict_,
|
||||
@ -177,7 +186,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Cf2_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Cf2",
|
||||
this->coeffDict_,
|
||||
@ -186,7 +195,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
CL_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"CL",
|
||||
this->coeffDict_,
|
||||
@ -195,7 +204,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
Ceta_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"Ceta",
|
||||
this->coeffDict_,
|
||||
@ -204,7 +213,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
CT_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"CT",
|
||||
this->coeffDict_,
|
||||
@ -213,7 +222,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
sigmaK_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"sigmaK",
|
||||
this->coeffDict_,
|
||||
@ -222,7 +231,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
sigmaEps_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"sigmaEps",
|
||||
this->coeffDict_,
|
||||
@ -231,7 +240,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
||||
),
|
||||
sigmaPhit_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
dimensionedScalar::getOrAddToDict
|
||||
(
|
||||
"sigmaPhit",
|
||||
this->coeffDict_,
|
||||
@ -341,6 +350,7 @@ bool kEpsilonPhitF<BasicTurbulenceModel>::read()
|
||||
{
|
||||
if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
|
||||
{
|
||||
includeNu_.readIfPresent("includeNu", this->coeffDict());
|
||||
Cmu_.readIfPresent(this->coeffDict());
|
||||
Ceps1a_.readIfPresent(this->coeffDict());
|
||||
Ceps1b_.readIfPresent(this->coeffDict());
|
||||
|
||||
@ -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.
|
||||
@ -34,11 +34,15 @@ Description
|
||||
compressible flows.
|
||||
|
||||
The model is a three-transport-equation linear-eddy-viscosity turbulence
|
||||
closure model alongside an elliptic relaxation equation:
|
||||
- Turbulent kinetic energy, \c k,
|
||||
- Turbulent kinetic energy dissipation rate, \c epsilon,
|
||||
- Normalised wall-normal fluctuating velocity scale, \c phit,
|
||||
- Elliptic relaxation factor, \c f.
|
||||
closure model alongside an elliptic relaxation equation.
|
||||
|
||||
\heading Input fields
|
||||
\plaintable
|
||||
k | Turbulent kinetic energy [m2/s2]
|
||||
epsilon | Turbulent kinetic energy dissipation rate [m2/s3]
|
||||
phit | Normalised wall-normal fluctuating velocity scale [-]
|
||||
f | Elliptic relaxation factor [1/s]
|
||||
\endplaintable
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
@ -53,19 +57,20 @@ Description
|
||||
\verbatim
|
||||
kEpsilonPhitFCoeffs
|
||||
{
|
||||
Cmu 0.22, // Turbulent viscosity constant
|
||||
Ceps1a 1.4, // Model constant for epsilon
|
||||
Ceps1b 1.0, // Model constant for epsilon
|
||||
Ceps1c 0.05, // Model constant for epsilon
|
||||
Ceps2 1.9, // Model constant for epsilon
|
||||
Cf1 1.4, // Model constant for f
|
||||
Cf2 0.3, // Model constant for f
|
||||
CL 0.25, // Model constant for L
|
||||
Ceta 110.0, // Model constant for L
|
||||
CT 6.0, // Model constant for T
|
||||
sigmaK 1.0, // Turbulent Prandtl number for k
|
||||
sigmaEps 1.3, // Turbulent Prandtl number for epsilon
|
||||
sigmaPhit 1.0, // Turbulent Prandtl number for phit = sigmaK
|
||||
includeNu true; // include nu in (LUU: Eq. 17), see Notes
|
||||
Cmu 0.22; // Turbulent viscosity constant
|
||||
Ceps1a 1.4; // Model constant for epsilon
|
||||
Ceps1b 1.0; // Model constant for epsilon
|
||||
Ceps1c 0.05; // Model constant for epsilon
|
||||
Ceps2 1.9; // Model constant for epsilon
|
||||
Cf1 1.4; // Model constant for f
|
||||
Cf2 0.3; // Model constant for f
|
||||
CL 0.25; // Model constant for L
|
||||
Ceta 110.0; // Model constant for L
|
||||
CT 6.0; // Model constant for T
|
||||
sigmaK 1.0; // Turbulent Prandtl number for k
|
||||
sigmaEps 1.3; // Turbulent Prandtl number for epsilon
|
||||
sigmaPhit 1.0; // Turbulent Prandtl number for phit = sigmaK
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -74,6 +79,14 @@ Note
|
||||
However, the name 'phi' preexisted in OpenFOAM; therefore, this name was
|
||||
replaced by 'phit' herein.
|
||||
|
||||
Including \c nu in \c DphitEff even though it is not present in (LUU:Eq. 17)
|
||||
provided higher level of resemblance to benchmarks for the tests considered,
|
||||
particularly for the peak skin friction (yet, pressure-related predictions
|
||||
were unaffected). Users can switch off \c nu in \c DphitEff by using
|
||||
\c includeNu entry in \c kEpsilonPhitFCoeffs as shown above in order to
|
||||
follow the reference paper thereat. \c includeNu is left \c true by default.
|
||||
See GitLab issue #1560.
|
||||
|
||||
SourceFiles
|
||||
kEpsilonPhitF.C
|
||||
|
||||
@ -119,6 +132,8 @@ protected:
|
||||
|
||||
// Protected Data
|
||||
|
||||
Switch includeNu_;
|
||||
|
||||
// Model coefficients
|
||||
|
||||
dimensionedScalar Cmu_;
|
||||
@ -210,7 +225,7 @@ public:
|
||||
//- Re-read model coefficients if they have changed
|
||||
virtual bool read();
|
||||
|
||||
//- Return the effective diffusivity for k
|
||||
//- Return the effective diffusivity for k (LUU:Eq. 3)
|
||||
tmp<volScalarField> DkEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
@ -223,7 +238,7 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the effective diffusivity for epsilon
|
||||
//- Return the effective diffusivity for epsilon (LUU:Eq. 4)
|
||||
tmp<volScalarField> DepsilonEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
@ -236,17 +251,18 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the effective diffusivity for phit
|
||||
//- Return the effective diffusivity for phit (LUU:Eq. 17)
|
||||
tmp<volScalarField> DphitEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"DphitEff",
|
||||
this->nut_/sigmaPhit_ + this->nu()
|
||||
)
|
||||
);
|
||||
auto tfld =
|
||||
tmp<volScalarField>::New("DphitEff", this->nut_/sigmaPhit_);
|
||||
|
||||
if (includeNu_)
|
||||
{
|
||||
tfld.ref() += this->nu();
|
||||
}
|
||||
|
||||
return tfld;
|
||||
}
|
||||
|
||||
//- Return the turbulent kinetic energy field
|
||||
|
||||
@ -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
|
||||
|
||||
@ -140,9 +140,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>
|
||||
|
||||
@ -86,8 +86,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
|
||||
|
||||
@ -121,9 +121,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) 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);
|
||||
}
|
||||
|
||||
@ -84,6 +84,15 @@ private:
|
||||
public:
|
||||
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- Copy construct
|
||||
smoothData(const smoothData&) = default;
|
||||
|
||||
//- Copy assignment
|
||||
smoothData& operator=(const smoothData&) = default;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -69,6 +69,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;
|
||||
|
||||
@ -162,7 +162,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
~weightedFlux();
|
||||
virtual ~weightedFlux();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -175,7 +175,8 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::rhoScale
|
||||
|
||||
void Foam::functionObjects::pressure::addHydrostaticContribution
|
||||
(
|
||||
volScalarField& p
|
||||
const volScalarField& p,
|
||||
volScalarField& prgh
|
||||
) const
|
||||
{
|
||||
// Add/subtract hydrostatic contribution
|
||||
@ -206,12 +207,12 @@ void Foam::functionObjects::pressure::addHydrostaticContribution
|
||||
{
|
||||
case ADD:
|
||||
{
|
||||
p += rgh;
|
||||
prgh += rgh;
|
||||
break;
|
||||
}
|
||||
case SUBTRACT:
|
||||
{
|
||||
p -= rgh;
|
||||
prgh -= rgh;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -243,7 +244,7 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::calcPressure
|
||||
|
||||
volScalarField& result = tresult.ref();
|
||||
|
||||
addHydrostaticContribution(result);
|
||||
addHydrostaticContribution(p, result);
|
||||
|
||||
if (mode_ & STATIC)
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -101,6 +101,8 @@ Usage
|
||||
UInf | Freestream velocity for coefficient calculation | no |
|
||||
rhoInf | Freestream density for coefficient calculation | no |
|
||||
hydrostaticMode | Hydrostatic contributions (see below) | no | none
|
||||
g | Gravity vector (see below) | no |
|
||||
hRef | Reference height (see below) | no |
|
||||
\endtable
|
||||
|
||||
The \c mode entry is used to select the type of pressure that is calculated.
|
||||
@ -117,6 +119,15 @@ Usage
|
||||
- \c add : add the term, e.g. to convert from p_rgh to p
|
||||
- \c subtract : subtract the term, e.g. to convert from p to p_rgh
|
||||
|
||||
If the \c hydrostaticMode is active, values are also required for
|
||||
gravity, \c g, and reference height, \c hRef. By default these will be
|
||||
retrieved from the database. When these values are not available
|
||||
the user must provide them, e.g.
|
||||
\verbatim
|
||||
g (0 -9.81 0);
|
||||
hRef 0;
|
||||
\endverbatim
|
||||
|
||||
|
||||
See also
|
||||
Foam::functionObjects::fieldExpression
|
||||
@ -247,7 +258,11 @@ private:
|
||||
) const;
|
||||
|
||||
//- Add the hydrostatic contribution
|
||||
void addHydrostaticContribution(volScalarField& p) const;
|
||||
void addHydrostaticContribution
|
||||
(
|
||||
const volScalarField& p,
|
||||
volScalarField& prgh
|
||||
) const;
|
||||
|
||||
//- Calculate and return the pressure
|
||||
tmp<volScalarField> calcPressure
|
||||
|
||||
@ -118,7 +118,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
{
|
||||
label nbrCelli =
|
||||
(
|
||||
cell() == mesh().faceOwner()[face()]
|
||||
this->cell() == mesh().faceOwner()[face()]
|
||||
? mesh().faceNeighbour()[face()]
|
||||
: mesh().faceOwner()[face()]
|
||||
);
|
||||
@ -135,7 +135,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
|
||||
// Change into nbrCell. No need to change tetFace, tetPt.
|
||||
//Pout<< " crossed from cell:" << celli_
|
||||
// << " into " << nbrCelli << endl;
|
||||
cell() = nbrCelli;
|
||||
this->cell() = nbrCelli;
|
||||
patchInteraction(cloud, td, trackFraction);
|
||||
}
|
||||
else
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -31,14 +31,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)
|
||||
:
|
||||
@ -123,13 +115,6 @@ Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * /
|
||||
|
||||
template<class PairType, class WallType>
|
||||
Foam::CollisionRecordList<PairType, WallType>::~CollisionRecordList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class PairType, class WallType>
|
||||
@ -386,24 +371,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
|
||||
)
|
||||
{
|
||||
if (this == &rhs)
|
||||
{
|
||||
return; // Self-assignment is a no-op
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user