ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/hydrodynamics/BeadModel.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/hydrodynamics/BeadModel.cpp (file contents):
Revision 2623 by tim, Wed Mar 15 15:51:44 2006 UTC vs.
Revision 2646 by tim, Tue Mar 21 00:26:55 2006 UTC

# Line 45 | Line 45 | bool BeadModel::createBeads(std::vector<BeadParam>& be
45   bool BeadModel::createBeads(std::vector<BeadParam>& beads) {
46  
47      if (sd_->isAtom()) {
48 <        createSingleBead(static_cast<Atom*>(sd_), beads);
48 >        if (!createSingleBead(static_cast<Atom*>(sd_), beads)) {
49 >            sprintf( painCave.errMsg,
50 >            "BeadModel::createBeads Error: GayBerne and other non-spheric atoms should use RoughShell model\n");
51 >            painCave.severity = OOPSE_ERROR;
52 >            painCave.isFatal = 1;
53 >            simError();    
54 >            return false;
55 >        }
56      }
57      else if (sd_->isRigidBody()) {
58          RigidBody* rb = static_cast<RigidBody*>(sd_);
59          std::vector<Atom*>::iterator ai;
60          Atom* atom;
61          for (atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) {
62 <            if (!createSingleBead(atom, beads))
62 >            if (!createSingleBead(atom, beads)) {
63 >                sprintf( painCave.errMsg,
64 >                    "BeadModel::createBeads Error: GayBerne and other non-spheric atoms should use RoughShell model\n");
65 >                painCave.severity = OOPSE_ERROR;
66 >                painCave.isFatal = 1;
67 >                simError();    
68                  return false;
69 +            }
70          }
71      }
72  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines