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