mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
geometricOneField, geometricZeroField: Add dimensions() returning dimless
This commit is contained in:
@ -38,6 +38,7 @@ Description
|
|||||||
#define geometricOneField_H
|
#define geometricOneField_H
|
||||||
|
|
||||||
#include "oneFieldField.H"
|
#include "oneFieldField.H"
|
||||||
|
#include "dimensionSet.H"
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -65,6 +66,8 @@ public:
|
|||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
inline const dimensionSet& dimensions() const;
|
||||||
|
|
||||||
inline scalar operator[](const label) const;
|
inline scalar operator[](const label) const;
|
||||||
|
|
||||||
inline oneField field() const;
|
inline oneField field() const;
|
||||||
|
|||||||
@ -27,6 +27,11 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const Foam::dimensionSet& Foam::geometricOneField::dimensions() const
|
||||||
|
{
|
||||||
|
return dimless;
|
||||||
|
}
|
||||||
|
|
||||||
inline Foam::scalar Foam::geometricOneField::operator[](const label) const
|
inline Foam::scalar Foam::geometricOneField::operator[](const label) const
|
||||||
{
|
{
|
||||||
return scalar(1);
|
return scalar(1);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,6 +38,7 @@ Description
|
|||||||
#define geometricZeroField_H
|
#define geometricZeroField_H
|
||||||
|
|
||||||
#include "zeroFieldField.H"
|
#include "zeroFieldField.H"
|
||||||
|
#include "dimensionSet.H"
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -65,6 +66,8 @@ public:
|
|||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
inline const dimensionSet& dimensions() const;
|
||||||
|
|
||||||
inline scalar operator[](const label) const;
|
inline scalar operator[](const label) const;
|
||||||
|
|
||||||
inline zeroField field() const;
|
inline zeroField field() const;
|
||||||
|
|||||||
@ -27,6 +27,11 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const Foam::dimensionSet& Foam::geometricZeroField::dimensions() const
|
||||||
|
{
|
||||||
|
return dimless;
|
||||||
|
}
|
||||||
|
|
||||||
inline Foam::scalar Foam::geometricZeroField::operator[](const label) const
|
inline Foam::scalar Foam::geometricZeroField::operator[](const label) const
|
||||||
{
|
{
|
||||||
return scalar(0);
|
return scalar(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user