source: pcp/src/wannier.h@ e936b3

non_adaptive_molecuilder
Last change on this file since e936b3 was 4f1369, checked in by Frederik Heber <heber@…>, 17 years ago

Wannier-file split up: ComputeMWLF() into smaller functions

This split up was done in the SVN repository and tested there and is working. It was impossible to piece it up into smaller chunks in order to maintain "bisectability", hence the last wannier.* from the SVN rep. was used. However, there was one bug in ParseWannierFile: There is the define "type" and there was a enum variable also of name type which caused errors on reading perturbed densities in the resulting shielding values. Removing the variable completely fixed this.
Note: With regards to the shielding values of c2h4 at 24Ht the resulting values are still absolutely the same as with revision initial_commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
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 */
22struct 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
36void PrintGSLMatrix(struct Problem *P, gsl_matrix *U, int Num, const char *msg);
37void ComputeMLWF(struct Problem *P);
38void WriteWannierFile(struct Problem *P, double spread, double old_spread, double **WannierCentre, double *WannierSpread);
39int ParseWannierFile(struct Problem *P);
40void SerialDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData);
41void ParallelDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData);
42double CalculateSpread(struct Problem *P, int i);
43gsl_complex convertComplex (fftw_complex a);
44void InitDiagonalization(struct Problem *P, struct DiagonalizationData *DiagData, int Num, int NumMatrices, int extra);
45void FreeDiagonalization(struct DiagonalizationData *DiagData);
46void OrthogonalizePsis(struct Problem *P);
47void StrongOrthogonalizePsis(struct Problem *P);
48void Diagonalize(struct Problem *P, struct DiagonalizationData *DiagData);
49
50void CalculateSecondOrderReciprocalMoment(struct Problem *P);
51
52#endif /*WANNIER_H_*/
Note: See TracBrowser for help on using the repository browser.