Changeset c76393
- Timestamp:
- Apr 23, 2008, 4:30:20 PM (17 years ago)
- Children:
- 5bef9d
- Parents:
- 51af4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified pcp/src/perturbed.c ¶
r51af4a rc76393 2939 2939 2940 2940 if (P->Call.out[ValueOut]) fprintf(stderr,"(%i) magnetic susceptibility tensor \\Chi_ij = \n",P->Par.me); 2941 if (P->Call.out[ReadOut]) fprintf(stderr,"\n"); 2941 2942 for (in=0; in<NDIM; in++) { // index i of integrand vector component 2942 2943 for(dex=0;dex<4;dex++) // initialise cross lookup … … 2967 2968 I->I[0].chi[in+dex*NDIM] = Chi[in+dex*NDIM]; 2968 2969 Chi[in+dex*NDIM] *= Lat->Volume*loschmidt_constant; // factor for _molar_ susceptibility 2969 if (P->Call.out[ ValueOut]) {2970 if (P->Call.out[ReadOut]) { 2970 2971 fprintf(stderr,"%e\t", Chi[in+dex*NDIM]); 2971 2972 if (dex == NDIM-1) fprintf(stderr,"\n"); … … 3012 3013 A += pow(-1,i)*pow(0.5*(Chi[in+dex*NDIM]-Chi[dex+in*NDIM]),2); 3013 3014 } 3014 if (P->Call.out[ ValueOut]) {3015 if (P->Call.out[ReadOut]) { 3015 3016 fprintf(stderr,"(%i) converted to Principal Axis System\n==================\nDiagonal entries:", P->Par.me); 3016 3017 for (i=0;i<NDIM;i++) 3017 3018 fprintf(stderr,"\t%lg",gsl_vector_get(eval,i)); 3018 fprintf(stderr,"\nsusceptib. : %e\n", iso); 3019 } 3020 if (P->Call.out[ValueOut]) { 3021 if (P->Call.out[ReadOut]) 3022 fprintf(stderr,"\nsusceptib. : %e\n", iso); 3023 else 3024 fprintf(stderr,"%e\n", iso); 3025 } 3026 if (P->Call.out[ReadOut]) { 3019 3027 fprintf(stderr,"anisotropy : %e\n", delta_chi); 3020 3028 fprintf(stderr,"asymmetry : %e\n", eta); … … 3119 3127 for (in=0;in<NDIM*NDIM;in++) { 3120 3128 CalculateOneDensityC(Lat, R->LevS, Dens0, CurrentDensity[in], CurrentDensityC[in], factorDC); 3121 TestReciprocalCurrent(P, CurrentDensityC[in], GArray, in);3129 //TestReciprocalCurrent(P, CurrentDensityC[in], GArray, in); 3122 3130 } 3123 3131 … … 3167 3175 } 3168 3176 } 3169 // fabs() all sigma values, as we need them as a positive density: OutputVis plots them in logarithmic scale and3170 // thus cannot deal with negative values!3171 for (i=0; i< Dens0->LocalSizeR; i++)3172 sigma_real[in+dex*NDIM][i] = fabs(sigma_real[in+dex*NDIM][i]);3173 3177 } 3174 3178 } … … 3194 3198 for (it=0; it < I->Max_Types; it++) { // integration over all types 3195 3199 for (ion=0; ion < I->I[it].Max_IonsOfType; ion++) { // and each ion of type 3196 if (P->Call.out[ValueOut]) fprintf(stderr,"(%i) Shielding Tensor for Ion %i of element %s \\sigma_ij = \n",P->Par.me, ion, I->I[it].Name); 3200 if (P->Call.out[ValueOut]) fprintf(stderr,"(%i) Shielding Tensor for Ion %i of element %s \\sigma_ij = ",P->Par.me, ion, I->I[it].Name); 3201 if (P->Call.out[ReadOut]) fprintf(stderr,"\n"); 3197 3202 for (in=0; in<NDIM; in++) { // index i of vector component in integrand 3198 3203 for (dex=0; dex<NDIM; dex++) {// index j of B component derivation in current density tensor 3199 3204 gsl_matrix_complex_set(H,in,dex,gsl_complex_rect((I->I[it].sigma_rezi[ion][in+dex*NDIM]+I->I[it].sigma_rezi[ion][dex+in*NDIM])/2.,0)); 3200 if (P->Call.out[ ValueOut]) fprintf(stderr,"%e\t", I->I[it].sigma_rezi[ion][in+dex*NDIM]);3205 if (P->Call.out[ReadOut]) fprintf(stderr,"%e\t", I->I[it].sigma_rezi[ion][in+dex*NDIM]); 3201 3206 } 3202 if (P->Call.out[ ValueOut]) fprintf(stderr,"\n");3207 if (P->Call.out[ReadOut]) fprintf(stderr,"\n"); 3203 3208 } 3204 3209 // output tensor to file … … 3238 3243 A += pow(-1,i)*pow(0.5*(I->I[it].sigma_rezi[ion][in+dex*NDIM]-I->I[it].sigma_rezi[ion][dex+in*NDIM]),2); 3239 3244 } 3240 if (P->Call.out[ ValueOut]) {3245 if (P->Call.out[ReadOut]) { 3241 3246 fprintf(stderr,"(%i) converted to Principal Axis System\n==================\nDiagonal entries:", P->Par.me); 3242 3247 for (i=0;i<NDIM;i++) 3243 3248 fprintf(stderr,"\t%lg",gsl_vector_get(eval,i)); 3244 fprintf(stderr,"\nshielding : %e\n", iso); 3249 } 3250 if (P->Call.out[ValueOut]) { 3251 if (P->Call.out[ReadOut]) 3252 fprintf(stderr,"\nshielding : %e\n", iso); 3253 else 3254 fprintf(stderr,"%e\n", iso); 3255 } 3256 if (P->Call.out[ReadOut]) { 3245 3257 fprintf(stderr,"anisotropy : %e\n", delta_sigma); 3246 3258 fprintf(stderr,"asymmetry : %e\n", eta); … … 3284 3296 } 3285 3297 } 3286 3298 3299 // fabs() all sigma values, as we need them as a positive density: OutputVis plots them in logarithmic scale and 3300 // thus cannot deal with negative values! 3301 for (in=0; in<NDIM; in++) {// index i of vector component in integrand 3302 for (dex=0; dex<NDIM; dex++) { // index j of B component derivation in current density tensor 3303 for (i=0; i< Dens0->LocalSizeR; i++) 3304 sigma_real[in+dex*NDIM][i] = fabs(sigma_real[in+dex*NDIM][i]); 3305 } 3306 } 3287 3307 if (Lev0->LevelNo == 0) { 3288 3308 if (!P->Par.me && P->Call.out[NormalOut]) fprintf(stderr,"(%i)Output of NICS map ...\n", P->Par.me); … … 3371 3391 for (it=0; it < I->Max_Types; it++) { // integration over all types 3372 3392 for (ion=0; ion < I->I[it].Max_IonsOfType; ion++) { // and each ion of type 3373 if (P->Call.out[ValueOut]) fprintf(stderr,"(%i) Magnetic dipole moment Tensor for Ion %i of element %s \\moment_ij = \n",P->Par.me, ion, I->I[it].Name); 3393 if (P->Call.out[ValueOut]) fprintf(stderr,"(%i) Magnetic dipole moment Tensor for Ion %i of element %s \\moment_ij = ",P->Par.me, ion, I->I[it].Name); 3394 if (P->Call.out[ReadOut]) fprintf(stderr,"\n"); 3374 3395 for (in=0; in<NDIM; in++) {// index i of vector component in integrand 3375 3396 for (dex=0; dex<NDIM; dex++) { // index j of B component derivation in current density tensor … … 3394 3415 MPI_Allreduce ( &moment[in+dex*NDIM], &Moment[in+dex*NDIM], 1, MPI_DOUBLE, MPI_SUM, P->Par.comm_ST_Psi); // sum "LocalSize to TotalSize" 3395 3416 I->I[it].moment[ion][in+dex*NDIM] = Moment[in+dex*NDIM]; 3396 if (P->Call.out[ ValueOut]) fprintf(stderr," %e", Moment[in+dex*NDIM]);3417 if (P->Call.out[ReadOut]) fprintf(stderr," %e", Moment[in+dex*NDIM]); 3397 3418 } 3398 if (P->Call.out[ ValueOut]) fprintf(stderr,"\n");3419 if (P->Call.out[ReadOut]) fprintf(stderr,"\n"); 3399 3420 } 3400 3421 // store symmetrized matrix … … 3441 3462 A += pow(-1,i)*pow(0.5*(Moment[in+dex*NDIM]-Moment[dex+in*NDIM]),2); 3442 3463 } 3443 if (P->Call.out[ ValueOut]) {3464 if (P->Call.out[ReadOut]) { 3444 3465 fprintf(stderr,"(%i) converted to Principal Axis System\n==================\nDiagonal entries:", P->Par.me); 3445 3466 for (i=0;i<NDIM;i++) 3446 3467 fprintf(stderr,"\t%lg",gsl_vector_get(eval,i)); 3447 fprintf(stderr,"\nshielding : %e\n", iso); 3468 } 3469 if (P->Call.out[ValueOut]) { 3470 if (P->Call.out[ReadOut]) 3471 fprintf(stderr,"moment : %e\n", iso); 3472 else 3473 fprintf(stderr,"%e\n", iso); 3474 } 3475 if (P->Call.out[ReadOut]) { 3448 3476 fprintf(stderr,"anisotropy : %e\n", delta_moment); 3449 3477 fprintf(stderr,"asymmetry : %e\n", eta); … … 3451 3479 fprintf(stderr,"A : %e\n", A); 3452 3480 fprintf(stderr,"==================\n"); 3453 3454 } 3481 } 3455 3482 gsl_vector_free(eval); 3456 3483 }
Note:
See TracChangeset
for help on using the changeset viewer.