|
[Sponsors] |
bitwise and operator usage in dsmcFields function object |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 16, 2010, 14:58 |
bitwise and operator usage in dsmcFields function object
|
#1 |
Member
Daniel
Join Date: Jul 2010
Location: California
Posts: 39
Rep Power: 16 |
Hi foamers - in the function object dsmcFields.C some of the calculations make usage of the bitwise and (&) operator to compute new fields. It seems to somehow involve converting a vector field into a scaler field.
Info<< " Calculating translationalT field." << endl; 00163 volScalarField translationalT 00164 ( 00165 IOobject 00166 ( 00167 "translationalT", 00168 obr_.time().timeName(), 00169 obr_, 00170 IOobject::NO_READ 00171 ), 00172 2.0/(3.0*dsmcCloud::kb*rhoNMean) 00173 *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) 00174 ); In the above code, UMean is a vector field. I'm new to C++ and the books that I have picked up only describe bitwise and in terms of bit by bit modification. Does anyone understand the usage of the operator in the code above. Many Thanks |
|
Tags |
bitwise, dsmc, dsmcfields |
|
|