35 #include "volFields.H"
36 #include "surfaceFields.H"
37 #include "prismMatcher.H"
43 word
fvscOpName(
const Foam::fvMesh& mesh, Foam::word termName);
51 if (mesh.schemesDict().subDict(
"fvsc").found(termName))
53 mesh.schemesDict().subDict(
"fvsc").lookup(termName) >> opname;
57 mesh.schemesDict().subDict(
"fvsc").lookup(
"default") >> opname;
60 if (((opname ==
"leastSquares") or (opname ==
"leastSquaresOpt")) and (mesh.nGeometricD() == 3))
62 FatalErrorIn(
"Foam::fvsc::fvscOpName") <<
"Can't use leastSquares or leastSquaresOpt in 3D case." << nl << exit(FatalError);
65 if (opname ==
"GaussVolPoint")
67 const labelList wedgeBC = mesh.boundaryMesh().findIndices(
"wedge",
true);
68 if (wedgeBC.size() > 0)
71 forAll (mesh.cells(), cellI)
73 if (prism.isA(mesh, cellI))
76 <<
"GaussVolPoint scheme does not support solving axisymmetric cases with wedge BC and prism cells." << endl
77 <<
"Try to set leastSquares scheme."
87 Foam::tmp<Foam::surfaceVectorField>
90 word tname =
"grad(" + vf.name() +
")";
92 fvscStencil& Stencil = fvscStencil::lookupOrNew
98 tmp<surfaceVectorField> tGrad(Stencil.Grad(vf));
103 Foam::tmp<Foam::surfaceVectorField>
109 Foam::tmp<Foam::surfaceTensorField>
112 word tname =
"grad(" + vf.name() +
")";
114 fvscStencil& Stencil = fvscStencil::lookupOrNew
120 return Stencil.Grad(vf);
123 Foam::tmp<Foam::surfaceTensorField>
129 Foam::tmp<Foam::surfaceScalarField>
132 word tname =
"div(" + vf.name() +
")";
134 fvscStencil& Stencil = fvscStencil::lookupOrNew
140 return Stencil.Div(vf);
143 Foam::tmp<Foam::surfaceScalarField>
149 Foam::tmp<Foam::surfaceVectorField>
152 word tname =
"div(" + vf.name() +
")";
154 fvscStencil& Stencil = fvscStencil::lookupOrNew
160 return Stencil.Div(vf);
163 Foam::tmp<Foam::surfaceVectorField>
word fvscOpName(const Foam::fvMesh &mesh, Foam::word termName)
Methods calculating of differential operators.
tmp< surfaceScalarField > div(const volVectorField &vF)
tmp< surfaceVectorField > grad(const volScalarField &vF)