#ifndef WANNIER_H_ #define WANNIER_H_ /** \file wannier.h * Header file for \ref wannier.c * * Contains declarations of functions which reside in \ref wannier.c * Project: ParallelCarParrinello \author Frederik Heber \date 2006 File: wannier.h $Id: wannier.h,v 1.3 2007-10-08 15:43:29 heber Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include /** Structure contains all variables needed for diagonalization of a matrix with * SerialDiagonalization() or ParallelDiagonalization() */ struct DiagonalizationData { int Num; //!< Number of rows/columns int AllocNum; //!< even number of rows/columns int NumMatrices;//!< number of matrices to be simultaneously "actively" diagonalized int extra; //!< number of additional matrices that are also, yet "passively" diagonalized (not considered in rotation angle evaluation) gsl_matrix *U; //!< transformation matrix gsl_matrix **A; //!< matrix to be diagonlized int *top; //!< merry-go-round top row of indices int *bot; //!< merry-go-round bottom row of indices MPI_Comm *comm; //!< MPI communicator for ParallelDiagonalization() int ProcRank; //!< Rank of this process, used in ParallelDiagonalization() int ProcNum; //!< Number of process in communicator, used in ParallelDiagonalization() }; void PrintGSLMatrix(struct Problem *P, gsl_matrix *U, int Num, const char *msg); void ComputeMLWF(struct Problem *P); void WriteWannierFile(struct Problem *P, double spread, double old_spread, double **WannierCentre, double *WannierSpread); int ParseWannierFile(struct Problem *P); void ChangeWannierCentres(struct Problem *P); void SerialDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData); void ParallelDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData); double CalculateSpread(struct Problem *P, int i); gsl_complex convertComplex (fftw_complex a); void InitDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData, int Num, int NumMatrices, int extra); void FreeDiagonalization(struct DiagonalizationData *DiagData); void OrthogonalizePsis(struct Problem *P); void StrongOrthogonalizePsis(struct Problem *P); void Diagonalize(struct Problem *P, struct DiagonalizationData *DiagData); void CalculateSecondOrderReciprocalMoment(struct Problem *P); #endif /*WANNIER_H_*/