CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   C++ in Cfx (https://www.cfd-online.com/Forums/cfx/26833-c-cfx.html)

fabian December 22, 2008 12:37

C++ in Cfx
 
Dear Friends

can i use C++ in CFX?

I would appreciate if some one give a hint

thank you

diego

Johnson December 23, 2008 06:32

Re: C++ in Cfx
 
It depends what you want to do.

If you want to call C/C++ routines that exist in a library from a User CEL Function or Junction Box Routine during the solver run, you should be able to do this quite easily.

If you type 'cfx5mkext -help' at the command line I think there is an example of doing this at the bottom of the help entry.

Regards,

Johnson

HekLeR January 18, 2009 23:04

Re: C++ in Cfx
 
Yes, this can be done.

The CFX solver is expecting to call a fortran function, but as long as you correctly account for name mangling, hidden string length arguments & pass by reference, it should work fine.


All times are GMT -4. The time now is 15:37.