codedFixedValue: accessing other patch causes crash in parallel
Hey foamers,
first of all, because this is about a BC, it's technically about the "Solving" portion of OF, but codedFixedValue is still code, so should this thread be moved to the OF/Programming sub-forum? Now, to the my problem: I'm working with a solver under OF2.4.0, which only uses p, not p_rgh. I want to define a pressure gradient between my inlet (left side of the mesh) and my outlet (right side of the mesh). On the outlet, I'm using a zeroGradient BC, and on the inlet I'm using codedFixedValue, which does the following:
My strong feeling is that the codedFixedValue BC of the inlet can simply not access the outlet patch anymore, because the mesh got decomposed and the outlet patch is on another processor core and in another folder. Does that sound correct? And if so, does anyone know how to solve it? Here's my code btw: Code:
type codedFixedValue; Code:
// read the caseDict file Lennart |
Ok, I have found a way, thanks to this post, which describes using Pstream and the reduce() function to make data available on all processors.
The relevant part of my code now looks like this: Code:
// get patch ID on opposite side Given the additional overhead my code introduces, it might still be the case that the workaround provides better performance. I'll edit my experiences into this post later, if I don't forget it. |
this pointers!
Hi Lennart, can you explain to me which object does each"this" pointer point to? I want to use this method but I an a little confused!
|
All times are GMT -4. The time now is 03:04. |