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

How to access math function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2008, 17:07
Default Dear OpenFOAMers: I would l
  #1
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Dear OpenFOAMers:

I would like to revise gen6DoF.C in interDyMFoam/sloshingTank3D6DoF. I tried to use Foam::abs(... Foam::sin(..)), but, got an error saying abs is not a member function of Foam. However, Foam::sin(..) works in the same .C file. Can someone tell me how to access abs function?

Thanks!
Pei
hsieh is offline   Reply With Quote

Old   November 19, 2008, 21:52
Default Hi Pei ! According to the p
  #2
Member
 
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 77
Rep Power: 17
mathieu is on a distinguished road
Hi Pei !

According to the programmer's guide (p. P-23), the Foam::abs() does not seem to exist. I guess that Foam::mag() would do the same job for a scalar...

Mathieu
mathieu is offline   Reply With Quote

Old   November 20, 2008, 06:52
Default Thanks a lot Mathieu! I mis
  #3
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Thanks a lot Mathieu!

I missed this in the Programmer's guide.

Pei
hsieh 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
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
Problem with math equations Jonas Larsson CFD-Wiki 1 November 14, 2006 11:56
a math operator in UDF lichun Dong FLUENT 7 June 18, 2005 22:04
math description of CFD John Main CFD Forum 2 December 13, 2002 02:34
MATH * MATH + MATH - MATH Mehdi BEN ELHADJ Main CFD Forum 2 October 9, 2000 16:02


All times are GMT -4. The time now is 05:00.