Hi folks,
I am trying to run a C function for a ot.NumericalMathFunction,
I am referring to the example here
http://doc.openturns.org/openturns-1.1/openturns-doc-february-2013/html/WrapperGuide/cid1.xhtml
I have placed a sample script below. Anyone know how to run the C function
using Openturns?
import openturns as ot
simcount = int(1e6)
big_sample = ot.Normal(2).getSample(simcount)
model = ot.NumericalMathFunction( 'wcode' )
out_sample = model(big_sample)
#include <math.h> int myCFunction( const double * X, unsigned long N,
double * Y, unsigned long P ) { Y[0] = cos(pow(X[0]+1, 2)) - sin(X[1]);
return 0; }
Thanks,
Doug
--
Douglas Long
[email protected]
_______________________________________________
OpenTURNS users mailing list
[email protected]
http://openturns.org/mailman/listinfo/users