CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM

Individually access of a dictonary for any decomposed processor - Parallel computing

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 1, 2012, 06:40
Default Individually access of a dictonary for any decomposed processor - Parallel computing
  #1
Senior Member
 
Join Date: Oct 2009
Posts: 136
Rep Power: 7
Peter_600 is on a distinguished road
Hi,

I would like to run a case in parallel and to execute specific tasks on different processors.
To achieve this I like to control the behavior within a script which is stored, let s say inside the constant folder for any particular processor?

Any ideas?


Peter
Peter_600 is offline   Reply With Quote

Old   October 1, 2012, 09:32
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
What should this script do exactly? Is it to be called every iteration, time step? Maybe there is a different way to achieve what you want...
Bernhard is offline   Reply With Quote

Old   October 2, 2012, 11:40
Default
  #3
Senior Member
 
Join Date: Oct 2009
Posts: 136
Rep Power: 7
Peter_600 is on a distinguished road
Actually I want to use the attachDetach topochanger in parallel.
I ve figured out that it crashes because some processors don t contain the physical attach/detach faces. Thus, I would like to skip the attach/detach function for those processors.

Therefore, I like to have in any processor folder a file which allows to switch on or off the attach/detach function, assuming weither there is a detach/attach boundary or not.

I know I have to change the source code, but I want to give a try.

I can create within my solver moveDynamicMesh in the beginning a file like

Quote:
// Read dictionary for attach Detach Switch

Pout << "Read Dictionary attachDetachSwitch" << nl;

IOdictionary attachDetachSwitch
(
IOobject
(
"attachDetachSwitch",
time().constant(),
//mesh,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

word attachSwitchState;

attachSwitchState = word(attachDetachSwitch.lookup("attachDetachSwitch "));

Pout << "Attach Detach State: " << attachSwitchState << nl;
Now I would like to use the object attachSwitchState in different classes. Like in
attachDetachFvMeshAttach.C
attachDetach.C.
to perform some if statements.

I don t know how I can pass this object which contain either" false or true " to any of this classes. Is it possible? Or am I totally wrong ?

Cheers Peter

Btw, I am using 1.6-ext
Peter_600 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



All times are GMT -4. The time now is 02:44.