ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/types/DirectionalAtomType.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/types/DirectionalAtomType.cpp (file contents):
Revision 1812 by tim, Mon Nov 29 14:40:30 2004 UTC vs.
Revision 1813 by tim, Wed Dec 1 17:38:32 2004 UTC

# Line 34 | Line 34 | void DirectionalAtomType::complete() {
34      int isError;
35      GenericData* data;
36  
37 +    //setup dipole atom  type in fortran side
38      if (isDipole()) {
39          data = getPropertyByName("Dipole");
40          if (data != NULL) {
# Line 66 | Line 67 | void DirectionalAtomType::complete() {
67          }
68      }
69  
70 +    //setup quadrupole atom type in fortran side
71 +    if (isQuadrupole()) {
72 +        data = getPropertyByName("Quadrupole");
73 +        if (data != NULL) {
74 +            Vector3dGenericData* vector3dData= dynamic_cast<Vector3dGenericData*>(data);
75 +
76 +            if (vector3dData != NULL) {
77 +                Vector3d diagElem= vector3dData->getData();
78 +                Mat3x3d Q;
79 +                Q[0][0] = diagElem[0];
80 +                Q[1][1] = diagElem[1];
81 +                Q[2][2] = diagElem[2];
82 +
83 +                //newQuadrupoleType(&atp.ident, Q->getArrayPointer, &isError);
84 +                if (isError != 0) {
85 +                    sprintf( painCave.errMsg,
86 +                           "Fortran rejected newQuadrupoleType\n");
87 +                    painCave.severity = OOPSE_ERROR;
88 +                    painCave.isFatal = 1;
89 +                    simError();          
90 +                }
91 +                
92 +            } else {
93 +                    sprintf( painCave.errMsg,
94 +                           "Can not cast GenericData to Vector3dGenericData\n");
95 +                    painCave.severity = OOPSE_ERROR;
96 +                    painCave.isFatal = 1;
97 +                    simError();          
98 +            }
99 +        } else {
100 +            sprintf( painCave.errMsg, "Can not find Quadrupole Parameters\n");
101 +            painCave.severity = OOPSE_ERROR;
102 +            painCave.isFatal = 1;
103 +            simError();          
104 +        }
105 +
106 +    }
107 +    
108 +    //setup sticky atom type in fortran side
109      if (isSticky()) {
110          data = getPropertyByName("Sticky");
111          if (data != NULL) {
# Line 100 | Line 140 | void DirectionalAtomType::complete() {
140          }
141      }
142  
143 <    //GayBerne
143 >    //setup GayBerne type in fortran side
144  
105    //Shape
145   }
146  
147  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines