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

How to compute the integral in the parallel case

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olesen

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 18, 2020, 14:25
Default How to compute the integral in the parallel case
  #1
New Member
 
Saddam Hijazi
Join Date: May 2016
Posts: 17
Rep Power: 10
SaddamH is on a distinguished road
Hi everybody, I have a question regarding the computation of integrals using fvc::domainIntegrate.



How can I compute the value of integrals over the different domains defined by the parallel decomposition ?


For example, I run a case in parallel using 6 processors and I want to compute the following quantity, where Ufield is volVectorField for velocity.



double A =fvc::domainIntegrate(Ufield & fvc::div(linearInterpolate(Ufield) & Ufield.mesh().Sf(), Ufield)).value();


when I then print the value of A using the following command

std::cout << "A is " << A << " from " << "processor" + name(Pstream::myProcNo()) << endl;


I get always - 0.156 from processor 0 - printed six times. This means that the integral is computed only over the first decomposed part of the domain. Ideally, I should be able to sum the values of A given by the computation of the integral across the six subdomains but I am not able to figure out how to do this.


Could you help me in solving this issue ?


Thank you very much,
Saddam
SaddamH is offline   Reply With Quote

 

Tags
integral computing, parallel code, parallel computation, parallel decomposition


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
Sampling for graphs in parallel for AMI case C-L OpenFOAM Bugs 5 January 15, 2018 11:55
implementation of mapFields into parallel transient case simpomann OpenFOAM Pre-Processing 4 August 2, 2016 04:41
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
[OpenFOAM] parallel case with paraview Ingenieur ParaView 2 August 16, 2013 08:24
Run in parallel a 2mesh case cosimobianchini OpenFOAM Running, Solving & CFD 2 January 11, 2007 06:33


All times are GMT -4. The time now is 14:30.