pimpleDyMFoam: Store Uf as an autoPtr for better error handling
This commit is contained in:
@ -212,12 +212,12 @@ ddtCorr
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>& phi,
|
||||
const GeometricField<Type, fvsPatchField, surfaceMesh>& Uf
|
||||
const autoPtr<GeometricField<Type, fvsPatchField, surfaceMesh>>& Uf
|
||||
)
|
||||
{
|
||||
if (U.mesh().changing())
|
||||
{
|
||||
return ddtCorr(U, Uf);
|
||||
return ddtCorr(U, Uf());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -173,7 +173,7 @@ namespace fvc
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>& phi,
|
||||
const GeometricField<Type, fvsPatchField, surfaceMesh>& Uf
|
||||
const autoPtr<GeometricField<Type, fvsPatchField, surfaceMesh>>& Uf
|
||||
);
|
||||
|
||||
template<class Type>
|
||||
|
||||
@ -221,7 +221,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::absolute
|
||||
|
||||
void Foam::fvc::correctUf
|
||||
(
|
||||
surfaceVectorField& Uf,
|
||||
autoPtr<surfaceVectorField>& Uf,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
@ -230,9 +230,9 @@ void Foam::fvc::correctUf
|
||||
|
||||
if (phi.mesh().changing())
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
Uf() = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
Uf() += n*(phi/mesh.magSf() - (n & Uf()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ namespace fvc
|
||||
|
||||
void correctUf
|
||||
(
|
||||
surfaceVectorField& Uf,
|
||||
autoPtr<surfaceVectorField>& Uf,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user