[a0bcf1] | 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
|
---|
[4f1369] | 14 | $Id: wannier.h,v 1.3 2007-10-08 15:43:29 heber Exp $
|
---|
[a0bcf1] | 15 | */
|
---|
| 16 |
|
---|
[79290f] | 17 | #ifdef HAVE_CONFIG_H
|
---|
| 18 | #include <config.h>
|
---|
| 19 | #endif
|
---|
| 20 |
|
---|
[a0bcf1] | 21 | #include <gsl/gsl_complex.h>
|
---|
| 22 |
|
---|
[4f1369] | 23 | /** Structure contains all variables needed for diagonalization of a matrix with
|
---|
| 24 | * SerialDiagonalization() or ParallelDiagonalization()
|
---|
| 25 | */
|
---|
| 26 | struct DiagonalizationData {
|
---|
| 27 | int Num; //!< Number of rows/columns
|
---|
| 28 | int AllocNum; //!< even number of rows/columns
|
---|
| 29 | int NumMatrices;//!< number of matrices to be simultaneously "actively" diagonalized
|
---|
| 30 | int extra; //!< number of additional matrices that are also, yet "passively" diagonalized (not considered in rotation angle evaluation)
|
---|
| 31 | gsl_matrix *U; //!< transformation matrix
|
---|
| 32 | gsl_matrix **A; //!< matrix to be diagonlized
|
---|
| 33 | int *top; //!< merry-go-round top row of indices
|
---|
| 34 | int *bot; //!< merry-go-round bottom row of indices
|
---|
| 35 | MPI_Comm *comm; //!< MPI communicator for ParallelDiagonalization()
|
---|
| 36 | int ProcRank; //!< Rank of this process, used in ParallelDiagonalization()
|
---|
| 37 | int ProcNum; //!< Number of process in communicator, used in ParallelDiagonalization()
|
---|
| 38 | };
|
---|
| 39 |
|
---|
[08e223] | 40 |
|
---|
[4f1369] | 41 | void PrintGSLMatrix(struct Problem *P, gsl_matrix *U, int Num, const char *msg);
|
---|
[a0bcf1] | 42 | void ComputeMLWF(struct Problem *P);
|
---|
[4f1369] | 43 | void WriteWannierFile(struct Problem *P, double spread, double old_spread, double **WannierCentre, double *WannierSpread);
|
---|
[a0bcf1] | 44 | int ParseWannierFile(struct Problem *P);
|
---|
[08e223] | 45 | void ChangeWannierCentres(struct Problem *P);
|
---|
[4f1369] | 46 | void SerialDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData);
|
---|
| 47 | void ParallelDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData);
|
---|
[a0bcf1] | 48 | double CalculateSpread(struct Problem *P, int i);
|
---|
| 49 | gsl_complex convertComplex (fftw_complex a);
|
---|
[4f1369] | 50 | void InitDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData, int Num, int NumMatrices, int extra);
|
---|
| 51 | void FreeDiagonalization(struct DiagonalizationData *DiagData);
|
---|
| 52 | void OrthogonalizePsis(struct Problem *P);
|
---|
| 53 | void StrongOrthogonalizePsis(struct Problem *P);
|
---|
| 54 | void Diagonalize(struct Problem *P, struct DiagonalizationData *DiagData);
|
---|
| 55 |
|
---|
| 56 | void CalculateSecondOrderReciprocalMoment(struct Problem *P);
|
---|
[a0bcf1] | 57 |
|
---|
| 58 | #endif /*WANNIER_H_*/
|
---|