mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: ensight output failing with dimensioned field (fixes #244)
- The new field needs initialization with a dimensioned<Type> not just the dimensionSet. - The new field was also incorrectly being registered, which could cause issues later.
This commit is contained in:
@ -81,7 +81,9 @@ volField
|
||||
// Construct volField (with zeroGradient) from dimensioned field
|
||||
|
||||
IOobject io(df);
|
||||
io.readOpt() = IOobject::NO_READ;
|
||||
io.readOpt() = IOobject::NO_READ;
|
||||
io.writeOpt() = IOobject::NO_WRITE;
|
||||
io.registerObject() = false;
|
||||
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> tvf
|
||||
(
|
||||
@ -89,16 +91,17 @@ volField
|
||||
(
|
||||
io,
|
||||
df.mesh(),
|
||||
df.dimensions(),
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
dimensioned<Type>("0", df.dimensions(), Zero),
|
||||
zeroGradientFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
tvf.ref().internalField() = df;
|
||||
tvf.ref().correctBoundaryConditions();
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||
|
||||
if (meshSubsetter.hasSubMesh())
|
||||
{
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh>> tfld
|
||||
(
|
||||
meshSubsetter.interpolate(vf)
|
||||
|
||||
Reference in New Issue
Block a user