74 map(mapF, mapAddressing);
86 map(tmapF, mapAddressing);
100 map(mapF, mapAddressing, mapWeights);
113 map(tmapF, mapAddressing, mapWeights);
186 #ifdef ConstructFromTmp
217 token firstToken(is);
226 else if (firstToken.
wordToken() ==
"nonuniform")
229 if (this->size() != s)
234 "(const word& keyword, const dictionary&, const label)",
236 ) <<
"size " << this->size()
237 <<
" is not equal to the given value of " << s
246 "(const word& keyword, const dictionary&, const label)",
248 ) <<
"expected keyword 'uniform' or 'nonuniform', found "
260 "(const word& keyword, const dictionary&, const label)",
262 ) <<
"expected keyword 'uniform' or 'nonuniform', "
263 "assuming deprecated Field format from "
264 "Foam version 2.0." <<
endl;
276 "(const word& keyword, const dictionary&, const label)",
278 ) <<
"expected keyword 'uniform' or 'nonuniform', found "
305 if (f.
size() != mapAddressing.
size())
314 label mapI = mapAddressing[i];
332 map(tmapF(), mapAddressing);
347 if (f.
size() != mapAddressing.
size())
352 if (mapWeights.
size() != mapAddressing.
size())
356 "void Field<Type>::map\n"
358 " const UList<Type>& mapF,\n"
359 " const labelListList& mapAddressing,\n"
360 " const scalarListList& mapWeights\n"
362 ) <<
"Weights and addressing map have different sizes. Weights size: "
363 << mapWeights.
size() <<
" map size: " << mapAddressing.
size()
369 const labelList& localAddrs = mapAddressing[i];
370 const scalarList& localWeights = mapWeights[i];
376 f[i] += localWeights[j]*mapF[localAddrs[j]];
389 map(tmapF(), mapAddressing, mapWeights);
423 map(tmapF(), mapper);
465 label mapI = mapAddressing[i];
481 rmap(tmapF(), mapAddressing);
500 f[mapAddressing[i]] += mapF[i]*mapWeights[i];
512 rmap(tmapF(), mapAddressing, mapWeights);
588 if (this->size() && contiguous<Type>())
594 if (this->
operator[](i) != this->
operator[](0))
624 FatalErrorIn(
"Field<Type>::operator=(const Field<Type>&)")
625 <<
"attempted assignment to self"
650 if (
this == &(rhs()))
652 FatalErrorIn(
"Field<Type>::operator=(const tmp<Field>&)")
653 <<
"attempted assignment to self"
672 template<
class Form,
class Cmpt,
int nCmpt>
680 #define COMPUTED_ASSIGNMENT(TYPE, op) \
682 template<class Type> \
683 void Field<Type>::operator op(const UList<TYPE>& f) \
685 TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f) \
688 template<class Type> \
689 void Field<Type>::operator op(const tmp<Field<TYPE> >& tf) \
695 template<class Type> \
696 void Field<Type>::operator op(const TYPE& t) \
698 TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t) \
706 #undef COMPUTED_ASSIGNMENT
712 Ostream& operator<<(Ostream& os, const Field<Type>&
f)
714 os << static_cast<const List<Type>&>(
f);
720 Ostream& operator<<(Ostream& os, const tmp<Field<Type> >&
tf)