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

forAllIter(...) method

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2014, 16:27
Default forAllIter(...) method
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
maybee is on a distinguished road
hi,

I want to use the forAllIter(...) loop like

Code:
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
{
...
}
My problem is that the iterator should start with the second element of "phases_" OR leave out the last element of "phases_". How can I do so?
maybee is offline   Reply With Quote

Old   February 16, 2014, 16:40
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo,

Then I would suggest that you do not use a macro, which is build to loop over all elements in a list. Simply implement it as an ordinary loop, which fulfills your specifications, i.e. your start/stop criteria.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj 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
On the alpha Eqn of VOF method when using Immersed boundary method in OpenFOAM keepfit OpenFOAM 4 January 31, 2014 15:32
Inaccurate gradient results from continuous Adjoint method Yminjo SU2 1 January 11, 2014 23:08
multiphaseEulerFoam: Method forAllIter(...) within solve() maybee OpenFOAM Programming & Development 4 January 7, 2014 05:35
[Gmsh] discretizer - gmshToFoam Andyjoe OpenFOAM Meshing & Mesh Conversion 13 March 14, 2012 05:35
Code for most powerfull FDV Method D.S.Nasan Main CFD Forum 6 September 4, 2008 03:08


All times are GMT -4. The time now is 06:46.