Added zero CoeffField

This commit is contained in:
Hrvoje Jasak 2017-04-05 11:08:42 +01:00
parent 9fca371a48
commit 0e04d88628
2 changed files with 22 additions and 6 deletions

View file

@ -31,6 +31,10 @@ License
template<class Type>
const char* const Foam::CoeffField<Type>::typeName("CoeffField");
template<class Type>
const Foam::CoeffField<Type> Foam::CoeffField<Type>::zero(0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View file

@ -122,6 +122,19 @@ public:
static const char* const typeName;
//- Empty field
static const CoeffField<Type> zero;
// Static Member Functions
//- Return a null field
inline static const CoeffField<Type>& null()
{
return zero;
}
// Constructors
@ -138,12 +151,8 @@ public:
tmp<CoeffField<Type> > clone() const;
// Destructor
~CoeffField();
//- Clear data
void clear();
//- Destructor
~CoeffField();
// Member functions
@ -163,6 +172,9 @@ public:
//- Return the field transpose
tmp<CoeffField<Type> > transpose() const;
//- Clear data
void clear();
// Return as typed. Fails when asked for the incorrect type