← Back to team overview

yade-dev team mailing list archive

Re: how to get flow parameter into TSC

 

MMA does not include FlowEngine, I just used it as example how to loop over engines.

I tried:

#include FlowEngine.hpp:

In file included from /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:21: /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:3: error: 'CGT' has not been declared /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:3: error: expected initializer before 'CVector' /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:4: error: 'CGT' has not been declared /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:4: error: expected initializer before 'Point' /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:7: error: 'CVector' does not name a type /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:8: error: 'Point' does not name a type /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:9: error: ISO C++ forbids declaration of 'Point' with no type /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:9: error: expected ',' or '...' before '&' token /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp: In function 'Vector3r makeVector3r(int)': /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:9: error: 'yv' was not declared in this scope
/home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp: At global scope:
/home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:10: error: ISO C++ forbids declaration of 'CVector' with no type /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:10: error: expected ',' or '...' before '&' token /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp: In function 'Vector3r makeVector3r(int)': /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:10: error: redefinition of 'Vector3r makeVector3r(int)' /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:9: error: 'Vector3r makeVector3r(int)' previously defined here /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp:10: error: 'yv' was not declared in this scope

-------------------------------------------------------------------------

#include FlowEngine.hpp.in:

In file included from /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:21: /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp.in:46: error: stray '@' in program

...

/home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp.in:410: error: stray '@' in program In file included from /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:21: /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp.in:417:47: error: FlowEngine_@TEMPLATE_FLOW_NAME@.ipp: No such file or directory In file included from /home/me/YADE/trunk/pkg/dem/TriaxialStressController.cpp:21: /home/me/YADE/build/yade/pkg/pfv/FlowEngine.hpp.in:46: error: expected initializer before ':' token


I think there is no yade engine, that includes pfv atm. So I have no example how this is done.


regards,

christian



Zitat von Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>:

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
________________


_______________________________________________
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






Follow ups

References