# | Line 1 | Line 1 | |
---|---|---|
1 | < | /* |
1 | > | /* |
2 | * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | |
3 | * | |
4 | * The University of Notre Dame grants you ("Licensee") a | |
# | Line 43 | Line 43 | namespace oopse { | |
43 | ||
44 | namespace oopse { | |
45 | ||
46 | < | CubicLattice::CubicLattice(){ |
47 | < | latticeParam = 1.0; |
46 | > | CubicLattice::CubicLattice(){ |
47 | > | latticeParam = 1.0; |
48 | ||
49 | < | cellLen[0] = latticeParam; |
50 | < | cellLen[1] = latticeParam; |
51 | < | cellLen[2] = latticeParam; |
49 | > | cellLen[0] = latticeParam; |
50 | > | cellLen[1] = latticeParam; |
51 | > | cellLen[2] = latticeParam; |
52 | ||
53 | < | } |
53 | > | } |
54 | ||
55 | < | std::vector<double> CubicLattice::getLatticeConstant(){ |
56 | < | std::vector<double> lc; |
55 | > | std::vector<RealType> CubicLattice::getLatticeConstant(){ |
56 | > | std::vector<RealType> lc; |
57 | ||
58 | < | lc.push_back(cellLen.x()); |
59 | < | return lc; |
60 | < | } |
58 | > | lc.push_back(cellLen.x()); |
59 | > | return lc; |
60 | > | } |
61 | ||
62 | < | void CubicLattice::setLatticeConstant(const std::vector<double>& lc){ |
62 | > | void CubicLattice::setLatticeConstant(const std::vector<RealType>& lc){ |
63 | ||
64 | < | if(lc.size() < 1){ |
65 | < | std::cerr << "CubicLattice::setLatticeConstant Error: the size of lattice constant vector is 0" << std::endl; |
66 | < | exit(1); |
67 | < | } |
68 | < | else if (lc.size() > 1){ |
69 | < | std::cerr << "CubicLattice::setLatticeConstant Warning: the size of lattice constant vector is " << lc.size() << std::endl; |
70 | < | } |
64 | > | if(lc.size() < 1){ |
65 | > | std::cerr << "CubicLattice::setLatticeConstant Error: the size of lattice constant vector is 0" << std::endl; |
66 | > | exit(1); |
67 | > | } |
68 | > | else if (lc.size() > 1){ |
69 | > | std::cerr << "CubicLattice::setLatticeConstant Warning: the size of lattice constant vector is " << lc.size() << std::endl; |
70 | > | } |
71 | ||
72 | < | latticeParam = lc[0]; |
72 | > | latticeParam = lc[0]; |
73 | ||
74 | < | cellLen[0] = latticeParam; |
75 | < | cellLen[1] = latticeParam; |
76 | < | cellLen[2] = latticeParam; |
74 | > | cellLen[0] = latticeParam; |
75 | > | cellLen[1] = latticeParam; |
76 | > | cellLen[2] = latticeParam; |
77 | ||
78 | < | update(); |
79 | < | } |
78 | > | update(); |
79 | > | } |
80 | ||
81 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |