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

Comparing trunk/OOPSE-3.0/src/applications/nanoRodBuilder/nanorodBuilder.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 81 | Line 81 | int main(int argc, char *argv []) {
81                  std::string outGeomFileName;
82                  
83                  
84 <    BaseLattice *simpleLat;
84 >    Lattice *simpleLat;
85      int numMol;
86      double latticeConstant;
87      std::vector<double> lc;
# Line 112 | Line 112 | int main(int argc, char *argv []) {
112      //get lattice type
113      latticeType = UpperCase(args_info.latticetype_arg);
114  
115    if (!LatticeFactory::getInstance()->hasLatticeCreator(latticeType)) {
116        std::cerr << latticeType << " is an invalid lattice type" << std::endl;
117        std::cerr << LatticeFactory::getInstance()->toString() << std::endl;
118        exit(1);
119    }
115  
116 <    
116 >    simpleLat = LatticeFactory::getInstance()->createLattice(latticeType);
117 >    if (simpleLat == NULL) {
118 >        sprintf(painCave.errMsg, "Lattice Factory can not create %s lattice\n",
119 >                latticeType.c_str());
120 >        painCave.isFatal = 1;
121 >        simError();
122 >    }      
123 >
124      //get input file name
125      if (args_info.inputs_num)
126          inputFileName = args_info.inputs[0];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines