diff --git a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H index 0344f9b1a4..81f5e5447a 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H @@ -23,6 +23,7 @@ surfaceScalarField phiHbyA + phig ); +fvc::makeRelative(phiHbyA, rho, U); MRF.makeRelative(fvc::interpolate(rho), phiHbyA); // Update the pressure BCs to ensure flux consistency diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.C index 612916f800..015b61fafe 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,7 +51,7 @@ UNARY_FUNCTION(tensor, tensor, cof, pow2) UNARY_FUNCTION(tensor, tensor, inv, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues, transform) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors, sign) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors, sign) // * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H index e05f243543..4ed25cefa0 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -64,7 +64,7 @@ UNARY_FUNCTION(tensor, tensor, cof, cof) UNARY_FUNCTION(tensor, tensor, inv, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues, transform) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors, sign) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors, sign) // * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.C b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.C index b0e46f32b0..08efa9d114 100644 --- a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.C +++ b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -219,7 +219,7 @@ UNARY_FUNCTION(tensor, tensor, cof) UNARY_FUNCTION(tensor, tensor, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors) // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H index 34e9966545..aa5ef82a31 100644 --- a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H +++ b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -168,7 +168,7 @@ UNARY_FUNCTION(tensor, tensor, cof) UNARY_FUNCTION(tensor, tensor, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors) // * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C index 5e470bbb61..2348c6d987 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -269,7 +269,7 @@ UNARY_FUNCTION(tensor, tensor, cof, pow2) UNARY_FUNCTION(tensor, tensor, inv, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues, transform) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors, sign) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors, sign) // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H index 45626d2aea..28e88f9892 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -169,7 +169,7 @@ UNARY_FUNCTION(tensor, tensor, cof, cof) UNARY_FUNCTION(tensor, tensor, inv, inv) UNARY_FUNCTION(vector, symmTensor, eigenValues, transform) -UNARY_FUNCTION(symmTensor, symmTensor, eigenVectors, sign) +UNARY_FUNCTION(tensor, symmTensor, eigenVectors, sign) // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/Scalar/doubleFloat.H b/src/OpenFOAM/primitives/Scalar/doubleFloat.H index 131eb07c1c..945b08fc13 100644 --- a/src/OpenFOAM/primitives/Scalar/doubleFloat.H +++ b/src/OpenFOAM/primitives/Scalar/doubleFloat.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -72,6 +72,10 @@ MAXMINPOW(float, float, int) MAXMINPOW(float, int, float) MAXMINPOW(float, float, long) MAXMINPOW(float, long, float) +#if defined(__APPLE__) && WM_LABEL_SIZE == 64 +MAXMINPOW(float, float, int64_t) +MAXMINPOW(float, int64_t, float) +#endif #undef MAXMINPOW diff --git a/src/OpenFOAM/primitives/complex/complexI.H b/src/OpenFOAM/primitives/complex/complexI.H index 608a097068..bba3e4a738 100644 --- a/src/OpenFOAM/primitives/complex/complexI.H +++ b/src/OpenFOAM/primitives/complex/complexI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -440,6 +440,9 @@ inline complex pow(const complex& x, const complex& y) powFuncs(int) powFuncs(long) +#if defined(__APPLE__) && WM_LABEL_SIZE == 64 +powFuncs(int64_t) +#endif powFuncs(float) powFuncs(double) diff --git a/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C b/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C index f1f2057a4d..e665b31384 100644 --- a/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C +++ b/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2020 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,6 +39,7 @@ https://www.geometrictools.com/Documentation/DistancePointEllipseEllipsoid.pdf #include "searchableSphere.H" #include "addToRunTimeSelectionTable.H" +#include // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointBoundaryCondition/adjointBoundaryConditionTemplates.C b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointBoundaryCondition/adjointBoundaryConditionTemplates.C deleted file mode 100644 index 6892333428..0000000000 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointBoundaryCondition/adjointBoundaryConditionTemplates.C +++ /dev/null @@ -1,167 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2007-2019 PCOpt/NTUA - Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "emptyFvPatch.H" -#include "adjointBoundaryCondition.H" -#include "adjointSolverManager.H" -#include "HashTable.H" -#include "surfaceInterpolationScheme.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template -tmp -< - Field::type> -> -adjointBoundaryCondition::computePatchGrad(word name) -{ - // Return field - typedef typename outerProduct::type GradType; - auto tresGrad = tmp>::New(patch_.size(), Zero); - auto& resGrad = tresGrad.ref(); - - const labelList& faceCells = patch_.faceCells(); - const fvMesh& mesh = patch_.boundaryMesh().mesh(); - const cellList& cells = mesh.cells(); - - // Go through the surfaceInterpolation scheme defined in gradSchemes for - // consistency - const GeometricField& field = - mesh.lookupObject(name); - - // Gives problems when grad(AdjointVar) is computed using a limited scheme, - // since it is not possible to know a priori how many words to expect in the - // stream. - // Interpolation scheme is now read through interpolation schemes. - /* - word gradSchemeName ("grad(" + name + ')'); - Istream& is = mesh.gradScheme(gradSchemeName); - word schemeData(is); - */ - - tmp> tinterpScheme - ( - surfaceInterpolationScheme::New - ( - mesh, - mesh.interpolationScheme("interpolate(" + name + ")") - ) - ); - - GeometricField surfField - ( - tinterpScheme().interpolate(field) - ); - - // Auxiliary fields - const surfaceVectorField& Sf = mesh.Sf(); - tmp tnf = patch_.nf(); - const vectorField& nf = tnf(); - const scalarField& V = mesh.V(); - const labelUList& owner = mesh.owner(); - - // Compute grad value of cell adjacent to the boundary - forAll(faceCells, fI) - { - const label cI = faceCells[fI]; - const cell& cellI = cells[cI]; - for (const label faceI : cellI) // global face numbering - { - label patchID = mesh.boundaryMesh().whichPatch(faceI); - if (patchID == -1) //face is internal - { - const label own = owner[faceI]; - tensor flux = Sf[faceI]*surfField[faceI]; - if (cI == own) - { - resGrad[fI] += flux; - } - else - { - resGrad[fI] -= flux; - } - } - else // Face is boundary. Covers coupled patches as well - { - if (!isA(mesh.boundary()[patchID])) - { - const fvPatch& patchForFlux = mesh.boundary()[patchID]; - const label boundaryFaceI = faceI - patchForFlux.start(); - const vectorField& Sfb = Sf.boundaryField()[patchID]; - resGrad[fI] += - Sfb[boundaryFaceI] - *surfField.boundaryField()[patchID][boundaryFaceI]; - } - } - } - resGrad[fI] /= V[cI]; - } - - // This has concluded the computation of the grad at the cell next to the - // boundary. We now need to compute the grad at the boundary face - const fvPatchField& bField = field.boundaryField()[patch_.index()]; - resGrad = nf*bField.snGrad() + (resGrad - nf*(nf & resGrad)); - - return tresGrad; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -adjointBoundaryCondition::adjointBoundaryCondition -( - const fvPatch& p, - const DimensionedField& iF, - const word& solverName -) -: - patch_(p), - managerName_("objectiveManager" + solverName), - adjointSolverName_(solverName), - simulationType_("incompressible"), - boundaryContrPtr_(nullptr), - addATCUaGradUTerm_(nullptr) -{ - // Set the boundaryContribution pointer - setBoundaryContributionPtr(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchFieldsFwd.C b/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchFieldsFwd.C deleted file mode 100644 index e043abf8e3..0000000000 --- a/src/optimisation/adjointOptimisation/adjoint/adjointBoundaryConditions/adjointZeroInlet/adjointZeroInletFvPatchFieldsFwd.C +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | www.openfoam.com - \\/ M anipulation | -------------------------------------------------------------------------------- - Copyright (C) 2007-2019 PCOpt/NTUA - Copyright (C) 2013-2019 FOSS GP - Copyright (C) 2019 OpenCFD Ltd. -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#ifndef adjointZeroInletFvPatchFieldsFwd_H -#define adjointZeroInletFvPatchFieldsFwd_H - -#include "fieldTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template class adjointZeroInletFvPatchField; - -makePatchTypeFieldTypedefs(adjointZeroInlet); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.C b/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.C index c9670beb9d..5a379c1ed0 100644 --- a/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.C +++ b/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.C @@ -5,8 +5,8 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2007-2020 PCOpt/NTUA - Copyright (C) 2013-2020 FOSS GP + Copyright (C) 2007-2021 PCOpt/NTUA + Copyright (C) 2013-2021 FOSS GP Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -252,7 +252,7 @@ scalar objectiveManager::print() } -bool objectiveManager::write +bool objectiveManager::writeObjectives ( const scalar weightedObjective, const bool valid @@ -289,7 +289,7 @@ void objectiveManager::updateAndWrite() updateNormalizationFactor(); update(); scalar weightedObjective = print(); - write(weightedObjective); + writeObjectives(weightedObjective); } diff --git a/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.H b/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.H index 943b4d41fd..0aeacc6b48 100644 --- a/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.H +++ b/src/optimisation/adjointOptimisation/adjoint/objectiveManager/objectiveManager/objectiveManager.H @@ -5,8 +5,8 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2007-2020 PCOpt/NTUA - Copyright (C) 2013-2020 FOSS GP + Copyright (C) 2007-2021 PCOpt/NTUA + Copyright (C) 2013-2021 FOSS GP Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -146,7 +146,7 @@ public: scalar print(); //- Write objective function history - virtual bool write + virtual bool writeObjectives ( const scalar weightedObjective, const bool valid = true diff --git a/tutorials/IO/fileHandler/system/blockMeshDict b/tutorials/IO/fileHandler/system/blockMeshDict index 4aef9e86de..eef8b2f0b7 100644 --- a/tutorials/IO/fileHandler/system/blockMeshDict +++ b/tutorials/IO/fileHandler/system/blockMeshDict @@ -36,7 +36,7 @@ vertices blocks ( hex (6 9 10 11 0 3 4 5 ) (20 40 1) simpleGrading (1 1 1) - hex (7 8 9 6 1 2 3 0) (20 8 1) simpleGrading (1 1 1) + hex (7 8 9 6 1 2 3 0) near (20 8 1) simpleGrading (1 1 1) ); boundary diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/decomposeParDict b/tutorials/lagrangian/sprayFoam/aachenBomb/system/decomposeParDict new file mode 100644 index 0000000000..e8914dea53 --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/decomposeParDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method simple; + +coeffs +{ + n (1 8 1); +} + +// ************************************************************************* // diff --git a/wmake/scripts/wmake-build-info b/wmake/scripts/wmake-build-info index 87e151b544..8ec98bd8f0 100755 --- a/wmake/scripts/wmake-build-info +++ b/wmake/scripts/wmake-build-info @@ -6,7 +6,7 @@ # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------ -# Copyright (C) 2018-2020 OpenCFD Ltd. +# Copyright (C) 2018-2021 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -237,7 +237,7 @@ getMakeInfo() # (api) from WM_DIR/rules/General/general # - extract WM_VERSION = OPENFOAM= - api="$(sed -ne '/^ *#/!{ /WM_VERSION.*OPENFOAM=/{ s@^.*OPENFOAM= *\([0-9][0-9]*\).*@\1@p; q }}' "$rulesFile" 2>/dev/null)" + api="$(sed -ne 's@^ *WM_VERSION *= *OPENFOAM=\([0-9][0-9]*\).*@\1@p' "$rulesFile" 2>/dev/null)" if [ -d "$META_INFO" ] then diff --git a/wmake/scripts/wmake-with-bear b/wmake/scripts/wmake-with-bear index a723d80ba2..addd753e8b 100755 --- a/wmake/scripts/wmake-with-bear +++ b/wmake/scripts/wmake-with-bear @@ -6,7 +6,7 @@ # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------- -# Copyright (C) 2020 OpenCFD Ltd. +# Copyright (C) 2020-2021 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later. @@ -80,7 +80,7 @@ done # Detect version. Seems to be stderr for some versions!? if version="$(bear --version 2>&1)" then - version="$(echo "$version" | sed -ne '1{ s/^[^0-9]*\([1-9]\)/\1/p }')" + version="$(echo "$version" | sed -ne '1s/^[^0-9]*\([1-9]\)/\1/p;')" else unset version fi