FieldField.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef FieldField_H
00037 #define FieldField_H
00038
00039 #include "tmp.H"
00040 #include "PtrList.H"
00041 #include "scalar.H"
00042 #include "direction.H"
00043 #include "VectorSpace.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051
00052 template<template<class> class Field, class Type>
00053 class FieldField;
00054
00055 template<template<class> class Field, class Type>
00056 Ostream& operator<<
00057 (
00058 Ostream&,
00059 const FieldField<Field, Type>&
00060 );
00061
00062 template<template<class> class Field, class Type>
00063 Ostream& operator<<
00064 (
00065 Ostream&,
00066 const tmp<FieldField<Field, Type> >&
00067 );
00068
00069
00070
00071
00072
00073
00074 template<template<class> class Field, class Type>
00075 class FieldField
00076 :
00077 public refCount,
00078 public PtrList<Field<Type> >
00079 {
00080
00081 public:
00082
00083
00084 typedef typename pTraits<Type>::cmptType cmptType;
00085
00086
00087
00088
00089
00090
00091 FieldField();
00092
00093
00094
00095 explicit FieldField(const label);
00096
00097
00098
00099
00100 FieldField(const word&, const FieldField<Field, Type>&);
00101
00102
00103 FieldField(const FieldField<Field, Type>&);
00104
00105
00106 FieldField(FieldField<Field, Type>&, bool reUse);
00107
00108
00109 FieldField(const PtrList<Field<Type> >&);
00110
00111
00112 # ifdef ConstructFromTmp
00113 FieldField(const tmp<FieldField<Field, Type> >&);
00114 # endif
00115
00116
00117 FieldField(Istream&);
00118
00119
00120 tmp<FieldField<Field, Type> > clone() const;
00121
00122
00123
00124 template<class Type2>
00125 static tmp<FieldField<Field, Type> > NewCalculatedType
00126 (
00127 const FieldField<Field, Type2>& ff
00128 )
00129 # ifdef __INTEL_COMPILER
00130 {
00131 FieldField<Field, Type>* nffPtr
00132 (
00133 new FieldField<Field, Type>(ff.size())
00134 );
00135
00136 forAll(*nffPtr, i)
00137 {
00138 nffPtr->set(i, Field<Type>::NewCalculatedType(ff[i]).ptr());
00139 }
00140
00141 return tmp<FieldField<Field, Type> >(nffPtr);
00142 }
00143 # else
00144 ;
00145 # endif
00146
00147
00148
00149
00150 void negate();
00151
00152
00153 tmp<FieldField<Field, cmptType> > component(const direction) const;
00154
00155
00156 void replace(const direction, const FieldField<Field, cmptType>&);
00157
00158
00159 void replace(const direction, const cmptType&);
00160
00161
00162 tmp<FieldField<Field, Type> > T() const;
00163
00164
00165
00166
00167 void operator=(const FieldField<Field, Type>&);
00168 void operator=(const tmp<FieldField<Field, Type> >&);
00169 void operator=(const Type&);
00170
00171 void operator+=(const FieldField<Field, Type>&);
00172 void operator+=(const tmp<FieldField<Field, Type> >&);
00173
00174 void operator-=(const FieldField<Field, Type>&);
00175 void operator-=(const tmp<FieldField<Field, Type> >&);
00176
00177 void operator*=(const FieldField<Field, scalar>&);
00178 void operator*=(const tmp<FieldField<Field, scalar> >&);
00179
00180 void operator/=(const FieldField<Field, scalar>&);
00181 void operator/=(const tmp<FieldField<Field, scalar> >&);
00182
00183 void operator+=(const Type&);
00184 void operator-=(const Type&);
00185
00186 void operator*=(const scalar&);
00187 void operator/=(const scalar&);
00188
00189
00190
00191
00192 friend Ostream& operator<< <Field, Type>
00193 (
00194 Ostream&,
00195 const FieldField<Field, Type>&
00196 );
00197
00198 friend Ostream& operator<< <Field, Type>
00199 (
00200 Ostream&,
00201 const tmp<FieldField<Field, Type> >&
00202 );
00203 };
00204
00205
00206
00207
00208 }
00209
00210
00211
00212 #include "FieldFieldFunctions.H"
00213
00214 #ifdef NoRepository
00215 # include "FieldField.C"
00216 #endif
00217
00218
00219
00220 #endif
00221
00222
Copyright © 2000-2009 OpenCFD Ltd