Field: Added zero() constructor
This commit is contained in:
@ -57,6 +57,13 @@ Foam::Field<Type>::Field(const label size, const Type& t)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::Field<Type>::Field(const label size, const zero)
|
||||
:
|
||||
List<Type>(size, pTraits<Type>::zero)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::Field<Type>::Field
|
||||
(
|
||||
|
||||
@ -117,6 +117,9 @@ public:
|
||||
//- Construct given size and initial value
|
||||
Field(const label, const Type&);
|
||||
|
||||
//- Construct given size and initialed to zero
|
||||
Field(const label, const zero);
|
||||
|
||||
//- Construct as copy of a UList\<Type\>
|
||||
explicit Field(const UList<Type>&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user