yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11327
Re: how to get flow parameter into TSC
I can't check the code now. Did you check the #include in MMA?
B
On 30/09/14 15:11, Christian Jakob wrote:
> Hi,
>
> I tried to cast FlowEngine in TSC, like it was done in
> MicroMarcoAnalyser.
>
> #ifdef FLOW_ENGINE
> //#include<yade/pkg/pfv/FlowEngine.hpp> //not working
> #include "FlowEngine_FlowEngineT.hpp" //not sure
> #endif
>
> ...
>
> void TriaxialStressController::updateStiffness() {
> Real fluidStiffness = 0.;
> #ifdef FLOW_ENGINE
> vector<shared_ptr<Engine> >::iterator it = scene->engines.begin();
> vector<shared_ptr<Engine> >::iterator itLast = scene->engines.end();
> for (;it!=itLast; ++it) {
> if ((*it)->getClassName() == "FlowEngine") {
> shared_ptr<FlowEngine> flow = YADE_PTR_CAST<FlowEngine> (*it);
> }
> }
> #endif
>
> ...
>
>
> compiler says:
>
>
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp: In member
> function 'void TriaxialStressController::updateStiffness()':
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:48: error:
> 'FlowEngine' was not declared in this scope
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:48: error:
> template argument 1 is invalid
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:48: error:
> invalid type in declaration before '=' token
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:48: error:
> 'FlowEngine' cannot appear in a constant-expression
> /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:48: error: no
> matching function for call to
> 'static_pointer_cast(boost::shared_ptr<Engine>&)'
>
>
> Is there way to declare and cast this engine and get parameters from
> there somehow?
>
> Regards,
>
> Christian
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help : https://help.launchpad.net/ListHelp
>
>
>
--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________
Follow ups
References