DynamicField.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 DynamicField_H
00037 #define DynamicField_H
00038
00039 #include "Field.H"
00040
00041
00042
00043 namespace Foam
00044 {
00045
00046
00047
00048 template<class Type>
00049 class DynamicField;
00050
00051 template<class Type>
00052 Ostream& operator<<(Ostream&, const DynamicField<Type>&);
00053
00054 template<class Type>
00055 Ostream& operator<<(Ostream&, const tmp<DynamicField<Type> >&);
00056
00057 template<class Type>
00058 Istream& operator>>(Istream&, DynamicField<Type>&);
00059
00060
00061
00062
00063
00064
00065 template<class Type>
00066 class DynamicField
00067 :
00068 public Field<Type>
00069 {
00070
00071
00072
00073
00074 label capacity_;
00075
00076
00077
00078 DynamicField(const label, const Type&);
00079
00080
00081 # ifdef ConstructFromTmp
00082 DynamicField(const tmp<DynamicField<Type> >&);
00083 # endif
00084
00085
00086 DynamicField(const word&, const dictionary&, const label);
00087
00088 public:
00089
00090
00091
00092 static const char* const typeName;
00093
00094
00095
00096
00097
00098 inline static const DynamicField<Type>& null()
00099 {
00100 return *reinterpret_cast< DynamicField<Type>* >(0);
00101 }
00102
00103
00104
00105
00106
00107
00108 DynamicField();
00109
00110
00111
00112 explicit inline DynamicField(const label);
00113
00114
00115 explicit inline DynamicField(const UList<Type>&);
00116
00117
00118 explicit inline DynamicField(const Xfer<List<Type> >&);
00119
00120
00121 inline DynamicField
00122 (
00123 const UList<Type>& mapF,
00124 const labelList& mapAddressing
00125 );
00126
00127
00128 inline DynamicField
00129 (
00130 const UList<Type>& mapF,
00131 const labelListList& mapAddressing,
00132 const scalarListList& weights
00133 );
00134
00135
00136 inline DynamicField
00137 (
00138 const UList<Type>& mapF,
00139 const FieldMapper& map
00140 );
00141
00142
00143 inline DynamicField(const DynamicField<Type>&);
00144
00145
00146 inline DynamicField(DynamicField<Type>&, bool reUse);
00147
00148
00149 inline DynamicField(const Xfer<DynamicField<Type> >&);
00150
00151
00152 inline DynamicField(Istream&);
00153
00154
00155 tmp<DynamicField<Type> > clone() const;
00156
00157
00158
00159
00160
00161 inline label capacity() const;
00162
00163
00164 inline void append(const Type&);
00165
00166
00167
00168
00169
00170 void setSize(const label nElem);
00171
00172
00173
00174 inline void operator=(const DynamicField<Type>&);
00175 inline void operator=(const UList<Type>&);
00176 inline void operator=(const tmp<DynamicField<Type> >&);
00177
00178
00179 inline Type& operator[](const label i);
00180
00181
00182 inline const Type& operator[](const label) const;
00183
00184
00185
00186 friend Ostream& operator<< <Type>
00187 (Ostream&, const DynamicField<Type>&);
00188
00189 friend Ostream& operator<< <Type>
00190 (Ostream&, const tmp<DynamicField<Type> >&);
00191
00192 friend Istream& operator>> <Type>
00193 (Istream&, DynamicField<Type>&);
00194 };
00195
00196
00197
00198
00199 }
00200
00201
00202
00203 #include "DynamicFieldI.H"
00204
00205
00206
00207 #ifdef NoRepository
00208 # include "DynamicField.C"
00209 #endif
00210
00211
00212
00213 #endif
00214
00215
Copyright © 2000-2009 OpenCFD Ltd