Field: Added construction from and assignment to zero
This commit is contained in:
parent
042a9d96fd
commit
6f70b18bd2
2 changed files with 9 additions and 1 deletions
|
|
@ -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>&);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue