Printing the gradient value on a particular patch
Hi Foamers,
I would like to print the values of the gradient of T on a particular patch before changing its value...it works fine on single processor. While on multiple processors, the patch is distributed on a number of processors, how would i make it print all the values from all the processors? forAll (T.boundaryField(), patchi) { if(T.boundaryField()[patchi].type() == "fixedGradient") { fixedGradientFvPatchScalarField& bufferMesh1= refCast<fixedGradientFvPatchScalarField>(T.boundar yField()[patchi]); forAll(bufferMesh1, faceI) { Info << bufferMesh1.gradient()[faceI] << endl; // bufferMesh1.gradient()[faceI] = blah blah; } } } Can anyone help me with this problem? Thanks Senthil |
You can either gather all the data onto a single processor using 'Pstream', or you can just use 'Pout' instead of 'Info'. Pout will output your values but with the processor number at the beginning of the line. So they won't be ordered particularly well in standard output, but you can always paste them into excel and sort them.
|
Hi Laurence,
Thanks a lot for the reply. I think the easiest way is to use pout instead of Info... Regards, Senthil |
All times are GMT -4. The time now is 05:17. |