40 const DimensionedField<Type, volMesh>& iF
43 transformFvPatchField<Type>(p, iF),
45 valueFraction_(p.size(), 1.0)
50 mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
52 const mixedFixedValueSlipFvPatchField<Type>& ptf,
54 const DimensionedField<Type, volMesh>& iF,
55 const fvPatchFieldMapper& mapper
58 transformFvPatchField<Type>(ptf, p, iF, mapper),
59 refValue_(ptf.refValue_, mapper),
60 valueFraction_(ptf.valueFraction_, mapper)
65 mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
68 const DimensionedField<Type, volMesh>& iF,
69 const dictionary& dict
72 transformFvPatchField<Type>(p, iF),
73 refValue_(
"refValue", dict, p.size()),
74 valueFraction_(
"valueFraction", dict, p.size())
79 mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
81 const mixedFixedValueSlipFvPatchField<Type>& ptf
84 transformFvPatchField<Type>(ptf),
85 refValue_(ptf.refValue_),
86 valueFraction_(ptf.valueFraction_)
90 mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
92 const mixedFixedValueSlipFvPatchField<Type>& ptf,
93 const DimensionedField<Type, volMesh>& iF
96 transformFvPatchField<Type>(ptf, iF),
97 refValue_(ptf.refValue_),
98 valueFraction_(ptf.valueFraction_)
105 void mixedFixedValueSlipFvPatchField<Type>::autoMap
107 const fvPatchFieldMapper& m
110 Field<Type>::autoMap(m);
111 refValue_.autoMap(m);
112 valueFraction_.autoMap(m);
118 void mixedFixedValueSlipFvPatchField<Type>::rmap
120 const fvPatchField<Type>& ptf,
124 transformFvPatchField<Type>::rmap(ptf, addr);
126 const mixedFixedValueSlipFvPatchField<Type>& dmptf =
127 refCast<const mixedFixedValueSlipFvPatchField<Type> >(ptf);
129 refValue_.rmap(dmptf.refValue_, addr);
130 valueFraction_.rmap(dmptf.valueFraction_, addr);
139 Field<Type> pif = this->patchInternalField();
143 valueFraction_*refValue_
145 )*this->patch().deltaCoeffs();
151 void mixedFixedValueSlipFvPatchField<Type>::evaluate(
const Pstream::commsTypes)
153 if (!this->updated())
155 this->updateCoeffs();
160 Field<Type>::operator=
162 valueFraction_*refValue_
164 (1.0 - valueFraction_)
165 *
transform(
I - nHat*nHat, this->patchInternalField())
168 transformFvPatchField<Type>::evaluate();
174 tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag()
const
179 diag.replace(vector::X,
mag(nHat.component(vector::X)));
181 diag.replace(vector::Z,
mag(nHat.component(vector::Z)));
184 valueFraction_*Type(pTraits<Type>::one)
185 + (1.0 - valueFraction_)*transformFieldMask<Type>(
pow<
vector, pTraits<Type>::rank>(
diag));
191 void mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os)
const
193 transformFvPatchField<Type>::write(os);
194 refValue_.writeEntry(
"refValue", os);
195 valueFraction_.writeEntry(
"valueFraction", os);