| 1 | #ifndef WANNIER_H_ | 
|---|
| 2 | #define WANNIER_H_ | 
|---|
| 3 |  | 
|---|
| 4 | /** \file wannier.h | 
|---|
| 5 | * Header file for \ref wannier.c | 
|---|
| 6 | * | 
|---|
| 7 | * Contains declarations of functions which reside in \ref wannier.c | 
|---|
| 8 | * | 
|---|
| 9 | Project: ParallelCarParrinello | 
|---|
| 10 | \author Frederik Heber | 
|---|
| 11 | \date 2006 | 
|---|
| 12 |  | 
|---|
| 13 | File: wannier.h | 
|---|
| 14 | $Id: wannier.h,v 1.3 2007-10-08 15:43:29 heber Exp $ | 
|---|
| 15 | */ | 
|---|
| 16 |  | 
|---|
| 17 | #include <gsl/gsl_complex.h> | 
|---|
| 18 |  | 
|---|
| 19 | /** Structure contains all variables needed for diagonalization of a matrix with | 
|---|
| 20 | * SerialDiagonalization() or ParallelDiagonalization() | 
|---|
| 21 | */ | 
|---|
| 22 | struct DiagonalizationData { | 
|---|
| 23 | int Num;        //!< Number of rows/columns | 
|---|
| 24 | int AllocNum;   //!< even number of rows/columns | 
|---|
| 25 | int NumMatrices;//!< number of matrices to be simultaneously "actively" diagonalized | 
|---|
| 26 | int extra;      //!< number of additional matrices that are also, yet "passively" diagonalized (not considered in rotation angle evaluation) | 
|---|
| 27 | gsl_matrix *U;   //!< transformation matrix | 
|---|
| 28 | gsl_matrix **A;  //!< matrix to be diagonlized | 
|---|
| 29 | int *top;       //!< merry-go-round top row of indices | 
|---|
| 30 | int *bot;       //!< merry-go-round bottom row of indices | 
|---|
| 31 | MPI_Comm *comm; //!< MPI communicator for ParallelDiagonalization() | 
|---|
| 32 | int ProcRank;   //!< Rank of this process, used in ParallelDiagonalization() | 
|---|
| 33 | int ProcNum;    //!< Number of process in communicator, used in ParallelDiagonalization() | 
|---|
| 34 | }; | 
|---|
| 35 |  | 
|---|
| 36 | void PrintGSLMatrix(struct Problem *P, gsl_matrix *U, int Num, const char *msg); | 
|---|
| 37 | void ComputeMLWF(struct Problem *P); | 
|---|
| 38 | void WriteWannierFile(struct Problem *P, double spread, double old_spread, double **WannierCentre, double *WannierSpread); | 
|---|
| 39 | int ParseWannierFile(struct Problem *P); | 
|---|
| 40 | void SerialDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData); | 
|---|
| 41 | void ParallelDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData); | 
|---|
| 42 | double CalculateSpread(struct Problem *P, int i); | 
|---|
| 43 | gsl_complex convertComplex (fftw_complex a); | 
|---|
| 44 | void InitDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData, int Num, int NumMatrices, int extra); | 
|---|
| 45 | void FreeDiagonalization(struct DiagonalizationData *DiagData); | 
|---|
| 46 | void OrthogonalizePsis(struct Problem *P); | 
|---|
| 47 | void StrongOrthogonalizePsis(struct Problem *P); | 
|---|
| 48 | void Diagonalize(struct Problem *P, struct DiagonalizationData *DiagData); | 
|---|
| 49 |  | 
|---|
| 50 | void CalculateSecondOrderReciprocalMoment(struct Problem *P); | 
|---|
| 51 |  | 
|---|
| 52 | #endif /*WANNIER_H_*/ | 
|---|