~marcodalessandro76/bigdft/1.8

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
=== modified file 'src/libpaw/libpaw.h'
--- src/libpaw/libpaw.h	2015-04-12 21:09:34 +0000
+++ src/libpaw/libpaw.h	2016-02-12 17:30:04 +0000
@@ -1,124 +1,71 @@
-/* libpaw.h */
-
-/*
- * This file is part of the libPAW library.
- * It has to be customized according to the host code.
- * For the time being there are 2 known host codes:
- * ABINIT (www.abinit.org) and BigDFT (bigdft.org).
- */
-
-/*
- * Copyright (C) 2014-2014 ABINIT Group (MT)
- * This file is part of the ABINIT software package. For license information,
- * please see the COPYING file in the top-level directory of the ABINIT source
- * distribution.
- */
-
-/* config.h should contain all preprocessing directives */
 #if defined HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-/* =============================
- * ========= ABINIT ============
- * ============================= */
 #if defined HAVE_LIBPAW_ABINIT
 
-/* ABINIT specific macros */
 #  include "abi_common.h"
 
-/* Constants and defs */
 #  define USE_DEFS use defs_basis
 
-/* MPI wrappers */
 #  define USE_MPI_WRAPPERS use m_xmpi
 
-/* Messages, errors */
-/* Other macros already defined in abi_common.h */
 #  define USE_MSG_HANDLING use m_errors, only : msg_hndl
 #  undef  HAVE_YAML
 
-/* Allocation/deallocation with memory profiling */
 #  define USE_MEMORY_PROFILING use m_profiling_abi
-/* Use this to allocate/deallocate basic-type arrays with sizes */
 #  define LIBPAW_ALLOCATE(ARR,SIZE) ABI_ALLOCATE(ARR,SIZE)
 #  define LIBPAW_DEALLOCATE(ARR) ABI_DEALLOCATE(ARR)
-/* Use this to allocate/deallocate basic-type pointers with sizes */
 #  define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ABI_ALLOCATE(ARR,SIZE)
 #  define LIBPAW_POINTER_DEALLOCATE(ARR) ABI_DEALLOCATE(ARR)
-/* Use this to allocate/deallocate user-defined-type arrays with sizes */
 #  define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) ABI_DATATYPE_ALLOCATE(ARR,SIZE)
 #  define LIBPAW_DATATYPE_DEALLOCATE(ARR) ABI_DATATYPE_DEALLOCATE(ARR)
-/* Use this to allocate basic-type arrays with explicit bounds */
 #  define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ABI_ALLOCATE(ARR,(BND1))
 #  define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ABI_ALLOCATE(ARR,(BND1,BND2))
 #  define BOUNDS(LBND,UBND) LBND : UBND 
 
-/* libXC support */
 #  if defined HAVE_DFT_LIBXC
 #    define LIBPAW_HAVE_LIBXC HAVE_DFT_LIBXC
 #  else
 #    undef LIBPAW_HAVE_LIBXC
 #  endif
 
-/* F2008 support */
 #  define LIBPAW_CONTIGUOUS ABI_CONTIGUOUS
 
-/* =============================
- * ========= BIGDFT ============
- * ============================= */
 #elif HAVE_LIBPAW_BIGDFT
 
-/* Constants and defs */
 #  define USE_DEFS use m_libpaw_defs
 
-/* MPI wrappers */
 #  define USE_MPI_WRAPPERS use m_libpaw_mpi
 
-/* Messages, errors */
 #  define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl
 #  define MSG_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS")
 #  define MSG_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS")
 #  define MSG_ERROR(msg)   call libpaw_msg_hndl(msg,"ERROR"  ,"PERS")
 #  define MSG_BUG(msg)     call libpaw_msg_hndl(msg,"BUG"    ,"PERS")
-/*BigDFT should accept long lines...*/
-/*#define MSG_ERROR(msg) call libpaw_msg_hndl(msg,"ERROR","PERS",__FILE__,__LINE__)*/
 #  define HAVE_YAML
 
-/* Allocation/deallocation with memory profiling */
 #  define USE_MEMORY_PROFILING use dynamic_memory
-/* Use this to allocate/deallocate basic-type arrays with sizes */
 #  define LIBPAW_ALLOCATE(ARR,SIZE) ARR=f_malloc(to_array SIZE ) 
 #  define LIBPAW_DEALLOCATE(ARR) call f_free(ARR)
-/* Use this to allocate/deallocate basic-type pointers with sizes */
 #  define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) ARR=f_malloc_ptr(to_array SIZE ) 
 #  define LIBPAW_POINTER_DEALLOCATE(ARR) call f_free_ptr(ARR)
-/* Use this to allocate/deallocate user-defined-type arrays or pointers with sizes */
 #  define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE)
 #  define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR)
-/* Use this to allocate user-defined-type arrays with explicit bounds */
 #  define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) ARR=f_malloc((/ BND1 /))
 #  define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) ARR=f_malloc((/ BND1 , BND2 /))
 #  define BOUNDS(LBND,UBND) LBND .to. UBND 
 
-/* libXC support */
 #  define LIBPAW_HAVE_LIBXC
 
-/* F2008 support */
 #  define LIBPAW_CONTIGUOUS 
 
-/* =============================
- * ========= DEFAULT ===========
- * ============================= */
 #else
 
-/* Constants and defs */
 #  define USE_DEFS use m_libpaw_defs
 
-/* MPI wrappers */
 #  define USE_MPI_WRAPPERS use m_libpaw_mpi
 
-/* Messages, errors */
 #  define USE_MSG_HANDLING use m_libpaw_tools, only : wrtout => libpaw_wrtout, libpaw_msg_hndl
 #  define MSG_COMMENT(msg) call libpaw_msg_hndl(msg,"COMMENT","PERS")
 #  define MSG_WARNING(msg) call libpaw_msg_hndl(msg,"WARNING","PERS")
@@ -126,29 +73,19 @@
 #  define MSG_BUG(msg)     call libpaw_msg_hndl(msg,"BUG"    ,"PERS")
 #  undef  HAVE_YAML
 
-/* Allocation/deallocation */
 #  define USE_MEMORY_PROFILING
-/* Use this to allocate/deallocate basic-type arrays with sizes */
 #  define LIBPAW_ALLOCATE(ARR,SIZE) allocate(ARR SIZE)
 #  define LIBPAW_DEALLOCATE(ARR) deallocate(ARR)
-/* Use this to allocate/deallocate basic-type pointers with sizes */
 #  define LIBPAW_POINTER_ALLOCATE(ARR,SIZE) allocate(ARR SIZE)
 #  define LIBPAW_POINTER_DEALLOCATE(ARR) deallocate(ARR)
-/* Use this to allocate/deallocate user-defined-type arrays with sizes */
 #  define LIBPAW_DATATYPE_ALLOCATE(ARR,SIZE) allocate(ARR SIZE)
 #  define LIBPAW_DATATYPE_DEALLOCATE(ARR) deallocate(ARR)
-/* Use this to allocate user-defined-type arrays with explicit bounds */
 #  define LIBPAW_BOUND1_ALLOCATE(ARR,BND1) allocate(ARR(BND1))
 #  define LIBPAW_BOUND2_ALLOCATE(ARR,BND1,BND2) allocate(ARR(BND1,BND2))
 #  define BOUNDS(LBND,UBND) LBND : UBND 
 
-/* libXC support */
 #  undef LIBPAW_HAVE_LIBXC
 
-/* F2008 support */
 #  define LIBPAW_CONTIGUOUS 
 
-/* =============================
- * =========== END =============
- * ============================= */
 #endif