Changeset 460e95


Ignore:
Timestamp:
Apr 21, 2008, 2:19:23 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
907086e
Parents:
13d7f6
git-author:
Frederik Heber <heber@…> (04/18/08 14:21:28)
git-committer:
Frederik Heber <heber@…> (04/21/08 14:19:23)
Message:

BOHRRADIUS changed to ANGSTROEMINBOHRRADIUS

Location:
pcp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/defs.h

    r13d7f6 r460e95  
    2020#define MYEPSILON (DBL_EPSILON*1000.0)  //!< 1000 times the smallest possible constant (1.0+DBL_EPSILON!=1.0)
    2121#define RTCOEFFFACTOR 0.0               //!< RT(?) Koeffizientenfaktor
    22 #define BOHRRADIUS 0.5291772108 //!< Bohr radius in Angstroem - units 1.74 */
     22#define ANGSTROEMINBOHRRADIUS 1.8897261 //!< Bohr radius in Angstroem - units 1.74 */
    2323
    2424#define STANDARTLEVEL 1         //!< standard level depth
  • pcp/src/ions.c

    r13d7f6 r460e95  
    5959void IonsInitRead(struct Problem *P, FILE *source) {
    6060        struct Ions *I = &P->Ion;
    61         struct Lattice *L = &P->Lat;
    6261  //struct RunStruct *Run = &P->R;
    63   int i,it,j,BorAng,IMT,d,me,k;
     62  int i,it,j,IMT,BorAng, d,me, count;
     63  int k;
     64  struct Lattice *L = &P->Lat;
    6465  int relative; // whether read-in coordinate are relative (1) or absolute 
    65   double R[NDIM];
    66   double Bohr = BOHRRADIUS; /* Angstroem */
     66  double Bohr = ANGSTROEMINBOHRRADIUS; /* Angstroem */
     67  double sigma, R[3], U[3];
    6768
    6869  I->Max_TotalIons = 0;
     
    7172  ParseForParameter(P->Call.out[ReadOut],source,"RCut", 0, 1, 1, double_type, &I->R_cut, critical);
    7273  ParseForParameter(P->Call.out[ReadOut],source,"IsAngstroem", 0, 1, 1, int_type, &BorAng, critical);
    73   if (!BorAng) Bohr = 1.0;
     74  if (!I->IsAngstroem) {
     75        Bohr = 1.0;
     76        } else {  // adapt RealBasis (is in Angstroem as well)
     77    SM(P->Lat.RealBasis, Bohr, NDIM_NDIM);
     78    RMatReci3(P->Lat.InvBasis,  P->Lat.RealBasis);
     79  }
    7480  ParseForParameter(P->Call.out[ReadOut],source,"MaxTypes", 0, 1, 1, int_type, &I->Max_Types, critical);
    7581  I->I = (struct IonType *) Malloc(sizeof(struct IonType)*I->Max_Types, "IonsInitRead: IonType");
Note: See TracChangeset for help on using the changeset viewer.