=== modified file 'SConstruct' --- SConstruct 2009-11-30 08:48:32 +0000 +++ SConstruct 2009-11-30 09:08:50 +0000 @@ -143,7 +143,6 @@ #('extraModules', 'Extra directories with their own SConscript files (must be in-tree) (whitespace separated)',None,None,Split), ('buildPrefix','Where to create build-[version][variant] directory for intermediary files','..'), EnumVariable('linkStrategy','How to link plugins together',defOptions['linkStrategy'],['per-class','per-pkg[broken]','monolithic','static[broken]']), - ('chunkSize','Maximum files to compile in one translation unit when building plugins.',20,None,int), ('version','Yade version (if not specified, guess will be attempted)',None), ('CPPPATH', 'Additional paths for the C preprocessor (colon-separated)','/usr/include/vtk-5.2:/usr/include/vtk-5.4'), ('LIBPATH','Additional paths for the linker (colon-separated)',None), @@ -559,7 +558,7 @@ ret=set() for p in plugins: if not buildPlugs.has_key(p): - raise RuntimeError("Plugin %s is required (backtrace shows where), but will not be built!"%p) + raise RuntimeError("Plugin %s will not be built!"%p) ret.add(buildPlugs[p].obj) return ['core','yade-support']+list(ret) === modified file 'core/main/pyboot.cpp' --- core/main/pyboot.cpp 2009-11-30 08:48:32 +0000 +++ core/main/pyboot.cpp 2009-11-30 09:08:50 +0000 @@ -3,17 +3,12 @@ #include #include -#include #include #include #include #include -#ifdef YADE_LOG4CXX - log4cxx::LoggerPtr logger=log4cxx::Logger::getLogger("yade.python"); -#endif - #ifdef YADE_DEBUG void crashHandler(int sig){ switch(sig){ @@ -43,12 +38,7 @@ #endif #if defined(YADE_OPENMP) || defined(YADE_OPENGL) - #ifdef LOG4CXX - LOG_ERROR("Yade compiled with openmp/opengl. Using python main will likely crash as soone as an ostream is used.") - #else - // avoid log4cxx-less LOG_ERROR, since it uses cerr, which crashes due to libsctc++ (?) issue. - fprintf(stderr,"ERROR: Yade compiled with openmp/opengl. Using python main will likely crash as soone as an ostream is used.\n"); - #endif + //LOG_ERROR("Yade compiled with openmp/opengl. Using python main will likely crash as soone as an ostream is used.") #endif PyEval_InitThreads(); === modified file 'pkg/dem/Engine/StandAloneEngine/CohesiveStateRPMRecorder.cpp' --- pkg/dem/Engine/StandAloneEngine/CohesiveStateRPMRecorder.cpp 2009-11-27 14:42:21 +0000 +++ pkg/dem/Engine/StandAloneEngine/CohesiveStateRPMRecorder.cpp 2009-11-30 14:57:17 +0000 @@ -3,8 +3,8 @@ YADE_PLUGIN((CohesiveStateRPMRecorder)); CREATE_LOGGER(CohesiveStateRPMRecorder); -CohesiveStateRPMRecorder::CohesiveStateRPMRecorder() { - initRun=true; +CohesiveStateRPMRecorder::CohesiveStateRPMRecorder():Recorder(){ + initRun=true; //We want to save the data in the beginning numberCohesiveContacts=0; } @@ -16,15 +16,15 @@ void CohesiveStateRPMRecorder::action(MetaBody* rootBody) { numberCohesiveContacts=0; + //Check all interactions FOREACH(const shared_ptr& i, *rootBody->interactions){ - if(!i->isReal()) continue; + if(!i->isReal()) continue; //Check whether they are real const shared_ptr& contPhys = YADE_PTR_CAST(i->interactionPhysics); - if (contPhys->isCohesive==true) { - numberCohesiveContacts++; + if (contPhys->isCohesive==true) { //Check whether they are cohesive + numberCohesiveContacts++; //If yes - calculate them } } - //Temporary solution, while flieRecorder class is not ready - outFile.open(outFileName.c_str(), ios::out | ios::app); - outFile< -#include -#include - - -class CohesiveStateRPMRecorder: public PeriodicEngine { +#include +#include +#include + + +class CohesiveStateRPMRecorder: public Recorder { public: - string outFileName; int numberCohesiveContacts; CohesiveStateRPMRecorder(); ~CohesiveStateRPMRecorder(); @@ -19,8 +18,8 @@ private: std::ofstream outFile; - REGISTER_ATTRIBUTES(PeriodicEngine,(outFileName)); - REGISTER_CLASS_AND_BASE(CohesiveStateRPMRecorder,PeriodicEngine); + REGISTER_ATTRIBUTES(Recorder,(numberCohesiveContacts)); + REGISTER_CLASS_AND_BASE(CohesiveStateRPMRecorder,Recorder); DECLARE_LOGGER; }; REGISTER_SERIALIZABLE(CohesiveStateRPMRecorder); === modified file 'py/yadeWrapper/yadeWrapper.cpp' --- py/yadeWrapper/yadeWrapper.cpp 2009-11-30 09:58:09 +0000 +++ py/yadeWrapper/yadeWrapper.cpp 2009-11-30 12:40:06 +0000 @@ -38,6 +38,11 @@ #include #include +#ifdef YADE_SHAPE + #include + #include + #include +#endif #include #include #include @@ -816,6 +821,10 @@ #define EXPOSE_DISPATCHER(DispatcherT,functorT) python::class_, python::bases, noncopyable >(#DispatcherT).def("__init__",python::make_constructor(Dispatcher_ctor_list)).add_property("functors",&Dispatcher_functors_get).def("dump",&DispatcherT::dump); EXPOSE_DISPATCHER(BoundingVolumeMetaEngine,BoundingVolumeEngineUnit) + #ifdef YADE_SHAPE + EXPOSE_DISPATCHER(GeometricalModelMetaEngine,GeometricalModelEngineUnit) + EXPOSE_DISPATCHER(InteractingGeometryMetaEngine,InteractingGeometryEngineUnit) + #endif EXPOSE_DISPATCHER(InteractionGeometryMetaEngine,InteractionGeometryEngineUnit) EXPOSE_DISPATCHER(InteractionPhysicsMetaEngine,InteractionPhysicsEngineUnit) #ifdef YADE_PHYSPAR @@ -828,6 +837,10 @@ #define EXPOSE_FUNCTOR(FunctorT) python::class_, python::bases, noncopyable>(#FunctorT).def("__init__",python::raw_constructor(Serializable_ctor_kwAttrs)); EXPOSE_FUNCTOR(BoundingVolumeEngineUnit) + #ifdef YADE_SHAPE + EXPOSE_FUNCTOR(GeometricalModelEngineUnit) + EXPOSE_FUNCTOR(InteractingGeometryEngineUnit) + #endif EXPOSE_FUNCTOR(InteractionGeometryEngineUnit) EXPOSE_FUNCTOR(InteractionPhysicsEngineUnit) #ifdef YADE_PHYSPAR @@ -844,6 +857,9 @@ #define EXPOSE_CXX_CLASS_IX(className) EXPOSE_CXX_CLASS(className).add_property("classIndex",&Indexable_getClassIndex) EXPOSE_CXX_CLASS(Body) + #ifdef YADE_SHAPE + .def_readwrite("shape",&Body::geometricalModel) + #endif .def_readwrite("mold",&Body::interactingGeometry) .def_readwrite("geom",&Body::interactingGeometry) .def_readwrite("bound",&Body::boundingVolume) @@ -856,6 +872,9 @@ .add_property("isClumpMember",&Body::isClumpMember) .add_property("isClump",&Body::isClump); EXPOSE_CXX_CLASS_IX(InteractingGeometry); + #ifdef YADE_SHAPE + EXPOSE_CXX_CLASS_IX(GeometricalModel); + #endif EXPOSE_CXX_CLASS_IX(BoundingVolume) .def_readonly("min",&BoundingVolume::min) .def_readonly("max",&BoundingVolume::max); === modified file 'yadeSCons.py' --- yadeSCons.py 2009-11-30 09:58:09 +0000 +++ yadeSCons.py 2009-11-30 12:40:06 +0000 @@ -138,17 +138,13 @@ def buildPluginLibs(env,plugInfo): objs={} linkStrategy=env['linkStrategy'] - chunkSize=env['chunkSize'] for p in plugInfo.values(): if not objs.has_key(p.obj): objs[p.obj]=(set(),set()) objs[p.obj][0].add(p.src) objs[p.obj][1].update(p.libs) for obj in objs.keys(): srcs=list(objs[obj][0]) - if len(srcs)>1: - if len(srcs)1: srcs=env.Combine('$buildDir/'+obj+'.cpp',srcs) if linkStrategy!='static': env.Install('$PREFIX/lib/yade$SUFFIX/plugins',env.SharedLibrary(obj,srcs,LIBS=env['LIBS']+['yade-support','core']+list(objs[obj][1]))) else: