Commit 4edb771e authored by Henry Weller's avatar Henry Weller
Browse files

Field: Added construction from and assignment to zero

parent 5c93cb5c
......@@ -60,7 +60,7 @@ 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)
List<Type>(size, Zero)
{}
......@@ -707,6 +707,13 @@ void Foam::Field<Type>::operator=(const Type& t)
}
template<class Type>
void Foam::Field<Type>::operator=(const zero)
{
List<Type>::operator=(Zero);
}
template<class Type>
template<class Form, class Cmpt, Foam::direction nCmpt>
void Foam::Field<Type>::operator=(const VectorSpace<Form,Cmpt,nCmpt>& vs)
......
......@@ -347,6 +347,7 @@ public:
void operator=(const SubField<Type>&);
void operator=(const tmp<Field<Type>>&);
void operator=(const Type&);
void operator=(const zero);
template<class Form, class Cmpt, direction nCmpt>
void operator=(const VectorSpace<Form,Cmpt,nCmpt>&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment