|
[Sponsors] |
Basic question about forAll loop and volVectorField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 9, 2014, 23:14 |
Basic question about forAll loop and volVectorField
|
#1 |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 14 |
Hello all, Pls I have two basic questions.
1.) What's the difference between the forAll loops below i.e. what's the effect of using the variable "A" with the index "celli"? Code:
forAll (A,celli) { if (A <= 1.0) { Talpha[A[celli]] = x[A[celli]]*y[A[celli]]; .... Code:
Talpha[celli] = x[celli]*y[celli]; Thanks in advance for your help |
|
January 10, 2014, 02:23 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
1-
A is array so A[celli] returns the value of A in the celli, for example celli is 1 but the value of A[celli] is 10, then T[A[celli]] equals T[10] and T[celli] equals T[1] 2- you can use forexample: surfaceSum, there are several else in programmer guide
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
January 10, 2014, 02:56 |
|
#3 |
Member
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 14 |
Thanks for your quick response
|
|
|
|