ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/hydrodynamics/ShapeBuilder.cpp
(Generate patch)

Comparing trunk/src/applications/hydrodynamics/ShapeBuilder.cpp (file contents):
Revision 906 by tim, Fri Mar 17 23:20:35 2006 UTC vs.
Revision 908 by tim, Mon Mar 20 19:12:14 2006 UTC

# Line 47 | Line 47 | Shape* ShapeBuilder::createShape(StuntDouble* sd) {
47   Shape* ShapeBuilder::createShape(StuntDouble* sd) {
48      Shape* currShape = NULL;
49              if (sd->isDirectionalAtom()) {
50 <              currShape = internalCreateShape(static_cast<Atom*>(sd));
50 >              currShape = internalCreateShape(static_cast<DirectionalAtom*>(sd));
51              } else if (sd->isAtom()) {
52 <                currShape = internalCreateShape(static_cast<DirectionalAtom*>(sd));
52 >                currShape = internalCreateShape(static_cast<Atom*>(sd));
53              } else if (sd->isRigidBody()) {
54                  currShape = internalCreateShape(static_cast<RigidBody*>(sd));
55              }
# Line 97 | Line 97 | Shape* ShapeBuilder::internalCreateShape(DirectionalAt
97  
98              if (gayBerneData != NULL) {  
99                  GayBerneParam gayBerneParam = gayBerneData->getData();
100 <                currShape = new Ellipsoid(datom->getPos(), gayBerneParam.GB_sigma, gayBerneParam.GB_l2b_ratio, datom->getA());
100 >                currShape = new Ellipsoid(datom->getPos(), gayBerneParam.GB_sigma/2.0, gayBerneParam.GB_l2b_ratio*gayBerneParam.GB_sigma/2.0, datom->getA());
101              } else {
102                  sprintf( painCave.errMsg,
103                         "Can not cast GenericData to GayBerneParam\n");
# Line 122 | Line 122 | Shape* ShapeBuilder::internalCreateShape(RigidBody* rb
122          for (atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) {
123              Shape* currShape = NULL;
124              if (atom->isDirectionalAtom()){
125 <                currShape = internalCreateShape(static_cast<Atom*>(atom));
125 >                currShape = internalCreateShape(static_cast<DirectionalAtom*>(atom));
126              }else if (atom->isAtom()){
127 <                currShape =  internalCreateShape(static_cast<DirectionalAtom*>(atom));
127 >                currShape =  internalCreateShape(static_cast<Atom*>(atom));
128              }
129              if (currShape != NULL)
130                  compositeShape->addShape(currShape);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines