38 #include <HashTable.H>
40 #include "emptyFvPatch.H"
41 #include "coupledFvPatch.H"
42 #include "wedgeFvPatch.H"
43 #include "symmetryFvPatch.H"
44 #include "symmetryPlaneFvPatch.H"
54 surfaceScalarField sF = linearInterpolate(iF);
58 Foam::tmp<Foam::surfaceVectorField>
62 tmp<surfaceVectorField> tgradIF(0.0*
nf_*fvc::snGrad(iF));
63 surfaceVectorField& gradIF = tgradIF.ref();
65 surfaceScalarField tField = sF*0;
67 faceScalarDer(iF.primitiveField(),sF.primitiveField(),0,tField);
68 gradIF.primitiveFieldRef().replace(0, tField);
69 faceScalarDer(iF.primitiveField(),sF.primitiveField(),1,tField);
70 gradIF.primitiveFieldRef().replace(1, tField);
71 faceScalarDer(iF.primitiveField(),sF.primitiveField(),2,tField);
72 gradIF.primitiveFieldRef().replace(2, tField);
77 bool notConstrain =
true;
78 const fvPatch& fvp =
mesh_.boundary()[ipatch];
81 isA<emptyFvPatch>(fvp) ||
82 isA<wedgeFvPatch>(fvp) ||
83 isA<coupledFvPatch>(fvp) ||
84 isA<symmetryFvPatch>(fvp) ||
85 isA<symmetryPlaneFvPatch>(fvp)
93 gradIF.boundaryFieldRef()[ipatch] =
94 nf_.boundaryField()[ipatch] *
95 iF.boundaryField()[ipatch].snGrad();
99 if(!Pstream::parRun())
112 List3<scalar> procVfValues(nProcPatches_);
115 faceScalarDer(procVfValues,sF,0,tField);
116 gradIF.boundaryFieldRef().replace(0, tField.boundaryFieldRef());
117 faceScalarDer(procVfValues,sF,1,tField);
118 gradIF.boundaryFieldRef().replace(1, tField.boundaryFieldRef());
119 faceScalarDer(procVfValues,sF,2,tField);
120 gradIF.boundaryFieldRef().replace(2, tField.boundaryFieldRef());
tmp< surfaceVectorField > Grad(const volScalarField &iF)
Calculate gradient of volume scalar function on the faces.