how to change boundaryType in volScalarField
Hi All,
In constructor of GeometricField class we have Code:
GeometricField ( const IOobject & io, How can I define GeometricField with zeroGradient patchFieldType?? |
Hi,
You can use just "zeroGradient" string or zeroGradientFvPatchField<Type>::typeName if you would like to be sure your modification survives rename of zeroGradient. |
Quote:
It tells me that zeroGradient was not declared in this scope... |
Hi,
To use zeroGradientFvPatchField you have to include zeroGradientFvPatchFields.H. If you do not want to bother, use string "zeroGradient". |
Hi Alexeym,
I added zeroGradientFvPatchFields.H but it still tells that zeroGradient was not declared in this scope. My code is (in constructor) Code:
A |
Hi,
You could try to use more conventional C++ syntax (first one uses string, second uses static field): Code:
A Code:
A |
Now it works :)
Thank you so much Alexeym. |
All times are GMT -4. The time now is 18:45. |