geometricOneField, geometricZeroField: Add dimensions() returning dimless
This commit is contained in:
parent
4428aeed15
commit
d796b957ab
@ -38,6 +38,7 @@ Description
|
||||
#define geometricOneField_H
|
||||
|
||||
#include "oneFieldField.H"
|
||||
#include "dimensionSet.H"
|
||||
#include "scalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -65,6 +66,8 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
inline const dimensionSet& dimensions() const;
|
||||
|
||||
inline scalar operator[](const label) 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
|
||||
{
|
||||
return scalar(1);
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,6 +38,7 @@ Description
|
||||
#define geometricZeroField_H
|
||||
|
||||
#include "zeroFieldField.H"
|
||||
#include "dimensionSet.H"
|
||||
#include "scalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -65,6 +66,8 @@ public:
|
||||
|
||||
// Member Operators
|
||||
|
||||
inline const dimensionSet& dimensions() const;
|
||||
|
||||
inline scalar operator[](const label) 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
|
||||
{
|
||||
return scalar(0);
|
||||
|
Loading…
Reference in New Issue
Block a user