33 template<
typename Type>
34 Type Foam::isoAdvection::faceValue
36 const GeometricField<Type, fvsPatchField, surfaceMesh>&
f,
42 return f.primitiveField()[facei];
51 if (patchi < 0 || patchi >= pbm.size())
54 <<
"Cannot find patch for face " << facei
59 const polyPatch& pp = pbm[patchi];
60 if (isA<emptyPolyPatch>(pp) || pp.empty())
62 return pTraits<Type>::zero;
65 const label patchFacei = pp.whichFace(facei);
66 return f.boundaryField()[patchi][patchFacei];
71 template<
typename Type>
72 void Foam::isoAdvection::setFaceValue
74 GeometricField<Type, fvsPatchField, surfaceMesh>&
f,
79 if (mesh_.isInternalFace(facei))
81 f.primitiveFieldRef()[facei] = value;
85 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
88 const label patchi = pbm.patchID()[facei - mesh_.nInternalFaces()];
90 if (patchi < 0 || patchi >= pbm.size())
93 <<
"Cannot find patch for face " << facei
98 const polyPatch& pp = pbm[patchi];
99 if (isA<emptyPolyPatch>(pp) || pp.empty())
104 const label patchFacei = pp.whichFace(facei);
106 f.boundaryFieldRef()[patchi][patchFacei] = value;