yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02526
[Branch ~yade-dev/yade/trunk] Rev 1863: 1.fix link with GLU for QGLViewer; 2.fix header for Shop; 3.Add clumpids to VTKRecorder
------------------------------------------------------------
revno: 1863
committer: Sergei D. <sega@think>
branch nick: trunk
timestamp: Mon 2009-12-07 11:07:20 +0300
message:
1.fix link with GLU for QGLViewer; 2.fix header for Shop; 3.Add clumpids to VTKRecorder
modified:
lib/SConscript
pkg/dem/Engine/StandAloneEngine/VTKRecorder.cpp
pkg/dem/Engine/StandAloneEngine/VTKRecorder.hpp
pkg/dem/meta/Shop.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'lib/SConscript'
--- lib/SConscript 2009-12-04 21:56:59 +0000
+++ lib/SConscript 2009-12-07 08:07:20 +0000
@@ -48,7 +48,7 @@
# since the generated header is #include'd "...", it looks for it in the original dir
# no idea why this _does_ work with gui/qt3. Go figure.
CPPPATH=env['CPPPATH']+['${TARGET.dir}'],
- LIBS=env['LIBS']+['GL']
+ LIBS=env['LIBS']+['GLU','GL']
)
yadeStaticOrSharedLib('yade-opengl',env.Combine('yade-opengl.cpp',['opengl/FpsTracker.cpp','opengl/GLTextLabel.cpp','opengl/GLWindow.cpp','opengl/GLWindowsManager.cpp','opengl/GLUtils.cpp']),LIBS=env['LIBS']+['glut','GL','$QGLVIEWER_LIB']),
#env.Install('$PREFIX/lib/yade$SUFFIX/lib',env.StaticLibrary
=== modified file 'pkg/dem/Engine/StandAloneEngine/VTKRecorder.cpp'
--- pkg/dem/Engine/StandAloneEngine/VTKRecorder.cpp 2009-12-04 23:46:45 +0000
+++ pkg/dem/Engine/StandAloneEngine/VTKRecorder.cpp 2009-12-07 08:07:20 +0000
@@ -51,7 +51,8 @@
else if(rec=="cpm") recActive[REC_CPM]=true;
else if(rec=="intr") recActive[REC_INTR]=true;
else if(rec=="ids") recActive[REC_IDS]=true;
- else LOG_ERROR("Unknown recorder named `"<<rec<<"' (supported are: spheres, velocity, facets, colors, cpm, intr, ids). Ignored.");
+ else if(rec=="clumpids") recActive[REC_CLUMPIDS]=true;
+ else LOG_ERROR("Unknown recorder named `"<<rec<<"' (supported are: spheres, velocity, facets, colors, cpm, intr, ids, clumpids). Ignored.");
}
// cpm needs interactions
if(recActive[REC_CPM]) recActive[REC_INTR]=true;
@@ -65,6 +66,9 @@
vtkSmartPointer<vtkFloatArray> spheresIds = vtkSmartPointer<vtkFloatArray>::New();
spheresIds->SetNumberOfComponents(1);
spheresIds->SetName("IDS");
+ vtkSmartPointer<vtkFloatArray> clumpIds = vtkSmartPointer<vtkFloatArray>::New();
+ clumpIds->SetNumberOfComponents(1);
+ clumpIds->SetName("clumpIDS");
vtkSmartPointer<vtkFloatArray> spheresColors = vtkSmartPointer<vtkFloatArray>::New();
spheresColors->SetNumberOfComponents(3);
spheresColors->SetName("colors");
@@ -148,6 +152,7 @@
spheresCells->InsertNextCell(1,pid);
radii->InsertNextValue(sphere->radius);
if (recActive[REC_IDS]) spheresIds->InsertNextValue(b->getId());
+ if (recActive[REC_CLUMPIDS]) clumpIds->InsertNextValue(b->clumpId);
if (recActive[REC_COLORS])
{
const Vector3r& color = sphere->diffuseColor;
@@ -216,6 +221,7 @@
spheresUg->SetCells(VTK_VERTEX, spheresCells);
spheresUg->GetPointData()->AddArray(radii);
if (recActive[REC_IDS]) spheresUg->GetPointData()->AddArray(spheresIds);
+ if (recActive[REC_CLUMPIDS]) spheresUg->GetPointData()->AddArray(clumpIds);
if (recActive[REC_COLORS]) spheresUg->GetPointData()->AddArray(spheresColors);
if (recActive[REC_VELOCITY]) {
spheresUg->GetPointData()->AddArray(spheresVelocity);
=== modified file 'pkg/dem/Engine/StandAloneEngine/VTKRecorder.hpp'
--- pkg/dem/Engine/StandAloneEngine/VTKRecorder.hpp 2009-12-04 23:07:34 +0000
+++ pkg/dem/Engine/StandAloneEngine/VTKRecorder.hpp 2009-12-07 08:07:20 +0000
@@ -4,7 +4,7 @@
class VTKRecorder: public PeriodicEngine {
public:
- enum {REC_SPHERES=0,REC_FACETS,REC_COLORS,REC_CPM,REC_INTR,REC_VELOCITY,REC_IDS,REC_SENTINEL};
+ enum {REC_SPHERES=0,REC_FACETS,REC_COLORS,REC_CPM,REC_INTR,REC_VELOCITY,REC_IDS,REC_CLUMPIDS,REC_SENTINEL};
//! A stuff to record: spheres,facets,colors
vector<string> recorders;
string fileName;
=== modified file 'pkg/dem/meta/Shop.cpp'
--- pkg/dem/meta/Shop.cpp 2009-12-06 22:02:12 +0000
+++ pkg/dem/meta/Shop.cpp 2009-12-07 08:07:20 +0000
@@ -44,6 +44,7 @@
#include<yade/pkg-common/InteractionGeometryDispatcher.hpp>
#include<yade/pkg-common/InteractionPhysicsDispatcher.hpp>
+#include<yade/pkg-common/InteractionDispatchers.hpp>
#include<yade/pkg-common/BoundDispatcher.hpp>
#include<yade/pkg-common/GravityEngines.hpp>