GeometricFieldFunctions: Added cmptMag function

This commit is contained in:
Will Bainbridge
2021-10-20 12:33:08 +01:00
parent c8c015ddb8
commit 7266aa8728
6 changed files with 23 additions and 6 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -272,6 +272,12 @@ Foam::dimensionSet Foam::cmptDivide
}
Foam::dimensionSet Foam::cmptMag(const dimensionSet& ds)
{
return ds;
}
Foam::dimensionSet Foam::pow(const dimensionSet& ds, const scalar p)
{
dimensionSet dimPow

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,6 +63,7 @@ dimensionSet max(const dimensionSet&, const dimensionSet&);
dimensionSet min(const dimensionSet&, const dimensionSet&);
dimensionSet cmptMultiply(const dimensionSet&, const dimensionSet&);
dimensionSet cmptDivide(const dimensionSet&, const dimensionSet&);
dimensionSet cmptMag(const dimensionSet&);
dimensionSet pow(const dimensionSet&, const scalar);
dimensionSet pow(const dimensionSet&, const dimensionedScalar&);
@ -346,6 +347,7 @@ public:
const dimensionSet&,
const dimensionSet&
);
friend dimensionSet cmptMag(const dimensionSet&);
friend dimensionSet pow(const dimensionSet&, const scalar);
friend dimensionSet pow(const dimensionSet&, const dimensionedScalar&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -276,6 +276,9 @@ cmptAv(const tmp<DimensionedField<Type, GeoMesh>>& tdf)
return CmptAv;
}
UNARY_FUNCTION(Type, Type, cmptMag, cmptMag);
#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc) \
\
template<class Type, class GeoMesh> \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,6 +99,8 @@ tmp
>
cmptAv(const tmp<DimensionedField<Type, GeoMesh>>& tdf);
UNARY_FUNCTION(Type, Type, cmptMag, cmptMag);
#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc) \
\

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -422,6 +422,8 @@ cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
return CmptAv;
}
UNARY_FUNCTION(Type, Type, cmptMag, cmptMag);
#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \
\

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -211,6 +211,8 @@ tmp
>
cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf);
UNARY_FUNCTION(Type, Type, cmptMag, cmptMag);
#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \
\