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

Comparing trunk/OOPSE-4/src/applications/simpleBuilder/simpleBuilder.cpp (file contents):
Revision 2181 by tim, Tue Apr 12 21:58:09 2005 UTC vs.
Revision 2184 by tim, Tue Apr 12 22:33:50 2005 UTC

# Line 77 | Line 77 | int main(int argc, char *argv []) {
77      std::string outPrefix;
78      std::string outMdFileName;
79      std::string outInitFileName;
80 <    BaseLattice *simpleLat;
80 >    Lattice *simpleLat;
81      int numMol;
82      double latticeConstant;
83      std::vector<double> lc;
# Line 104 | Line 104 | int main(int argc, char *argv []) {
104      //get lattice type
105      latticeType = UpperCase(args_info.latticetype_arg);
106  
107 <    if (!LatticeFactory::getInstance()->hasLatticeCreator(latticeType)) {
108 <        std::cerr << latticeType << " is an invalid lattice type" << std::endl;
109 <        std::cerr << LatticeFactory::getInstance()->toString() << std::endl;
110 <        exit(1);
107 >    simpleLat = LatticeFactory::getInstance()->createLattice(latticeType);
108 >    
109 >    if (simpleLat == NULL) {
110 >      sprintf(painCave.errMsg, "Lattice Factory can not create %s lattice\n",
111 >              latticeType.c_str());
112 >      painCave.isFatal = 1;
113 >      simError();
114      }
115  
116      //get the number of unit cell
# Line 187 | Line 190 | int main(int argc, char *argv []) {
190              << std::endl;
191          std::cerr << "A new .md file: " << outMdFileName
192              << " is generated, use it to rerun the simpleBuilder" << std::endl;
193 <        exit(1);
193 >        exit(1);
194      }
195  
196      //determine the output file names  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines