mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: finiteArea: corrected reference access to tmps
This commit is contained in:
committed by
Andrew Heather
parent
50d1ac15ef
commit
9ac1fa417b
@ -53,7 +53,7 @@ ddt
|
||||
(
|
||||
mesh,
|
||||
mesh.schemesDict().ddtScheme("ddt(" + dt.name() + ')')
|
||||
)().facDdt(dt);
|
||||
).ref().facDdt(dt);
|
||||
}
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ ddt
|
||||
(
|
||||
vf.mesh(),
|
||||
vf.mesh().schemesDict().ddtScheme("ddt(" + vf.name() + ')')
|
||||
)().facDdt(vf);
|
||||
).ref().facDdt(vf);
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ ddt
|
||||
(
|
||||
"ddt(" + rho.name() + ',' + vf.name() + ')'
|
||||
)
|
||||
)().facDdt(rho, vf);
|
||||
).ref().facDdt(rho, vf);
|
||||
}
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ ddt
|
||||
(
|
||||
"ddt(" + rho.name() + ',' + vf.name() + ')'
|
||||
)
|
||||
)().facDdt(rho, vf);
|
||||
).ref().facDdt(rho, vf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -108,14 +108,14 @@ div
|
||||
fa::divScheme<Type>::New
|
||||
(
|
||||
vf.mesh(), vf.mesh().schemesDict().divScheme(name)
|
||||
)().facDiv(vf)
|
||||
).ref().facDiv(vf)
|
||||
);
|
||||
GeometricField
|
||||
<
|
||||
typename innerProduct<vector, Type>::type,
|
||||
faPatchField,
|
||||
areaMesh
|
||||
>& Div = tDiv();
|
||||
>& Div = tDiv.ref();
|
||||
|
||||
Div.primitiveFieldRef() =
|
||||
transform(tensor::I - sqr(n), Div.internalField());
|
||||
@ -208,9 +208,9 @@ div
|
||||
vf.mesh(),
|
||||
flux,
|
||||
vf.mesh().schemesDict().divScheme(name)
|
||||
)().facDiv(flux, vf)
|
||||
).ref().facDiv(flux, vf)
|
||||
);
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv();
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv.ref();
|
||||
|
||||
Div.internalField() = transform(tensor::I - sqr(n), Div.internalField());
|
||||
Div.correctBoundaryConditions();
|
||||
|
||||
@ -63,7 +63,7 @@ grad
|
||||
tmp<GeometricField<GradType, faPatchField, areaMesh>> tgGrad =
|
||||
fac::edgeIntegrate(ssf.mesh().Sf()*ssf);
|
||||
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad();
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref();
|
||||
|
||||
gGrad -= n*(n & gGrad);
|
||||
gGrad.correctBoundaryConditions();
|
||||
@ -116,7 +116,7 @@ grad
|
||||
(
|
||||
vf.mesh(),
|
||||
vf.mesh().schemesDict().gradScheme(name)
|
||||
)().grad(vf);
|
||||
).ref().grad(vf);
|
||||
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref();
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ lnGrad
|
||||
(
|
||||
vf.mesh(),
|
||||
vf.mesh().schemesDict().lnGradScheme(name)
|
||||
)().lnGrad(vf);
|
||||
).ref().lnGrad(vf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,9 +53,11 @@ ndiv
|
||||
{
|
||||
const areaVectorField& n = ssf.mesh().faceAreaNormals();
|
||||
|
||||
tmp<GeometricField<Type, faPatchField, areaMesh>> v =
|
||||
tmp<GeometricField<Type, faPatchField, areaMesh>> tv =
|
||||
fac::edgeIntegrate(ssf);
|
||||
|
||||
GeometricField<Type, faPatchField, areaMesh>& v = tv.ref();
|
||||
|
||||
v.internalField() = n*(n & v.internalField());
|
||||
v.correctBoundaryConditions();
|
||||
|
||||
@ -97,9 +99,9 @@ ndiv
|
||||
fa::divScheme<Type>::New
|
||||
(
|
||||
vf.mesh(), vf.mesh().schemesDict().divScheme(name)
|
||||
)().facDiv(vf)
|
||||
).ref().facDiv(vf)
|
||||
);
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv();
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv.ref();
|
||||
|
||||
Div.internalField() = n*(n & Div.internalField());
|
||||
Div.correctBoundaryConditions();
|
||||
@ -191,10 +193,10 @@ ndiv
|
||||
vf.mesh(),
|
||||
flux,
|
||||
vf.mesh().schemesDict().divScheme(name)
|
||||
)().facDiv(flux, vf)
|
||||
).ref().facDiv(flux, vf)
|
||||
);
|
||||
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv();
|
||||
GeometricField<Type, faPatchField, areaMesh>& Div = tDiv.ref();
|
||||
|
||||
Div.internalField() = n*(n &Div.internalField());
|
||||
Div.correctBoundaryConditions();
|
||||
|
||||
@ -64,7 +64,7 @@ ngrad
|
||||
tmp<GeometricField<GradType, faPatchField, areaMesh>> tgGrad =
|
||||
fac::edgeIntegrate(ssf.mesh().Sf()*ssf);
|
||||
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad();
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref();
|
||||
|
||||
gGrad = n*(n & gGrad);
|
||||
gGrad.correctBoundaryConditions();
|
||||
@ -119,9 +119,9 @@ ngrad
|
||||
(
|
||||
vf.mesh(),
|
||||
vf.mesh().schemesDict().gradScheme(name)
|
||||
)().grad(vf);
|
||||
).ref().grad(vf);
|
||||
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad();
|
||||
GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref();
|
||||
|
||||
gGrad = n*(n & gGrad);
|
||||
gGrad.correctBoundaryConditions();
|
||||
|
||||
@ -56,9 +56,10 @@ ndiv
|
||||
vf.mesh(),
|
||||
flux,
|
||||
vf.mesh().schemesDict().divScheme(name)
|
||||
)().famDiv(flux, vf);//TODO calculate normal
|
||||
).ref().famDiv(flux, vf);//TODO calculate normal
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>>
|
||||
ndiv
|
||||
@ -86,6 +87,7 @@ ndiv
|
||||
return fam::ndiv(flux, vf, "div("+flux.name()+','+vf.name()+')');
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<faMatrix<Type>>
|
||||
ndiv
|
||||
|
||||
@ -56,7 +56,7 @@ div
|
||||
vf.mesh(),
|
||||
flux,
|
||||
vf.mesh().schemesDict().divScheme(name)
|
||||
)().famDiv(flux, vf);
|
||||
).ref().famDiv(flux, vf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface
|
||||
pTraits<Type>::zero
|
||||
)
|
||||
);
|
||||
Field<Type>& result = tresult();
|
||||
Field<Type>& result = tresult.ref();
|
||||
|
||||
// Get reference to volume mesh
|
||||
const polyMesh& pMesh = mesh_();
|
||||
|
||||
Reference in New Issue
Block a user