CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem on multiple processors..works fine on single processor!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2009, 19:35
Default Printing the gradient value on a particular patch
  #1
Senior Member
 
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17
skabilan is on a distinguished road
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

Last edited by skabilan; December 4, 2009 at 02:36.
skabilan is offline   Reply With Quote

Old   December 5, 2009, 05:16
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
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.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   December 5, 2009, 13:19
Default
  #3
Senior Member
 
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17
skabilan is on a distinguished road
Hi Laurence,

Thanks a lot for the reply. I think the easiest way is to use pout instead of Info...

Regards,
Senthil
skabilan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Problem of Multiple Fluids Mehul CFX 1 June 3, 2008 10:31
problem with starting pre-post processors Ivan CFX 3 October 24, 2005 08:03
Multiple inlets problem Jeff Main CFD Forum 2 August 17, 2005 11:48
UDF problem on single computer with two procesor Dmitry FLUENT 3 May 18, 2005 13:44


All times are GMT -4. The time now is 01:15.