yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03877
Re: How to use a plugin
Hi,
I got an error. The library/plugin requires me to define this function in this way, and I am trying to assess yade's pointers within the function:
static void NAG_CALL objfun(Integer n, double x[], double *objf, double objgrd[], Nag_Comm *comm){
shared_ptr<Scene> scene = Omega()::instance().getScene();
}
Error:
pkg/dem/DataClass/InteractionGeometry/IgFunc.cpp: In function 'void objfun(Integer, double*, double*, double*, Nag_Comm*)':
pkg/dem/DataClass/InteractionGeometry/IgFunc.cpp:420: error: conversion from 'Omega' to non-scalar type 'boost::shared_ptr<Scene>' requested
pkg/dem/DataClass/InteractionGeometry/IgFunc.cpp:420: error: expected ',' or ';' before '::' token
After that is done, I'm planning to do this:
//shared_ptr<BodyContainer>& bodies = scene->bodies;
//Body* b1 = ( *bodies ) [id1].get();
//Body* b2 = ( *bodies ) [id2].get();
Yours,
Boon
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
Follow ups
References
-
How to use a plugin
From: boon chiaweng, 2010-04-01
-
Re: How to use a plugin
From: Anton Gladky, 2010-04-01
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05