- Timestamp:
- Apr 22, 2008, 8:52:36 AM (17 years ago)
- Children:
- 53b5b6
- Parents:
- 90c027
- Location:
- pcp/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/data.h
r90c027 r88e890 563 563 double RealBasis[NDIM_NDIM]; //!< Coefficients of the basis vectors 564 564 double RealBasisSQ[NDIM]; //!< squared Norm of each basis vector 565 //double RealBasisQ[NDIM]; //!< Norm of each basis vector565 double RealBasisCenter[NDIM]; //!< center of the unit cell ((0.5,0.5,0.5) transformed by RealBasis) 566 566 double InvBasis[NDIM_NDIM]; //!< Matrix-wise inverted basis vectors 567 567 double ReciBasis[NDIM_NDIM]; //!< Coefficients of the transposed(!), inverse basis "matrix" (i.e. reciprocal basis) -
pcp/src/init.c
r90c027 r88e890 133 133 int i,j,UpDummy; 134 134 int MaxG[NDIM], N[NDIM], NFactor, Lev1N[NDIM]; 135 double x[NDIM]; 135 136 struct LatticeLevel *Lev0; 136 137 int RL=-1; … … 142 143 return(1); 143 144 } 145 for (i=0; i < NDIM; i++) // create center point 146 x[i] = .5; 147 RMat33Vec3(Lat->RealBasisCenter, Lat->RealBasis, x); 148 if (P->Call.out[ValueOut]) fprintf(stderr,"Unit cell center = (%lg, %lg, %lg)\n", Lat->RealBasisCenter[0], Lat->RealBasisCenter[1], Lat->RealBasisCenter[2]); 144 149 // square-rooted and normal reciprocal (transposed) Base 145 150 for (i=0; i < NDIM_NDIM; i++) h[i] = Lat->RealBasis[i]; … … 148 153 for (i=0; i < NDIM_NDIM; i++) Lat->ReciBasis[i] *= factor; // SM(Lat->ReciBasis, factor, NDIM_NDIM); 149 154 for (i=0; i < NDIM; i++) { 155 Lat->ReciBasisSQ[i] = RNORMSQ3(&(Lat->ReciBasis[i*NDIM])); 150 156 Lat->RealBasisSQ[i] = RNORMSQ3(&(Lat->RealBasis[i*NDIM])); 151 Lat->ReciBasisSQ[i] = RNORMSQ3(&(Lat->ReciBasis[i*NDIM]));152 157 } 153 158 // Prepares LatticeLevels
Note:
See TracChangeset
for help on using the changeset viewer.