Added zero CoeffField
This commit is contained in:
parent
9fca371a48
commit
0e04d88628
2 changed files with 22 additions and 6 deletions
|
@ -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 * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue