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 #ifndef ValueStoredPointPatchField_H
00036 #define ValueStoredPointPatchField_H
00037
00038 #include "PointPatchField.H"
00039
00040
00041
00042 namespace Foam
00043 {
00044
00045
00046
00047
00048
00049 template<template<class> class PatchField, class PointPatch, class Type>
00050 class ValueStoredPointPatchField
00051 :
00052 public PatchField<Type>,
00053 public Field<Type>
00054 {
00055
00056
00057 void checkFieldSize() const;
00058
00059
00060 public:
00061
00062
00063 TypeName("valueStored");
00064
00065
00066
00067
00068
00069 ValueStoredPointPatchField
00070 (
00071 const PointPatch&,
00072 const Field<Type>&
00073 );
00074
00075
00076 ValueStoredPointPatchField
00077 (
00078 const PointPatch&,
00079 const Field<Type>&,
00080 const Field<Type>&
00081 );
00082
00083
00084 ValueStoredPointPatchField
00085 (
00086 const PointPatch&,
00087 const Field<Type>&,
00088 const dictionary&
00089 );
00090
00091
00092 ValueStoredPointPatchField
00093 (
00094 const ValueStoredPointPatchField<PatchField, PointPatch, Type>&,
00095 const PointPatch&,
00096 const Field<Type>&,
00097 const PointPatchFieldMapper&
00098 );
00099
00100
00101 virtual autoPtr<PatchField<Type> > clone() const
00102 {
00103 return autoPtr<PatchField<Type> >
00104 (
00105 new ValueStoredPointPatchField<PatchField, PointPatch, Type>
00106 (
00107 *this
00108 )
00109 );
00110 }
00111
00112
00113 ValueStoredPointPatchField
00114 (
00115 const ValueStoredPointPatchField<PatchField, PointPatch, Type>&,
00116 const Field<Type>&
00117 );
00118
00119
00120 virtual autoPtr<PatchField<Type> > clone(const Field<Type>& iF) const
00121 {
00122 return autoPtr<PatchField<Type> >
00123 (
00124 new ValueStoredPointPatchField<PatchField, PointPatch, Type>
00125 (
00126 *this,
00127 iF
00128 )
00129 );
00130 }
00131
00132
00133
00134
00135
00136
00137
00138 label size() const
00139 {
00140 return Field<Type>::size();
00141 }
00142
00143
00144
00145
00146 virtual void autoMap
00147 (
00148 const PointPatchFieldMapper&
00149 );
00150
00151
00152
00153 virtual void rmap
00154 (
00155 const PointPatchField<PatchField, PointPatch, Type>&,
00156 const labelList&
00157 );
00158
00159
00160
00161
00162
00163 virtual bool storesFieldData() const
00164 {
00165 return true;
00166 }
00167
00168
00169 virtual void initEvaluate(const bool=false)
00170 {}
00171
00172 virtual void evaluate();
00173
00174
00175 virtual void updateBoundaryField()
00176 {}
00177
00178
00179
00180 virtual void write(Ostream&) const;
00181
00182
00183
00184
00185
00186 virtual void operator=
00187 (
00188 const ValueStoredPointPatchField<PatchField, PointPatch, Type>&
00189 );
00190
00191 virtual void operator=(const Field<Type>&);
00192 virtual void operator=(const Type&);
00193
00194
00195
00196 virtual void operator==
00197 (
00198 const ValueStoredPointPatchField<PatchField, PointPatch, Type>&
00199 );
00200
00201 virtual void operator==(const Field<Type>&);
00202 virtual void operator==(const Type&);
00203
00204 };
00205
00206
00207
00208
00209
00210 template<template<class> class PatchField, class PointPatch, class Type>
00211 tmp<Field<Type> > operator+
00212 (
00213 const ValueStoredPointPatchField<PatchField, PointPatch, Type>& vsppf,
00214 const Type& t
00215 )
00216 {
00217 return static_cast<const Field<Type>&>(vsppf) + t;
00218 }
00219
00220
00221
00222
00223 }
00224
00225
00226
00227 #ifdef NoRepository
00228 # include "ValueStoredPointPatchField.C"
00229 #endif
00230
00231
00232
00233 #endif
00234
00235