Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2021-10-27 16:04:11 +01:00
9 changed files with 52 additions and 21 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) \
\

View File

@ -1691,8 +1691,8 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh
domainMesh.addFvPatches(patches, false);
//*** Set the old-time volumes if present
// domainMesh.setV0().field() = V0;
// domainMesh.setV00().field() = V00;
// domainMesh.V0Ref().field() = V0;
// domainMesh.V00Ref().field() = V00;
// Construct zones
List<pointZone*> pZonePtrs(pointZoneNames.size());

View File

@ -308,13 +308,19 @@ public:
//- Return old-time cell volumes
const DimensionedField<scalar, volMesh>& V0() const;
//- Access old-time cell volumes
DimensionedField<scalar, volMesh>& V0Ref();
//- Return old-old-time cell volumes
const DimensionedField<scalar, volMesh>& V00() const;
//- Access old-old-time cell volumes
DimensionedField<scalar, volMesh>& V00Ref();
//- Return sub-cycle cell volumes
tmp<DimensionedField<scalar, volMesh>> Vsc() const;
//- Return sub-cycl old-time cell volumes
//- Return sub-cycle old-time cell volumes
tmp<DimensionedField<scalar, volMesh>> Vsc0() const;
//- Return cell face area vectors
@ -323,9 +329,6 @@ public:
//- Return cell face area magnitudes
const surfaceScalarField& magSf() const;
//- Return cell face motion fluxes
const surfaceScalarField& phi() const;
//- Return cell centres as volVectorField
const volVectorField& C() const;
@ -335,6 +338,12 @@ public:
//- Return face deltas as surfaceVectorField
tmp<surfaceVectorField> delta() const;
//- Return cell face motion fluxes
const surfaceScalarField& phi() const;
//- Access cell face motion fluxes
surfaceScalarField& phiRef();
//- Return a labelType of valid component indicators
// 1 : valid (solved)
// -1 : invalid (not solved)
@ -390,12 +399,6 @@ public:
// these fvPatches.
void removeFvBoundary();
//- Return cell face motion fluxes
surfaceScalarField& setPhi();
//- Return old-time cell volumes
DimensionedField<scalar, volMesh>& setV0();
// Write

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
@ -226,7 +226,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V0() const
}
Foam::volScalarField::Internal& Foam::fvMesh::setV0()
Foam::volScalarField::Internal& Foam::fvMesh::V0Ref()
{
if (!V0Ptr_)
{
@ -267,6 +267,17 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const
}
Foam::volScalarField::Internal& Foam::fvMesh::V00Ref()
{
if (!V00Ptr_)
{
V00();
}
return *V00Ptr_;
}
Foam::tmp<Foam::volScalarField::Internal>
Foam::fvMesh::Vsc() const
{
@ -429,7 +440,7 @@ const Foam::surfaceScalarField& Foam::fvMesh::phi() const
}
Foam::surfaceScalarField& Foam::fvMesh::setPhi()
Foam::surfaceScalarField& Foam::fvMesh::phiRef()
{
if (!phiPtr_)
{