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

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 8
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: 14
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: 8
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 17:51.