|
[Sponsors] |
December 16, 2013, 17:42 |
What is cmptMag?
|
#1 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Hi
Could anyone please tell me what cmptMag function is for? Code:
Form Foam::cmptMag ( const VectorSpace< Form, Cmpt, nCmpt > & vs ) inline Many thanks in advance. |
|
December 18, 2013, 07:23 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo,
First of all, abs is not being used as a function in the FOAM namespace, as it is called mag instead. Consider a vector v(-1, -1, -1), the mag(v) is the square root of 3, i.e. the two norm. If you instead do vector w = Foam::cmptMag(v) you will get w = (1, 1, 1). 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. |
|
March 19, 2019, 08:50 |
abs not working for me
|
#3 | |
New Member
Join Date: Apr 2018
Posts: 17
Rep Power: 8 |
Quote:
I did "volVectorField U1CmptMag = Foam::cmptMag(U1);" thank you |
||
|
|