how to rename a field defined from others fields ?
Hi!
I defined a symmetric tensor field symGradU from a field U Code:
volSymmTensorField symGradU = twoSymm(fvc::grad(U)); Code:
Info << "Field symGradU name = " << symGradU.name() << endl; Field symGradU name = twoSymm(grad(U)) I want to change this name ("symGradU"), in particular to write the output correctly. I tried Code:
symGradU.name() = "symGradU" ; Do you know a simple manner to rename a field ?? Regards, Cyp |
You can do it during construction, (though it must be possible to do it afterwards too...). From GeometricField.H:
Code:
//- Construct as copy resetting IO parameters Code:
volSymmTensorField symGradU |
Thank you very much ! It is exactly what I was looking for !
|
All times are GMT -4. The time now is 06:16. |