geometricOneField, geometricZeroField: Add dimensions() returning dimless

This commit is contained in:
Henry
2013-07-14 23:14:51 +01:00
parent 4428aeed15
commit d796b957ab
4 changed files with 17 additions and 1 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);