Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (8)
......@@ -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])
......
......@@ -180,7 +180,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"
......
......@@ -169,11 +169,14 @@ class PrecisionAdaptor
// Private Member Functions
//- Copy in field
void copyInput(const Container<InputType>& input)
void copyInput(const Container<InputType>& input, const bool copy)
{
Container<Type>* p = new Container<Type>(input.size());
this->reset(p);
std::copy(input.cbegin(), input.cend(), p->begin());
if (copy)
{
std::copy(input.cbegin(), input.cend(), p->begin());
}
}
......@@ -185,8 +188,8 @@ public:
// Constructors
//- Construct from Container<InputType>, copying on input as required
PrecisionAdaptor(Container<InputType>& input)
//- Construct from Container<InputType>, copying on input if required
PrecisionAdaptor(Container<InputType>& input, const bool copy = true)
:
tmpNrc<Container<Type>>(),
ref_(input)
......@@ -197,7 +200,7 @@ public:
}
else
{
this->copyInput(input);
this->copyInput(input, copy);
}
}
......
......@@ -82,12 +82,11 @@ void Foam::primitiveMesh::makeCellCentresAndVols
{
typedef Vector<solveScalar> solveVector;
PrecisionAdaptor<solveVector, vector> tcellCtrs(cellCtrs_s);
PrecisionAdaptor<solveVector, vector> tcellCtrs(cellCtrs_s, false);
Field<solveVector>& cellCtrs = tcellCtrs.ref();
PrecisionAdaptor<solveScalar, scalar> tcellVols(cellVols_s);
PrecisionAdaptor<solveScalar, scalar> tcellVols(cellVols_s, false);
Field<solveScalar>& cellVols = tcellVols.ref();
// Clear the fields for accumulation
cellCtrs = Zero;
cellVols = 0.0;
......
......@@ -247,7 +247,14 @@ void Foam::blockFaces::projectFace::project
}
if (iter > 0 && (iResidual+jResidual)/initialResidual < relTol)
if
(
iter > 0
&& (
initialResidual < ROOTVSMALL
|| ((iResidual+jResidual)/initialResidual < relTol)
)
)
{
break;
}
......
......@@ -229,7 +229,7 @@ Foam::label Foam::kahipDecomp::decomposeSerial
// Output: cell -> processor addressing
decomp.resize(numCells);
PrecisionAdaptor<int, label, List> decomp_param(decomp);
PrecisionAdaptor<int, label, List> decomp_param(decomp, false);
#if 0 // WIP: #ifdef KAFFPA_CPP_INTERFACE
......
......@@ -196,7 +196,7 @@ Foam::label Foam::metisDecomp::decomposeSerial
// Output: cell -> processor addressing
decomp.resize(numCells);
PrecisionAdaptor<idx_t, label, List> decomp_param(decomp);
PrecisionAdaptor<idx_t, label, List> decomp_param(decomp, false);
// Output: number of cut edges
idx_t edgeCut = 0;
......
......@@ -13,5 +13,4 @@ Eddy Simulation (IDDES) model
For further details please visit:
openfoam.com/documentation/cpp-guide/html/verification-validation-turbulent-surface-mounted-cube.html
https://www.openfoam.com/documentation/guides/latest/doc/verification-validation-turbulent-surface-mounted-cube.html